Here, routing means you decide.
You name the model as provider/model and FlowModels sends the request exactly there. One key and one invoice, however many providers you use.
No automatic failover.
FlowModels never picks a model for you and never quietly switches to another provider. If the chosen provider answers with 429 or 503, we retry the same call with the same provider at most twice, as long as the request deadline allows. After that, you get the error with its code.
The path of a request.
The order is the order in the code. A request stops at the first step that rejects it.
-
Request ID
Every response carries its own identifier in the
x-request-idheader. -
Key in the header only
The key must be in
Authorization: Bearer. In the URL or the body it is rejected.401 invalid_token_source -
Check the key
Unknown, blocked or expired keys get no further.
401 invalid_api_key -
Check the account
A suspended account is turned away before limits or credit are touched.
403 account_suspended -
Key permission
Only a key for AI calls may call a model.
403 insufficient_key_scope -
Per-minute limit
The per-minute budget of your tier. For the OpenAI model families there is also a shared ceiling across all accounts, which does not count against your own budget. The
x-ratelimit-*headers tell you where you stand.429 rate_limit_exceeded503 provider_overloaded -
Concurrent requests
If as many requests are already running as your tier allows, the next one is refused immediately.
429 concurrent_requests_exceeded -
Deprecation
A model being phased out says so in the
DeprecationandSunsetheaders. After the cutoff date it is rejected.410 model_deprecated -
Idempotency
With the
Idempotency-Keyheader, the same request without streaming gets the same response instead of being paid for twice. Streamed responses are not stored: after a complete stream the key is free again and a retry runs anew.409 idempotency_key_in_progress422 idempotency_key_reuse -
Check request and model
Fields are checked,
provider/modelis resolved in the catalog, and the model must support the field.400 invalid_field_value404 model_not_found400 unsupported_for_model -
Reserve credit
The request only continues if there is enough credit and the price is known.
429 insufficient_quota503 pricing_unavailable -
Provider
FlowModels calls exactly the model you named, streamed or as JSON, and bills the actual usage.
502 routing_execution_failed503 provider_overloaded
Parameters of POST /v1/chat/completions
The chosen model must also support a field. If it does not, the API answers with 400 unsupported_for_model.
| Field | Effect |
|---|---|
model |
Required: the model as provider/model |
messages |
Required: history with system, user, assistant and tool |
stream |
Response as Server-Sent Events |
stream_options.include_usage |
Usage in the last stream event |
temperature, top_p |
Spread of the response |
max_tokens |
Output ceiling, also the basis of the reservation |
frequency_penalty, presence_penalty, stop, seed |
Further control, as far as the model accepts it |
tools, tool_choice |
Your own tools: the model calls them, you run them |
response_format |
JSON object or a fixed JSON schema |
reasoning_effort |
Compute effort for reasoning models |
web_search |
Web search, if the model supports it |
Rejected by the API
/v1/chat/completions answers these fields with 400 unsupported_field instead of quietly ignoring them.
nlogprobstop_logprobsaudiostoreprevious_response_idbackgroundconversationwebhook_endpoint_idmetadata