Skip to content
Start Trading

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 account_ids.

Get Threads
GET/v1/omni-ai/threads
Get Thread
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
ContextItem object { data, kind, label, captured_at }

A snapshot of the widget the user asks about.

data: map[unknown]

Relevant widget data, selections, and units. Use strings for exact decimals and large IDs.

kind: string

Nonblank descriptive kind. New kinds do not require a backend release.

minLength1
label: string

Nonblank attachment label for conversation rendering.

minLength1
captured_at: optional string

Client-reported snapshot time. Omit when unknown.

formatdate-time
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, 6 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:
ContentPartText = ContentPartTextPayload { text }

Text content part.

type: "text"
ContentPartStructuredAction = ContentPartStructuredActionPayload { action, action_id, clicked, 2 more }

Structured action content part.

type: "structured_action"
ContentPartChart = ContentPartChartPayload { payload }

Chart payload content part.

type: "chart"
ContentPartSuggestedActions = ContentPartSuggestedActionsPayload { payload }

Suggested actions payload content part.

type: "suggested_actions"
ContentPartCustom = ContentPartCustomPayload { payload }

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
context: optional TurnContext { items }

Immutable snapshots attached to this user message. Omitted when none were supplied. When a null/undefined value is observed, it indicates that there is no available data.

items: array of ContextItem { data, kind, label, captured_at }

One to four snapshots. Each snapshot’s data may contain at most 32 levels of nesting.

data: map[unknown]

Relevant widget data, selections, and units. Use strings for exact decimals and large IDs.

kind: string

Nonblank descriptive kind. New kinds do not require a backend release.

minLength1
label: string

Nonblank attachment label for conversation rendering.

minLength1
captured_at: optional string

Client-reported snapshot time. Omit when unknown.

formatdate-time
error: optional ErrorStatus { code, message, details }

When a null/undefined value is observed, it indicates it does not apply.

code: string
message: string
details: optional unknown

When a null/undefined value is observed, it indicates it does not apply.

MessageContent object { parts }

Finalized immutable message content container. Never includes thinking parts.

parts: array of MessageContentPart
One of the following:
ContentPartText = ContentPartTextPayload { text }

Text content part.

type: "text"
ContentPartStructuredAction = ContentPartStructuredActionPayload { action, action_id, clicked, 2 more }

Structured action content part.

type: "structured_action"
ContentPartChart = ContentPartChartPayload { payload }

Chart payload content part.

type: "chart"
ContentPartSuggestedActions = ContentPartSuggestedActionsPayload { payload }

Suggested actions payload content part.

type: "suggested_actions"
ContentPartCustom = ContentPartCustomPayload { payload }

Escape-hatch custom payload content part.

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

Final immutable content part visible on persisted messages.

One of the following:
ContentPartText = ContentPartTextPayload { text }

Text content part.

type: "text"
ContentPartStructuredAction = ContentPartStructuredActionPayload { action, action_id, clicked, 2 more }

Structured action content part.

type: "structured_action"
ContentPartChart = ContentPartChartPayload { payload }

Chart payload content part.

type: "chart"
ContentPartSuggestedActions = ContentPartSuggestedActionsPayload { payload }

Suggested actions payload content part.

type: "suggested_actions"
ContentPartCustom = ContentPartCustomPayload { payload }

Escape-hatch custom payload content part.

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

Finalized immutable message content container. Never includes thinking parts.

parts: array of MessageContentPart
One of the following:
ContentPartText = ContentPartTextPayload { text }

Text content part.

type: "text"
ContentPartStructuredAction = ContentPartStructuredActionPayload { action, action_id, clicked, 2 more }

Structured action content part.

type: "structured_action"
ContentPartChart = ContentPartChartPayload { payload }

Chart payload content part.

type: "chart"
ContentPartSuggestedActions = ContentPartSuggestedActionsPayload { payload }

Suggested actions payload content part.

type: "suggested_actions"
ContentPartCustom = ContentPartCustomPayload { payload }

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
context: optional TurnContext { items }

Immutable snapshots attached to this user message. Omitted when none were supplied. When a null/undefined value is observed, it indicates that there is no available data.

items: array of ContextItem { data, kind, label, captured_at }

One to four snapshots. Each snapshot’s data may contain at most 32 levels of nesting.

data: map[unknown]

Relevant widget data, selections, and units. Use strings for exact decimals and large IDs.

kind: string

Nonblank descriptive kind. New kinds do not require a backend release.

minLength1
label: string

Nonblank attachment label for conversation rendering.

minLength1
captured_at: optional string

