Skip to main content
GET
Get Chat Turn

Authorizations

Authorization
string
header
required

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

Path Parameters

chat_id
string
required
turn_id
string
required

A turn ID from POST /v1/chat or /messages, or latest for the chat's newest turn

Response

Successful Response

Response from GET /v1/chat/{chat_id}/turns/{turn_id}: a message and Chat's work on it.

id
string
required

The turn's id

chat_id
string
required

The chat's id

status
enum<string>
required

queued (not started), running, completed, failed (not charged) or cancelled

Available options:
queued,
running,
completed,
failed,
cancelled
message
string
required

The message that started the turn, or for a scheduled run the task's instruction

messages
string[]
required

Every message in the turn: the first started it, any later one was sent while it ran and joined it. A scheduled run's turn has none.

reply
ChatReplyV1 · object
required
usage
ChatTurnUsageV1 · object
required
created_at
string
required

When the turn started (ISO 8601)

elapsed_seconds
integer
required

Seconds since the turn started, or how long it took once finished

stop_reason
enum<string> | null

Why a finished turn ended: done; needs_input (Chat asked questions and waits for the answers, see reply.questions); stopped (cancelled); error. Null while running.

Available options:
done,
needs_input,
stopped,
error
started_by
enum<string>
default:message

message: a message or answers started the turn. schedule: one of the chat's scheduled tasks ran, and nobody sent a message (only a chat started in the app has scheduled tasks).

Available options:
message,
schedule
completed_at
string | null

When the turn finished (ISO 8601)

last_activity_at
string | null

When Chat last made progress on the turn (a reply, a search starting or finishing). A running turn with no progress for several minutes is stuck or slow and can be cancelled.

next_turn_id
string | null

The chat's next turn, once one was started