Claude Code proxy

Claude Code proxy with native Anthropic Messages support.

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.

CLAUDE CODE PROXY ENV
export ANTHROPIC_BASE_URL=https://api.aiduct.ai
export ANTHROPIC_AUTH_TOKEN=sk-aiduct-...
export ANTHROPIC_DEFAULT_SONNET_MODEL=anthropic/claude-sonnet-4-5

claude
# Use /status to confirm Claude Code is pointed at Aiduct

PROTOCOL

Anthropic Messages

MARKUP

$0

MODELS

Sonnet, Haiku, Opus

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.

Native protocol, not a shape conversion

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.

Comparison

AREAAIDUCTALTERNATIVE
BillingUsage-based with dashboard recordsSubscription or separate upstream account
ProtocolNative Anthropic MessagesOften OpenAI-shape compatibility only
ModelsClaude Sonnet, Haiku, OpusDepends on provider mapping

FAQ

Is Aiduct a Claude Code proxy?+

Yes. Claude Code sends Anthropic Messages requests to the base URL you configure, and Aiduct accepts those requests at api.aiduct.ai.

Do I need an Anthropic subscription?+

No. You use an Aiduct API key and pay by usage. New accounts receive welcome credit for testing.

Should ANTHROPIC_BASE_URL include /v1?+

No. Use https://api.aiduct.ai. Claude Code appends the Messages API path itself.