Quickstart
Three steps from zero to your first request. You do not need an overseas credit card, and you do not need to wait for approval.
1. Create a key
Section titled “1. Create a key”Sign in to the dashboard, open API keys, then click Create key. The key starts with kn- and is shown only once, so copy it and store it right away. One key works for all models, all providers, and both APIs (OpenAI and Anthropic).
2. Add balance
Section titled “2. Add balance”Open Balance, then top up with QRIS from Rp 1.000. The balance is added once payment is complete. Billing is counted per token in Rupiah, so Rp 1.000 is enough to try cheap models thousands of times.
Skip this step if you only want to try: use a free model. Add the suffix
:freeto the model id (for examplestep-3-7-flash:free), and the request will not deduct balance, with a per-minute request limit.
3. Call
Section titled “3. Call”One curl command returns an answer directly. Replace kn-... with your key.
curl https://kenari.id/v1/chat/completions \ -H "Authorization: Bearer kn-..." \ -H "Content-Type: application/json" \ -d '{ "model": "step-3-7-flash:free", "messages": [{"role": "user", "content": "Hello!"}] }'Verify the connection from the response: if the JSON body contains choices[0].message.content with an answer, the connection works. 401 invalid api key means kn-... is wrong or was copied with a truncation. model_not_found means the id was typed wrong. Use exactly step-3-7-flash:free or pick one from Models and pricing.
Done. You just spent a few Rupiah (or nothing at all for a :free model) and received one completion.
Use from code
Section titled “Use from code”The base URL https://kenari.id/v1 is a direct replacement for https://api.openai.com/v1. Point the OpenAI SDK there, and the rest of your code does not need to change.
from openai import OpenAI
client = OpenAI(base_url="https://kenari.id/v1", api_key="kn-...")r = client.chat.completions.create( model="step-3-7-flash:free", messages=[{"role": "user", "content": "Hello!"}],)print(r.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://kenari.id/v1", apiKey: "kn-..." });const res = await client.chat.completions.create({ model: "step-3-7-flash:free", messages: [{ role: "user", content: "Hello!" }],});console.log(res.choices[0].message.content);Verify the connection from code: if choices[0].message.content is present, the connection works. See Chat completions for the full parameter list.
Next steps
Section titled “Next steps”- kenari CLI: install
@kenarihq/cli, sign in once, then use native and kenari models per role in one Claude Code or Codex session. - Authentication and keys: how keys are used and managed.
- Chat completions: full parameters and response shape.
- Models and pricing: active model list and per-token prices.
- Editors and AI agents: set up Claude Code, Codex, OpenCode, and others.
- For AI agents: llms.txt, openapi.json, MCP server, and how to use kenari from Claude Code.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
401 invalid api key | kn-... was wrong or copied with a truncation | create a new key in the dashboard, copy it whole |
model_not_found | id was typed wrong | use exactly step-3-7-flash:free, or pick one from Models and pricing |
402 insufficient_balance | paid model used with Rp 0 balance | switch to a :free model, or top up via QRIS from Rp 1.000 |
405 when the base URL is https://kenari.id/v1/v1/... or missing /v1 | wrong base URL shape | base URL must be exactly https://kenari.id/v1 |