Semua model
Gemini 2.5 Flash
Google Chat
Model cepat dengan konteks sangat panjang dan input multimodal untuk beban kerja volume tinggi.
Spesifikasi
- Provider
- Jenis model
- Chat
- Context window
- 1.048.576 token
- Output maksimum
- 65.536 token
- Input yang didukung
- Teks, Gambar
- Output
- Teks
- Kemampuan
- Text
- Vision
- Tool calling
- Streaming
- JSON mode
Harga
- Input
- Rp5.940
- Output
- Rp49.500
- Input tersimpan (cached)
- Rp1.485
per 1 juta token
per 1 juta token
per 1 juta token
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": "google/gemini-2.5-flash",
"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": "google/gemini-2.5-flash",
"stream": true,
"stream_options": { "include_usage": true },
"messages": [{ "role": "user", "content": "Ceritakan tentang Nusantara." }]
}'Input gambar
curl "https://www.astranesia.com/v1/chat/completions" \
-H "Authorization: Bearer $AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "Apa yang ada pada gambar ini?" },
{ "type": "image_url", "image_url": { "url": "https://example.com/foto.jpg" } }
]
}
]
}'Tool calling
curl "https://www.astranesia.com/v1/chat/completions" \
-H "Authorization: Bearer $AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash",
"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 1.048.576 token (input dan output).
- Output maksimum 65.536 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.
- Gambar dikirim lewat URL https:// atau data URL base64 (png, jpeg, gif, webp).
- 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.