# AI Gateway

The AI Gateway is one endpoint for every model provider. Your code, agents or coding agent asks for a **model**, and the gateway calls its **provider**. The gateway offers one key for every provider, one bill and one place to turn models off.

## 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                                   |

Credits come from the account the API key belongs to. A project's key bills that project's account; a key from your account settings bills your personal account.

## Which models it serves

Every model has a `provider/model` ID, such as `anthropic/claude-haiku-4-5-20251001`, and `GET /ai/models` lists them. Each level can only narrow the one above it:

| Level   | Turns models off with                                               | Sets a default with                                    |
| ------- | ------------------------------------------------------------------- | ------------------------------------------------------ |
| Account | [Account settings > Model access](/docs/ai-gateway/model-access.md) | [Default model](/docs/ai-gateway/default-model.md)     |
| Project | [Building blocks > Models](/docs/agents/project-models.md)          | [Default model](/docs/agents/project-default-model.md) |
| API key | [Set allowed models](/docs/authentication/key-models.md)            |                                                        |

An agent with no model of its own answers with its project's default, or else its account's. A key that calls a model off its list gets `403` `key-model-denied`.

## Choose a task

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

  Call any model from your code.

* [Use your own provider key](/docs/ai-gateway/provider-keys.md)

  Bill model calls to your own OpenAI or Anthropic account.

* [Use coding agents](/docs/ai-gateway/coding-agents.md)

  Run Claude Code, Cursor or Codex on Veryfront credits.

* [Turn off models across an account](/docs/ai-gateway/model-access.md)

  Switch a model off for every project in an account.

* [Set an account's default model](/docs/ai-gateway/default-model.md)

  Choose the model an account's agents answer with when they have none of their own.

* [Limit an API key's models](/docs/authentication/key-models.md)

  Let a key call only some models.

## Next steps

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