Skip to main content
POST
/
v3
/
compat
/
v1beta
/
interactions
Interactions API
curl --request POST \
  --url https://api.opper.ai/v3/compat/v1beta/interactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contents": "<unknown>",
  "input": "<unknown>"
}
'
{
  "status": "<string>",
  "agent": "<string>",
  "error": {
    "code": "<string>",
    "message": "<string>"
  },
  "id": "<string>",
  "model": "<string>",
  "previous_interaction_id": "<string>",
  "role": "<string>",
  "steps": [
    {
      "type": "<string>",
      "arguments": {},
      "content": [
        {
          "data": "<string>",
          "role": "<string>",
          "text": "<string>",
          "type": "<string>",
          "uri": "<string>"
        }
      ],
      "id": "<string>",
      "name": "<string>",
      "signature": "<string>",
      "summary": {
        "data": "<string>",
        "role": "<string>",
        "text": "<string>",
        "type": "<string>",
        "uri": "<string>"
      }
    }
  ],
  "usage": {
    "total_cached_tokens": 123,
    "total_input_tokens": 123,
    "total_output_tokens": 123,
    "total_thought_tokens": 123,
    "total_tokens": 123
  }
}

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
custom_model_credentials
object
generation_config
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