Claude Code
NuRoute speaks Anthropic's Messages API at POST /v1/messages, so Claude Code
works with it unchanged. Its requests go through the same pipeline as /v1/chat/completions: your routing, policies,
PII redaction, budgets, credits and plan apply.
Set up
export ANTHROPIC_BASE_URL=https://nuroute.ai
export ANTHROPIC_API_KEY=aicp-... # your NuRoute API key (or ANTHROPIC_AUTH_TOKEN)
export ANTHROPIC_MODEL=auto # Artemis Task picks the model for each request
export ANTHROPIC_DEFAULT_HAIKU_MODEL=auto # Claude Code's quick background calls (older versions: ANTHROPIC_SMALL_FAST_MODEL)
claude
ANTHROPIC_MODEL can be any model your key can route to, for example claude-sonnet-4-6 to always use it.
auto is Artemis Task, billed per token from credits.
What works
| Feature | Supported |
|---|---|
| Chat and streaming | ✓ |
| Tools (Claude Code's file, shell and search tools) | ✓ |
| Prompt caching | ✓ where the serving provider caches; cached tokens show as cache_read_input_tokens |
| Model stickiness per conversation | ✓ (Claude Code's metadata.user_id keeps each person's conversations apart) |
| Images and PDFs in prompts | ✗ refused with a 400 |
| Extended thinking | Ignored: the serving model decides |
| Anthropic server tools (web search, code execution) | ✗ refused with a 400 |
A project-scoped key keeps Claude Code's requests in its project, so the project's routing, budget and policy apply.
Errors you may see
| Status | Meaning |
|---|---|
401 authentication_error | The key is wrong or revoked |
402 billing_error | Your credit balance is used up; top up on the Billing page |
429 rate_limit_error | Too many requests at once, or your plan's request limit is reached |