Create Response
Create a model response.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Model identifier, e.g. 'openai/gpt-4o'
How to pick between the providers that serve the requested model. Applies only when model is a model name with no provider prefix (e.g. 'gpt-5.5'); ignored for a concrete 'provider/model' id, which already names its provider. This does not choose the model — for that see router_candidates with model='@edenai'.
List of fallback model IDs to try if the primary model fails. Models are tried in order. Example: ['anthropic/claude-3-opus', 'openai/gpt-4o']
3Identifies a conversation, so its requests keep reaching the provider that holds its prompt cache. Any stable string you choose — a thread id, a ticket number, an agent run. Also accepted as the x-session-id header, for clients that cannot add body fields; the body field wins if both are sent. Without one, a conversation is recognised from its opening messages instead.
256Models the '@edenai' router may choose BETWEEN — it picks the model, whereas routing picks the provider for a model you already named. Used only when model='@edenai'. Each entry should be 'provider/model', e.g. ['openai/gpt-4o', 'anthropic/claude-3-5-sonnet-20241022']. If not provided, defaults to all available models.
Text, image, or file inputs to the model. Optional when continuing a conversation via previous_response_id.
System/developer instructions prepended to input. Not carried over when using previous_response_id.
ID of a prior response to continue a multi-turn conversation. The provider manages conversation state server-side.
Whether to stream the response via server-sent events.
List of tools the model may call (function, web_search, file_search, etc.).
Controls which tool is called. 'auto', 'required', 'none', or a specific tool object.
0 <= x <= 20 <= x <= 1x >= 1Reasoning configuration, e.g. {'effort': 'low'|'medium'|'high'}.
How to handle context that exceeds the model's context window.
auto, disabled Whether the provider should store the response server-side for later retrieval.
Up to 16 key-value pairs for tagging.
Stable end-user identifier for abuse detection.
Prompt-cache routing hint (OpenAI): requests sharing a key and a common prompt prefix are routed to the same cache shard, improving hit rates for high-volume shared prefixes. Forwarded to providers that support it, dropped elsewhere. Also read for provider stickiness when no session_id or x-session-id is given.
How long the provider retains the prompt cache — OpenAI currently accepts "in_memory" (provider default, typically 5-10 minutes) and "24h" (extended retention, supported on gpt-5.x and gpt-4.1). The known values are advertised in the schema but not enforced: the value is passed through verbatim for the provider to validate, so new provider values work without an Eden AI release. Dropped for providers that don't support it.
in_memory, 24h Request-level prompt-cache settings (mode and ttl) for OpenAI GPT-5.6 and newer models. Ignored by models that don't support prompt caching.
Text output configuration, e.g. {'format': {'type': 'json_schema', ...}}.
Additional output data to include, e.g. 'file_search_call.results'.
Whether to run the model response in the background.
Response
Successful Response
- ResponseOutputMessage
- Option 2
"response"