magpie
magpie is a local gateway that points coding agents, such as Claude Code, Codex and OpenCode, at the provider and model you pick. kenari works in magpie as a provider. One link fills in the base URLs, and you paste your own API key.
Add kenari with the import link
Section titled “Add kenari with the import link”- Install magpie from usemagpie.ai and open it once.
- Open the link Add kenari to magpie. The page shows that requests go to kenari.id and that no API key is included. Press the button if magpie does not open by itself.
- Paste a kenari API key from API Keys and press Add.
magpie reads the model list from https://kenari.id/v1/models, so new kenari models show up without a new link.
Add kenari from the terminal
Section titled “Add kenari from the terminal”Run this command to add the same provider from a terminal, with your own key in place of kn-YOUR-KEY:
magpie provider add kenari \ url=https://kenari.id/v1 \ responses=https://kenari.id/v1 \ anthropic=https://kenari.id \ key=kn-YOUR-KEYBase URLs
Section titled “Base URLs”| API format | Base URL |
|---|---|
| OpenAI Chat Completions | https://kenari.id/v1 |
| OpenAI Responses | https://kenari.id/v1 |
| Anthropic Messages | https://kenari.id |
The Anthropic base URL has no /v1, because the client adds /v1/messages itself.
Pitfalls
Section titled “Pitfalls”- Keep the Anthropic URL set. magpie then sends Claude models over Messages, which keeps prompt caching (Cache read is billed far below Input). Without it, Claude goes over Chat Completions and the cache markers your agent sets are dropped. See Prompt caching.
- A
401means the key is not a kenari key. kenari keys start withkn-. - Cost figures inside magpie do not come from kenari. Your real spend is on the Usage page.