Skip to main content
POST
OpenResponses API

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token.

Headers

X-Opper-Name
string

Function name for tracing and project-level guardrail function-scope filtering.

X-Opper-Parent-Span-Id
string<uuid>

Parent span ID for distributed tracing context.

X-Opper-Tags
string

Comma-separated key:value usage-attribution tags (e.g. tenant:acme,project:demo, max 8). Recorded on the generation's billing/metrics rows; group spend by any key via GET /v2/analytics/usage?group_by=. Header-borne twin of the /v3/session URL prefix tags (which win per key when both are present); opper.-prefixed keys and session_id are reserved. Malformed values return 400.

Body

application/json
cache_control
object

Opt in to automatic prompt caching for Anthropic-family models: {"type":"ephemeral"} (optionally "ttl":"1h"). Places one moving cache breakpoint on the largest cacheable prefix. Caching is off unless set; no-op on providers with automatic server-side caching (OpenAI

frequency_penalty
number
include
string[]
input
object
instructions
string
max_output_tokens
integer
max_tool_calls
integer
metadata
object
model
string
models
string[]

Fallback models tried in order when the model before them fails for any reason (provider error; rate limit; timeout; a member blocked by one of your rules). Same OpenRouter shape: send the primary in model and the rest here; or omit model and the first entry is the primary. Each entry is any model string: a bare pooled name; a provider/model id; an org alias. Not allowed together with a dynamic/ route. At most 10 entries. Which model answered is in the X-Opper-Served-Model header; the model field still echoes what you sent.

parallel_tool_calls
boolean
presence_penalty
number
previous_response_id
string
reasoning
object
service_tier
string
store
boolean
stream
boolean
temperature
number
text
object
tool_choice
any

Any value

tools
object[]
top_p
number
truncation
string

Response

Successful response

completed_at
integer
required
created_at
integer
required
error
object
required
id
string
required
incomplete_details
any
required

Any value

model
string
required
object
string
required
output
object[]
required
status
string
required
tool_choice
any
required

Any value

frequency_penalty
number
instructions
string
max_output_tokens
integer
metadata
object
parallel_tool_calls
boolean
presence_penalty
number
previous_response_id
string
reasoning
object
service_tier
string
temperature
number
text
object
tools
object[]
top_p
number
truncation
string
usage
object