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

# AI Gateway

> One endpoint in front of 700+ models. Drop in your SDK, fall back across models with dynamic routes, keep data in the EU, and see one bill across every provider.

The AI Gateway is the request path. Your app sends a call, the gateway picks a model, runs it, and returns the result. One gateway and API key, with [700+ models](https://docs.opper.ai/capabilities/models.md) behind it. The gateway is hosted in the EU; provider inference locations depend on the selected model.

It replaces wiring up each provider yourself, so there are no per-provider SDKs, keys, billing, or rate limits to manage. To swap a model, change a string.

## What the gateway gives you

> [card] One API, every model
>
> Reach 700+ models from 50+ providers, including OpenAI, Anthropic, Google, and Mistral, through a single endpoint and key.

> [card] [Every modality](https://docs.opper.ai/build/multimodal/overview.md)
>
> Not just text — generate images, speech, and video, transcribe audio, and run realtime voice.

> [card] Drop-in SDKs
>
> Keep the OpenAI, Anthropic, or Google AI SDK you already use. Change the base URL, nothing else.

> [card] Switch models without code
>
> Point your app at a dynamic route and change its models in the platform, no deploy.

> [card] Bring your own keys
>
> Register your own provider deployments and API keys. They work like any other model.

> [card] Keep inference in the EU
>
> Hosted in the EU. Pin an EU route per call, or restrict every call to EU-only or zero-retention providers at the gateway.

> [card] One bill, every provider
>
> Every response carries its cost. Spend across all providers in one place.

> [card] Observability built in
>
> Every call is metered and listed in [Logs](https://docs.opper.ai/control-plane/logs.md): cost, latency, and tokens. Control Plane adds full traces.

## One API, every model

Address any model as `provider/model`. The same call works whether you point it at OpenAI, Anthropic, or a model hosted in the EU.

```bash theme={null}
openai/gpt-5            # OpenAI
anthropic/claude-opus-4-7   # Anthropic
mistral/mistral-large-2512   # Mistral, EU-hosted
```

Some models are served by more than one provider (for example the same Claude model via Anthropic, Azure, or Bedrock). Opper balances across them for you, so a single name keeps working even when one provider is busy.

To call a model, point your SDK at `https://api.opper.ai/v3/compat` — see [Drop-in SDKs](https://docs.opper.ai/build/gateway/drop-in-sdks.md). The same endpoint covers text, [structured output](https://docs.opper.ai/build/gateway/structured-output.md), [tool calling](https://docs.opper.ai/build/gateway/tools.md), and [multimodal input](https://docs.opper.ai/build/multimodal/vision-pdfs.md), with the same routing, governance, and tracing on every call.

The gateway isn't text-only. Dedicated endpoints generate [images](https://docs.opper.ai/build/multimodal/images.md) (`POST /v3/images`), [speech and transcripts](https://docs.opper.ai/build/multimodal/audio.md) (`POST /v3/audio/*`), and [video](https://docs.opper.ai/build/multimodal/video.md) (`POST /v3/videos`), and [realtime voice](https://docs.opper.ai/build/realtime/quickstart.md) runs over a WebSocket — all behind the same key and governance. See [Multimodality](https://docs.opper.ai/build/multimodal/overview.md).

For classification and scoring, [decision models](https://docs.opper.ai/build/gateway/evaluations.md) answer in OpenAI's Decisions format at `POST /v3/compat/decisions` and in TypeSafe's System One format at `POST /v3/compat/v1/systemone`, returning probabilities, categories, and scores through the same project key.

## Pin and switch models without touching code

Keep model names out of your application. Set a default once and change it without a deploy:

* **[Default model](https://docs.opper.ai/control-plane/route.md)** sets the model for calls that don't name one, per organization or project. Edit one rule to move a project to a different model.
* **[Custom models](https://docs.opper.ai/capabilities/custom-models.md)** let you register your own provider deployments and call them like any other model in the catalog.

Callers can still pass an explicit `model` for per-call trade-offs, as long as [model access](https://docs.opper.ai/control-plane/rules/model-access.md) allows it.

## Bring your own keys

You can go beyond Opper's hosted models. Register your own provider deployments and API keys (for example a private Azure OpenAI deployment), and they show up in the catalog alongside built-in models with the same routing, governance, and tracing.

```bash theme={null}
curl -X POST https://api.opper.ai/v2/custom-models \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPPER_API_KEY" \
  -d '{
    "name": "example/my-gpt",
    "provider": "azure",
    "model_id": "gpt-production",
    "api_key": "your-provider-key",
    "params": {"api_base": "https://your-deployment.openai.azure.com/", "api_version": "2024-06-01"}
  }'
```

Call it like any other model: `example/my-gpt`. See [Custom models](https://docs.opper.ai/capabilities/custom-models.md) for the full setup.

## Keep data in the EU

The gateway is hosted exclusively in the EU. The only thing that leaves is the model call itself, and you control where that goes.

With a [model access](https://docs.opper.ai/control-plane/rules/model-access.md) rule you can restrict every call to:

* EU-only routes, by where inference runs and where providers store content (see [EU data residency](https://docs.opper.ai/control-plane/eu-data-residency.md))
* Specific regions or countries
* Providers that meet your data requirements, including the Zero data retention policy

Opper storage is configured separately. Opper stores no traces until a retention rule turns tracing on. To stop storing new traces after that, switch tracing off in [Opper retention](https://docs.opper.ai/control-plane/rules/retention.md) so an enabled **0-day** retention rule applies. Usage records are still kept, and existing traces keep their original expiry dates. See that page for the effects on files and response caching.

If you also need provider data restrictions, configure the provider data policy in [Model access](https://docs.opper.ai/control-plane/rules/model-access.md). Set both controls to meet both requirements: turning Opper tracing off does not restrict providers, and selecting a provider data policy does not turn Opper tracing off.

Anything that breaks a rule is rejected at the gateway before it reaches a provider. See [Security](https://docs.opper.ai/overview/security.md) for more.

## One bill, full visibility

Every response includes its `cost`, computed the same way across all 700+ models. The gateway aggregates spend and usage across providers, so you get one bill and one place to watch it.

Every call is metered (cost, latency, tokens) and shows up in **Analytics** for spend over time. Turn tracing on with a [retention rule](https://docs.opper.ai/control-plane/rules/retention.md) (Control Plane) and you also get the full [trace](https://docs.opper.ai/overview/concepts.md) for each call, with inputs, outputs, and every step.

## How the Gateway and Rules work together

The Gateway runs your requests. [Rules](https://docs.opper.ai/control-plane/rules/overview.md) defines
the boundaries it enforces.

| | AI Gateway | Rules |
| - | - | - |
| **Role** | Runs every request | Defines what requests may do |
| **You use it by** | Making model calls | Configuring policies in the platform |
| **Examples** | Fallbacks, provider access, usage metering | Retention, spend limits, model access, checks, routing |

Configure a rule once; the Gateway applies it to every matching call.

## Security

The gateway also enforces data residency. The next page covers how Opper is hosted and protected.

> [card] [Security](https://docs.opper.ai/overview/security.md)
>
> EU hosting, sub-processors, encryption, and deletion.

> [card] [Models](https://opper.ai/models)
>
> The full catalog. EU-hosted models marked.

> [card] [Build on Opper](https://docs.opper.ai/build/overview.md)
>
> Ready to build? Text, multimodal, and voice.

> [card] [Drop-in SDKs](https://docs.opper.ai/build/gateway/drop-in-sdks.md)
>
> Use the OpenAI, Anthropic, or Google AI SDK you already have.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.