Capio API reference
OpenAI- and Anthropic-compatible endpoints, drop-in for any client that supports base_url. Below: the minimum you need to make a first request, then three coding-agent integrations.
Quick start
Send any OpenAI-compatible request to https://capiollm.tech/v1. The response shape is identical to OpenAI, so your existing code only needs two changes: the base URL and the API key.
curl https://capiollm.tech/v1/chat/completions \
-H "Authorization: Bearer $CAPIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [
{ "role": "user", "content": "ping" }
]
}'The proxy returns the same JSON you'd get from api.openai.com. The model field is one of our own aliases — see the models section for the full list.
Authentication
All requests must include a Bearer token. Get one in the dashboard, then either set it as an env var (preferred) or paste it into your client. The raw key is only shown once at creation — we only store its SHA-256 hash.
POST /v1/chat/completions HTTP/1.1
Host: capiollm.tech
Authorization: Bearer sk-capio-live-xxxxxxxxxxxx
Content-Type: application/jsonStreaming
Pass stream: true to get Server-Sent Events back. Same wire format as OpenAI's chat.completions, so any client that already streams from OpenAI will work unmodified.
curl https://capiollm.tech/v1/chat/completions \
-H "Authorization: Bearer $CAPIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"stream": true,
"messages": [
{ "role": "user", "content": "Tell me a story" }
]
}'Models
The full list is at GET /v1/models (works with your key). The cheat sheet for the popular ones:
# Flagship
claude-opus-4-8 # — context
deepseek-v4-flash # 1M context
deepseek-v4-pro # 1M context
gemini-3.1-pro # — context
# Long context
deepseek-v4-flash # 1M context
deepseek-v4-pro # 1M context
gpt-5.5 # 1M context
kimi-k2.6 # 262K context
MiniMax-M3 # 1M context
# Budget
deepseek-v4-flash # $0.07 / $0.14 per M tokens
MiniMax-M3 # $0.30 / $1.20 per M tokensPrices per million tokens, listed on the landing page. Tokens never expire, pay-as-you-go.
Claude Code
Claude Code is Anthropic's terminal agent. Point it at Capio by setting the Anthropic base URL — Claude Code appends /v1/messages for you. The API key must be passed as ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_API_KEY must be set to an empty string (not unset) so Claude Code doesn't try to authenticate against anthropic.com first.
# 1. Get a key at /app/api-keys, then:
export CAPIO_API_KEY="sk-capio-live-xxxxxxxxxxxx"
# 2. Point Claude Code at Capio. CC appends /v1/messages for you.
export ANTHROPIC_BASE_URL="https://capiollm.tech"
export ANTHROPIC_AUTH_TOKEN="$CAPIO_API_KEY"
# 3. Critical: ANTHROPIC_API_KEY must be the EMPTY string,
# not unset — otherwise CC authenticates against anthropic.com first.
export ANTHROPIC_API_KEY=""Or commit a project-level .claude/settings.local.json so the config travels with the repo:
{
"env": {
"ANTHROPIC_BASE_URL": "https://capiollm.tech",
"ANTHROPIC_AUTH_TOKEN": "sk-capio-live-xxxxxxxxxxxx",
"ANTHROPIC_API_KEY": ""
}
}Then pick which Capio model each "tier" of Claude Code should use. capio/claude-opus-4-8 keeps the Anthropic feel, or swap to capio/deepseek-v4-flash for the cheapest tier. Anything Claude Code accepts in model: on the wire works.
# "opus" / "sonnet" / "haiku" are just Claude Code's tier
# names — map each to whatever Capio model you want.
export ANTHROPIC_DEFAULT_OPUS_MODEL="capio/claude-opus-4-8"
export ANTHROPIC_DEFAULT_SONNET_MODEL="capio/MiniMax-M3"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="capio/deepseek-v4-flash"/logout in Claude Code first if you've previously signed in with an Anthropic account — the cached login takes precedence over the env vars otherwise.OpenCode
OpenCode is an open-source terminal + desktop agent. It reads a project-level opencode.json for providers and a global auth.json for keys. We register Capio as a custom OpenAI-compatible provider with baseURL pointing at https://capiollm.tech/v1.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"capio": {
"npm": "@ai-sdk/openai-compatible",
"name": "Capio",
"models": {
"claude-opus-4-8": {},
"gpt-5.5": {},
"MiniMax-M3": {},
"deepseek-v4-pro": {},
"deepseek-v4-flash": {},
"kimi-k2.6": {}
},
"options": {
"baseURL": "https://capiollm.tech/v1",
"apiKey": "{env:CAPIO_API_KEY}"
}
}
}
}{
"capio": {
"type": "api",
"key": "sk-capio-live-xxxxxxxxxxxx"
}
}opencode, type /connect, choose your provider, and paste the key. The two files above are what /connect would write for you.OpenClaw
OpenClaw is a multi-channel agent runtime (Telegram, Discord, CLI). Models are addressed as capio/<model-name> — same convention as openrouter/<author>/<slug>. Drop a config at ~/.openclaw/openclaw.json and you're done.
{
"env": {
"CAPIO_API_KEY": "sk-capio-live-xxxxxxxxxxxx"
},
"agents": {
"defaults": {
"model": {
"primary": "capio/deepseek-v4-flash"
},
"models": {
"capio/deepseek-v4-flash": {}
}
}
}
}Add a fallback chain for resilience — Capio will retry on the next model in the list if the primary errors out:
{
"env": {
"CAPIO_API_KEY": "sk-capio-live-xxxxxxxxxxxx"
},
"agents": {
"defaults": {
"model": {
"primary": "capio/deepseek-v4-flash",
"fallbacks": [
"capio/deepseek-v4-pro",
"capio/MiniMax-M3",
"capio/kimi-k2.6"
]
},
"models": {
"capio/deepseek-v4-flash": {},
"capio/deepseek-v4-pro": {},
"capio/MiniMax-M3": {},
"capio/kimi-k2.6": {}
}
}
}
}openclaw auth list to verify the key is loaded. If you see 401, check echo $CAPIO_API_KEY — the env var must be in the shell that started the gateway.