gpt-5.6-sol is served by four providers, kimi-k2.6 by seven, gpt-oss-120b by fifteen. 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.
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.
sort never changes which model answers, only who serves it.
Trying providers in a set order
Setrouting.order to name the providers to try first, in the order you want them tried.
sort objective if you set one. Traffic is not spread by price: once your list matches a provider, the chain is a fixed ranking, not a weighted draw.
- A provider marked down moves last. If health checks mark a listed provider as down, it moves to the end of the chain, whatever its position in your list.
orderis a preference, not a restriction. If none of the providers you list sells the model, or all of them are marked down, the request starts with another provider of the model. Withallow_fallbacks: false, that provider is the only one tried. To make sure only certain providers are ever used, list them inallowed_providerstoo.- Long lists may not be tried in full. A request makes at most 8 attempts, and the entries in your
fallbackskeep their slots first. See Fallback. - An entry that does not sell the model is skipped. Naming any
orderstill turns off sticky routing, as an explicitsortdoes, even when none of its entries sell the model.
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.
Excluding specific providers
Setrouting.ignored_providers to keep a request away from specific providers.
allowed_providers: every provider of kimi-k2.6 except DeepInfra can serve the request, including on failover. An entry that does not sell the model has no effect. If the list excludes every provider of the model, the request fails with a 400 naming the providers that sell it.
Setting a maximum price
Setrouting.max_price to route only to providers whose listed per-token rates are at or below your ceiling.
pricing of its entry in /v3/models?view=models.
Prices are in USD per million tokens. Set input, output, or both. Providers that charge by another unit (such as per image or per second) are not filtered. If no provider of the model is within the ceiling, the request fails with a 400 naming the cheapest provider and its rates, so you know what ceiling would work.
How these settings apply
order, allowed_providers, ignored_providers and max_price follow the same rules:
- Use the provider name from the catalog. It is the part before the first
/in an endpoint id from/v3/models?view=models, such asamazon(notbedrock),vertex,fireworks_aiortogether_ai. Names are case-insensitive. A name that matches no provider is not an error, it just matches nothing, so a misspelledignored_providersentry excludes nothing. - They apply to every model name without a provider, in
modeland infallbacks. If any of them is left with no provider, the whole request fails with a400, even when the other models still have one. - A concrete
provider/modelis never filtered or reordered. It goes exactly where you sent it, inmodelor infallbacks. To keep a request away from a provider, don’t name that provider in either. - Invalid values return a
422: an empty provider name or one longer than 64 characters, more than 16 entries inorder, the same provider in bothallowed_providersandignored_providers, or amax_pricewith neitherinputnoroutput, a negative price, or any other key (a typo such asouputis rejected rather than ignored).
Requiring zero data retention
Setrouting.zero_data_retention to true to serve the request only from providers that keep no prompts or outputs. Eden AI also saves neither the request nor its response.
provider/model and your fallbacks included. A model name keeps only its providers that qualify; a concrete provider/model or a fallback that doesn’t qualify fails the request with no_compliant_provider, naming each one and why. Which models pass, how your own keys are handled, what else it turns off, and how an organization requires it for every call: see Compliance Policies.
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.
allow_fallbacks to null is equivalent to omitting it, leaving provider failover enabled.
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.x-session-id, x-claude-code-session-id, x-session-affinity, and session-id. The body field wins if headers are present.
cURL
session_id and the session headers are accepted on all three chat dialects (/v3/chat/completions, /v3/responses and /v3/v1/messages) and are capped at 256 characters. They are never forwarded to the provider.
How long provider affinity lasts
After Eden AI observes a cache write or read, it keeps the conversation on that provider for 10 minutes by default. Each later cache write or read refreshes the window. When you declare a prompt-cache lifetime, sticky routing follows it so the provider affinity matches the cache window:
If a request declares more than one duration, Eden AI uses the longest one, capped at the maximum retention of the provider that served the cache write or read. Providers without a known extended-retention policy use a conservative one-hour ceiling.
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 or routing.order also takes priority over cache affinity. 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
Fallback
Name your own backup models
LLM Models
Browse available models and their pricing
Servers Location
Where each region runs
Request Metadata
See which provider actually served the request