single strategy) sends all traffic for a route to one target. Once it is in place, callers send requests to the route by 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 whose access policy allows the model you want. 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.
- Give the rule a Name, for example
gpt-4o-direct. Your application calls it asroute::gpt-4o-direct. - Choose the target: the Provider, the Model (pick a suggestion or type an id, for example
gpt-4o), and the stored credential to use for it. - Save the rule.
route::gpt-4o-direct resolve to this route, and to11 injects the stored credential. Requests that name a provider directly, as <provider-slug>::<model>, keep using passthrough.
Send a request
Once the rule is live, call the route 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, and each request picks one through itsmodel field. For example, with Direct routing rules named gpt-4o-direct and claude-direct:
To confirm how a given request resolved — managed route or passthrough, and which target served it — open Projects → Traces in Observe.
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 how a request picks its layer.