gpt-5.6-sol is served by OpenAI and Azure, kimi-k2.6 by seven providers, gpt-oss-120b by ten. They run the same weights at different prices, speeds and reliability.
Name a model without a provider prefix and Eden AI picks which provider serves it.
Finding the routable models
Ask any model listing for the grouped view and you get one entry per routable name, with the providers behind it nested underneath:cURL
endpoints carries its own, so this one call answers both questions: which names route, and what each provider charges and supports. See Listing Models for the full field reference.
Provider routing chooses which provider serves the model you named. It is separate from Smart Routing, where
@edenai chooses which model to use. The two compose: @edenai picks a model, then provider routing picks who serves it.How a provider is chosen
By default Eden AI optimises for cost: the cheapest provider for the shape of your request, accounting for how much of it is prompt versus completion. Selection is weighted rather than absolute: cheaper providers receive proportionally more traffic instead of every request piling onto a single one. That keeps you off one provider’s rate limits and spreads exposure when a provider degrades. Providers that are failing are ranked below healthy ones and are never chosen first. They stay in the chain as a last resort, because a struggling provider is still better than no answer.Choosing an objective
Setrouting.sort to optimise for something other than price.
speed, latency and exact rank on observed performance. When Eden AI has too little data for a model, routing falls back to ranking on price rather than guessing, and your request still succeeds.cost means the cheapest provider every time, not a weighted draw.
Restricting which providers may be used
routing.allowed_providers narrows the pool to providers you trust or have agreements with. Everything else is excluded, including from failover.
Disabling provider failover
By default, if the chosen provider fails, Eden AI tries another provider of the same model. Setrouting.allow_fallbacks to false to stop that. The request is attempted once and the error is returned to you.
Keeping a conversation on one provider
A prompt cache lives at one provider endpoint. If routing picks a different provider on turn two of a conversation, that cache is not there, so you pay to build it again instead of reading it at a discount. Sticky routing keeps a conversation on the provider that already holds its cache. It is on by default, and only ever active for models whose providers discount cache reads. Where there is no discount there is nothing to gain, so routing keeps spreading by price. You don’t have to do anything: with no identifier, Eden AI recognises a conversation from its opening messages, which don’t change as it grows. Sending an identifier makes it reliable. Use any stable string: a thread id, a ticket number, an agent run id.cURL
session_id is accepted on all three chat dialects (/v3/chat/completions, /v3/responses and /v3/v1/messages) and is capped at 256 characters. It is never forwarded to the provider.
Choosing a session id
The identifier has to be the same on every turn of one conversation. That is the whole contract, and both ways of getting it wrong look like using the feature correctly:
Mint it once when the conversation starts, store it alongside the conversation, and send it on every turn.
Turning it off
routing.sort also takes priority, because “cheapest” has to keep meaning cheapest, cache or no cache. And a concrete provider/model was never routed in the first place.
Confirm it is working with Request Metadata: the provider in
summary should be the same on every turn. Your usage block reports the cached tokens. Expect none on the first turn, since there was nothing to read yet.Pinning a region
Append@region to route to a provider endpoint in a specific region. This composes with everything above, and each entry in a chain carries its own region, so the primary and the fallback below are two separate attempts in two separate regions.
Seeing which provider served your request
Routing is invisible by default: the response looks the same whichever provider answered. Sendx-edenai-metadata: enabled and Eden AI attaches what it decided, including every provider it tried and the status each returned.
strategy values, and how to read the block off a stream.
Turning routing off
Name aprovider/model and routing never runs. The request goes exactly where you sent it. This is the behaviour of every request that names a provider, and nothing about provider routing changes it.
Next Steps
Smart Routing
Let Eden AI choose the model as well as the provider
Fallback
Name your own backup models
LLM Models
Browse available models and their pricing
Servers Location
Where each region runs