> ## Documentation Index
> Fetch the complete documentation index at: https://ngrok.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Models

> Understanding model naming and request formats in the AI Gateway.

Models are the AI systems that process your requests. You specify the model in each request body, and you can use an [access key configuration](/ai-gateway/guides/access-key-configurations) to restrict which models an access key may call.

## Specifying models

### Model name only

```json theme={null}
{
  "model": "gpt-4o",
  "messages": [{"role": "user", "content": "Hello"}]
}
```

The gateway looks up `gpt-4o` in the [model catalog](/ai-gateway/reference/model-catalog) and routes to OpenAI.

### Provider prefix

```json theme={null}
{
  "model": "anthropic:claude-sonnet-4-6",
  "messages": [{"role": "user", "content": "Hello"}]
}
```

Use `provider:model` when you want to force a specific provider or target [a model you run yourself](/ai-gateway/guides/use-a-model-you-run-yourself).

## Multiple models (failover)

List fallback models with the `models` array:

```json theme={null}
{
  "model": "gpt-4o",
  "models": ["gpt-4o-mini", "anthropic:claude-sonnet-4-6"],
  "messages": [{"role": "user", "content": "Hello"}]
}
```

The gateway tries `model` first, then each entry in `models` in order, until one succeeds.

## Unknown models (pass-through)

If a model is not in the catalog, the gateway still routes it when you include a provider prefix:

```json theme={null}
{
  "model": "openai:some-new-model",
  "messages": [{"role": "user", "content": "Hello"}]
}
```

The provider returns an error if the model does not exist. Pass-through models must still be allowed by the access key's configuration.

## Model aliases

Model and provider names are not case-sensitive. The catalog includes built-in aliases—see [Aliases reference](/ai-gateway/reference/model-catalog#aliases-reference).

## Model capabilities

Models differ in input/output modalities, context window, and features. See the [model catalog](/ai-gateway/reference/model-catalog) for details.

## Next steps

* [Model catalog](/ai-gateway/reference/model-catalog): Supported models by provider
* [Choose a model](/ai-gateway/guides/model-selection-strategies): Model IDs and provider prefixes
* [Configure fallback models](/ai-gateway/guides/configure-fallback-models): Try another model when the first one fails
* [Restrict providers and models](/ai-gateway/guides/restrict-providers-and-models): Limit models per key
