Create account
For businesses and self-employed professionals only

Menu

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.

  1. Request ID

    Every response carries its own identifier in the x-request-id header.

  2. 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
  3. Check the key

    Unknown, blocked or expired keys get no further.

    401 invalid_api_key
  4. Check the account

    A suspended account is turned away before limits or credit are touched.

    403 account_suspended
  5. Key permission

    Only a key for AI calls may call a model.

    403 insufficient_key_scope
  6. 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_exceeded 503 provider_overloaded
  7. Concurrent requests

    If as many requests are already running as your tier allows, the next one is refused immediately.

    429 concurrent_requests_exceeded
  8. Deprecation

    A model being phased out says so in the Deprecation and Sunset headers. After the cutoff date it is rejected.

    410 model_deprecated
  9. Idempotency

    With the Idempotency-Key header, 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_progress 422 idempotency_key_reuse
  10. Check request and model

    Fields are checked, provider/model is resolved in the catalog, and the model must support the field.

    400 invalid_field_value 404 model_not_found 400 unsupported_for_model
  11. Reserve credit

    The request only continues if there is enough credit and the price is known.

    429 insufficient_quota 503 pricing_unavailable
  12. Provider

    FlowModels calls exactly the model you named, streamed or as JSON, and bills the actual usage.

    502 routing_execution_failed 503 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.

FieldEffect
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.

  • n
  • logprobs
  • top_logprobs
  • audio
  • store
  • previous_response_id
  • background
  • conversation
  • webhook_endpoint_id
  • metadata

Create a key, name a model, start building.

FlowModels is aimed exclusively at businesses and self-employed professionals.