Skip to main content
Auriko routes Claude Code and Claude Agent SDK requests through multiple providers, giving you model choice, cost controls, and fallbacks.
Claude Code features work through Auriko: tool use, MCP servers, streaming, extended thinking, and prompt caching. Only LLM inference routes through Auriko; agentic operations (file I/O, bash, MCP) run locally.

Prerequisites

Set up Claude Code

Add 3 environment variables to your shell profile (~/.zshrc or ~/.bashrc):
export ANTHROPIC_BASE_URL="https://api.auriko.ai"
export ANTHROPIC_AUTH_TOKEN="ak_live_..."  # from auriko.ai/dashboard
export ANTHROPIC_API_KEY=""
ANTHROPIC_API_KEY="" must be explicitly set to empty. If it contains a value, Claude Code uses it directly against Anthropic, bypassing Auriko.
Reload your shell after saving:
source ~/.zshrc   # or: source ~/.bashrc

Verify setup

claude -p "Say exactly: setup-ok" --model claude-haiku-4-5-20251001
Claude Code includes a system prompt on every request. The first request in a session costs more than follow-ups due to prompt caching.

Use different models

You can pass an Auriko model ID with the --model flag:
claude --model deepseek-v4-flash
claude --model gemini-2.5-flash
claude --model grok-4.3
Model IDs must be exact. Claude Code requires reasoning support from every model. Models that don’t support reasoning return a 400 error. Browse per-model capabilities in the directory API. Available models include:
ModelAuthorContext
claude-sonnet-4-6Anthropic1M
claude-opus-4-6Anthropic1M
claude-opus-4-7Anthropic1M
deepseek-v4-flashDeepSeek1M
deepseek-v4-proDeepSeek1M
gemini-2.5-flashGoogle1M
gemini-2.5-proGoogle1M
gemini-3.1-pro-previewGoogle1M
glm-5.1Z.AI200K
grok-4.3xAI1M
kimi-k2.5Moonshot262K
kimi-k2.6Moonshot262K
minimax-m2-7MiniMax205K
minimax-m2-7-highspeedMiniMax205K
qwen-3.6-plusAlibaba1M
To list available models:
curl -s -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
  https://api.auriko.ai/v1/models | jq '.data[].id'
The /model picker in interactive sessions lists only Claude tier names (Opus, Sonnet, and Haiku). To switch to a non-Claude model mid-session, type the full ID: /model deepseek-v4-flash. You can override which model each tier maps to:
export ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4-flash"
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-4-7"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5-20251001"
Add these to your shell profile alongside the other environment variables.

Set up Claude Agent SDK

The Claude Agent SDK is Python-only. For TypeScript, use the Anthropic SDK directly (see below). The Claude Agent SDK spawns Claude Code as a subprocess. Pass Auriko credentials through ClaudeAgentOptions.env:
import os
from claude_agent_sdk import ClaudeAgentOptions, query

options = ClaudeAgentOptions(
    model="sonnet",
    system_prompt="You are a code review assistant.",
    allowed_tools=["Read", "Grep", "Glob"],
    env={
        "ANTHROPIC_BASE_URL": "https://api.auriko.ai",
        "ANTHROPIC_AUTH_TOKEN": os.environ["AURIKO_API_KEY"],
        "ANTHROPIC_API_KEY": "",
    },
)

async for message in query(prompt="Review main.py for bugs", options=options):
    print(message)
To prevent filesystem settings from overriding your env values, pass setting_sources=[] in options.

Use the Anthropic SDK directly

You can point the Anthropic SDK at Auriko’s API:
import os
import anthropic

client = anthropic.Anthropic(
    base_url="https://api.auriko.ai",
    api_key=os.environ["AURIKO_API_KEY"],
)

response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)

Configure routing

Add a gateway object to the request body:
response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
    extra_body={
        "gateway": {
            "routing": {"optimize": "cost"},
        },
    },
)
For Claude Code, configure routing at the workspace level in the Auriko dashboard. See routing options for details.

Troubleshoot

SymptomCauseFix
”model may not exist or you may not have access”Model ID isn’t exact (e.g., claude-haiku-4-5 instead of claude-haiku-4-5-20251001)Use the full model ID from GET /v1/models
Requests go to Anthropic directly, not AurikoANTHROPIC_API_KEY contains a valueSet ANTHROPIC_API_KEY="" (empty string, not unset)
“Invalid API Key” or auth errorsCached Anthropic OAuth credentialsRun claude auth logout, then verify env vars are set
Requests hang or timeoutANTHROPIC_BASE_URL includes /v1Use https://api.auriko.ai only
”does not support reasoning/extended thinking”Claude Code requires reasoning support but this model doesn’t have itUse a reasoning-capable model (see “Use different models” above)
apiKeySource: none in session eventsClaude Code doesn’t classify ANTHROPIC_AUTH_TOKEN as a key sourceExpected behavior. Requests authenticate correctly