Docs / text / GPT-5.4 Mini
GPT-5.4 Mini online
GPT-5.4 Mini — paling ekonomis untuk draf, ringkasan, dan chat ringan.
Rp Rp3.713 / 1M token input
Rp12.375 −70%
⏱ ±1–20 detik perkiraan waktu
gpt/5.4-mini model id
chatstreaming
1 · Create a chat completion
Endpoint OpenAI-compatible — SDK OpenAI langsung jalan dengan baseURL GetRun. Input Rp3.713 · cached input Rp371 · output Rp22.275 per 1M token; saldo direservasi lalu biaya final dihitung dari usage aktual (token cache lebih murah). Permintaan gagal tidak ditagih.
curl -X POST https://run.getcore.id/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt/5.4-mini",
"messages": [
{
"role": "user",
"content": "Halo!"
}
],
"stream": true
}'// Kompatibel dengan SDK OpenAI: cukup ganti baseURL + apiKey.
import OpenAI from 'openai';
const client = new OpenAI({ baseURL: 'https://run.getcore.id/v1', apiKey: 'YOUR_API_KEY' });
const stream = await client.chat.completions.create({
model: 'gpt/5.4-mini',
messages: [{ role: 'user', content: 'Halo!' }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? '');
}from openai import OpenAI
client = OpenAI(base_url="https://run.getcore.id/v1", api_key="YOUR_API_KEY")
stream = client.chat.completions.create(
model="gpt/5.4-mini",
messages=[{"role": "user", "content": "Halo!"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")Input parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
stream |
boolean | No | Streaming SSE token demi token. | true |
messages |
array | Yes | Riwayat percakapan gaya OpenAI: array {role, content}. | — |
max_tokens |
integer | No | Batas token output. (min 1, max 16384) | 4096 |
temperature |
number | No | Kreativitas sampling (0 = deterministik). (min 0, max 2) | — |
2 · Streaming & harga
Dengan stream: true respons berupa SSE (chunk delta gaya OpenAI). Sebelum [DONE], GetRun menambahkan satu event berisi biaya aktual:
data: {"choices":[{"delta":{"content":"Ha"}}], ...}
data: {"choices":[{"delta":{"content":"lo!"}}], ...}
data: {"getrun":{"task_id":"task_…","price_idr":101,"currency":"IDR"}}
data: [DONE]
Tanpa streaming, respons JSON penuh menyertakan usage dan blok getrun yang sama. Setiap percakapan tercatat sebagai task di Usage.
Status values
| Status | Keterangan |
|---|---|
queued | Tugas sedang diantrikan. |
processing | Sedang diproses. |
succeeded | Berhasil. |
failed | Gagal — lihat error detail, tidak ditagih. |
text/plain, dilayani dari CDN kami dan berlaku 7 hari — salin ke penyimpananmu sendiri untuk jangka panjang.Best practices
Bila generation gagal, task berstatus failed dengan error.code ternormalisasi (mis. moderation_blocked, upstream_error) dan price.final = 0 — saldo dikembalikan otomatis. Daftar lengkap kode error ada di Error handling. Selalu kirim Idempotency-Key unik per tugas agar retry aman.
Coba tanpa kode: jalankan model ini langsung dari Playground atau lihat di API Market.
