Integrations overview
Any tool that speaks the OpenAI or Anthropic API can use kenari by changing the base URL and the key. One kn- key works for every model and for both API formats. Create it under API Keys in the dashboard. See Authentication and API keys.
Base URLs
Section titled “Base URLs”| Client type | Base URL | Examples |
|---|---|---|
| OpenAI-compatible SDKs and tools | https://kenari.id/v1 | OpenAI SDKs, OpenCode, Zoo Code, Hermes, OpenClaw, Kimi Code |
| OpenAI Responses clients | https://kenari.id/v1 | Codex |
| Anthropic SDKs and Claude Code | https://kenari.id | Anthropic SDKs, Claude Code |
The Anthropic row is for the Anthropic SDKs and Claude Code, which add /v1/messages themselves, so their base URL has no /v1. If you add it, requests go to /v1/v1/messages and return 405.
import osimport anthropicfrom openai import OpenAI
openai_client = OpenAI(base_url="https://kenari.id/v1", api_key=os.environ["KENARI_API_KEY"])anthropic_client = anthropic.Anthropic(base_url="https://kenari.id", api_key=os.environ["KENARI_API_KEY"])Valid model ids are listed in Models and pricing. To test with zero balance, use a :free model such as step-3-7-flash:free.
Dedicated guides
Section titled “Dedicated guides”- Claude Code: three environment variables.
- Codex: a provider in
config.toml. - kenari CLI: mix native and kenari models per role.
- MCP server: docs, model list and web tools for any MCP client.
- Docs for AI agents:
llms.txt, Markdown pages and OpenAPI.
Claude Code Router
Section titled “Claude Code Router”Claude Code Router (CCR) can add kenari as a provider from a link. On a machine with CCR installed, open add kenari to CCR. The link points CCR at a public manifest at https://kenari.id/.well-known/ccr-provider.json. The manifest holds the base URL, the API format and the chat models that support function calling, so you set nothing by hand. CCR shows a preview before it saves anything, and asks for your kn- key in the confirmation dialog. The key is not part of the link or the manifest.
The manifest needs no key and refreshes every few minutes. CCR reads it when you open the link, so open the link again to pick up new models.
If the link does nothing, CCR is not installed or does not handle the ccr:// scheme. Use Claude Code with environment variables instead.
OpenCode
Section titled “OpenCode”In OpenCode, type /connect, pick Kenari from the provider list, paste your key, and choose a model. Setting KENARI_API_KEY in your environment also works without /connect. For opencode.json configuration, follow the OpenCode docs.
OmniRoute
Section titled “OmniRoute”Run omniroute setup or open the OmniRoute dashboard, pick Kenari from the provider list, and paste your key. Every catalog model becomes available through your OmniRoute endpoint, together with OmniRoute’s own fallback rules. See the OmniRoute docs.
Zoo Code
Section titled “Zoo Code”Open Zoo Code settings, pick Kenari under API Provider, paste your key, and choose a model. Zoo Code loads the model list from /v1/models, so new models appear without an extension update. See the Zoo Code guide.
Hermes
Section titled “Hermes”Hermes accepts an OpenAI-compatible endpoint. Use https://kenari.id/v1 as the base URL and your kenari key as OPENAI_API_KEY. The exact setup differs between versions, so follow the Hermes docs.
OpenClaw
Section titled “OpenClaw”OpenClaw takes a custom provider through the flags --custom-base-url, --custom-provider-id, --custom-model-id and --custom-compatibility. Set the base URL to https://kenari.id/v1 and the key to your kn- key. See the OpenClaw docs for the exact format.
Kimi Code
Section titled “Kimi Code”Kimi Code can import kenari as a provider from a public registry. Run:
kimi provider add https://kenari.id/.well-known/models.dev.jsonThe registry lists every kenari chat model with its context window, its longest output, and whether it reads images and calls functions. It needs no key and refreshes every few minutes. Kimi Code checks the same URL again on later starts, so new models appear without another command.
The import does not store your key. Add one line to the [providers.kenari] section of ~/.kimi-code/config.toml, and export the key in your shell:
api_key_env = "KENARI_API_KEY"Then pick a kenari model with /model, or start Kimi Code with -m and a model name from the list. The registry shows 0 for prices because kenari bills in Rupiah. See Models and pricing for the real prices. For the other options of kimi provider, follow the Kimi Code docs.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
401 with invalid key or missing authorization | The key is not set, did not load, or does not start with kn-. | Copy the key again from API Keys, then restart the tool or open a new terminal. |
400 with model_not_found | The model id is misspelled or not in the catalog. | Copy the id from Models and pricing. |
402 with insufficient_balance | The model is paid and your available balance cannot cover the estimated cost of the request. | Use a :free model, shorten the prompt, or top up. See How a chat request is charged. |
405 | The base URL has the wrong shape, such as /v1/v1 or a missing /v1. | Use https://kenari.id/v1 for OpenAI-compatible clients and https://kenari.id for the Anthropic SDKs and Claude Code. In CCR, keep the base URL from its integration link. |