Provider setup
Set up Anthropic
Official Anthropic API + Messages wire — drive the agent with Claude.
Why Anthropic
The Claude family wins on long context, tool-call accuracy, and writing quality in our internal evals. We use the official Messages API (/v1/messages), wire id anthropic_messages. It is not the same shape as OpenAI Responses — Kition Agent runs an internal adapter so the UI looks identical.
Anthropic also has the most mature prompt-caching story right now: a cache hit saves 90% of input cost, and long system prompts get cache_control markers applied automatically.
Generate an API key
- console.anthropic.com → Settings → API Keys
- Create Key, name "Kition Desktop", pick a Workspace
- Copy the
sk-ant-api03-...string - Workspaces support spend caps to prevent runaways
Add it in Kition
Settings → Providers → Add → Anthropic. The template fills wire and the anthropic-version header for you.
{
"name": "anthropic",
"baseURL": "https://api.anthropic.com",
"apiKey": "sk-ant-api03-...",
"wire": "anthropic_messages",
"defaultModel": "claude-sonnet-4-6",
"headers": {
"anthropic-version": "2023-06-01",
"anthropic-beta": "prompt-caching-2024-07-31"
}
}Auth header
Anthropic uses x-api-key (not a Bearer token) and requires the anthropic-version header — Kition injects both automatically. A 401 invalid x-api-key usually means stray whitespace or that you pasted the key into the wrong field.
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [{"role":"user","content":"ping"}]
}'Pick a model
claude-sonnet-4-6— default daily driver for writing and standard agent runsclaude-opus-4-7— heavy lifting (deep reasoning, complex refactors, research synthesis); 5x the costclaude-haiku-4-5— fast tier for summarization, classification, lightweight subagents- All models ship 200k context; Pro users can enable 1M context beta via
anthropic-beta: context-1m-2025-08-07
Common errors
401 authentication_error— key wrong or has whitespace403 permission_error— workspace lacks the model or region is restricted404 not_found_error— model id typo (note:claude-sonnet-4-6, notclaude-4.6-sonnet)429 rate_limit_error— RPM/ITPM/OTPM hit; Kition honorsretry-after529 overloaded_error— Anthropic-side congestion; auto-retried 3 times before surfacing400 invalid_request_error— usually first message is not user, or tool_use/tool_result pairs are unbalanced
Rate limits and billing
Anthropic rate-limits on three axes: RPM (requests/min), ITPM (input tokens/min), OTPM (output tokens/min). Tier 1 lands around 50 RPM / 50k ITPM / 10k OTPM — fine for one user but ITPM hits first on batch indexing.
Strongly recommend prompt caching: long system prompts cost 90% less on cache hit, which dominates agent loops that resend the system block every turn. Kition enables it by default — no manual config needed.