Use built-in server-side tools
Use built-in server-side tools
Use web search and other built-in tools without client-side tool orchestration.
Retain server-side conversation state
Retain server-side conversation state
Server-side state is retained between turns via
previous_response_id, without resending the full message history.Send multimodal input
Send multimodal input
Pass
input_image and input_file items in a single request.Build agent-style workflows
Build agent-style workflows
Combine function calling, reasoning, and tool continuation for agent-style loops.
The Responses API is the OpenAI-style
/responses endpoint on the AI Gateway, exposed at POST /v3/router/responses. It implements the OpenResponses specification: a request carries a model and an input, and the response returns structured output items together with token and cost usage. The endpoint supports built-in tools such as web search, server-side conversation state, streaming, and multimodal input. Choose it when those capabilities matter; for a classic messages-based flow, use Chat Completions.
Invoke a configured agent by setting
model to agent/<key>; the agent’s tools, knowledge bases, and memory apply automatically. See Run Agents.Responses vs Chat Completions
Both endpoints share the same base URL (https://api.orq.ai/v3/router), authentication, and AI Gateway features: fallbacks, retries, caching, guardrails, and budgets. The table below lists the differences.
Function calling works on both endpoints through the
tools array; see Tool Calling.
Quick Start
Use the OpenAI SDK against the AI Gateway base URL and callclient.responses.create.
Statefulness
Responses are persisted server-side by default (store defaults to true) and can be retrieved by ID (GET /v3/router/responses/{response_id}, see Retrieve Response). Continue a conversation by passing previous_response_id on the next request; the gateway uses the stored conversation instead of requiring the full history again. previous_response_id requires store: true on the original response.
Set
store: false to skip persisting a response. The response cannot be retrieved later, and previous_response_id will not work on follow-up requests.Streaming
Set"stream": true on the request body. The server responds with a Server-Sent Events stream in the OpenAI Responses format: incremental text arrives as response.output_text.delta events, and the stream ends with a completed event carrying final usage. See Streaming for event handling, retry, and error patterns.
Built-in tools
Built-in tools run server-side: pass them in thetools array and the gateway executes them during generation. Web search is available only through the Responses API, as web_search and web_search_preview tool types. See Web search in Responses API for tool fields, provider mapping, and the include option.
Function tools work on both endpoints; see Tool Calling.
Multimodal input
Send images and PDFs alongside text in theinput array using input_image and input_file items. See Multimodal inputs and generation for supported formats and full examples.
AI Gateway features
All AI Gateway features apply to the Responses API. Most are configured per request through request-body fields; budgets are configured in the console and apply by scope.See also
- Create Response: full request and response reference
- Retrieve Response: fetch a stored response by ID
- OpenAI-Compatible API: base URL and all supported endpoints
- Run Agents: invoke a configured agent through the Responses API
- Reasoning:
reasoningeffort for OpenAI models via the Responses API - Using Prompts: template variables and prompt substitution
- Memory stores: persistent memory across requests with the
memoryfield