Run one command, `vercel ai-gateway coding-agents setup`, and Vercel AI Gateway connects the coding agents on your machine to 300+ models, with budgets that cap how much your agents spend and a single dashboard that shows how much each agent costs. Your agents keep working as they do now, and their requests route through the gateway.

Setup takes three steps. The budgets and the dashboard are what deliver the low-cost part, so they get most of this page.

Two prerequisites before you start: a Vercel account and the latest Vercel CLI.

## [Copy link to heading](#what-is-vercel-ai-gateway)What is Vercel AI Gateway?

Vercel AI Gateway is a service your coding agents route through. Instead of each agent holding its own provider accounts and keys, every agent sends requests to the gateway, which forwards them to the model you picked. That gives you one account, one Vercel invoice, 300+ models available in every agent, automatic provider fallbacks, and full request traces and metrics.

Without a gateway, each coding agent ships wired to its own default models and its own billing. Trying a different model means another account and another key, and still no shared view of what anything costs. The model landscape also moves too fast to hard-wire one model into your tools: 81% of July's tokens ran on models that were not on the gateway six months earlier, according to the [August 2026 AI Gateway Production Index](/blog/deepseek-overtakes-google-on-volume-cost-per-token-falls).

## [Copy link to heading](#set-up-your-agents-in-three-steps)Set up your agents in three steps

### [Copy link to heading](#1.-run-the-setup-command)1\. Run the setup command

Terminal

```
vercel ai-gateway coding-agents setup
```

The command detects the coding agents installed on your machine, generates an API key, and writes the gateway URL and credentials into each agent's native config format. Files are edited in place with their formatting preserved. Your key is stored in the macOS Keychain rather than in a plaintext config, and existing Claude Desktop and Codex Desktop sessions are copied over, so your history survives the switch.

### [Copy link to heading](#2.-review-the-diff)2\. Review the diff

Before writing anything, setup shows a diff of every planned change, so you can see exactly which files it will touch and what it will change in each one.

### [Copy link to heading](#3.-pick-a-model-for-your-agent)3\. Pick a model for your agent

Setup doesn't lock you into a specific model. Open your agent and choose one with its in-app command, like `/model` in Claude Code. Through the gateway, any of 300+ models works in any agent, including models an agent has no native support for, and automatic fallbacks cover you when a provider has trouble.

Expect to switch models later. Among teams that ran more than 10 million tokens in both June and July, 3 in 4 changed at least a tenth of their model mix, per the same [August 2026 AI Gateway Production Index](/blog/deepseek-overtakes-google-on-volume-cost-per-token-falls).

## [Copy link to heading](#which-agents-does-setup-support)Which agents does setup support?

The command configures nine coding agents.

Once setup finishes, here's how to pick a model in each:

| Agent | How to pick a model |
| --- | --- |
| Claude Code | `/model` or `/model <slug>`, e.g. `/model anthropic/claude-opus-5` |
| Codex | `/model` in a session, or start it on a specific model |
| OpenCode | `/models`, then choose `vercel/<creator>/<model>` |
| Pi | `/model` |
| Cline | `/model` in the CLI; in the IDE extension, change models in settings |
| Cursor | add gateway model slugs in Settings, then Models |
| Hermes | `/model custom:vercel-ai-gateway:<slug>` |
| Kilo Code | `/models`, then choose the model |
| OpenClaw | add model slugs to the starter list in its config |

