Create a response
OpenAI Responses-compatible endpoint. Models that list
POST /v1/responses in supported_endpoints accept the Responses
request shape: input, instructions, streaming, function tools,
and structured output through text.format.
Responses are not stored: store is always false, whatever the
request sets. Send the full conversation in input with every
request. A previous_response_id, conversation, or prompt, or an
item_reference input item, returns 400 with the code
unsupported_parameter and param naming the field. Background
responses are not available: background: true returns 400 with
the code unsupported_value and param background. For a response
past 15 minutes, use WebSocket mode.
A tool type the model does not support returns 400 with param
naming the tool, for example tools[1].type. A web_search tool
turns on the model’s own web search when the model has one.
The response object repeats the settings of the request, including
tools, tool_choice, parallel_tool_calls, instructions,
temperature, top_p, max_output_tokens, text, reasoning,
user, and metadata. store is always false. A response
cut off by max_output_tokens or a content filter has status
incomplete, and incomplete_details.reason says which.
With stream: true the response is a Server-Sent Events stream of
Responses events, starting with response.created and
response.in_progress. A completed answer ends with
response.completed, and an answer cut off by max_output_tokens
or a content filter ends with response.incomplete. A stream that
fails after it starts ends with response.failed, whose
response.error gives the code and message; an error event can
come just before it. The stream ends after its final event, with no
[DONE] sentinel.
Authentication
Pass your EmpirioLabs API key as a bearer token. The Anthropic-style
x-api-key header is also accepted on every endpoint.
Request
The full conversation: a string, or a list of input items (messages, function calls, and function call outputs). Responses are not stored, so an item_reference item returns 400.
Stream the response as Server-Sent Events.
Responses are not stored, whatever this is set to; the response always reports false.
Background responses are not available. true returns 400 with param background and the code unsupported_value; leave it out or set it to false.
Tools the model may call, in the Responses format: function tools, and web_search, which turns on the model’s own web search when the model has one. A tool type the model does not support returns 400 naming it.
auto, none, required, an object naming one function, or an allowed_tools object that limits the call to some of tools.
Reasoning settings such as effort, on models that offer reasoning control.
Your own key-value labels, repeated on the response.
The most tokens the model may generate for the response, reasoning tokens included. A response that reaches it ends with status incomplete.
Output format, for example {"format": {"type": "json_schema", "name": "...", "strict": true, "schema": {...}}}.
Response
The response object, or a Server-Sent Events stream when stream is true.
Output items in order, such as message, function_call, and reasoning items. Item IDs start with msg_, fc_, or rs_.
The text of every output_text part of the output, joined.
Set when status is incomplete.
Set when status is failed.
Always false.
