Skip to main content
POST
Messages 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
max_tokens
integer
required
messages
object[]
required
model
string
required
metadata
object
output_format
object
stop_sequences
string[]
stream
boolean
system
any

Any value

temperature
number
thinking
any

Any value

tool_choice
any

Any value

tools
object[]
top_k
integer
top_p
number

Response

Successful response

content
any[]
required

Any value

id
string
required
model
string
required
role
string
required
stop_reason
string
required
stop_sequence
string
required
type
string
required
usage
object
required