Claude Code Max via AI Gateway, available now for Claude Code
By Steven Van ·
The Vercel CLI's automatic setup only configures API-key auth, so subscription users must add the environment variables by hand.
Vercel's AI Gateway now supports the Claude Code Max subscription for the Claude Code CLI. Developers can route Claude Code requests through AI Gateway using their existing Anthropic subscription at no additional cost, while getting unified observability, usage tracking, and monitoring through Vercel's dashboard.
Setup means adding two environment variables, ANTHROPIC_BASE_URL and ANTHROPIC_CUSTOM_HEADERS, to a shell configuration file such as ~/.zshrc or ~/.bashrc, then starting Claude Code and logging in with the "Claude account with subscription" option. Claude Code still authenticates directly with Anthropic, sending its own Authorization header. AI Gateway uses a separate header, x-ai-gateway-api-key, for its own authentication, so the two can coexist, with AI Gateway acting as a passthrough proxy to Anthropic or, when needed, a router to other providers.