Quickstart
Klinn speaks the OpenAI API for chat. A key from the console is the only thing you add.
Call a model
Send the key as a bearer token to https://api.klinn.dev/v1. The model id is the name without a vendor prefix.
curl https://api.klinn.dev/v1/chat/completions \
-H "Authorization: Bearer $KLINN_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "claude-sonnet-5", "messages": [{ "role": "user", "content": "Hello" }] }'Ids and aliases
claude-sonnet-5 and gpt-oss-120b are the ids to use. A provider's native id, and the vendor/model spelling, are accepted as aliases of the same model.
In Cursor, Claude Code and Codex
Create key on the console's Models or Dashboard page shows these steps with your key filled in. By hand: Cursor takes the key and the base URL in its own settings.
- 1Open Cursor Settings, then Models.
- 2Under OpenAI API Key, paste your key.The key from the console.
- 3Turn on Override OpenAI Base URL, paste the URL and click Verify.
https://api.klinn.dev/v1 - 4Click Add model, type the model id exactly as it is here, and enable it.For example
claude-sonnet-5: any id from the Models page. - 5Pick it in the chat's model menu.
Known limit: Cursor sends its own model list, so the id must be typed exactly as it is on this page.
Claude Code reads three variables. Keep them in your shell profile, or under "env" in ~/.claude/settings.json.
export ANTHROPIC_BASE_URL=https://api.klinn.dev
export ANTHROPIC_API_KEY=<your key>
export ANTHROPIC_MODEL=claude-sonnet-5Codex takes Klinn as a model provider in ~/.codex/config.toml, with the key in KLINN_API_KEY.
model = "claude-sonnet-5"
model_provider = "klinn"
[model_providers.klinn]
name = "Klinn"
base_url = "https://api.klinn.dev/v1"
env_key = "KLINN_API_KEY"
wire_api = "chat"