Skip to main content
POST
Interactions 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.

Body

application/json
contents
any
required

Any value

input
any
required

Any value

agent
string
background
boolean
cache_control
object

Opt in to automatic prompt caching for Anthropic-family models routed through this Gemini-shape endpoint: {"type":"ephemeral"} (optionally "ttl":"1h"). Places one moving cache breakpoint on the largest cacheable prefix. Caching is off unless set; no-op on Gemini and other providers with automatic server-side caching. Cache writes cost 1.25x input and reads 0.1x

custom_model_credentials
object
generation_config
object
metadata
object
model
string
previous_interaction_id
string
response_format
object
response_mime_type
string
safety_settings
object[]
store
boolean
stream
boolean
system_instruction
object
tool_config
object
tools
object[]

Response

Successful response

status
string
required
agent
string
error
object
id
string
model
string
previous_interaction_id
string
role
string
steps
object[]
usage
object