Why use a proxy for Claude Code?
Claude Code users often want API-style metering instead of a monthly subscription. Aiduct routes Claude Code requests through an API key and records cost, latency, and request history in the dashboard.
Claude Code proxy
Aiduct gives Claude Code a third-party API endpoint that still speaks Anthropic's native Messages protocol, so tool use, thinking, multimodal input, and model defaults keep working.
export ANTHROPIC_BASE_URL=https://api.aiduct.ai export ANTHROPIC_AUTH_TOKEN=sk-aiduct-... export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-5 export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4-5 export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-7 claude # Use /status to confirm Claude Code is pointed at Aiduct
PROTOCOL
Anthropic Messages
BILLING
Published pricing
MODELS
Sonnet, Haiku, Opus
Claude Code users often want API-style metering instead of a monthly subscription. Aiduct routes Claude Code requests through an API key and records cost, latency, and request history in the dashboard.
The Claude Code path uses /v1/messages, not an OpenAI-only compatibility shim. That matters for Claude-specific behavior such as tool calls, thinking blocks, and multi-part message content.
| AREA | AIDUCT | ALTERNATIVE |
|---|---|---|
| Billing | Usage-based with dashboard records | Subscription or separate upstream account |
| Protocol | Native Anthropic Messages | Often OpenAI-shape compatibility only |
| Models | Claude Sonnet, Haiku, Opus | Depends on provider mapping |
FAQ
Yes. Claude Code sends Anthropic Messages requests to the base URL you configure, and Aiduct accepts those requests at api.aiduct.ai.
No. Use https://api.aiduct.ai. Claude Code appends the Messages API path itself.