single strategy) sends all traffic for a model to one target. Once it is in place, callers send requests by model name and to11 uses the stored credential to reach the provider — the caller does not supply a provider key. Use it when one provider and one credential are all you need for a model.
Before you start
- A provider connected under Project → AI Gateway → Providers, with the model you want in its model list. See Connecting a provider.
- A stored credential for that provider, set up under Credentials.
Create a Direct routing rule
- Open Project → AI Gateway → Routing.
- In the routing list, start a new rule with the create-rule flow.
- Choose the Direct routing strategy.
- Set the model the rule applies to (for example
gpt-4o). - Choose the target: the provider and the stored credential to use for this model.
- Save the rule.
Send a request
Once the rule is live, call the model by name. The caller needs only its to11 credential — no provider key:The to11 credential goes in
x-to11-authorization. Authorization (or x-api-key) is reserved for an upstream provider key when you bring your own — it is not used for a managed route.Managed and passthrough together
A project can mix the two. Each Direct routing rule covers one model, and every model without a rule falls through to passthrough, where the caller supplies a provider key. For example, with a separate Direct routing rule ongpt-4o and on claude-sonnet-4-6, but none on gpt-4o-mini:
| Model | Routing mode | Caller supplies a provider key? |
|---|---|---|
gpt-4o | Managed (Direct routing) | No |
claude-sonnet-4-6 | Managed (Direct routing) | No |
gpt-4o-mini | Passthrough | Yes |
Next steps
Weighted split
Split traffic across multiple targets by weight.
Fallback chain
Fail over to the next target on error.
Routing overview
The three-layer model and top-down resolution.