Skip to content
Get started

Omni AI

ModelsExpand Collapse
class ActionButton:

Button metadata shared by chart and suggested-actions payloads.

button_id: str

Stable button identifier within the content part.

label: str

User-visible label.

prompt: Optional[PromptButtonAction]

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

prompt: str

Prompt text to submit as the next user turn.

structured_action: Optional[StructuredActionButtonAction]

Structured action in the same message to execute on click.

action_id: Optional[str]

UUID of a structured_action content part in the same message.

formatuuid
class ChartPayload:

Typed chart payload rendered inline in assistant content.

chart_id: str

Stable chart identifier scoped to the content part.

action_buttons: Optional[List[ActionButton]]

Buttons associated with this chart.

button_id: str

Stable button identifier within the content part.

label: str

User-visible label.

prompt: Optional[PromptButtonAction]

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

prompt: str

Prompt text to submit as the next user turn.

structured_action: Optional[StructuredActionButtonAction]

Structured action in the same message to execute on click.

action_id: Optional[str]

UUID of a structured_action content part in the same message.

formatuuid
data_chart: Optional[DataChart]

Explicit series-driven chart definition.

series: Optional[List[ChartSeries]]
name: str
points: Optional[List[ChartPoint]]
x: str
y: float
symbol_chart: Optional[SymbolChart]

Symbol-driven chart definition.

symbol: str
timeframe: Optional[str]
class ChartPoint:

Single chart coordinate.

x: str
y: float
class ChartSeries:

Named data series within a chart.

name: str
points: Optional[List[ChartPoint]]
x: str
y: float
class ContentPartChartPayload:

Chart payload content part.

payload: ChartPayload

Typed chart payload rendered inline in assistant content.

chart_id: str

Stable chart identifier scoped to the content part.

action_buttons: Optional[List[ActionButton]]

Buttons associated with this chart.

button_id: str

Stable button identifier within the content part.

label: str

User-visible label.

prompt: Optional[PromptButtonAction]

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

prompt: str

Prompt text to submit as the next user turn.

structured_action: Optional[StructuredActionButtonAction]

Structured action in the same message to execute on click.

action_id: Optional[str]

UUID of a structured_action content part in the same message.

formatuuid
data_chart: Optional[DataChart]

Explicit series-driven chart definition.

series: Optional[List[ChartSeries]]
name: str
points: Optional[List[ChartPoint]]
x: str
y: float
symbol_chart: Optional[SymbolChart]

Symbol-driven chart definition.

symbol: str
timeframe: Optional[str]
class ContentPartCustomPayload:

Escape-hatch custom payload content part.

payload: object
class ContentPartStructuredActionPayload:

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:
class PrefillOrder:

Prefill an order ticket for user confirmation

prefill_order: PrefillOrderAction

Prefill an order ticket for user confirmation

One of the following:
class PrefillNewOrderAction:

Create one or more new orders.

action_type: Literal["NEW"]
class PrefillCancelOrderAction:

Cancel one or more existing orders.

action_type: Literal["CANCEL"]
class OpenChart:

Open a chart for a symbol

open_chart: OpenChartAction

Open a chart for a symbol

symbol: str

Trading symbol to chart

extras: Optional[object]

Additional chart configuration (indicators, overlays, etc.)

timeframe: Optional[str]

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

class OpenScreener:

Open a stock screener with filters

open_screener: OpenScreenerAction

Open a stock screener with filters

filters: List[ScreenerFilter]

Filter criteria for the screener

field: str

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

operator: str

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

value: object

Filter value

field_filter: Optional[List[str]]

Optional field/column selection for screener results.

page_size: Optional[int]

Optional page size.

formatint32
sort_by: Optional[str]

Optional sort field for screener rows.

sort_direction: Optional[str]

Optional sort direction (ASC or DESC).

class OpenEntitlementConsent:

Open entitlement consent flow

Open entitlement consent flow

Stable entitlement agreement family key.

action_id: str
class ContentPartSuggestedActionsPayload:

Suggested actions payload content part.

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

action_buttons: Optional[List[ActionButton]]

Ordered message-level buttons.

button_id: str

Stable button identifier within the content part.

label: str

User-visible label.

prompt: Optional[PromptButtonAction]

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

prompt: str

Prompt text to submit as the next user turn.

structured_action: Optional[StructuredActionButtonAction]

Structured action in the same message to execute on click.

action_id: Optional[str]

UUID of a structured_action content part in the same message.

