Skip to content

Chat

List Sessions
GET/api/v1/chat
Create Session
POST/api/v1/chat
Get Full Session
GET/api/v1/chat/{session_id}
Delete Session
DELETE/api/v1/chat/{session_id}
Get Session Summary
GET/api/v1/chat/{session_id}/summary
Generate Session Title
POST/api/v1/chat/{session_id}/title
Stream Messages
POST/api/v1/chat/{session_id}/messages/stream
ModelsExpand Collapse
ChatListResponse = object { last_updated_at, session_id, generated_title, 2 more }

Summary of a chat session, including its title and last run metadata.

last_updated_at: string

ISO-format timestamp showing when the session was last updated.

session_id: string

Unique session identifier.

generated_title: optional string

Auto-generated title derived from the first user message.

index_ids: optional array of string

Indexes this session is bound to. Null on unbound sessions.

job_metadata: optional object { duration_ms, error, export_config_ids, 4 more }

Token usage and status from the most recent run. Null if the session has not been run yet.

duration_ms: optional number
error: optional string
export_config_ids: optional array of string
is_error: optional boolean
total_input_tokens: optional number
total_output_tokens: optional number
turns: optional number
ChatCreateResponse = object { last_updated_at, session_id, generated_title, 2 more }

Summary of a chat session, including its title and last run metadata.

last_updated_at: string

ISO-format timestamp showing when the session was last updated.

session_id: string

Unique session identifier.

generated_title: optional string

Auto-generated title derived from the first user message.

index_ids: optional array of string

Indexes this session is bound to. Null on unbound sessions.

job_metadata: optional object { duration_ms, error, export_config_ids, 4 more }

Token usage and status from the most recent run. Null if the session has not been run yet.

duration_ms: optional number
error: optional string
export_config_ids: optional array of string
is_error: optional boolean
total_input_tokens: optional number
total_output_tokens: optional number
turns: optional number
ChatRetrieveResponse = object { events, last_updated_at, session_id, 3 more }

Full chat session including its complete event history.

events: array of object { content, type } or object { content, type } or object { content, type } or 5 more

Ordered list of events that make up the conversation history.

One of the following:
ThinkingDelta = object { content, type }
content: string
type: optional "thinking_delta"
TextDelta = object { content, type }
content: string
type: optional "text_delta"
Thinking = object { content, type }
content: string
type: optional "thinking"
Text = object { content, type }
content: string
type: optional "text"
ToolCall = object { arguments, call_id, name, type }
arguments: map[unknown]
call_id: string
name: string
type: optional "tool_call"
ToolResult = object { call_id, name, result, 2 more }
call_id: string
name: string
result: unknown
image_attachment: optional object { attachment_name, source_id }

Coordinates for lazily resolving a page screenshot presigned URL.

attachment_name: string
source_id: string
type: optional "tool_result"
Stop = object { error, is_error, usage, type }
error: string
is_error: boolean
usage: object { duration_ms, total_input_tokens, total_output_tokens, turns }
duration_ms: optional number
total_input_tokens: optional number
total_output_tokens: optional number
turns: optional number
type: optional "stop"
UserInput = object { content, type }
content: string
type: optional "user_input"
last_updated_at: string

ISO-format timestamp showing when the session was last updated.

session_id: string

Unique session identifier.

generated_title: optional string

Auto-generated title derived from the first user message.

index_ids: optional array of string

Indexes this session is bound to. Null on unbound sessions.

job_metadata: optional object { duration_ms, error, export_config_ids, 4 more }

Token usage and status from the most recent run. Null if the session has not been run yet.

duration_ms: optional number
error: optional string
export_config_ids: optional array of string
is_error: optional boolean
total_input_tokens: optional number
total_output_tokens: optional number
turns: optional number
ChatGetSummaryResponse = object { last_updated_at, session_id, generated_title, 2 more }

Summary of a chat session, including its title and last run metadata.

last_updated_at: string

ISO-format timestamp showing when the session was last updated.

session_id: string

Unique session identifier.

generated_title: optional string

Auto-generated title derived from the first user message.

index_ids: optional array of string

Indexes this session is bound to. Null on unbound sessions.

job_metadata: optional object { duration_ms, error, export_config_ids, 4 more }

Token usage and status from the most recent run. Null if the session has not been run yet.

duration_ms: optional number
error: optional string
export_config_ids: optional array of string
is_error: optional boolean
total_input_tokens: optional number
total_output_tokens: optional number
turns: optional number
ChatSetTitleResponse = object { last_updated_at, session_id, generated_title, 2 more }

Summary of a chat session, including its title and last run metadata.

last_updated_at: string

ISO-format timestamp showing when the session was last updated.

session_id: string

Unique session identifier.

generated_title: optional string

Auto-generated title derived from the first user message.

index_ids: optional array of string

Indexes this session is bound to. Null on unbound sessions.

job_metadata: optional object { duration_ms, error, export_config_ids, 4 more }

Token usage and status from the most recent run. Null if the session has not been run yet.

duration_ms: optional number
error: optional string
export_config_ids: optional array of string
is_error: optional boolean
total_input_tokens: optional number
total_output_tokens: optional number
turns: optional number
ChatStreamResponse = unknown