Client-reported snapshot time. Omit when unknown.

formatdate-time
error: optional ErrorStatus { code, message, details }

When a null/undefined value is observed, it indicates it does not apply.

code: string
message: string
details: optional unknown

When a null/undefined value is observed, it indicates it does not apply.

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.

id: string
created_at: string
title: string
updated_at: string

Time of the last activity: a new message in the thread or a change to the thread.

formatdate-time
ThreadList = array of Thread { id, created_at, title, updated_at }
id: string
created_at: string
title: string
updated_at: string

Time of the last activity: a new message in the thread or a change to the thread.

formatdate-time
TurnContext object { items }

Client snapshots attached to one instant-chat user message.

Context is separate from visible message text and does not grant account access. The compact JSON representation must not exceed 64 KiB.

items: array of ContextItem { data, kind, label, captured_at }

One to four snapshots. Each snapshot’s data may contain at most 32 levels of nesting.

data: map[unknown]

Relevant widget data, selections, and units. Use strings for exact decimals and large IDs.

kind: string

Nonblank descriptive kind. New kinds do not require a backend release.

minLength1
label: string

Nonblank attachment label for conversation rendering.

minLength1
captured_at: optional string

Client-reported snapshot time. Omit when unknown.

formatdate-time
ThreadGetThreadsResponse = BaseResponse { metadata, error }
data: ThreadList { id, created_at, title, updated_at }
id: string
created_at: string
title: string
updated_at: string

Time of the last activity: a new message in the thread or a change to the thread.

formatdate-time
ThreadGetThreadByIDResponse = BaseResponse { metadata, error }
data: Thread { id, created_at, title, updated_at }

Thread metadata.

id: string
created_at: string
title: string
updated_at: string

Time of the last activity: a new message in the thread or a change to the thread.

formatdate-time
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 }

When a null/undefined value is observed, it indicates that there is no available data.

parts: array of ResponseContentPart
One of the following:
ContentPartText = ContentPartTextPayload { text }

Text content part.

type: "text"
ContentPartThinking = ContentPartThinkingPayload { thoughts }

Thinking content part shown on dynamic response polling.

type: "thinking"
ContentPartStructuredAction = ContentPartStructuredActionPayload { action, action_id, clicked, 2 more }

Structured action content part.

type: "structured_action"
ContentPartChart = ContentPartChartPayload { payload }

Chart payload content part.

type: "chart"
ContentPartSuggestedActions = ContentPartSuggestedActionsPayload { payload }

Suggested actions payload content part.

type: "suggested_actions"
ContentPartCustom = ContentPartCustomPayload { payload }

Escape-hatch custom payload content part.

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

When a null/undefined value is observed, it indicates it does not apply.

code: string
message: string
details: optional unknown

When a null/undefined value is observed, it indicates it does not apply.

output_message_id: optional string

When a null/undefined value is observed, it indicates it does not apply.

formatuuid
ThreadGetMessagesResponse = BaseResponse { metadata, error }
data: MessageList { id, content, created_at, 6 more }
id: string
content: MessageContent { parts }

Finalized immutable message content container. Never includes thinking parts.

parts: array of MessageContentPart
One of the following:
ContentPartText = ContentPartTextPayload { text }

Text content part.

type: "text"
ContentPartStructuredAction = ContentPartStructuredActionPayload { action, action_id, clicked, 2 more }

Structured action content part.

type: "structured_action"
ContentPartChart = ContentPartChartPayload { payload }

Chart payload content part.

type: "chart"
ContentPartSuggestedActions = ContentPartSuggestedActionsPayload { payload }

Suggested actions payload content part.

type: "suggested_actions"
ContentPartCustom = ContentPartCustomPayload { payload }

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
context: optional TurnContext { items }

Immutable snapshots attached to this user message. Omitted when none were supplied. When a null/undefined value is observed, it indicates that there is no available data.

items: array of ContextItem { data, kind, label, captured_at }

One to four snapshots. Each snapshot’s data may contain at most 32 levels of nesting.

data: map[unknown]

Relevant widget data, selections, and units. Use strings for exact decimals and large IDs.

kind: string

Nonblank descriptive kind. New kinds do not require a backend release.

minLength1
label: string

Nonblank attachment label for conversation rendering.

minLength1
captured_at: optional string

Client-reported snapshot time. Omit when unknown.

formatdate-time
error: optional ErrorStatus { code, message, details }

When a null/undefined value is observed, it indicates it does not apply.

code: string
message: string
details: optional unknown

When a null/undefined value is observed, it indicates it does not apply.

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