Connect Claude Code
Anthropic's terminal coding agent, connected over the Anthropic Messages protocol.
Use cases
Good for letting an agent read your project, edit files and run tests from the terminal. Claude Code speaks the Anthropic Messages protocol at https://omnimodel.me/anthropic, and works with any catalog model that supports tool calling, not just Claude.
Tips
A coding agent sends many long requests per task, so pick a long-context model with tool calling and set a daily spend limit on the key.
Reasoning effort
Claude Code sends Anthropic thinking. A budget_tokens value maps to a level (≤512 minimal, ≤1024 low, ≤8192 medium, ≤24576 high, above that xhigh). adaptive without an effort counts as xhigh; disabled turns reasoning off. The platform follows the levels the serving line accepts: a level the upstream rejects becomes the next higher accepted level, or its highest one. If the model cannot turn reasoning off, asking for it returns 422 model.reasoning_off_unsupported. Each model's table is under Reasoning effort on its page in the catalog; rewritten calls show the rewrite in usage records.
If it cannot connect
- Set
ANTHROPIC_BASE_URLtohttps://omnimodel.me/anthropicwithout/v1; the client appends/v1/messagesitself. - The key starts with
key_and is not paused or revoked;auth.invalid_keymeans the key cannot be used. - The model ID matches the catalog and is in the key's allowed models.
billing.insufficient_creditmeans the balance is too low; see common errors for more.
Setup
- Install: npm install -g @anthropic-ai/claude-code.
- Add the environment variables below to your shell profile (such as ~/.zshrc) and open a new terminal.
- Run claude in your project and check the active model with /model.
Settings
- API host:
https://omnimodel.me/anthropic - API key:
YOUR_API_KEY - Model:
MODEL_ID
Compatibility testing for Claude Code is still in progress; if something breaks, open a ticket with the request ID.
export ANTHROPIC_BASE_URL="https://omnimodel.me/anthropic"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="MODEL_ID"
export ANTHROPIC_DEFAULT_OPUS_MODEL="MODEL_ID"
export ANTHROPIC_DEFAULT_SONNET_MODEL="MODEL_ID"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="MODEL_ID"
FAQ
- Why set all four model variables?
- Claude Code switches between model tiers during a task, for example a small model for titles. Pointing all four at one model keeps it from asking for a model name the platform does not serve.
- What if I am already signed in with a Claude subscription?
- Once ANTHROPIC_AUTH_TOKEN is set, Claude Code uses it first. Remove the variables to go back to your subscription.