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 · object | null
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

Sampling parameters ignored because the selected model does not support them.