
You can now use Claude Code through Vercel AI Gateway via its Anthropic-compatible API endpoint.
Route Claude Code requests through AI Gateway to centralize usage and spend, view traces in observability, and benefit from failover between providers for your model of choice.
Log out if you're already logged in, then set these environment variables to configure Claude Code to use AI Gateway:
Setting ANTHROPIC_API_KEY to an empty string is required. Claude Code checks this variable first, and if it's set to a non-empty value, it will use that instead of ANTHROPIC_AUTH_TOKEN.
Start Claude Code. Requests will route through AI Gateway:
See the Claude Code documentation for details.