# AI Gateway support for Claude Code

By Steven Van · 2026-01-05

Claude Code requests can now route through Vercel's AI Gateway for centralized spend tracking, traces, and provider failover.

[Vercel](<https://creatorstoolbox.com/tools/vercel>)'s [AI Gateway now supports Claude Code](<https://vercel.com/changelog/ai-gateway-support-for-claude-code>) through its Anthropic-compatible API endpoint. Routing Claude Code requests through the gateway centralizes usage and spend, shows request traces in observability, and adds failover between providers for the chosen model.

To set it up, log out of Claude Code, then set ANTHROPIC\_BASE\_URL to https://ai-gateway.vercel.sh, ANTHROPIC\_AUTH\_TOKEN to an AI Gateway API key, and ANTHROPIC\_API\_KEY to an empty string before starting claude again. The empty ANTHROPIC\_API\_KEY is required: Claude Code checks that variable first and will use it instead of ANTHROPIC\_AUTH\_TOKEN if it's non-empty.

![Vercel](<https://www.google.com/s2/favicons?domain=vercel.com&sz=128>)

Vercel

The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.

[View Vercel →](<https://creatorstoolbox.com/tools/vercel>)

[Original source](<https://vercel.com/docs/ai-gateway/claude-code>)

[Read AI Gateway support for Claude Code on Creators Toolbox](<https://creatorstoolbox.com/blog/vercel-ai-gateway-support-for-claude-code>)

---
Canonical source: https://creatorstoolbox.com/blog/vercel-ai-gateway-support-for-claude-code
