Responses

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

post/v3/router/responses

Request

  • Base URL
    https://my.orq.ai
  • URL
    https://my.orq.ai/v3/router/responses
  • Auth
    HTTP bearer

Request body

backgroundboolean

If true, the response runs asynchronously in the background.

fallback_on_codesinteger[] nullable

HTTP status codes that trigger fallback. Defaults to [408,429,500,502,503,504,529]. Each code must be unique and between 400 and 599.

frequency_penaltynumber double

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

includestring[]

Additional fields to include in the response. Use web_search_call.action.sources to add source URLs and titles to a web search action, or web_search_call.results for detailed results. See the Web search guide for the supported values.

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' | 'ultrafast' | 'scale' | 'priority'

Processing mode for the request. Ultrafast is available for GPT-6 Astra on US/global processing. Fast uses premium low-latency processing; priority remains a backward-compatible alias.

speed'standard' | 'fast'

Inference speed for direct Anthropic models. Fast mode is available on Claude Opus 4.8, Opus 5, and Opus 5.5 at premium pricing, and cannot be combined with batch or priority processing.

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.

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' | 'ultrafast' | 'scale' | 'priority' required
status'queued' | 'in_progress' | 'completed' | 'failed' | 'incomplete' required
storeboolean required
temperaturenumber double required
textunknown required
tool_choiceunknown required
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

Changes

    • breaking

      request property / was restricted to a list of enum values

    • warning

      added the new 12h enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new 12h enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new 12h enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new 12h enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new 12h enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new 12h enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new 12h enum value to the ///// response property for the response status (media type: application/json)

    • warning

      added the new instant enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new instant enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new instant enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new instant enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new instant enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new instant enum value to the //////// response property for the response status (media type: text/event-stream)

    • warning

      added the new instant enum value to the ///// response property for the response status (media type: application/json)

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property ///////

    • info

      added the new optional request property ///////

    • info

      added the new optional request property ///////

    • info

      added the new optional request property /

    • info

      added the new optional request property

    • info

      the request property / became optional

    • info

      added the new 12h enum value to the request property /

    • info

      added the new instant enum value to the request property /

    • info

      added the new instant enum value to the request property ///

    • info

      added the new instant enum value to the request property ///

    • info

      added the new latency_based enum value to the request property /

    • info

      added the new round_robin enum value to the request property /

    • info

      added the new weight_based enum value to the request property /

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property //////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property ///////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property //////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property ///////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property //////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property ///////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property //////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property ///////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property //////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property ///////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property //////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property ///////// to the response with the status (media type: text/event-stream)

    • info

      added the optional property ///// to the response with the status (media type: application/json)

    • info

      added the optional property ////// to the response with the status (media type: application/json)

    • breaking

      removed the enum value 12h of the request property /

    • breaking

      removed the enum value instant of the request property /

    • breaking

      removed the enum value instant of the request property ///

    • breaking

      removed the enum value instant of the request property ///

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property ///////

    • warning

      removed the request property ///////

    • warning

      removed the request property ///////

    • warning

      removed the request property

    • warning

      removed the optional property ///////// from the response with the status (media type: text/event-stream)

    • warning

      removed the optional property ///////// from the response with the status (media type: text/event-stream)

    • warning

      removed the optional property ///////// from the response with the status (media type: text/event-stream)

    • warning

      removed the optional property ///////// from the response with the status (media type: text/event-stream)

    • warning

      removed the optional property ///////// from the response with the status (media type: text/event-stream)

    • warning

      removed the optional property ///////// from the response with the status (media type: text/event-stream)

    • warning

      removed the optional property ////// from the response with the status (media type: application/json)

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the 12h enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the 12h enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the 12h enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the 12h enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the 12h enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the 12h enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the 12h enum value from the ///// response property for the response status (media type: application/json)

    • info

      removed the instant enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the instant enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the instant enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the instant enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the instant enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the instant enum value from the //////// response property for the response status (media type: text/event-stream)

    • info

      removed the instant enum value from the ///// response property for the response status (media type: application/json)