Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Your QX API key. The X-API-Key header works too

Body

application/json
model
string
required

The agent's ID, as shown in its URL in the app, or builtin:qx_agent for the QX agent

Example:

"builtin:qx_agent"

input
required

The message as text, or a list holding one user message, or a list of answers to approval requests. Answers go on the conversation that paused, with no message

Example:

"Summarise my unread emails from today"

previous_response_id
string

Continues the conversation of this response

conversation
string

Continues this conversation. Send this or previous_response_id, not both

stream
boolean
default:false

Stream the turn as server-sent events

permission_mode
enum<string>

What happens to a tool that needs approval, for this message only. delegated (the default for a message): it's refused. normal (the default for answers): the turn pauses with approval requests. auto: it runs without asking.

Available options:
delegated,
normal,
auto
connected_accounts
object

The account to use for an app on this message, as app to account ID, from the connected accounts endpoint

Response

The agent's turn. With stream, a stream of Responses API events instead

id
string

The response's ID. Send it as previous_response_id to continue the conversation

object
string
created_at
integer
status
string

completed, failed or cancelled

model
string
conversation
object
previous_response_id
string | null

The previous_response_id the request sent

output
Item · object[]

What the agent did, in order. Its thinking as reasoning items, its messages as message items, its finished tool calls as mcp_call items, and mcp_approval_request items when the turn paused

usage
object | null

The turn's tokens. Null while the turn runs

error
object | null

Why the turn failed. Null otherwise

steered
boolean

Only when the conversation was already running a turn. The message joined that turn, which answers it