v171

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0726249111.7 MB
Responses

Create response

Creates a model response for the given input. Returns a response object or a stream of server-sent events.

post/v3/router/responses

Request body

backgroundboolean

If true, the response runs asynchronously in the background.

frequency_penaltynumber double

Penalize new tokens based on their frequency in the text so far. Between -2.0 and 2.0.

instructionsstring

System prompt / instructions for the model.

integration_idstring

Integration ID used to resolve provider credentials for this request.

max_output_tokensinteger

Maximum number of tokens in the response output.

max_tool_callsinteger

Maximum number of tool call rounds in the agentic loop.

metadataobject

Developer-defined key-value pairs attached to the response (OpenAI spec: Map<string, string>). Non-string values are rejected with a 400.

modelstring

The model to use in provider/model format (e.g. openai/gpt-4o). Use agent/<key> to invoke a pre-configured agent from the orq.ai platform.

parallel_tool_callsboolean

Whether to allow parallel tool calls.

presence_penaltynumber double

Penalize new tokens based on their presence in the text so far. Between -2.0 and 2.0.

previous_response_idstring

The ID of a previous response to continue from. Requires store to be true (default) on the original response.

prompt_cache_keystring

Key for prompt caching across requests.

safety_identifierstring

Safety identifier for content filtering.

service_tier'auto' | 'default' | 'flex' | 'fast' | 'scale' | 'priority'

Processing mode for the request. Fast uses premium low-latency processing; priority remains a backward-compatible alias.

stop_sequencesstring[]

Custom text sequences that cause the model to stop generating. Forwarded to providers that support it (e.g. Anthropic); ignored otherwise.

storeboolean

Whether to persist the response (default: true). When false, the response cannot be retrieved later and previous_response_id will not work for follow-up requests.

streamboolean

If true, returns a stream of server-sent events.

tagsstring[] nullable

Tags attached to the request trace.

temperaturenumber double

Sampling temperature between 0 and 2.

template_engine'text' | 'jinja' | 'mustache'

Template engine for variable substitution in instructions. Defaults to the agent manifest's engine when invoking an agent, otherwise text.

top_kinteger

Only sample from the top K options for each subsequent token. Forwarded to providers that support it (e.g. Anthropic); ignored otherwise.

top_logprobsinteger

Number of most likely tokens to return at each position.

top_pnumber double

Nucleus sampling parameter.

variablesobject

Template variables for prompt substitution. Plain values fill {{variable}} placeholders in instructions. For secrets, use {"secret": true, "value": "sensitive-data"} — secrets are automatically passed to platform tools (Python, HTTP, MCP) and redacted from traces.

Response

Returns a response object or a stream of events.

backgroundboolean required
completed_atinteger nullable required
created_atinteger required
frequency_penaltynumber double required
idstring required
instructionsstring nullable required
max_output_tokensinteger nullable required
max_tool_callsinteger nullable required
metadataobject required

Developer-defined key-value pairs attached to the response (OpenAI spec: Map<string, string>).

modelstring required
objectstring required

Always "response"

parallel_tool_callsboolean required
presence_penaltynumber double required
previous_response_idstring nullable required
prompt_cache_keystring nullable required
prompt_cache_retentionstring nullable required
safety_identifierstring nullable required
service_tier'auto' | 'default' | 'flex' | 'fast' | 'scale' | 'priority' required
status'queued' | 'in_progress' | 'completed' | 'failed' | 'incomplete' required
storeboolean required
temperaturenumber double required
{"stackTrail":"paths:/v3/router/responses:post:responses:200:content:application/json:schema:properties:text","oasType":"schema","type":"unknown","description":"Text output configuration including format and verbosity"}
{"stackTrail":"paths:/v3/router/responses:post:responses:200:content:application/json:schema:properties:tool_choice","oasType":"schema","type":"unknown","description":"Tool choice setting: \"auto\", \"none\", \"required\", or a specific function"}
top_kinteger

Only sample from the top K options for each subsequent token. Present only when set on the request.

top_logprobsinteger required
top_pnumber double required
truncation'disabled' | 'auto' required
userstring nullable required
variablesobject