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

# Bring your own key (closed models)

> Route your OpenAI, Anthropic, Gemini, xAI, or Mistral traffic through Omnia on your own provider key — same model, one base-URL change, full observability.

You don't have to switch models to start using Omnia. Store your existing
provider key, point your traffic at the gateway, and keep calling the exact
closed model you run today, while every request gains logging, grades,
[calibrated judges](/judges/calibration), and canary-gate eligibility.

## Setup

1. **API Keys → Provider keys** (also under Settings → Workspace): pick the provider, paste
   your API key. It's encrypted at rest and **write-only**: after saving,
   only the key's prefix is ever shown again, to anyone.
2. Point your SDK at the gateway and prefix the model with the provider:

```python theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.omnia-voice.com/v1",
    api_key="sk_sovereign_...",           # your OMNIA key
)
resp = client.chat.completions.create(
    model="openai/gpt-4o",                # provider prefix = the whole opt-in
    messages=[{"role": "user", "content": "..."}],
)
```

The request body is unchanged from what you send today; streaming, tools,
everything. Your provider key never appears in any request; the gateway
attaches it server-side.

## Supported providers

| Prefix       | Provider  | Example                        |
| ------------ | --------- | ------------------------------ |
| `openai/`    | OpenAI    | `openai/gpt-4o`, `openai/o3`   |
| `anthropic/` | Anthropic | `anthropic/claude-sonnet-4-5`  |
| `gemini/`    | Google    | `gemini/gemini-2.5-pro`        |
| `xai/`       | xAI       | `xai/grok-4`                   |
| `mistral/`   | Mistral   | `mistral/mistral-large-latest` |

Any model id the vendor offers works; new launches work day one. (Bedrock
and Vertex use cloud credentials rather than a single API key and aren't
supported this way.)

## Billing

**Your provider bills your key directly — Omnia charges nothing for these
tokens.** Telemetry and logs still record full usage. Judging and evals you
run over this traffic bill as normal Omnia usage, like any judging.

## When your key stops working

A rotated or revoked provider key returns **`401`** with code
`provider_key_rejected` and a message telling you where to update it, never
a generic upstream error. Fix it on the API Keys page (or Settings → Workspace); a saved or deleted key takes effect at the gateway within seconds.

## From BYOK to a cheaper model

Once your closed-model traffic flows through the gateway,
[validated evals](/judges/grading) can measure it against
your own quality bar, and when an open-weights model from the catalog
clears that bar at a fraction of the price, a
[quality-gated canary](/reference/model-aliases) proves it on a live split
and moves you over, with auto-rollback if it's ever wrong. Same traffic,
same judges, and a measured, interval-backed comparison at every step.
