Integration
Claude Code with an LLMcode key
Claude Code is a CLI that speaks the Anthropic Messages protocol. It reads the endpoint and the token from environment variables, so pointing it at LLMcode is a matter of four exports.
Updated
The four variables
ANTHROPIC_BASE_URL takes the origin without /v1 — the CLI appends /v1/messages itself. ANTHROPIC_AUTH_TOKEN carries the LLMcode key, not an Anthropic key. The two model variables choose which published profile answers as Opus and Sonnet.
Keep the token in the environment of the shell that starts Claude Code. Writing it into a project file means it ends up in git, and the key is shown only once at issue time.
- ANTHROPIC_BASE_URL=https://llmcode.io
- ANTHROPIC_AUTH_TOKEN=sk-llmcode-…
- ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5-5
- ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5
Verify before the first task
Run claude /status in the same shell. It prints the base URL and the model names the CLI resolved; if the base URL still says api.anthropic.com, the export did not reach the process.
Then run a small task and open /account/logs. The request should appear with the model slug, token counts and the amount charged. A 401 there means the token is wrong or revoked; a 403 means the key is not allowed to use that profile.
Cost control for agent runs
Agent sessions spend tokens in bursts: a single refactor can read dozens of files. Put a spend limit and an expiry date on the key so one runaway session cannot empty the account, and keep the default profile on a cheaper model for routine edits.
This is a compatible endpoint, not Anthropic's own service. Latency and rate limits depend on the upstream channel, and the default rate ceiling is 600 requests per minute.
Connect
export ANTHROPIC_BASE_URL="https://llmcode.io"
export ANTHROPIC_AUTH_TOKEN="$LLMCODE_API_KEY"
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-5-5"
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-5-5"
claude /status$env:ANTHROPIC_BASE_URL = "https://llmcode.io"
$env:ANTHROPIC_AUTH_TOKEN = $env:LLMCODE_API_KEY
$env:ANTHROPIC_DEFAULT_SONNET_MODEL = "claude-sonnet-5-5"
claude /statuscurl https://llmcode.io/v1/models \
-H "Authorization: Bearer $LLMCODE_API_KEY"Published model prices
USD per 1M tokens. The numbers come from the public catalog on every page rebuild — this is the sale price, not an estimate.
| Model | Input | Output | Cache |
|---|---|---|---|
| Claude Opus 5.5 | $2.70 | $8.00 | $0.14 |
| DeepSeek Flash | $0.50 | $2.00 | $0.01 |
| Claude Sonnet 5.5 | $1.33 | $6.67 | $0.07 |
| DeepSeek V4 Pro | $2.20 | $6.60 | $0.07 |
Top-up from $10, balance in USD. 1 USD = 1,000,000 UT. No subscription and no auto-charge.
Questions
Do I need an Anthropic account?
No. You need an LLMcode account, a key and a USD balance. The CLI talks to the LLMcode endpoint.
Should ANTHROPIC_BASE_URL include /v1?
No. Use https://llmcode.io. The CLI adds /v1/messages on its own; a trailing /v1 produces a doubled path and a 404.
Does streaming work?
Yes for /v1/messages: the response is a regular SSE stream. The /v1/responses endpoint does not stream in this version and returns 400 with stream: true.
How do I stop a session from overspending?
Issue a key with a UT spend limit and an expiry date, and check /account/logs after the first run to see the real cost of your typical task.