Docs

Codus developer quickstart

Use Codus through a standard OpenAI-compatible API, issue your own API keys, and choose the route that fits the task.

Quickstart

  1. 1. Buy a prepaid Codus credit pack.
  2. 2. Create a Codus API key in the dashboard.
  3. 3. Send requests to the base URL with a model alias such as codus/sonnet.
Base URL
https://api.codus.fun/v1
API key format
qta_live_...

Model aliases

codus/gemini-3.1-pro
Gemini 3.1 Pro through Codus
codus/claude-fable-5
Claude Fable 5 through Codus
codus/gpt-5.5
GPT-5.5 through Codus
codus/claude-opus-5
Claude Opus 5 through Codus
codus/gemini-3.1-pro-preview
Gemini 3.1 Pro Preview through Codus
codus/gpt-5.6-luna
GPT-5.6 Luna through Codus
codus/gpt-5.6-sol
GPT-5.6 Sol through Codus
codus/gemini-3-pro
Gemini 3 Pro through Codus
codus/claude-sonnet-5
Claude Sonnet 5 through Codus
codus/gpt-5.6-terra
GPT-5.6 Terra through Codus
codus/claude-opus-4-8
Claude Opus 4.8 through Codus
codus/claude-opus-4-8-thinking
Claude Opus 4.8 Thinking through Codus
codus/claude-opus-4-7
Claude Opus 4.7 through Codus
codus/claude-sonnet-4-6
Claude Sonnet 4.6 through Codus
codus/claude-haiku-4-5
Claude Haiku 4.5 through Codus

Streaming

Streaming support depends on the selected route. Check route availability and test with your Codus API key before wide rollout.

Controlled user note

Do not send highly sensitive data through best-effort community routes. Route multipliers apply to total token usage.

bash
curl https://api.codus.fun/v1/chat/completions \
  -H "Authorization: Bearer qta_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "codus/sonnet",
    "messages": [
      {"role": "user", "content": "Summarize this diff and suggest next edits."}
    ]
  }'
javascript
const response = await fetch("https://api.codus.fun/v1/chat/completions", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer qta_live_...",
  },
  body: JSON.stringify({
    model: "codus/sonnet",
    messages: [{ role: "user", content: "Review this pull request." }],
  }),
});

const data = await response.json();
python
import requests

response = requests.post(
    "https://api.codus.fun/v1/chat/completions",
    headers={
        "Authorization": "Bearer qta_live_...",
        "Content-Type": "application/json",
    },
    json={
        "model": "codus/sonnet",
        "messages": [{"role": "user", "content": "Generate release notes from these commits."}],
    },
)

print(response.json())
json
{
  "error": {
    "code": "insufficient_balance",
    "message": "Your Codus balance is too low for this route.",
    "type": "billing_error"
  }
}
json
{
  "usage": {
    "input_tokens": 1800,
    "output_tokens": 3400,
    "route_multiplier": "x3",
    "charged_quota_tokens": 15600
  }
}