Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

API key or UI session JWT passed as a Bearer token.

Headers

AiQL-Workspace
string
required

ID of the workspace the request operates on.

Body

application/json
content
string
default:""

Natural-language prompt for the agent turn. Empty when resuming deferred tools.

chat_id
string | null

Existing chat/query id. Created when omitted.

documentId
string | null

Optional document scope for the agent turn.

interactionMode
enum<string>
default:ask

Inquiry interaction mode: ask (Haiku), reason/build (Opus).

Available options:
ask,
reason,
build
variant
enum<string>
default:root

Inquiry surface variant controlling available tools.

Available options:
root,
explore,
canvas,
app,
written-document,
presentation,
dashboard-cards
canvasId
string | null

Bound canvas id for canvas-variant turns.

deckId
string | null

Bound presentation deck id for presentation-variant turns.

writtenDocumentId
string | null

Bound written document id for written-document-variant turns.

deferredToolResults
Deferredtoolresults · object | null

Client-side tool results used to resume a deferred agent turn.

message_history
Message History · object[] | null

Optional prior model/UI message history.

Response

Successful Response

chat_id
string
required
run_id
string
required
channel
string
required
token
string
required
subscription_token
string
required
ws_url
string
required
since
StreamPosition · object | null