curl --request POST \
--url https://api.opper.ai/v3/compat/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.opper.ai/v3/compat/responses"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.opper.ai/v3/compat/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"id": "<string>",
"incomplete_details": "<unknown>",
"model": "<string>",
"object": "<string>",
"output": [
{
"type": "<string>",
"arguments": "<string>",
"call_id": "<string>",
"content": [
{
"text": "<string>",
"type": "<string>",
"annotations": [
"<unknown>"
]
}
],
"encrypted_content": "<string>",
"id": "<string>",
"name": "<string>",
"role": "<string>",
"status": "<string>",
"summary": [
{
"text": "<string>",
"type": "<string>"
}
]
}
],
"status": "<string>",
"tool_choice": "<unknown>",
"completed_at": 123,
"cost": 123,
"frequency_penalty": 123,
"instructions": "<string>",
"max_output_tokens": 123,
"metadata": {},
"output_text": "<string>",
"parallel_tool_calls": true,
"presence_penalty": 123,
"previous_response_id": "<string>",
"reasoning": {
"effort": "<string>",
"summary": "<string>"
},
"service_tier": "<string>",
"temperature": 123,
"text": {
"format": {
"type": "<string>",
"name": "<string>",
"schema": {}
}
},
"tools": [
{
"type": "<string>",
"description": "<string>",
"headers": {},
"name": "<string>",
"parameters": {},
"require_approval": "<string>",
"server_label": "<string>",
"server_url": "<string>"
}
],
"top_p": 123,
"truncation": "<string>",
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"cost": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens_details": {
"reasoning_tokens": 123
}
},
"user": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Responses
OpenAI Responses API compatible endpoint. Supports streaming via the stream parameter.
curl --request POST \
--url https://api.opper.ai/v3/compat/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.opper.ai/v3/compat/responses"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.opper.ai/v3/compat/responses', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"id": "<string>",
"incomplete_details": "<unknown>",
"model": "<string>",
"object": "<string>",
"output": [
{
"type": "<string>",
"arguments": "<string>",
"call_id": "<string>",
"content": [
{
"text": "<string>",
"type": "<string>",
"annotations": [
"<unknown>"
]
}
],
"encrypted_content": "<string>",
"id": "<string>",
"name": "<string>",
"role": "<string>",
"status": "<string>",
"summary": [
{
"text": "<string>",
"type": "<string>"
}
]
}
],
"status": "<string>",
"tool_choice": "<unknown>",
"completed_at": 123,
"cost": 123,
"frequency_penalty": 123,
"instructions": "<string>",
"max_output_tokens": 123,
"metadata": {},
"output_text": "<string>",
"parallel_tool_calls": true,
"presence_penalty": 123,
"previous_response_id": "<string>",
"reasoning": {
"effort": "<string>",
"summary": "<string>"
},
"service_tier": "<string>",
"temperature": 123,
"text": {
"format": {
"type": "<string>",
"name": "<string>",
"schema": {}
}
},
"tools": [
{
"type": "<string>",
"description": "<string>",
"headers": {},
"name": "<string>",
"parameters": {},
"require_approval": "<string>",
"server_label": "<string>",
"server_url": "<string>"
}
],
"top_p": 123,
"truncation": "<string>",
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123,
"cost": 123,
"input_tokens_details": {
"cached_tokens": 123
},
"output_tokens_details": {
"reasoning_tokens": 123
}
},
"user": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"meta": {}
}Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
Function name for tracing and project-level guardrail function-scope filtering.
Parent span ID for distributed tracing context.
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
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
Show child attributes
Show child attributes
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.
OpenAI cache-routing key: a stable name for the prompt prefix this request shares with others. Forwarded to OpenAI and used to keep requests that share the key on the same cache replica at providers with per-replica prompt caches.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Any value
Show child attributes
Show child attributes
Response
Successful response
Show child attributes
Show child attributes
Any value
Show child attributes
Show child attributes
Any value
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes