Skip to content
Get started

Threads

Thread-centric AI assistant for conversational trading. Create threads to start conversations, poll response objects for in-progress output, and read finalized messages from thread history. Thread/message/response endpoints require an explicit account_id. Entitlement endpoints are caller-scoped and use trading_account_ids.

Get Threads
GET/v1/omni-ai/threads
Get Thread By ID
GET/v1/omni-ai/threads/{thread_id}
Create Thread
POST/v1/omni-ai/threads
Get Thread Response
GET/v1/omni-ai/threads/{thread_id}/response
Get Messages
GET/v1/omni-ai/threads/{thread_id}/messages
Create Message
POST/v1/omni-ai/threads/{thread_id}/messages
ModelsExpand Collapse
CreateMessageResponse object { response_id, thread_id, user_message_id }

Response payload for continuing a thread with a new message.

response_id: string
thread_id: string
user_message_id: string
CreateThreadResponse object { response_id, thread_id, user_message_id }

Response payload for thread creation.

response_id: string
thread_id: string
user_message_id: string
Message object { id, content, created_at, 5 more }

Final immutable message.

id: string
content: MessageContent { parts }

Finalized immutable message content container. Never includes thinking parts.

parts: array of MessageContentPart
One of the following:

Text content part.

type: "text"
ContentPartStructuredActionPayload { action, action_id }

Structured action content part.

type: "structured_action"

Chart payload content part.

type: "chart"

Suggested actions payload content part.

type: "suggested_actions"

Escape-hatch custom payload content part.

type: "custom"
created_at: string

Immutable terminal outcome for a finalized assistant message.

One of the following:
"completed"
"errored"
"canceled"

Finalized message role in the public contract.

One of the following:
"USER"
"ASSISTANT"
seq: number
thread_id: string
error: optional ErrorStatus { code, message, details }

Shared sanitized error payload.

code: string
message: string
details: optional unknown
MessageContent object { parts }

Finalized immutable message content container. Never includes thinking parts.

parts: array of MessageContentPart
One of the following:

Text content part.

type: "text"
ContentPartStructuredActionPayload { action, action_id }

Structured action content part.

type: "structured_action"

Chart payload content part.

type: "chart"

Suggested actions payload content part.

type: "suggested_actions"

Escape-hatch custom payload content part.

type: "custom"
MessageContentPart = ContentPartTextPayload { text } or ContentPartStructuredActionPayload { action, action_id } or ContentPartChartPayload { payload } or 2 more

Final immutable content part visible on persisted messages.

One of the following:

Text content part.

type: "text"
ContentPartStructuredActionPayload { action, action_id }

Structured action content part.

type: "structured_action"

Chart payload content part.

type: "chart"

Suggested actions payload content part.

type: "suggested_actions"

Escape-hatch custom payload content part.

type: "custom"
MessageList = array of Message { id, content, created_at, 5 more }
id: string
content: MessageContent { parts }

Finalized immutable message content container. Never includes thinking parts.

parts: array of MessageContentPart
One of the following:

Text content part.

type: "text"
ContentPartStructuredActionPayload { action, action_id }

Structured action content part.

type: "structured_action"

Chart payload content part.

type: "chart"

Suggested actions payload content part.

type: "suggested_actions"

Escape-hatch custom payload content part.

type: "custom"
created_at: string

Immutable terminal outcome for a finalized assistant message.

One of the following:
"completed"
"errored"
"canceled"

Finalized message role in the public contract.

One of the following:
"USER"
"ASSISTANT"
seq: number
thread_id: string
error: optional ErrorStatus { code, message, details }

Shared sanitized error payload.

code: string
message: string
details: optional unknown
MessageOutcome = "completed" or "errored" or "canceled"

Immutable terminal outcome for a finalized assistant message.

One of the following:
"completed"
"errored"
"canceled"
MessageRole = "USER" or "ASSISTANT"

Finalized message role in the public contract.

One of the following:
"USER"
"ASSISTANT"
Thread object { id, created_at, title, updated_at }

Thread metadata returned by list/get thread endpoints.

id: string
created_at: string
title: string
updated_at: string
ThreadList = array of Thread { id, created_at, title, updated_at }
id: string
created_at: string
title: string
updated_at: string
ThreadGetThreadsResponse = BaseResponse { metadata, error }
data: ThreadList { id, created_at, title, updated_at }
id: string
created_at: string
title: string
updated_at: string
ThreadGetThreadByIDResponse = BaseResponse { metadata, error }
data: Thread { id, created_at, title, updated_at }

Thread metadata returned by list/get thread endpoints.

id: string
created_at: string
title: string
updated_at: string
ThreadCreateThreadResponse = BaseResponse { metadata, error }
data: CreateThreadResponse { response_id, thread_id, user_message_id }

Response payload for thread creation.

response_id: string
thread_id: string
user_message_id: string
ThreadGetThreadResponseResponse = BaseResponse { metadata, error }
data: Response { id, status, thread_id, 4 more }

Dynamic pollable response.

id: string

Dynamic lifecycle status for a pollable response.

One of the following:
"queued"
"running"
"succeeded"
"failed"
"canceled"
thread_id: string
user_message_id: string
content: optional ResponseContent { parts }

Dynamic response content container. May include thinking parts.

parts: array of ResponseContentPart
One of the following:

Text content part.

type: "text"

Thinking content part shown on dynamic response polling.

type: "thinking"
ContentPartStructuredActionPayload { action, action_id }

Structured action content part.

type: "structured_action"

Chart payload content part.

type: "chart"

Suggested actions payload content part.

type: "suggested_actions"

Escape-hatch custom payload content part.

type: "custom"
error: optional ErrorStatus { code, message, details }

Shared sanitized error payload.

code: string
message: string
details: optional unknown
output_message_id: optional string
ThreadGetMessagesResponse = BaseResponse { metadata, error }
data: MessageList { id, content, created_at, 5 more }
id: string
content: MessageContent { parts }

Finalized immutable message content container. Never includes thinking parts.

parts: array of MessageContentPart
One of the following:

Text content part.

type: "text"
ContentPartStructuredActionPayload { action, action_id }

Structured action content part.

type: "structured_action"

Chart payload content part.

type: "chart"

Suggested actions payload content part.

type: "suggested_actions"

Escape-hatch custom payload content part.

type: "custom"
created_at: string

Immutable terminal outcome for a finalized assistant message.

One of the following:
"completed"
"errored"
"canceled"

Finalized message role in the public contract.

One of the following:
"USER"
"ASSISTANT"
seq: number
thread_id: string
error: optional ErrorStatus { code, message, details }

Shared sanitized error payload.

code: string
message: string
details: optional unknown
ThreadCreateMessageResponse = BaseResponse { metadata, error }
data: CreateMessageResponse { response_id, thread_id, user_message_id }

Response payload for continuing a thread with a new message.

response_id: string
thread_id: string
user_message_id: string