Routing and fallbacks
Call a catalog model directly, or group models into your own fallback route.
Call any catalog model by its ID, or call a custom route that tries several models in order. outerlane falls back when an upstream cannot return a valid response, and you are billed only for the model that answers. The response model is the actual responding model, while x_outerlane.requested_model preserves the model or route ID you sent.
Before trying a model, outerlane checks that it can serve the request. A model is skipped when it does not support image input, tools, or the requested output length. Image and video generation models are never used for text requests.
Custom routes
Open Routes and create a route with one to six text catalog model IDs in fallback order. The route is called as route/<slug>, and outerlane tries its compatible models in the exact order you saved.
{
"model": "route/production-chat",
"messages": [{ "role": "user", "content": "Hello" }]
}Routes are private to your account. Renaming or reordering a route changes future requests without changing application code.
Explicit fallbacks
Add up to four fallback model IDs with the OpenRouter-compatible models array. The primary model is tried first.
{
"model": "anthropic/claude-sonnet-5-5",
"models": ["openai/gpt-6.1-sol", "google/gemini-4-neon"],
"messages": [{ "role": "user", "content": "Hello" }]
}Fallbacks apply to all three text protocols: Chat Completions, Responses, and Anthropic Messages. If the first upstream returns an error before a valid response is accepted, outerlane tries the next compatible candidate. Streaming output that has already started is not restarted under a different model.
Inspect the route
x_outerlane.route_attempts contains model IDs, statuses, error codes, and attempt durations. It does not expose upstream provider names or internal upstream model IDs.
{
"model": "openai/gpt-6.1-sol",
"x_outerlane": {
"requested_model": "route/production-chat",
"cache_hit": false,
"route_attempts": [
{ "model": "anthropic/claude-sonnet-5-5", "status": 502, "code": "upstream_error", "durationMs": 84 },
{ "model": "openai/gpt-6.1-sol", "status": 200, "code": null, "durationMs": 421 }
]
}
}