# How the AI Gateway works

The AI Gateway is one gateway for every model provider, with a route per protocol: `/ai/v1` for OpenAI clients, `/ai` for Anthropic and Google. Your code and agents call it, and it calls the provider.

## Before you start

Calls through the gateway need a Veryfront account. [Sign in](/sign-in) or create one.

## Who pays

| Calls go                                | Billed to              | Set up                                                                          |
| --------------------------------------- | ---------------------- | ------------------------------------------------------------------------------- |
| Through the gateway, on Veryfront's key | Your Veryfront credits | An [API key](/docs/authentication/api-keys.md) in your code; nothing for agents |
| Through the gateway, on your key        | Your provider account  | [Use your own provider key](/docs/ai-gateway/provider-keys.md)                  |
| Straight to the provider, no gateway    | Your provider account  | `OPENAI_API_KEY` in the project's environment                                   |

## Choose a task

| You want to                                              | Go to                                                           |
| -------------------------------------------------------- | --------------------------------------------------------------- |
| Call any model from your code                            | [Use any SDK](/docs/ai-gateway/sdk.md)                          |
| Bill model calls to your own OpenAI or Anthropic account | [Use your own provider key](/docs/ai-gateway/provider-keys.md)  |
| Run Claude Code, Cursor or Codex on Veryfront credits    | [Use coding agents](/docs/ai-gateway/coding-agents.md)          |
| Let a key call only some models                          | [Limit an API key's models](/docs/authentication/key-models.md) |

## Next steps

* [Use any SDK](/docs/ai-gateway/sdk.md)
