1 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
Vercel now allows users to access Claude Code through its AI Gateway using an Anthropic-compatible API. This setup centralizes usage, tracks spending, and provides failover options between different models. Users need to set specific environment variables to configure the integration.
If you do, here's more
You can now access Claude Code via Vercel AI Gateway using an Anthropic-compatible API endpoint. This integration allows users to manage requests through the AI Gateway, which helps centralize usage and spending. It also provides observability features for tracking requests and ensures failover support if switching between different AI providers becomes necessary.
To set up Claude Code with AI Gateway, log out of any existing sessions and configure your environment variables. You need to export `ANTHROPIC_BASE_URL` to point to the AI Gateway URL and provide your API key through `ANTHROPIC_AUTH_TOKEN`. Importantly, the `ANTHROPIC_API_KEY` must be set to an empty string to ensure Claude Code uses the authentication token correctly.
After setting the environment variables, you can start using Claude Code. The requests will automatically route through the AI Gateway. For further details on using Claude Code, refer to the official documentation.
Questions about this article
No questions yet.