Dokumentasi
API AXI AI
API gateway berbasis kredit dengan antarmuka OpenAI-compatible. Cukup ganti base_url dan api_key; tidak perlu mengubah kode yang sudah ada.
Pengantar
AXI AI adalah API gateway yang menyediakan akses ke model AI terkurasi melalui satu endpoint yang kompatibel dengan format OpenAI. Setiap request dikonsumsi dalam satuan kredit berdasarkan jumlah token yang diproses, tanpa biaya langganan tetap atau komitmen minimum.
Tersedia tiga tier model dengan karakteristik berbeda pada kompresi konteks dan prioritas antrean. Semua tier menggunakan model dasar yang sama.
Base URL: https://api.axi.ai.id/v1
Autentikasi
Setiap request harus menyertakan API key dalam header Authorization dengan skema Bearer. API key dibuat di Console AXI AI setelah akun Anda aktif.
POST /v1/chat/completionsHost: api.axi.ai.idAuthorization: Bearer axi_live_xxxxxxxxxxxxContent-Type: application/jsonPenting
Model & Tier
Pilih tier berdasarkan kebutuhan kompresi konteks dan anggaran kredit.
| Model | Kompresi | Input | Output | Cache |
|---|---|---|---|---|
axi-lite | Agresif | 3,0 cr/1k | 6,0 cr/1k | 0,6 cr/1k |
axi-proPopuler | Konservatif | 4,5 cr/1k | 9,0 cr/1k | 0,9 cr/1k |
axi-premium | Tidak ada | 6,0 cr/1k | 12,0 cr/1k | 1,2 cr/1k |
cr = kredit · 1k = per 1.000 token · Cache = token cache hit (read)
Model Langsung
Selain tier AXI, tersedia model pihak ketiga yang dijual apa adanya, tanpa kompresi konteks. Daftar dan tarif di bawah diambil langsung dari katalog sehingga selalu menampilkan tarif yang berlaku sekarang.
Hanya dengan kredit berbayar
GLM-5.3 Flash
glm-5.3-flash
Cepat dan hemat; mendukung gambar.
- Konteks
- 1 jt
- Output maks.
- 128 rb
- Tools
- Reasoning
- Gambar
- Streaming
- Input
- 0,72 cr/1kperkiraan Rp 9
- Output
- 2,4 cr/1kperkiraan Rp 30
- Cache hit
- 0,144 cr/1kperkiraan Rp 1,8
GLM-5.3
glm-5.3
Model unggulan GLM, konteks 1 juta token.
- Konteks
- 1 jt
- Output maks.
- 128 rb
- Tools
- Reasoning
- Streaming
- Input
- 6,72 cr/1kperkiraan Rp 84
- Output
- 21,12 cr/1kperkiraan Rp 264
- Cache hit
- 1,248 cr/1kperkiraan Rp 15,6
GLM-5.2
glm-5.2
Generasi GLM sebelumnya, thinking dapat diatur.
- Konteks
- 1 jt
- Output maks.
- 128 rb
- Tools
- Reasoning
- Streaming
- Input
- 6,72 cr/1kperkiraan Rp 84
- Output
- 21,12 cr/1kperkiraan Rp 264
- Cache hit
- 1,248 cr/1kperkiraan Rp 15,6
MiniMax M3
minimax-m3
Konteks 1 juta token; prompt di atas 512 ribu token ditagih 2x.
- Konteks
- 1 jt
- Output maks.
- 65,5 rb
- Tools
- Reasoning
- Streaming
- Input
- 1,44 cr/1kperkiraan Rp 18
- Output
- 5,76 cr/1kperkiraan Rp 72
- Cache hit
- 0,288 cr/1kperkiraan Rp 3,6
Prompt di atas 512 rb token ditagih 2x.
Kimi K3
kimi-k3
Model penalaran Kimi, mendukung gambar dan video.
- Konteks
- 1 jt
- Output maks.
- 131,1 rb
- Tools
- Reasoning
- Gambar
- Streaming
- Input
- 14,4 cr/1kperkiraan Rp 180
- Output
- 72,0 cr/1kperkiraan Rp 900
- Cache hit
- 1,44 cr/1kperkiraan Rp 18
Kimi K2.7 Code
kimi-k2.7-code
Kimi untuk coding dan agen.
- Konteks
- 256 rb
- Output maks.
- 32,8 rb
- Tools
- Reasoning
- Gambar
- Streaming
- Input
- 4,56 cr/1kperkiraan Rp 57
- Output
- 19,2 cr/1kperkiraan Rp 240
- Cache hit
- 0,912 cr/1kperkiraan Rp 11,4
Kimi K2.7 Code HighSpeed
kimi-k2.7-code-highspeed
Varian Kimi K2.7 Code dengan kecepatan tinggi.
- Konteks
- 256 rb
- Output maks.
- 32,8 rb
- Tools
- Reasoning
- Gambar
- Streaming
- Input
- 9,12 cr/1kperkiraan Rp 114
- Output
- 38,4 cr/1kperkiraan Rp 480
- Cache hit
- 1,824 cr/1kperkiraan Rp 22,8
GLM-5.3 FlashX
glm-5.3-flashx
GLM-5.3 versi lebih kuat dari Flash; mendukung gambar.
- Konteks
- 1 jt
- Output maks.
- 128 rb
- Tools
- Reasoning
- Gambar
- Streaming
- Input
- 1,776 cr/1kperkiraan Rp 22,2
- Output
- 6,0 cr/1kperkiraan Rp 75
- Cache hit
- 0,36 cr/1kperkiraan Rp 4,5
MiniMax M2.7
minimax-m2.7
MiniMax generasi sebelumnya, konteks 200 ribu token.
- Konteks
- 200 rb
- Output maks.
- 128 rb
- Tools
- Reasoning
- Streaming
- Input
- 1,44 cr/1kperkiraan Rp 18
- Output
- 5,76 cr/1kperkiraan Rp 72
- Cache hit
- 0,288 cr/1kperkiraan Rp 3,6
DeepSeek V4.1 Flash
deepseek-v4.1-flash
DeepSeek V4.1 Flash; tarif dihitung dengan harga jam sibuk.
- Konteks
- 1 jt
- Output maks.
- 384 rb
- Tools
- Reasoning
- Streaming
- Input
- 1,44 cr/1kperkiraan Rp 18
- Output
- 5,76 cr/1kperkiraan Rp 72
- Cache hit
- 0,029 cr/1kperkiraan Rp 0,36
MiMo V2.6 Flash
mimo-v2.6-flash
MiMo Flash dari Xiaomi, konteks 1 juta token; mendukung gambar.
- Konteks
- 1 jt
- Output maks.
- 128 rb
- Tools
- Reasoning
- Gambar
- Streaming
- Input
- 0,672 cr/1kperkiraan Rp 8,4
- Output
- 1,344 cr/1kperkiraan Rp 16,8
- Cache hit
- 0,014 cr/1kperkiraan Rp 0,18
MiMo V2.6 Pro
mimo-v2.6-pro
MiMo Pro dari Xiaomi, penalaran dan multimodal.
- Konteks
- 1 jt
- Output maks.
- 128 rb
- Tools
- Reasoning
- Gambar
- Streaming
- Input
- 2,088 cr/1kperkiraan Rp 26,1
- Output
- 4,176 cr/1kperkiraan Rp 52,2
- Cache hit
- 0,018 cr/1kperkiraan Rp 0,23
Qwen3.7 Flash
qwen3.7-flash
Qwen3.7 Flash dari Alibaba; cepat dan hemat, konteks 1 juta token.
- Konteks
- 1 jt
- Output maks.
- 65,5 rb
- Tools
- Reasoning
- Streaming
- Input
- 0,144 cr/1kperkiraan Rp 1,8
- Output
- 0,624 cr/1kperkiraan Rp 7,8
- Cache hit
- 0,029 cr/1kperkiraan Rp 0,36
Prompt di atas 32 rb token ditagih 3,34x.
Qwen3.7 Plus
qwen3.7-plus
Qwen3.7 Plus dari Alibaba; seimbang, mendukung gambar; prompt di atas 256 ribu token ditagih 3x.
- Konteks
- 1 jt
- Output maks.
- 65,5 rb
- Tools
- Reasoning
- Gambar
- Streaming
- Input
- 1,92 cr/1kperkiraan Rp 24
- Output
- 7,68 cr/1kperkiraan Rp 96
- Cache hit
- 0,384 cr/1kperkiraan Rp 4,8
Prompt di atas 256 rb token ditagih 3x.
Qwen3.7 Max
qwen3.7-max
Qwen3.7 Max dari Alibaba; model terkuat generasi 3.7, konteks 1 juta token.
- Konteks
- 1 jt
- Output maks.
- 65,5 rb
- Tools
- Reasoning
- Streaming
- Input
- 12,0 cr/1kperkiraan Rp 150
- Output
- 36,0 cr/1kperkiraan Rp 450
- Cache hit
- 2,4 cr/1kperkiraan Rp 30
Qwen3.8 Flash
qwen3.8-flash
Qwen3.8 Flash dari Alibaba; cepat dan hemat, konteks 1 juta token.
- Konteks
- 1 jt
- Output maks.
- 65,5 rb
- Tools
- Reasoning
- Streaming
- Input
- 0,72 cr/1kperkiraan Rp 9
- Output
- 2,256 cr/1kperkiraan Rp 28,2
- Cache hit
- 0,72 cr/1kperkiraan Rp 9
Qwen3.8 Max
qwen3.8-max
Qwen3.8 Max dari Alibaba; model terkuat, mendukung gambar, konteks 1 juta token.
- Konteks
- 1 jt
- Output maks.
- 65,5 rb
- Tools
- Reasoning
- Gambar
- Streaming
- Input
- 9,6 cr/1kperkiraan Rp 120
- Output
- 28,8 cr/1kperkiraan Rp 360
- Cache hit
- 9,6 cr/1kperkiraan Rp 120
cr = kredit · 1k = per 1.000 token · Cache hit = token yang dibaca dari cache · Rupiah adalah perkiraan (kredit × nilai kredit) dan dapat berubah mengikuti harga kredit.
Memakai model langsung
Pakai id model sebagai nilai model pada /v1/chat/completions. Endpoint, autentikasi, dan streaming sama persis dengan tier AXI. Lihat Ketentuan Saldo untuk aturan kredit berbayar.
curl https://api.axi.ai.id/v1/chat/completions \ -H "Authorization: Bearer $AXI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "glm-5.3-flash", "messages": [{"role": "user", "content": "Hello!"}], "max_tokens": 256 }'Model Limits
Batas kapasitas model yang berlaku untuk semua tier AXI AI.
- Maximum Input Tokens
- 1.000.000 (1M)
- Maximum Output Tokens
- 384.000 (384k)
- Context Window
- 1.000.000 (1M)
- Maximum TPM
- 1.000.000 (1000k)
- Maximum QPM
- 60
TPM = Tokens Per Minute · QPM = Queries Per Minute · Limit berlaku per API key.
Endpoint
Endpoint utama untuk chat completion. Endpoint lain tersedia di bagian Embeddings dan Models.
https://api.axi.ai.id/v1/chat/completionsRequest body
{ "model": "axi-pro", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Jelaskan apa itu machine learning." } ], "max_tokens": 512, "temperature": 0.7}Response
{ "id": "chatcmpl-axi-xxxxxxxx", "object": "chat.completion", "created": 1750000000, "model": "axi-pro", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Machine learning adalah ..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 28, "completion_tokens": 120, "total_tokens": 148, "credits_charged": "0.42", "credits_remaining": "4832.58" }}credits_chargedKredit yang dikurangi untuk request ini (desimal).
credits_remainingSisa saldo kredit setelah request.
Streaming
Tambahkan "stream": true pada request body untuk menerima respons bertahap sebagai Server-Sent Events (SSE) dengan format yang sama seperti OpenAI. SDK OpenAI membaca aliran ini langsung.
curl -N https://api.axi.ai.id/v1/chat/completions \ -H "Authorization: Bearer $AXI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "axi-pro", "messages": [{"role": "user", "content": "Hello!"}], "stream": true }'Embeddings
Ubah teks menjadi vektor embedding dengan format request dan respons OpenAI Embeddings.
https://api.axi.ai.id/v1/embeddingsModel yang tersedia untuk embeddings dapat dilihat lewat GET /v1/models. Ganti ID_MODEL_EMBEDDING pada contoh berikut dengan id dari daftar tersebut.
curl https://api.axi.ai.id/v1/embeddings \ -H "Authorization: Bearer $AXI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "ID_MODEL_EMBEDDING", "input": "Teks yang ingin diubah menjadi vektor" }'Models
Ambil daftar model yang dapat Anda pakai dengan API key Anda. Respons mengikuti format daftar model OpenAI.
https://api.axi.ai.id/v1/modelscurl https://api.axi.ai.id/v1/models \ -H "Authorization: Bearer $AXI_API_KEY"Error
Saat request gagal, status HTTP menunjukkan jenis masalahnya dan isi respons mengikuti format error OpenAI; pesan yang bisa dibaca manusia ada pada error.message.
| Status | Arti | Tindakan |
|---|---|---|
401 | API key tidak valid atau sudah dicabut. | Periksa header Authorization. Buat key baru di Console bila key lama dicabut. |
402 | Saldo kredit tidak cukup (Payment Required). | Top-up kredit, lalu ulangi request. |
429 | Request melewati batas QPM (60) atau TPM (1.000.000) per API key. | Kurangi laju request lalu coba lagi beberapa saat kemudian. |
5xx | Terjadi gangguan di sisi server. | Coba lagi beberapa saat kemudian. |
Contoh Penggunaan
cURL
curl https://api.axi.ai.id/v1/chat/completions \ -H "Authorization: Bearer $AXI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "axi-pro", "messages": [{"role": "user", "content": "Hello!"}], "max_tokens": 256 }'Python (openai SDK)
from openai import OpenAI client = OpenAI( api_key="axi_live_xxxxxxxxxxxx", base_url="https://api.axi.ai.id/v1",) response = client.chat.completions.create( model="axi-pro", messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Jelaskan konsep REST API."}, ], max_tokens=512,) print(response.choices[0].message.content)JavaScript / TypeScript
import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.AXI_API_KEY, baseURL: "https://api.axi.ai.id/v1",}); const response = await client.chat.completions.create({ model: "axi-pro", messages: [ { role: "system", content: "You are a helpful assistant." }, { role: "user", content: "Jelaskan konsep REST API." }, ], max_tokens: 512,}); console.log(response.choices[0].message.content);Integrasi Tool
AXI AI kompatibel dengan semua tool yang mendukung OpenAI API. Pola konfigurasi umum: ganti base_url ke https://api.axi.ai.id/v1, isi api_key dengan API key AXI AI, dan set model ke axi-lite, axi-pro, atau axi-premium.
Codex CLI
npm install -g @openai/codex
Via file konfigurasi ~/.codex/config.yaml:
model: axi-proprovider: name: openai baseURL: https://api.axi.ai.id/v1 apiKey: axi_live_xxxxxxxxxxxxAtau langsung via environment variable:
export OPENAI_API_KEY="axi_live_xxxxxxxxxxxx"export OPENAI_BASE_URL="https://api.axi.ai.id/v1" codex "refactor this function to use async/await"OpenCode
npm install -g opencode-ai
Tambahkan provider di ~/.config/opencode/config.json atau opencode.json di root project:
{ "model": "openai/axi-pro", "providers": { "openai": { "name": "AXI AI", "apiKey": "axi_live_xxxxxxxxxxxx", "baseURL": "https://api.axi.ai.id/v1" } }}Aider
pip install aider-chat
Via flag saat menjalankan:
aider \ --model openai/axi-pro \ --openai-api-key $AXI_API_KEY \ --openai-api-base https://api.axi.ai.id/v1Atau simpan di .aider.conf.yml supaya tidak perlu diketik ulang:
model: openai/axi-proopenai-api-key: axi_live_xxxxxxxxxxxxopenai-api-base: https://api.axi.ai.id/v1Hermes, QwenCode, OpenClaw, dan tool lainnya
Semua tool yang mendukung endpoint OpenAI-compatible dapat dikonfigurasi dengan pola yang sama. Sebagian besar membaca dari environment variable standar:
export OPENAI_API_KEY="axi_live_xxxxxxxxxxxx"export OPENAI_BASE_URL="https://api.axi.ai.id/v1"export OPENAI_MODEL="axi-pro" # jika tool mendukungUntuk tool yang menggunakan file konfigurasi sendiri, cari opsi base_url, api_base, atau endpoint dan isi dengan URL di atas:
| Tool | Config key | Nilai |
|---|---|---|
| Hermes CLI | base_url / openai_base | https://api.axi.ai.id/v1 |
| QwenCode | OPENAI_BASE_URL | https://api.axi.ai.id/v1 |
| OpenClaw | provider.baseURL | https://api.axi.ai.id/v1 |
| Continue | apiBase (config.json) | https://api.axi.ai.id/v1 |
| Cline | openAiBaseUrl | https://api.axi.ai.id/v1 |
| LM Studio | Custom Endpoint URL | https://api.axi.ai.id/v1 |
Sistem Kredit
Kredit dikonsumsi per token yang diproses. Tidak ada biaya tetap; Anda hanya membayar yang dipakai.
Input token
Dihitung dari semua pesan yang dikirim (termasuk system prompt dan riwayat chat).
Output token
Dihitung dari teks yang dihasilkan model dalam satu response.
Cache hit
Token yang diambil dari cache provider, dengan tarif lebih hemat dari input reguler.
- Saldo kredit tidak kedaluwarsa; bebas digunakan kapan saja.
- Jika saldo tidak cukup, request akan ditolak dengan HTTP
402 Payment Required. - Top-up kredit tersedia di halaman paket. Ketentuan lengkap ada di Ketentuan Saldo.