Documentation Index
Fetch the complete documentation index at: https://docs.orq.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
UsePOST /responses on the AI Router with the same request shape as the OpenAI Responses API: model, input, and a tools array that includes a built-in web search entry. The router forwards search to each provider’s native capability when the model supports it.
There is no separate Perplexity or Parallel tool in the router; the supported contract is OpenAI-style web_search / web_search_preview tools on /responses, mapped to Anthropic and Google where applicable.
Prefer models whose metadata indicates web search support. See Supported Models and your workspace model list.
Quick start
Use the OpenAI SDK against the AI Router base URL and call the Responses API directly.POST https://api.orq.ai/v3/router/responses
Tool definitions
Requesttools entries use the discriminated type field, matching the gateway schema.
web_search_preview
| Field | Type | Description |
|---|---|---|
type | "web_search_preview" | Identifies the preview web search tool. |
domains | string[] | Optional allowlist of domains to restrict search. |
search_context_size | string | Optional. One of low, medium, high — how much context to retrieve per result. |
user_location | object | Optional. Hints for localized results (type, city, country, region, timezone). |
web_search
| Field | Type | Description |
|---|---|---|
type | "web_search" | Stable web search tool type. |
search_context_size | string | Optional. low, medium, high. |
user_location | object | Optional. Same shape as above. |
filters | object | Optional. e.g. allowed_domains (nullable array) to restrict domains. |
include (optional)
You can ask for additional fields on web search output items, aligned with OpenAI Responses include:
| Value | Meaning |
|---|---|
web_search_call.results | Include detailed search results where available. |
web_search_call.action.sources | Include source URLs and titles on the action. |
Output: web_search_call
Responses can contain output items with "type": "web_search_call":
| Field | Description |
|---|---|
id | Item id. |
type | "web_search_call". |
status | Lifecycle status for the call. |
action | Optional. type may be search, open_page, or find, plus fields like query, url, pattern, and sources (url + title). |
/responses streams.
Provider behavior
OpenAI
Tools andinclude are passed to client.responses.create with your model id (for example openai/o3). Use the same parameters OpenAI documents for web search on the Responses API.
Anthropic
web_search and web_search_preview in tools are mapped to Anthropic’s web search tool for the Messages path used under /responses.
Google Gemini
The same tool types enable Google Search grounding (googleSearch) for Gemini models that support it.
tool_choice
You can steer the model toward web search using the structured tool_choice form, for example:
tool_choice.type values for built-in tools are defined in the API schema (including web_search, web_search_preview, and related literals). Strings none, auto, and required behave as usual.
Streaming
Set"stream": true on the same JSON body. The server responds with text/event-stream and events in the OpenAI-style response stream format.
Code examples
SetORQ_API_KEY (or pass the key explicitly) so the Authorization header resolves.
Non-streaming
Streaming
For cURL streaming,
-N disables buffering so SSE lines show up as they arrive. Parse data: lines from the response body the same way you would against OpenAI’s Responses stream.See also
- OpenAI-Compatible API — base URL and
/responses - Reasoning — Responses API
reasoningandthinkingon the same endpoint - Tool Calling — function tools on
/chat/completions