Skip to main content
POST
Create and execute a turn in a session

Authorizations

Authorization
string
header
required

Caller credential (Authorization: Bearer <token>). Required on protected routes when auth is enabled. Browser sessions may use the HttpOnly id_token or accessToken cookie instead.

Path Parameters

session_id
string
required

Session identifier.

Required string length: 1 - 64

Body

application/json
input
object[]

Turn input items: user messages and/or approval/tool-response resumes. Do not mix user messages with approval or tool-response items.

previous_turn_id
default:auto

Defaults to 'auto' (chain to session last turn). Use 'none' for a new root turn.

Available options:
auto
stream
boolean
default:true

When true (default), stream turn events as SSE. When false, return the running turn immediately.

Response

When stream is false: the running turn. When stream is true: Server-Sent Events stream of turn events.

data
object
required