Back to blog
Workflow
Vercel

When to use AI Gateway instead of calling model providers directly?

Thắng Đoàn
Thắng Đoàn

Juggling separate keys, per-provider billing views, and downtime whenever one provider has issues makes direct model calls painful to operate. AI Gateway sits in front of the providers with one API, usage tracking, retries, and failover for higher-than-provider uptime, with no markup or platform fee on inference.

What it is

AI Gateway is a unified API for calling models from many providers, with usage and cost tracking, retries, failover, and performance optimizations. It reflects provider pricing with no markup and no platform fee on inference, including BYOK requests.

Applied case

A developer using coding agents like Claude Code, Codex, or Cursor can install the latest Vercel CLI, run setup, and select google/gemini-4-carbon as the model in the agent. This gives the agent a model with a 1M-token context window suited to large codebases, backed by gateway controls like budgets for API keys and routing rules. Built-in custom reporting and Zero Data Retention support come along the way.

  • Run Vercel CLI setup, then select google/gemini-4-carbon in your coding agent

When to use it

Use when you want one API across providers, failover, and cost visibility with no markup. Skip when you only call a single provider and never need retries or unified reporting.

Read more

Gemini 4 Carbon on AI Gateway

Coding agents guide

Gemini 4 Carbon model page

Share:

Recommended for you

Enjoyed this article?

Subscribe for new articles. No spam. Unsubscribe anytime.

By subscribing you agree to receive the newsletter. No spam, and you can unsubscribe anytime.