formatuuid
class ContentPartTextPayload:

Text content part.

text: str
class ContentPartThinkingPayload:

Thinking content part shown on dynamic response polling.

thoughts: List[str]
class DataChart:

Chart represented by explicit data series.

series: Optional[List[ChartSeries]]
name: str
points: Optional[List[ChartPoint]]
x: str
y: float
class OpenChartAction:

Action to open a chart for a symbol.

symbol: str

Trading symbol to chart

extras: Optional[object]

Additional chart configuration (indicators, overlays, etc.)

timeframe: Optional[str]

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.

class OpenScreenerAction:

Action to open a stock screener with filters.

filters: List[ScreenerFilter]

Filter criteria for the screener

field: str

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

operator: str

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

value: object

Filter value

field_filter: Optional[List[str]]

Optional field/column selection for screener results.

page_size: Optional[int]

Optional page size.

formatint32
sort_by: Optional[str]

Optional sort field for screener rows.

sort_direction: Optional[str]

Optional sort direction (ASC or DESC).

class PrefillCancelOrderAction:

Cancel-order prefill action.

orders: List[CancelOrderRequest]

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

account_id: int

Account ID (from path parameter)

formatint64
order_id: str

Order ID to cancel (from path parameter)

class PrefillNewOrderAction:

New-order prefill action.

orders: List[NewOrderRequest]

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: str

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: Optional[str]

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

maxLength64
expires_at: Optional[datetime]

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

formatdate-time
extended_hours: Optional[bool]

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

instrument_id: Optional[InstrumentIDOrSymbol]

OEMS instrument UUID

formatuuid
limit_offset: Optional[str]

Limit offset for trailing stop-limit orders (signed)

limit_price: Optional[str]

Limit price (required for LIMIT and STOP_LIMIT orders)

position_effect: Optional[PositionEffect]

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

One of the following:
"OPEN"
"CLOSE"
stop_price: Optional[str]

Stop price (required for STOP and STOP_LIMIT orders)

symbol: Optional[str]

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: Optional[str]

Trailing offset amount (required for trailing orders)

trailing_offset_type: Optional[TrailingOffsetType]

Trailing offset type (PRICE or PERCENT_BPS)

One of the following:
"PRICE"
"BPS"
Union[PrefillNewOrderAction, PrefillCancelOrderAction]

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:
class PrefillNewOrderAction:

Create one or more new orders.

action_type: Literal["NEW"]
class PrefillCancelOrderAction:

Cancel one or more existing orders.

action_type: Literal["CANCEL"]
class PromptButtonAction:

Prompt-style button behavior.

prompt: str

Prompt text to submit as the next user turn.

class ScreenerFilter:

A single filter criterion for the screener.

field: str

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

operator: str

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

value: object

Filter value

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:
class PrefillOrder:

Prefill an order ticket for user confirmation

prefill_order: PrefillOrderAction

Prefill an order ticket for user confirmation

One of the following:
class PrefillNewOrderAction:

Create one or more new orders.

action_type: Literal["NEW"]
class PrefillCancelOrderAction:

Cancel one or more existing orders.

action_type: Literal["CANCEL"]
class OpenChart:

Open a chart for a symbol

open_chart: OpenChartAction

Open a chart for a symbol

symbol: str

Trading symbol to chart

extras: Optional[object]

Additional chart configuration (indicators, overlays, etc.)

timeframe: Optional[str]

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

class OpenScreener:

Open a stock screener with filters

open_screener: OpenScreenerAction

Open a stock screener with filters

filters: List[ScreenerFilter]

Filter criteria for the screener

field: str

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

operator: str

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

value: object

Filter value

field_filter: Optional[List[str]]

Optional field/column selection for screener results.

page_size: Optional[int]

Optional page size.

formatint32
sort_by: Optional[str]

Optional sort field for screener rows.

sort_direction: Optional[str]

Optional sort direction (ASC or DESC).

class OpenEntitlementConsent:

Open entitlement consent flow

Open entitlement consent flow

Stable entitlement agreement family key.

class StructuredActionButtonAction:

Structured-action button behavior.

action_id: Optional[str]

UUID of a structured_action content part in the same message.

formatuuid
class SuggestedActionsPayload:

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

action_buttons: Optional[List[ActionButton]]

Ordered message-level buttons.

button_id: str

Stable button identifier within the content part.

label: str

User-visible label.

prompt: Optional[PromptButtonAction]

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

prompt: str

Prompt text to submit as the next user turn.

structured_action: Optional[StructuredActionButtonAction]

Structured action in the same message to execute on click.

action_id: Optional[str]

UUID of a structured_action content part in the same message.

formatuuid
class SymbolChart:

Chart for a single symbol and timeframe.

symbol: str
timeframe: Optional[str]

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
v1.omni_ai.entitlements.get_entitlements(EntitlementGetEntitlementsParams**kwargs) -> EntitlementGetEntitlementsResponse
GET/v1/omni-ai/entitlements
Create Entitlements
v1.omni_ai.entitlements.create_entitlements(EntitlementCreateEntitlementsParams**kwargs) -> EntitlementCreateEntitlementsResponse
POST/v1/omni-ai/entitlements
Delete Entitlement
v1.omni_ai.entitlements.delete_entitlement(strentitlement_id) -> EntitlementDeleteEntitlementResponse
DELETE/v1/omni-ai/entitlements/{entitlement_id}
Get Entitlement Agreements
v1.omni_ai.entitlements.get_entitlement_agreements() -> EntitlementGetEntitlementAgreementsResponse
GET/v1/omni-ai/entitlement-agreements
ModelsExpand Collapse
class DeleteEntitlementResponse:
entitlement_id: str
revoked: bool
Literal["omni_account_data_access"]

Stable entitlement agreement family key.

class EntitlementAgreementResource:
agreement_id: str

Stable entitlement agreement family key.

document_content: str
document_sha256: str
entitlement_codes: List[EntitlementCode]
title: str
version: int
agreement_id: str

Stable entitlement agreement family key.

document_content: str
document_sha256: str
entitlement_codes: List[EntitlementCode]
title: str
version: int
Literal["omni.account_data"]

Stable entitlement code granted by an agreement.

class EntitlementResource:
agreement_id: str
entitlement_code: EntitlementCode

Stable entitlement code granted by an agreement.

entitlement_id: str
granted_at: str
trading_account_id: int
agreement_id: str
entitlement_code: EntitlementCode

Stable entitlement code granted by an agreement.

entitlement_id: str
granted_at: str
trading_account_id: int
class EntitlementGetEntitlementsResponse:
agreement_id: str
entitlement_code: EntitlementCode

Stable entitlement code granted by an agreement.

entitlement_id: str
granted_at: str
trading_account_id: int
class EntitlementCreateEntitlementsResponse:
agreement_id: str
entitlement_code: EntitlementCode

Stable entitlement code granted by an agreement.

entitlement_id: str
granted_at: str
trading_account_id: int
class EntitlementDeleteEntitlementResponse:
entitlement_id: str
revoked: bool
class EntitlementGetEntitlementAgreementsResponse:
agreement_id: str

Stable entitlement agreement family key.

document_content: str
document_sha256: str
entitlement_codes: List[EntitlementCode]
title: str
version: int

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
v1.omni_ai.messages.get_message_by_id(strmessage_id, MessageGetMessageByIDParams**kwargs) -> MessageGetMessageByIDResponse
GET/v1/omni-ai/messages/{message_id}
Submit Feedback
v1.omni_ai.messages.submit_feedback(strmessage_id, MessageSubmitFeedbackParams**kwargs) -> MessageSubmitFeedbackResponse
POST/v1/omni-ai/messages/{message_id}/feedback
ModelsExpand Collapse
class CreateFeedbackResponse:
created_at: str
feedback_id: Optional[str]
class MessageGetMessageByIDResponse:
data: Message

Final immutable message.

id: str

Finalized immutable message content container. Never includes thinking parts.

parts: List[MessageContentPart]
One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Structured action content part.

type: Literal["structured_action"]
class UnionMember2:

Chart payload content part.

type: Literal["chart"]
class UnionMember3:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember4:

Escape-hatch custom payload content part.

type: Literal["custom"]
created_at: str

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: int
thread_id: str
error: Optional[ErrorStatus]

Shared sanitized error payload.

code: str
message: str
details: Optional[object]
class MessageSubmitFeedbackResponse:
created_at: str
feedback_id: Optional[str]

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
v1.omni_ai.responses.get_response_by_id(strresponse_id, ResponseGetResponseByIDParams**kwargs) -> ResponseGetResponseByIDResponse
GET/v1/omni-ai/responses/{response_id}
Cancel Response
v1.omni_ai.responses.cancel_response(strresponse_id, ResponseCancelResponseParams**kwargs) -> ResponseCancelResponseResponse
DELETE/v1/omni-ai/responses/{response_id}
ModelsExpand Collapse
class CancelResponsePayload:
canceled: bool
class ErrorStatus:

Shared sanitized error payload.

code: str
message: str
details: Optional[object]
class Response:

Dynamic pollable response.

id: str

Dynamic lifecycle status for a pollable response.

One of the following:
"queued"
"running"
"succeeded"
"failed"
"canceled"
thread_id: str
user_message_id: str
content: Optional[ResponseContent]

Dynamic response content container. May include thinking parts.

parts: List[ResponseContentPart]
One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Thinking content part shown on dynamic response polling.

type: Literal["thinking"]
class UnionMember2:

Structured action content part.

type: Literal["structured_action"]
class UnionMember3:

Chart payload content part.

type: Literal["chart"]
class UnionMember4:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember5:

Escape-hatch custom payload content part.

type: Literal["custom"]
error: Optional[ErrorStatus]

Shared sanitized error payload.

code: str
message: str
details: Optional[object]
output_message_id: Optional[str]
class ResponseContent:

Dynamic response content container. May include thinking parts.

parts: List[ResponseContentPart]
One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Thinking content part shown on dynamic response polling.

type: Literal["thinking"]
class UnionMember2:

Structured action content part.

type: Literal["structured_action"]
class UnionMember3:

Chart payload content part.

type: Literal["chart"]
class UnionMember4:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember5:

Escape-hatch custom payload content part.

type: Literal["custom"]
Union[UnionMember0, UnionMember1, UnionMember2, 3 more]

Dynamic content part visible on a pollable response.

One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Thinking content part shown on dynamic response polling.

type: Literal["thinking"]
class UnionMember2:

Structured action content part.

type: Literal["structured_action"]
class UnionMember3:

Chart payload content part.

type: Literal["chart"]
class UnionMember4:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember5:

Escape-hatch custom payload content part.

type: Literal["custom"]
Literal["queued", "running", "succeeded", 2 more]

Dynamic lifecycle status for a pollable response.

One of the following:
"queued"
"running"
"succeeded"
"failed"
"canceled"
class ResponseGetResponseByIDResponse:
data: Response

Dynamic pollable response.

id: str

Dynamic lifecycle status for a pollable response.

One of the following:
"queued"
"running"
"succeeded"
"failed"
"canceled"
thread_id: str
user_message_id: str
content: Optional[ResponseContent]

Dynamic response content container. May include thinking parts.

parts: List[ResponseContentPart]
One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Thinking content part shown on dynamic response polling.

type: Literal["thinking"]
class UnionMember2:

Structured action content part.

type: Literal["structured_action"]
class UnionMember3:

Chart payload content part.

type: Literal["chart"]
class UnionMember4:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember5:

Escape-hatch custom payload content part.

type: Literal["custom"]
error: Optional[ErrorStatus]

Shared sanitized error payload.

code: str
message: str
details: Optional[object]
output_message_id: Optional[str]
class ResponseCancelResponseResponse:
canceled: bool

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
v1.omni_ai.threads.get_threads(ThreadGetThreadsParams**kwargs) -> ThreadGetThreadsResponse
GET/v1/omni-ai/threads
Get Thread By ID
v1.omni_ai.threads.get_thread_by_id(strthread_id, ThreadGetThreadByIDParams**kwargs) -> ThreadGetThreadByIDResponse
GET/v1/omni-ai/threads/{thread_id}
Create Thread
v1.omni_ai.threads.create_thread(ThreadCreateThreadParams**kwargs) -> ThreadCreateThreadResponse
POST/v1/omni-ai/threads
Get Thread Response
v1.omni_ai.threads.get_thread_response(strthread_id, ThreadGetThreadResponseParams**kwargs) -> ThreadGetThreadResponseResponse
GET/v1/omni-ai/threads/{thread_id}/response
Get Messages
v1.omni_ai.threads.get_messages(strthread_id, ThreadGetMessagesParams**kwargs) -> ThreadGetMessagesResponse
GET/v1/omni-ai/threads/{thread_id}/messages
Create Message
v1.omni_ai.threads.create_message(strthread_id, ThreadCreateMessageParams**kwargs) -> ThreadCreateMessageResponse
POST/v1/omni-ai/threads/{thread_id}/messages
ModelsExpand Collapse
class CreateMessageResponse:

Response payload for continuing a thread with a new message.

response_id: str
thread_id: str
user_message_id: str
class CreateThreadResponse:

Response payload for thread creation.

response_id: str
thread_id: str
user_message_id: str
class Message:

Final immutable message.

id: str

Finalized immutable message content container. Never includes thinking parts.

parts: List[MessageContentPart]
One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Structured action content part.

type: Literal["structured_action"]
class UnionMember2:

Chart payload content part.

type: Literal["chart"]
class UnionMember3:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember4:

Escape-hatch custom payload content part.

type: Literal["custom"]
created_at: str

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: int
thread_id: str
error: Optional[ErrorStatus]

Shared sanitized error payload.

code: str
message: str
details: Optional[object]
class MessageContent:

Finalized immutable message content container. Never includes thinking parts.

parts: List[MessageContentPart]
One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Structured action content part.

type: Literal["structured_action"]
class UnionMember2:

Chart payload content part.

type: Literal["chart"]
class UnionMember3:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember4:

Escape-hatch custom payload content part.

type: Literal["custom"]
Union[UnionMember0, UnionMember1, UnionMember2, 2 more]

Final immutable content part visible on persisted messages.

One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Structured action content part.

type: Literal["structured_action"]
class UnionMember2:

Chart payload content part.

type: Literal["chart"]
class UnionMember3:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember4:

Escape-hatch custom payload content part.

type: Literal["custom"]
List[Message]
id: str

Finalized immutable message content container. Never includes thinking parts.

parts: List[MessageContentPart]
One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Structured action content part.

type: Literal["structured_action"]
class UnionMember2:

Chart payload content part.

type: Literal["chart"]
class UnionMember3:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember4:

Escape-hatch custom payload content part.

type: Literal["custom"]
created_at: str

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: int
thread_id: str
error: Optional[ErrorStatus]

Shared sanitized error payload.

code: str
message: str
details: Optional[object]
Literal["completed", "errored", "canceled"]

Immutable terminal outcome for a finalized assistant message.

One of the following:
"completed"
"errored"
"canceled"
Literal["USER", "ASSISTANT"]

Finalized message role in the public contract.

One of the following:
"USER"
"ASSISTANT"
class Thread:

Thread metadata returned by list/get thread endpoints.

id: str
created_at: str
title: str
updated_at: str
List[Thread]
id: str
created_at: str
title: str
updated_at: str
class ThreadGetThreadsResponse:
id: str
created_at: str
title: str
updated_at: str
class ThreadGetThreadByIDResponse:
data: Thread

Thread metadata returned by list/get thread endpoints.

id: str
created_at: str
title: str
updated_at: str
class ThreadCreateThreadResponse:

Response payload for thread creation.

response_id: str
thread_id: str
user_message_id: str
class ThreadGetThreadResponseResponse:
data: Response

Dynamic pollable response.

id: str

Dynamic lifecycle status for a pollable response.

One of the following:
"queued"
"running"
"succeeded"
"failed"
"canceled"
thread_id: str
user_message_id: str
content: Optional[ResponseContent]

Dynamic response content container. May include thinking parts.

parts: List[ResponseContentPart]
One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Thinking content part shown on dynamic response polling.

type: Literal["thinking"]
class UnionMember2:

Structured action content part.

type: Literal["structured_action"]
class UnionMember3:

Chart payload content part.

type: Literal["chart"]
class UnionMember4:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember5:

Escape-hatch custom payload content part.

type: Literal["custom"]
error: Optional[ErrorStatus]

Shared sanitized error payload.

code: str
message: str
details: Optional[object]
output_message_id: Optional[str]
class ThreadGetMessagesResponse:
id: str

Finalized immutable message content container. Never includes thinking parts.

parts: List[MessageContentPart]
One of the following:
class UnionMember0:

Text content part.

type: Literal["text"]
class UnionMember1:

Structured action content part.

type: Literal["structured_action"]
class UnionMember2:

Chart payload content part.

type: Literal["chart"]
class UnionMember3:

Suggested actions payload content part.

type: Literal["suggested_actions"]
class UnionMember4:

Escape-hatch custom payload content part.

type: Literal["custom"]
created_at: str

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: int
thread_id: str
error: Optional[ErrorStatus]

Shared sanitized error payload.

code: str
message: str
details: Optional[object]
class ThreadCreateMessageResponse:

Response payload for continuing a thread with a new message.

response_id: str
thread_id: str
user_message_id: str