> ## Documentation Index
> Fetch the complete documentation index at: https://docs.csku.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Mulai Cepat

> Mulai menggunakan CSKU AI API dalam waktu kurang dari 5 menit

## Memulai

Ikuti langkah-langkah berikut untuk melakukan panggilan API pertama Anda ke CSKU AI.

### Langkah 1: Dapatkan Secret Key Anda

<Steps>
  <Step title="Login ke Dashboard">
    Buka [app.csku.ai/settings/secret-key-settings](https://app.csku.ai/settings/secret-key-settings)
  </Step>

  <Step title="Salin Secret Key">
    Salin Secret Key Anda
  </Step>

  <Step title="Simpan dengan Aman">
    Simpan Secret Key Anda di tempat yang aman (jangan expose di client-side code)
  </Step>
</Steps>

### Langkah 2: Buat Permintaan Pertama Anda

Gunakan header Authorization dengan Bearer token:

```http theme={null}
Authorization: Bearer {secret_key}
```

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api.csku.ai/v1/message" \
    -H "Authorization: Bearer sk_xxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -d '{
      "conversation_id": "conv_123456",
      "text": "Halo, saya butuh bantuan"
    }'
  ```

  ```javascript Node.js theme={null}
  const SECRET_KEY = 'sk_xxxxxxxxxxxxx'; // Dari dashboard

  const response = await fetch('https://api.csku.ai/v1/message', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${SECRET_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      conversation_id: 'conv_123456',
      text: 'Halo, saya butuh bantuan'
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  SECRET_KEY = 'sk_xxxxxxxxxxxxx'  # Dari dashboard

  response = requests.post(
      'https://api.csku.ai/v1/message',
      headers={
          'Authorization': f'Bearer {SECRET_KEY}',
          'Content-Type': 'application/json'
      },
      json={
          'conversation_id': 'conv_123456',
          'text': 'Halo, saya butuh bantuan'
      }
  )

  print(response.json())
  ```

  ```php PHP theme={null}
  <?php
  $SECRET_KEY = 'sk_xxxxxxxxxxxxx'; // Dari dashboard

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'https://api.csku.ai/v1/message');
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Bearer ' . $SECRET_KEY,
      'Content-Type: application/json'
  ]);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
      'conversation_id' => 'conv_123456',
      'text' => 'Halo, saya butuh bantuan'
  ]));
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

  $response = curl_exec($ch);
  curl_close($ch);

  echo $response;
  ```
</CodeGroup>

### Langkah 3: Verifikasi Respons

Anda akan menerima respons sukses:

```json theme={null}
{
  "status": 1,
  "message": "Sukses"
}
```

## Mengirim Pesan dengan Media

Anda juga dapat mengirim pesan dengan lampiran media:

```bash theme={null}
curl -X POST "https://api.csku.ai/v1/message" \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "conversation_id": "conv_123456",
    "text": "Lihat produk ini",
    "media": {
      "url": "https://example.com/product.jpg",
      "type": "image",
      "mimetype": "image/jpeg",
      "name": "product.jpg",
      "caption": "Gambar produk"
    }
  }'
```

## Tipe Media yang Didukung

| Tipe       | Deskripsi    | Contoh MIME Type                    |
| ---------- | ------------ | ----------------------------------- |
| `image`    | File gambar  | image/jpeg, image/png, image/gif    |
| `video`    | File video   | video/mp4, video/avi                |
| `audio`    | File audio   | audio/mp3, audio/wav                |
| `document` | File dokumen | application/pdf, application/msword |

## Langkah Selanjutnya

<CardGroup cols={2}>
  <Card title="Autentikasi" icon="lock" href="/authentication">
    Pelajari lebih lanjut tentang autentikasi
  </Card>

  <Card title="Referensi API" icon="code" href="/api-reference/introduction">
    Jelajahi semua endpoint
  </Card>
</CardGroup>
