Skip to content
Get started

Omni AI

ModelsExpand Collapse
ActionButton { buttonId, label, prompt, structuredAction }

Button metadata shared by chart and suggested-actions payloads.

buttonId: string

Stable button identifier within the content part.

label: string

User-visible label.

prompt?: PromptButtonAction { prompt } | null

Follow-up prompt to submit as the next user message.

prompt: string

Prompt text to submit as the next user turn.

structuredAction?: StructuredActionButtonAction { actionId } | null

Structured action in the same message to execute on click.

actionId?: string | null

UUID of a structured_action content part in the same message.

formatuuid
ChartPayload { chartId, actionButtons, dataChart, symbolChart }

Typed chart payload rendered inline in assistant content.

chartId: string

Stable chart identifier scoped to the content part.

actionButtons?: Array<ActionButton { buttonId, label, prompt, structuredAction } >

Buttons associated with this chart.

buttonId: string

Stable button identifier within the content part.

label: string

User-visible label.

prompt?: PromptButtonAction { prompt } | null

Follow-up prompt to submit as the next user message.

prompt: string

Prompt text to submit as the next user turn.

structuredAction?: StructuredActionButtonAction { actionId } | null

Structured action in the same message to execute on click.

actionId?: string | null

UUID of a structured_action content part in the same message.

formatuuid
dataChart?: DataChart { series } | null

Explicit series-driven chart definition.

series?: Array<ChartSeries { name, points } >
name: string
points?: Array<ChartPoint { x, y } >
x: string
y: number
symbolChart?: SymbolChart { symbol, timeframe } | null

Symbol-driven chart definition.

symbol: string
timeframe?: string | null
ChartPoint { x, y }

Single chart coordinate.

x: string
y: number
ChartSeries { name, points }

Named data series within a chart.

name: string
points?: Array<ChartPoint { x, y } >
x: string
y: number
ContentPartChartPayload { payload }

Chart payload content part.

payload: ChartPayload { chartId, actionButtons, dataChart, symbolChart }

Typed chart payload rendered inline in assistant content.

chartId: string

Stable chart identifier scoped to the content part.

actionButtons?: Array<ActionButton { buttonId, label, prompt, structuredAction } >

Buttons associated with this chart.

buttonId: string

Stable button identifier within the content part.

label: string

User-visible label.

prompt?: PromptButtonAction { prompt } | null

Follow-up prompt to submit as the next user message.

prompt: string

Prompt text to submit as the next user turn.

structuredAction?: StructuredActionButtonAction { actionId } | null

Structured action in the same message to execute on click.

actionId?: string | null

UUID of a structured_action content part in the same message.

formatuuid
dataChart?: DataChart { series } | null

Explicit series-driven chart definition.

series?: Array<ChartSeries { name, points } >
name: string
points?: Array<ChartPoint { x, y } >
x: string
y: number
symbolChart?: SymbolChart { symbol, timeframe } | null

Symbol-driven chart definition.

symbol: string
timeframe?: string | null
ContentPartCustomPayload { payload }

Escape-hatch custom payload content part.

payload: unknown
ContentPartStructuredActionPayload { action, action_id }

Structured action content part.

Structured actions that Omni AI can return to clients.

These actions provide machine-readable instructions for the client to execute, such as prefilling an order ticket, opening a chart, or navigating to a route.

One of the following:
PrefillOrder { prefill_order }

Prefill an order ticket for user confirmation

prefill_order: PrefillOrderAction

Prefill an order ticket for user confirmation

One of the following:
PrefillNewOrderAction extends PrefillNewOrderAction { orders } { action_type }

Create one or more new orders.

action_type: "NEW"
PrefillCancelOrderAction extends PrefillCancelOrderAction { orders } { action_type }

Cancel one or more existing orders.

action_type: "CANCEL"
OpenChart { open_chart }

Open a chart for a symbol

open_chart: OpenChartAction { symbol, extras, timeframe }

Open a chart for a symbol

symbol: string