Two of these agents have their own dedicated walkthroughs: how to [use Claude Code with 300+ models](https://vercel.com/i/use-claude-code-with-300-plus-models) and how to [use OpenCode with 300+ models](https://vercel.com/i/use-opencode-with-300-plus-models).

## [Copy link to heading](#how-do-budgets-keep-the-cost-low)How do budgets keep the cost low?

The low cost in this setup comes from spend controls. A budget caps how much your team, a single project, or an individual API key can spend. The gateway checks the budget before each request and rejects further requests once the limit is exceeded, until the budget resets or you raise it. Budgets are optional; without one, spend is unlimited.

Budgets refresh daily, weekly, or monthly, or not at all, in which case the limit is cumulative. Each period resets at the start of its window in UTC. A default budget applies to every project or key without an explicit one, and the API keys your agents use support budgets with resets and expiry, so an experiment can get its own key with its own cap and an end date.

Spend alerts can email you when spend crosses 50%, 75%, or 100% of the limit within a period. Each threshold fires at most once per period, and alerts below 100% are informational; they never block requests.

A budget is a soft cap, not a hard guarantee. The request that crosses the limit still completes, so total spend can end up slightly over the limit.

Budgets control how much you spend. How you decide what models are worth paying for in the first place and why is a separate question, covered in [which AI model you should pay for](https://vercel.com/i/which-ai-model-should-you-pay-for).

## [Copy link to heading](#what-does-the-dashboard-show)What does the dashboard show?

One dashboard covers your agent traffic: spend, performance, and token usage across models and agents. The usage section graphs requests by model, time to first token, input and output token counts, and spend over time. Requests are also summarized by project and by API key: request count, average tokens, duration, time to first token, and cost.

The logs page lets you search by request ID, filter by model, provider, or status, and track requests in real time. Open a single request to see how it was routed; the trace shows the cost, tokens, and model behind it. You can export the filtered list as CSV or JSON.

Zero Data Retention and provider allowlists are team-wide policies, and your agents can't route around them. They apply to every request without touching agent configs, which matters most when you start [trying open-weight models safely](https://vercel.com/i/try-open-weight-models-safely).

## [Copy link to heading](#frequently-asked-questions)Frequently asked questions

### [Copy link to heading](#which-coding-agents-does-the-one-command-setup-support)Which coding agents does the one-command setup support?

The setup command, `vercel ai-gateway coding-agents setup`, supports 9 coding agents: Claude Code, Codex, OpenCode, Pi, Cline, Cursor, Hermes, Kilo Code, and OpenClaw. The command detects which of them are installed on your machine and configures each one it finds.

### [Copy link to heading](#can-i-cap-how-much-my-coding-agents-spend)Can I cap how much my coding agents spend?

Yes. Vercel AI Gateway budgets cap spend for the whole team, a single project, or a single API key, with daily, weekly, monthly, or no refresh periods. You can also get an email when the spend crosses 50%, 75%, or 100% of the limit in a period. A budget is optional, and a team, project, or key without one can spend without limit.

### [Copy link to heading](#what-happens-when-a-budget-runs-out)What happens when a budget runs out?

Once spend reaches the limit, Vercel AI Gateway starts rejecting that scope's requests and keeps rejecting them until the budget resets or someone raises it. The check runs before each request, though, so the one that pushes spend past the limit still finishes, and total spend can land slightly over.

### [Copy link to heading](#can-i-see-the-costs-for-each-agent-and-model-in-one-place)Can I see the costs for each agent and model in one place?

Yes. The Vercel AI Gateway dashboard puts spend, performance, and token usage for every agent and model in one place, with requests summarized by project and by API key. Opening a request shows its trace, including the cost, tokens, and model behind it, and the logs page can export a filtered list of requests as CSV or JSON.

### [Copy link to heading](#do-i-need-a-vercel-account-to-use-ai-gateway-with-a-coding-agent)Do I need a Vercel account to use AI Gateway with a coding agent?

Yes. A Vercel account and the latest Vercel CLI are required to run the setup command, vercel ai-gateway coding-agents setup. After setup, you continue using your coding agents as before, and their requests are routed through the gateway on your Vercel account.

[

**Build a software factory with Vercel Connect**

Ship a software factory with GitHub and Linear connectors provisioned for you from the first deployment.

Deploy now

](https://vercel.fyi/eve-software-factory)

## [Copy link to heading](#related-resources)Related resources

- [Use Claude Code with 300+ models](https://vercel.com/i/use-claude-code-with-300-plus-models)

- [Use OpenCode with 300+ models](https://vercel.com/i/use-opencode-with-300-plus-models)

- [Try open-weight models safely](https://vercel.com/i/try-open-weight-models-safely)

- [Which AI model should you pay for?](https://vercel.com/i/which-ai-model-should-you-pay-for)

- [Set up coding agents in one command with AI Gateway](https://vercel.com/changelog/set-up-coding-agents-in-one-command-with-ai-gateway)

- [AI Gateway model catalog](https://vercel.com/ai-gateway/models)

- [Coding agents](https://vercel.com/docs/ai-gateway/coding-agents)