Skip to main content
POST
Create a turn in a session

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

sessionId
string
required

Session identifier (.).

Minimum string length: 1
Example:

"01arz3ndektsv4rrffq69g5fav.g"

Body

application/json
input
object[]
previous_turn_id
default:auto

Defaults to 'auto' (chain to session last turn). Use 'null' for the session's first turn.

Available options:
auto

Response

Server-Sent Events stream of turn events.

type
enum<string>
required
Available options:
model.message
id
string
required

Unique identifier for the event

thread_id
string
required
created_at
string
required
content
name
string
refusal
string | null
reasoning_content
string
tool_calls
object[]
finish_reason
enum<string> | null
Available options:
stop,
length,
tool_calls,
content_filter,
function_call
usage
object