Trading symbol to chart

extras?: unknown

Additional chart configuration (indicators, overlays, etc.)

timeframe?: string | null

Chart timeframe (e.g., “1D”, “1W”, “1M”, “3M”, “1Y”, “5Y”)

OpenScreener { open_screener }

Open a stock screener with filters

open_screener: OpenScreenerAction { filters, field_filter, page_size, 2 more }

Open a stock screener with filters

filters: Array<ScreenerFilter { field, operator, value } >

Filter criteria for the screener

field: string

Field to filter on (e.g., “market_cap”, “sector”, “price”)

operator: string

Comparison operator (e.g., “eq”, “gte”, “lte”, “in”)

value: unknown

Filter value

field_filter?: Array<string> | null

Optional field/column selection for screener results.

page_size?: number | null

Optional page size.

formatint32
sort_by?: string | null

Optional sort field for screener rows.

sort_direction?: string | null

Optional sort direction (ASC or DESC).

OpenEntitlementConsent { open_entitlement_consent }

Open entitlement consent flow

Open entitlement consent flow

Stable entitlement agreement family key.

action_id: string
ContentPartSuggestedActionsPayload { payload }

Suggested actions payload content part.

payload: SuggestedActionsPayload { actionButtons }

Suggested follow-up buttons rendered at the end of an assistant message.

actionButtons?: Array<ActionButton { buttonId, label, prompt, structuredAction } >

Ordered message-level buttons.

buttonId: string

Stable button identifier within the content part.

label: string

User-visible label.

prompt?: PromptButtonAction { prompt } | null

Follow-up prompt to submit as the next user message.

prompt: string

Prompt text to submit as the next user turn.

structuredAction?: StructuredActionButtonAction { actionId } | null

Structured action in the same message to execute on click.

actionId?: string | null

UUID of a structured_action content part in the same message.

formatuuid
ContentPartTextPayload { text }

Text content part.

text: string
ContentPartThinkingPayload { thoughts }

Thinking content part shown on dynamic response polling.

thoughts: Array<string>
DataChart { series }

Chart represented by explicit data series.

series?: Array<ChartSeries { name, points } >
name: string
points?: Array<ChartPoint { x, y } >
x: string
y: number
OpenChartAction { symbol, extras, timeframe }

Action to open a chart for a symbol.

symbol: string

Trading symbol to chart

extras?: unknown

Additional chart configuration (indicators, overlays, etc.)

timeframe?: string | null

Chart timeframe (e.g., “1D”, “1W”, “1M”, “3M”, “1Y”, “5Y”)

Action to open entitlement consent flow for one or more accounts.

Stable entitlement agreement family key.

OpenScreenerAction { filters, field_filter, page_size, 2 more }

Action to open a stock screener with filters.

filters: Array<ScreenerFilter { field, operator, value } >

Filter criteria for the screener

field: string

Field to filter on (e.g., “market_cap”, “sector”, “price”)

operator: string

Comparison operator (e.g., “eq”, “gte”, “lte”, “in”)

value: unknown

Filter value

field_filter?: Array<string> | null

Optional field/column selection for screener results.

page_size?: number | null

Optional page size.

formatint32
sort_by?: string | null

Optional sort field for screener rows.

sort_direction?: string | null

Optional sort direction (ASC or DESC).

PrefillCancelOrderAction { orders }

Cancel-order prefill action.

orders: Array<CancelOrderRequest { account_id, order_id } >

Orders to cancel using the same identifiers required by the cancel-order API.

account_id: number

Account ID (from path parameter)

formatint64
order_id: string

Order ID to cancel (from path parameter)

PrefillNewOrderAction { orders }

New-order prefill action.

orders: Array<NewOrderRequest { instrument_type, order_type, quantity, 13 more } >

Orders to prefill using the same shape accepted by the orders API.

instrument_type: SecurityType

Type of security

One of the following:
"COMMON_STOCK"
"PREFERRED_STOCK"
"OPTION"
"CASH"
"OTHER"
order_type: RequestOrderType

