Skip to main content
POST
Grounded Responses API (v1)

Error Reference: Grounded Responses

Common errors: unsupported model, missing or invalid grounding parameters, context window exceeded, provider timeout, provider unavailable.

Authorizations

Authorization
string
header
default:<api-key>
required

Bearer authentication header of the form Bearer <api-key>, where <api-key> is your API key.

Headers

X-Cache-TTL
string | null

Body

application/json

Responses API request body extended with retrieval-augmented generation: retrieved publisher content is injected into the prompt before the model is called. Takes the same grounding parameters as the grounded Chat Completions endpoint.

input
required

String prompt or array of input items

model
string
required
certainty_threshold
number | null

Minimum vector-similarity certainty (0-1) a retrieved source must meet to be attached. Omit to use the server default.

Required range: 0 <= x <= 1
frequency_penalty
number | null
image_generation
Image Generation · object | null

Image generation options (quality, size) mapped onto OpenAI's image_generation tool; ignored by providers without quality controls.

instructions
string | null
max_output_tokens
integer | null
parallel_tool_calls
boolean | null
presence_penalty
number | null
prompt_cache_key
string | null
rag_publisher
string | null
default:GlooGrounded

Publisher whose content is searched for grounding sources. Omit the field to use the default publisher (GlooGrounded); send an empty string or null to disable retrieval and answer from the model alone.

reasoning
Reasoning Config · object | null

Reasoning controls for a Responses request. On the Responses endpoints, a summary comes back only when summary is set. See the Reasoning guide (/api-guides/reasoning).

response_format
Response Format · object | null
sources_limit
integer
default:3

Maximum number of sources to retrieve and inject.

Required range: 1 <= x <= 10
stop
unknown
stream
boolean
default:false
temperature
number | null
tool_choice
unknown
tools
Tools · object[] | null
top_p
number | null

Response

Successful grounded Responses API result. If stream is false or omitted, the response is JSON and includes sources_returned. If stream=true, the response is a named Server-Sent Events stream and X-Sources-Returned reports whether retrieval returned sources.

A non-streaming grounded Responses API result.

id
string
required
object
string
default:response
required
Allowed value: "response"
created_at
integer
required

Unix timestamp when the response was created.

model
string
required
status
enum<string>
required
Available options:
completed,
failed,
in_progress,
incomplete
output
(Message · object | Image Generation · object | Function Call · object | Reasoning · object)[]
required

Items generated by the model, such as assistant messages, images, function calls, or reasoning summaries.

An assistant message produced by the model.

sources_returned
boolean
required

Whether retrieval returned sources used to ground the request.

usage
Usage · object

Token usage for the response.

instructions
string
max_output_tokens
integer
metadata
object
parallel_tool_calls
boolean
prompt_cache_key
string
reasoning
object
temperature
number
text
object
tool_choice
any
tools
object[]
top_p
number
ignored_params
Ignored Parameters · object

Parameters that were ignored or not applied as sent. The request still succeeds. Entries are name=value: sampling parameters the selected model does not accept and, on Direct Responses, reasoning removed from input (input.reasoning=<n> reasoning items, input.reasoning_paired=<n> other items removed with them) and stateful parameters that have no effect (previous_response_id, conversation, store=True, background=True). On a stream, the parameter names are in the X-Ignored-Params header instead.

Example:
reasoning_carryover
Reasoning Carry-over Report · object

What happened to the reasoning items in the request's input. Present only when input contained at least one reasoning item, or the request asked for include: ["reasoning.encrypted_content"]; otherwise absent. Gloo does not carry reasoning from one request to the next: reasoning state sent back in input is removed before any model is called, and the request still succeeds. Returned by the guarded Responses and Grounded Responses endpoints. On a stream, the counts are in the X-Gloo-Reasoning-Carryover header and this object is a top-level field of the final response.completed or response.incomplete event's data; a stream that fails before either event ends without it. Direct Responses does not return this object or the header: it reports removed reasoning as input.reasoning=<n> and input.reasoning_paired=<n> in ignored_params (X-Ignored-Params on a stream).

Example: