Integration docs
AGI Dawn is compatible with the official Anthropic API. Any tool or SDK that supports Anthropic works once you replace the base URL and the API key.
On this page
https://agidawn.ccCreate keys under “API Keys” in the console; they start with sk-Quick start
- Create an account, then redeem a code under “Wallet” or ask your account manager to top up.
- Create a key under “API Keys”. One key per device or project makes it easy to revoke individually.
- Connect with any of the methods below.
Claude Code
Requires Node.js 22 or newer (older versions print an EBADENGINE warning but usually still run).
npm install -g @anthropic-ai/claude-code
Option 1: environment variables (recommended)
# Add to ~/.zshrc or ~/.bashrc, then reopen the terminal export ANTHROPIC_BASE_URL=https://agidawn.cc export ANTHROPIC_AUTH_TOKEN=sk-your-key
# PowerShell: set user environment variables [Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://agidawn.cc", "User") [Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-your-key", "User")
Option 2: settings.json
Use this when you would rather not touch global environment variables.
{
"env": {
"ANTHROPIC_BASE_URL": "https://agidawn.cc",
"ANTHROPIC_AUTH_TOKEN": "sk-your-key"
}
}ANTHROPIC_AUTH_TOKEN takes precedence over a subscription login. To sign out anyway, type /logout in a session; claude auth status shows which credential is active. Do not also set ANTHROPIC_API_KEY: when both are set, AGI Dawn uses it (our gateway gives the x-api-key header priority), so a leftover key causes 401.Verify
claude -p "Which model are you?"
For a deeper guide to working with Claude Code (permission modes, workflow, hooks, MCP, teams), see the Claude Code guide.
Other tools
- Cursor: Settings → Models → paste the key as the Anthropic API key, enable “Override Base URL” and enter the base URL.
- Cline / Roo Code: choose the Anthropic provider, enter the base URL and key; model IDs are in the table below.
- Continue:
provider: anthropicwithapiBaseset to the base URL.
Messages API
Identical to the official POST /v1/messages. Authenticate with the x-api-key header and include anthropic-version.
curl https://agidawn.cc/v1/messages \ -H "x-api-key: sk-your-key" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5-5", "max_tokens": 1024, "messages": [{"role": "user", "content": "Hello, Claude"}] }'
# pip install anthropic import anthropic client = anthropic.Anthropic( base_url="https://agidawn.cc", api_key="sk-your-key", ) message = client.messages.create( model="claude-opus-5-5", max_tokens=1024, messages=[{"role": "user", "content": "Hello, Claude"}], ) print(message.content[0].text)
// npm install @anthropic-ai/sdk import Anthropic from '@anthropic-ai/sdk' const client = new Anthropic({ baseURL: 'https://agidawn.cc', apiKey: 'sk-your-key', }) const message = await client.messages.create({ model: 'claude-opus-5-5', max_tokens: 1024, messages: [{ role: 'user', content: 'Hello, Claude' }], }) console.log(message.content[0].text)
Streaming
Add "stream": true to the request body. The response is an SSE event stream with the same event types as the official API (message_start, content_block_delta, message_stop, …). In the SDK use client.messages.stream(...).
with client.messages.stream(model="claude-opus-5-5", max_tokens=1024,
messages=[{"role": "user", "content": "Write a short poem about dawn"}]) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)Prompt caching
Add cache_control to the content blocks you want cached. Repeated requests hit the cache and reads are billed at the cache-read price, with the same discount. Claude Code uses caching automatically.
"system": [{
"type": "text",
"text": "A very long system prompt…",
"cache_control": {"type": "ephemeral"}
}]Models and prices
Prices are per million tokens and mirror the gateway’s billing in real time. Everything here is billed at list price, then 50% off or more.
| Model | Our input / output | Our cache read | List input / output |
|---|---|---|---|
claude-fable-5-1 | $5.00 / $25.00 | $0.125 | $10.00 / $50.00 |
claude-fable-5 | $5.00 / $25.00 | $0.50 | $10.00 / $50.00 |
claude-opus-5-5 | $2.00 / $10.00 | $0.10 | $4.00 / $20.00 |
claude-opus-5 | $2.50 / $12.50 | $0.25 | $5.00 / $25.00 |
claude-opus-4-8 | $2.50 / $12.50 | $0.25 | $5.00 / $25.00 |
claude-opus-4-7 | $2.50 / $12.50 | $0.25 | $5.00 / $25.00 |
claude-opus-4-6 | $2.50 / $12.50 | $0.25 | $5.00 / $25.00 |
claude-opus-4-5-20251101 | $2.50 / $12.50 | $0.25 | $5.00 / $25.00 |
claude-sonnet-5-5 | $1.00 / $5.00 | $0.05 | $2.00 / $10.00 |
claude-sonnet-5 | $1.00 / $5.00 | $0.10 | $2.00 / $10.00 |
claude-sonnet-4-6 | $1.50 / $7.50 | $0.15 | $3.00 / $15.00 |
claude-sonnet-4-5-20250929 | $1.50 / $7.50 | $0.15 | $3.00 / $15.00 |
claude-haiku-5-5Prompts over 100K tokens bill the whole request at the long-context price: $0.25 / $1.25 | $0.05 / $0.25 | $0.005 | $0.10 / $0.50 |
claude-haiku-4-5 | $0.50 / $2.50 | $0.05 | $1.00 / $5.00 |
claude-haiku-4-5-20251001 | $0.50 / $2.50 | $0.05 | $1.00 / $5.00 |
Cache writes: 1.25× the input price for 5-minute caches and 2× for 1-hour caches, same as the official API.
Billing
- Your credit equals what you top up, in USD. Each request is charged at the “Our input / output” price in the table above, and every usage-log entry shows the list price and your discount.
- Input, output, cache reads and cache writes are priced separately. “Usage logs” in the console show tokens and cost per request.
- Credits never expire. Tokens are consumed immediately and used credit is non-refundable, so start small.
Error codes
| Status | Cause | What to do |
|---|---|---|
401 | The key is invalid or disabled, its own quota is used up or expired, or ANTHROPIC_API_KEY is also set | Check the key’s status and quota in the console; make sure the variable is set (Claude Code reads ANTHROPIC_AUTH_TOKEN); unset ANTHROPIC_API_KEY; run claude auth status to see the active credential |
403 | Account balance is too low or this key’s remaining quota cannot cover the request; or the requested model is outside what this key allows, your IP is not on its allowlist, or the account is disabled | Read the returned message: for balance or quota, top up, redeem a code or raise the key’s quota; for model or IP limits, adjust this key in the console; if the account is disabled, contact your account manager |
404 | Unknown model | Use a model ID from the table above |
429 | Too many requests, or upstream is busy | Retry later; contact your account manager if it persists |
5xx | Temporary upstream error | Retry; the SDKs and Claude Code retry automatically |
FAQ
Is this real Claude?
Yes. Requests go through the native Anthropic Messages protocol, with no protocol conversion, no injected system prompts and no model swapping.
How do I top up or get an invoice?
Sign in and contact your account manager from the “Account manager” card on the dashboard; invoices are handled by them as well. See How to top up.
What does the console record?
Each request’s model, token usage and cost, for billing and reconciliation. You can review them one by one under “Usage logs”.