Type of order

One of the following:
"MARKET"
"LIMIT"
"STOP"
"STOP_LIMIT"
"TRAILING_STOP"
"TRAILING_STOP_LIMIT"
quantity: string

Quantity to trade. For COMMON_STOCK: shares (may be fractional if supported). For OPTION (single-leg): contracts (must be an integer)

side: Side

Side of the order

One of the following:
"BUY"
"SELL"
"SELL_SHORT"
"OTHER"
time_in_force: RequestTimeInForce

Time in force

One of the following:
"DAY"
"GOOD_TILL_CANCEL"
"IMMEDIATE_OR_CANCEL"
"FILL_OR_KILL"
"GOOD_TILL_DATE"
"AT_THE_OPENING"
"AT_THE_CLOSE"
"GOOD_TILL_CROSSING"
"GOOD_THROUGH_CROSSING"
"AT_CROSSING"
id?: string | null

Optional client-provided unique ID (idempotency). Required to be unique per account.

maxLength64
expires_at?: string | null

The timestamp when the order should expire (UTC). Required when time_in_force is GOOD_TILL_DATE.

formatdate-time
extended_hours?: boolean | null

Allow trading outside regular trading hours. Some brokers disallow options outside RTH.

instrument_id?: InstrumentIDOrSymbol | null

OEMS instrument UUID

formatuuid
limit_offset?: string | null

Limit offset for trailing stop-limit orders (signed)

limit_price?: string | null

Limit price (required for LIMIT and STOP_LIMIT orders)

position_effect?: PositionEffect

Required when instrument_type is OPTION. Specifies whether the order opens or closes a position.

One of the following:
"OPEN"
"CLOSE"
stop_price?: string | null

Stop price (required for STOP and STOP_LIMIT orders)

symbol?: string | null

Trading symbol. For equities, use the ticker symbol (e.g., “AAPL”). For options, use the OSI symbol (e.g., “AAPL 250117C00190000”). Either symbol or instrument_id must be provided.

trailing_offset?: string | null

Trailing offset amount (required for trailing orders)

trailing_offset_type?: TrailingOffsetType | null

Trailing offset type (PRICE or PERCENT_BPS)

One of the following:
"PRICE"
"BPS"
PrefillOrderAction = PrefillNewOrderAction { action_type } | PrefillCancelOrderAction { action_type }

Action to prefill order details for user confirmation.

The user must review and authorize the order before submission to the trading API. This action provides parsed order data that can be used to prefill an order ticket UI or submitted directly via the orders API after user confirmation.

One of the following:
PrefillNewOrderAction extends PrefillNewOrderAction { orders } { action_type }

Create one or more new orders.

action_type: "NEW"
PrefillCancelOrderAction extends PrefillCancelOrderAction { orders } { action_type }

Cancel one or more existing orders.

action_type: "CANCEL"
PromptButtonAction { prompt }

Prompt-style button behavior.

prompt: string

Prompt text to submit as the next user turn.

ScreenerFilter { field, operator, value }

A single filter criterion for the screener.

field: string

Field to filter on (e.g., “market_cap”, “sector”, “price”)

operator: string

Comparison operator (e.g., “eq”, “gte”, “lte”, “in”)

value: unknown

Filter value

StructuredAction = PrefillOrder { prefill_order } | OpenChart { open_chart } | OpenScreener { open_screener } | OpenEntitlementConsent { open_entitlement_consent }

Structured actions that Omni AI can return to clients.

These actions provide machine-readable instructions for the client to execute, such as prefilling an order ticket, opening a chart, or navigating to a route.

One of the following:
PrefillOrder { prefill_order }

Prefill an order ticket for user confirmation

prefill_order: PrefillOrderAction

Prefill an order ticket for user confirmation

One of the following:
PrefillNewOrderAction extends PrefillNewOrderAction { orders } { action_type }

Create one or more new orders.

action_type: "NEW"
PrefillCancelOrderAction extends PrefillCancelOrderAction { orders } { action_type }

Cancel one or more existing orders.

action_type: "CANCEL"
OpenChart { open_chart }

Open a chart for a symbol

open_chart: OpenChartAction { symbol, extras, timeframe }

Open a chart for a symbol

symbol: string

Trading symbol to chart

extras?: unknown

Additional chart configuration (indicators, overlays, etc.)

timeframe?: string | null

Chart timeframe (e.g., “1D”, “1W”, “1M”, “3M”, “1Y”, “5Y”)

OpenScreener { open_screener }

Open a stock screener with filters

open_screener: OpenScreenerAction { filters, field_filter, page_size, 2 more }

Open a stock screener with filters

filters: Array<ScreenerFilter { field, operator, value } >

Filter criteria for the screener

field: string

Field to filter on (e.g., “market_cap”, “sector”, “price”)

operator: string

Comparison operator (e.g., “eq”, “gte”, “lte”, “in”)

value: unknown

Filter value

field_filter?: Array<string> | null

Optional field/column selection for screener results.

page_size?: number | null

Optional page size.

formatint32
sort_by?: string | null

Optional sort field for screener rows.

sort_direction?: string | null

Optional sort direction (ASC or DESC).

OpenEntitlementConsent { open_entitlement_consent }

Open entitlement consent flow

Open entitlement consent flow

Stable entitlement agreement family key.

StructuredActionButtonAction { actionId }

Structured-action button behavior.

actionId?: string | null

UUID of a structured_action content part in the same message.

formatuuid
SuggestedActionsPayload { actionButtons }

Suggested follow-up buttons rendered at the end of an assistant message.

actionButtons?: Array<ActionButton { buttonId, label, prompt, structuredAction } >

Ordered message-level buttons.

buttonId: string

Stable button identifier within the content part.

label: string

User-visible label.

prompt?: PromptButtonAction { prompt } | null

Follow-up prompt to submit as the next user message.

prompt: string

Prompt text to submit as the next user turn.

structuredAction?: StructuredActionButtonAction { actionId } | null

Structured action in the same message to execute on click.

actionId?: string | null

UUID of a structured_action content part in the same message.

formatuuid
SymbolChart { symbol, timeframe }

Chart for a single symbol and timeframe.

symbol: string
timeframe?: string | null

Omni AIEntitlements

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 Entitlements
client.v1.omniAI.entitlements.getEntitlements(EntitlementGetEntitlementsParams { trading_account_id } query?, RequestOptionsoptions?): EntitlementGetEntitlementsResponse { data }
GET/v1/omni-ai/entitlements
Create Entitlements
client.v1.omniAI.entitlements.createEntitlements(EntitlementCreateEntitlementsParams { agreement_id, requested_entitlement_codes, trading_account_ids } body, RequestOptionsoptions?): EntitlementCreateEntitlementsResponse { data }
POST/v1/omni-ai/entitlements
Delete Entitlement
client.v1.omniAI.entitlements.deleteEntitlement(stringentitlementID, RequestOptionsoptions?): EntitlementDeleteEntitlementResponse { data }
DELETE/v1/omni-ai/entitlements/{entitlement_id}
Get Entitlement Agreements
client.v1.omniAI.entitlements.getEntitlementAgreements(RequestOptionsoptions?): EntitlementGetEntitlementAgreementsResponse { data }
GET/v1/omni-ai/entitlement-agreements
ModelsExpand Collapse
DeleteEntitlementResponse { entitlement_id, revoked }
entitlement_id: string
revoked: boolean
EntitlementAgreementKey = "omni_account_data_access"

Stable entitlement agreement family key.

EntitlementAgreementResource { agreement_id, agreement_key, document_content, 4 more }
agreement_id: string
agreement_key: EntitlementAgreementKey { }

Stable entitlement agreement family key.

document_content: string
document_sha256: string
entitlement_codes: Array<EntitlementCode { } >
title: string
version: number
EntitlementAgreementResourceList = Array<EntitlementAgreementResource { agreement_id, agreement_key, document_content, 4 more } >
agreement_id: string
agreement_key: EntitlementAgreementKey { }

