Lewati ke konten
Semua model

DeepSeek Chat

DeepSeek Chat

Model teks berbiaya rendah dengan kemampuan penalaran dan pemanggilan fungsi yang solid.

Spesifikasi

Provider
DeepSeek
Jenis model
Chat
Context window
128.000 token
Output maksimum
8.192 token
Input yang didukung
Teks
Output
Teks
Kemampuan
  • Text
  • Tool calling
  • Streaming
  • JSON mode

Harga

Input

per 1 juta token

Rp5.346
Output

per 1 juta token

Rp21.780
Input tersimpan (cached)

per 1 juta token

Rp1.386

Harga dalam Rupiah. Tagihan dihitung dari jumlah token yang dilaporkan untuk setiap request dan dipotong dari saldo Anda.

Contoh API

Chat Completions

curl "https://www.astranesia.com/v1/chat/completions" \
  -H "Authorization: Bearer $AI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-chat",
    "messages": [
      { "role": "system", "content": "Jawab dengan singkat dalam Bahasa Indonesia." },
      { "role": "user", "content": "Halo!" }
    ]
  }'

Streaming

curl -N "https://www.astranesia.com/v1/chat/completions" \
  -H "Authorization: Bearer $AI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-chat",
    "stream": true,
    "stream_options": { "include_usage": true },
    "messages": [{ "role": "user", "content": "Ceritakan tentang Nusantara." }]
  }'

Tool calling

curl "https://www.astranesia.com/v1/chat/completions" \
  -H "Authorization: Bearer $AI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek/deepseek-chat",
    "messages": [{ "role": "user", "content": "Cuaca di Jakarta?" }],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "get_weather",
          "description": "Ambil cuaca terkini untuk sebuah kota.",
          "parameters": {
            "type": "object",
            "properties": { "city": { "type": "string" } },
            "required": ["city"]
          }
        }
      }
    ]
  }'

Batasan request

  • Context window maksimum 128.000 token (input dan output).
  • Output maksimum 8.192 token. Nilai max_tokens di atas batas ini ditolak.
  • Jika max_tokens tidak diisi, batas output 4.096 token diterapkan.
  • Parameter n hanya mendukung nilai 1.
  • Streaming SSE didukung dengan stream: true.
  • Ukuran request maksimum 3,8 MB.
  • Batas 60 request per menit dan 5 request bersamaan untuk setiap akun.
  • Saldo harus mencukupi perkiraan biaya maksimum request sebelum request diproses.