Dokumentasi
Dari daftar sampai request pertama dalam beberapa menit.
- 1Buat akunDaftar gratis, lalu buka dashboard.
- 2Isi saldoTop up Pay as you go (minimal Rp5.000) atau beli paket token. Pembayaran lewat QRIS dan masuk otomatis.
- 3Buat API keyDi menu API key, pilih jenis key: Token (sk-tkn-) atau Pay as you go (sk-pyg-). Salin key saat itu juga karena hanya ditampilkan sekali.
- 4Kirim requestPakai base URL di bawah dengan SDK atau alat apa pun yang mendukung format OpenAI, Anthropic, atau Gemini.
Base URL
| Format | Base URL | Header key |
|---|---|---|
| OpenAI | https://api.tokenbyte.biz.id/v1 | Authorization: Bearer <key> |
| Anthropic | https://api.tokenbyte.biz.id | x-api-key: <key> |
| Gemini | https://api.tokenbyte.biz.id | x-goog-api-key: <key> |
Ketiga header diterima di semua endpoint. Jadi kalau alatmu hanya bisa mengirim Authorization: Bearer, itu tetap berfungsi untuk format Anthropic dan Gemini.
Request pertama
curl
curl https://api.tokenbyte.biz.id/v1/chat/completions \
-H "Authorization: Bearer sk-tkn-KEY_KAMU" \
-H "Content-Type: application/json" \
-d '{
"model": "smart-auto",
"messages": [{"role": "user", "content": "Halo!"}]
}'Belum tahu mau pakai model apa? Mulai dari smart-auto. Gateway memilihkan model yang paling hemat untuk tiap tugas.
Cek saldo dari API
curl
curl https://api.tokenbyte.biz.id/v1/account -H "Authorization: Bearer sk-tkn-KEY_KAMU"