Stable entitlement agreement family key.

document_content: string
document_sha256: string
entitlement_codes: Array<EntitlementCode { } >
title: string
version: number
EntitlementCode = "omni.account_data"

Stable entitlement code granted by an agreement.

EntitlementResource { agreement_id, entitlement_code, entitlement_id, 2 more }
agreement_id: string
entitlement_code: EntitlementCode { }

Stable entitlement code granted by an agreement.

entitlement_id: string
granted_at: string
trading_account_id: number
EntitlementResourceList = Array<EntitlementResource { agreement_id, entitlement_code, entitlement_id, 2 more } >
agreement_id: string
entitlement_code: EntitlementCode { }

Stable entitlement code granted by an agreement.

entitlement_id: string
granted_at: string
trading_account_id: number
EntitlementGetEntitlementsResponse extends BaseResponse { metadata, error } { data }
data: EntitlementResourceList { agreement_id, entitlement_code, entitlement_id, 2 more }
agreement_id: string
entitlement_code: EntitlementCode { }

Stable entitlement code granted by an agreement.

entitlement_id: string
granted_at: string
trading_account_id: number
EntitlementCreateEntitlementsResponse extends BaseResponse { metadata, error } { data }
data: EntitlementResourceList { agreement_id, entitlement_code, entitlement_id, 2 more }
agreement_id: string
entitlement_code: EntitlementCode { }

Stable entitlement code granted by an agreement.

entitlement_id: string
granted_at: string
trading_account_id: number
EntitlementDeleteEntitlementResponse extends BaseResponse { metadata, error } { data }
data: DeleteEntitlementResponse { entitlement_id, revoked }
entitlement_id: string
revoked: boolean
EntitlementGetEntitlementAgreementsResponse extends BaseResponse { metadata, error } { data }
data: EntitlementAgreementResourceList { agreement_id, agreement_key, document_content, 4 more }
agreement_id: string
agreement_key: EntitlementAgreementKey { }

Stable entitlement agreement family key.

document_content: string
document_sha256: string
entitlement_codes: Array<EntitlementCode { } >
title: string
version: number

Omni AIMessages

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 Message By ID
client.v1.omniAI.messages.getMessageByID(stringmessageID, MessageGetMessageByIDParams { account_id } query, RequestOptionsoptions?): MessageGetMessageByIDResponse { data }
GET/v1/omni-ai/messages/{message_id}
Submit Feedback
client.v1.omniAI.messages.submitFeedback(stringmessageID, MessageSubmitFeedbackParams { account_id, score, comment, metadata } body, RequestOptionsoptions?): MessageSubmitFeedbackResponse { data }
POST/v1/omni-ai/messages/{message_id}/feedback
ModelsExpand Collapse
CreateFeedbackResponse { created_at, feedback_id }
created_at: string
feedback_id?: string | null
MessageGetMessageByIDResponse extends BaseResponse { metadata, error } { data }
data: Message { 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<MessageContentPart>
One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember2 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember3 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember4 extends ContentPartCustomPayload { payload } { type }

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?: ErrorStatus { code, message, details } | null

Shared sanitized error payload.

code: string
message: string
details?: unknown
MessageSubmitFeedbackResponse extends BaseResponse { metadata, error } { data }
data: CreateFeedbackResponse { created_at, feedback_id }
created_at: string
feedback_id?: string | null

Omni AIResponses

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 Response By ID
client.v1.omniAI.responses.getResponseByID(stringresponseID, ResponseGetResponseByIDParams { account_id } query, RequestOptionsoptions?): ResponseGetResponseByIDResponse { data }
GET/v1/omni-ai/responses/{response_id}
Cancel Response
client.v1.omniAI.responses.cancelResponse(stringresponseID, ResponseCancelResponseParams { account_id } params, RequestOptionsoptions?): ResponseCancelResponseResponse { data }
DELETE/v1/omni-ai/responses/{response_id}
ModelsExpand Collapse
CancelResponsePayload { canceled }
canceled: boolean
ErrorStatus { code, message, details }

Shared sanitized error payload.

code: string
message: string
details?: unknown
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?: ResponseContent { parts } | null

Dynamic response content container. May include thinking parts.

parts: Array<ResponseContentPart>
One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartThinkingPayload { thoughts } { type }

Thinking content part shown on dynamic response polling.

type: "thinking"
UnionMember2 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember3 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember4 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember5 extends ContentPartCustomPayload { payload } { type }

Escape-hatch custom payload content part.

type: "custom"
error?: ErrorStatus { code, message, details } | null

Shared sanitized error payload.

code: string
message: string
details?: unknown
output_message_id?: string | null
ResponseContent { parts }

Dynamic response content container. May include thinking parts.

parts: Array<ResponseContentPart>
One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartThinkingPayload { thoughts } { type }

Thinking content part shown on dynamic response polling.

type: "thinking"
UnionMember2 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember3 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember4 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember5 extends ContentPartCustomPayload { payload } { type }

Escape-hatch custom payload content part.

type: "custom"
ResponseContentPart = UnionMember0 { type } | UnionMember1 { type } | UnionMember2 { type } | 3 more

Dynamic content part visible on a pollable response.

One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartThinkingPayload { thoughts } { type }

Thinking content part shown on dynamic response polling.

type: "thinking"
UnionMember2 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember3 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember4 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember5 extends ContentPartCustomPayload { payload } { type }

Escape-hatch custom payload content part.

type: "custom"
ResponseStatus = "queued" | "running" | "succeeded" | 2 more

Dynamic lifecycle status for a pollable response.

One of the following:
"queued"
"running"
"succeeded"
"failed"
"canceled"
ResponseGetResponseByIDResponse extends BaseResponse { metadata, error } { data }
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?: ResponseContent { parts } | null

Dynamic response content container. May include thinking parts.

parts: Array<ResponseContentPart>
One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartThinkingPayload { thoughts } { type }

Thinking content part shown on dynamic response polling.

type: "thinking"
UnionMember2 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember3 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember4 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember5 extends ContentPartCustomPayload { payload } { type }

Escape-hatch custom payload content part.

type: "custom"
error?: ErrorStatus { code, message, details } | null

Shared sanitized error payload.

code: string
message: string
details?: unknown
output_message_id?: string | null
ResponseCancelResponseResponse extends BaseResponse { metadata, error } { data }
data: CancelResponsePayload { canceled }
canceled: boolean

Omni AIThreads

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
client.v1.omniAI.threads.getThreads(ThreadGetThreadsParams { account_id, page_size, page_token } query, RequestOptionsoptions?): ThreadGetThreadsResponse { data }
GET/v1/omni-ai/threads
Get Thread By ID
client.v1.omniAI.threads.getThreadByID(stringthreadID, ThreadGetThreadByIDParams { account_id } query, RequestOptionsoptions?): ThreadGetThreadByIDResponse { data }
GET/v1/omni-ai/threads/{thread_id}
Create Thread
client.v1.omniAI.threads.createThread(ThreadCreateThreadParams { account_id, type, capabilities, 3 more } body, RequestOptionsoptions?): ThreadCreateThreadResponse { data }
POST/v1/omni-ai/threads
Get Thread Response
client.v1.omniAI.threads.getThreadResponse(stringthreadID, ThreadGetThreadResponseParams { account_id } query, RequestOptionsoptions?): ThreadGetThreadResponseResponse { data }
GET/v1/omni-ai/threads/{thread_id}/response
Get Messages
client.v1.omniAI.threads.getMessages(stringthreadID, ThreadGetMessagesParams { account_id, page_size, page_token } query, RequestOptionsoptions?): ThreadGetMessagesResponse { data }
GET/v1/omni-ai/threads/{thread_id}/messages
Create Message
client.v1.omniAI.threads.createMessage(stringthreadID, ThreadCreateMessageParams { account_id, text, capabilities } body, RequestOptionsoptions?): ThreadCreateMessageResponse { data }
POST/v1/omni-ai/threads/{thread_id}/messages
ModelsExpand Collapse
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
CreateThreadResponse { response_id, thread_id, user_message_id }

Response payload for thread creation.

response_id: string
thread_id: string
user_message_id: string
Message { 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<MessageContentPart>
One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember2 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember3 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember4 extends ContentPartCustomPayload { payload } { type }

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?: ErrorStatus { code, message, details } | null

Shared sanitized error payload.

code: string
message: string
details?: unknown
MessageContent { parts }

Finalized immutable message content container. Never includes thinking parts.

parts: Array<MessageContentPart>
One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember2 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember3 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember4 extends ContentPartCustomPayload { payload } { type }

Escape-hatch custom payload content part.

type: "custom"
MessageContentPart = UnionMember0 { type } | UnionMember1 { type } | UnionMember2 { type } | 2 more

Final immutable content part visible on persisted messages.

One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember2 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember3 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember4 extends ContentPartCustomPayload { payload } { type }

Escape-hatch custom payload content part.

type: "custom"
MessageList = Array<Message { id, content, created_at, 5 more } >
id: string
content: MessageContent { parts }

Finalized immutable message content container. Never includes thinking parts.

parts: Array<MessageContentPart>
One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember2 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember3 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember4 extends ContentPartCustomPayload { payload } { type }

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?: ErrorStatus { code, message, details } | null

Shared sanitized error payload.

code: string
message: string
details?: unknown
MessageOutcome = "completed" | "errored" | "canceled"

Immutable terminal outcome for a finalized assistant message.

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

Finalized message role in the public contract.

One of the following:
"USER"
"ASSISTANT"
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
ThreadList = Array<Thread { id, created_at, title, updated_at } >
id: string
created_at: string
title: string
updated_at: string
ThreadGetThreadsResponse extends BaseResponse { metadata, error } { data }
data: ThreadList { id, created_at, title, updated_at }
id: string
created_at: string
title: string
updated_at: string
ThreadGetThreadByIDResponse extends BaseResponse { metadata, error } { data }
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 extends BaseResponse { metadata, error } { data }
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 extends BaseResponse { metadata, error } { data }
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?: ResponseContent { parts } | null

Dynamic response content container. May include thinking parts.

parts: Array<ResponseContentPart>
One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartThinkingPayload { thoughts } { type }

Thinking content part shown on dynamic response polling.

type: "thinking"
UnionMember2 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember3 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember4 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember5 extends ContentPartCustomPayload { payload } { type }

Escape-hatch custom payload content part.

type: "custom"
error?: ErrorStatus { code, message, details } | null

Shared sanitized error payload.

code: string
message: string
details?: unknown
output_message_id?: string | null
ThreadGetMessagesResponse extends BaseResponse { metadata, error } { data }
data: MessageList { id, content, created_at, 5 more }
id: string
content: MessageContent { parts }

Finalized immutable message content container. Never includes thinking parts.

parts: Array<MessageContentPart>
One of the following:
UnionMember0 extends ContentPartTextPayload { text } { type }

Text content part.

type: "text"
UnionMember1 extends ContentPartStructuredActionPayload { action, action_id } { type }

Structured action content part.

type: "structured_action"
UnionMember2 extends ContentPartChartPayload { payload } { type }

Chart payload content part.

type: "chart"
UnionMember3 extends ContentPartSuggestedActionsPayload { payload } { type }

Suggested actions payload content part.

type: "suggested_actions"
UnionMember4 extends ContentPartCustomPayload { payload } { type }

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?: ErrorStatus { code, message, details } | null

Shared sanitized error payload.

code: string
message: string
details?: unknown
ThreadCreateMessageResponse extends BaseResponse { metadata, error } { data }
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