# Omni AI ## Domain Types ### Action Button - `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. ### Chart Payload - `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. - `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]` ### Chart Point - `class ChartPoint: …` Single chart coordinate. - `x: str` - `y: float` ### Chart Series - `class ChartSeries: …` Named data series within a chart. - `name: str` - `points: Optional[List[ChartPoint]]` - `x: str` - `y: float` ### Content Part Chart Payload - `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. - `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]` ### Content Part Custom Payload - `class ContentPartCustomPayload: …` Escape-hatch custom payload content part. - `payload: object` ### Content Part Structured Action Payload - `class ContentPartStructuredActionPayload: …` Structured action content part. - `action: StructuredAction` 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. - `class PrefillOrder: …` Prefill an order ticket for user confirmation - `prefill_order: PrefillOrderAction` Prefill an order ticket for user confirmation - `class PrefillNewOrderAction: …` Create one or more new orders. - `action_type: Literal["NEW"]` - `"NEW"` - `class PrefillCancelOrderAction: …` Cancel one or more existing orders. - `action_type: Literal["CANCEL"]` - `"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. - `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: OpenEntitlementConsentAction` Open entitlement consent flow - `agreement_key: EntitlementAgreementKey` Stable entitlement agreement family key. - `"omni_account_data_access"` - `reason: str` - `requested_entitlement_codes: List[EntitlementCode]` - `"omni.account_data"` - `trading_account_ids: List[int]` - `action_id: str` ### Content Part Suggested Actions Payload - `class ContentPartSuggestedActionsPayload: …` Suggested actions payload content part. - `payload: 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. ### Content Part Text Payload - `class ContentPartTextPayload: …` Text content part. - `text: str` ### Content Part Thinking Payload - `class ContentPartThinkingPayload: …` Thinking content part shown on dynamic response polling. - `thoughts: List[str]` ### Data Chart - `class DataChart: …` Chart represented by explicit data series. - `series: Optional[List[ChartSeries]]` - `name: str` - `points: Optional[List[ChartPoint]]` - `x: str` - `y: float` ### Open Chart Action - `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") ### Open Entitlement Consent Action - `class OpenEntitlementConsentAction: …` Action to open entitlement consent flow for one or more accounts. - `agreement_key: EntitlementAgreementKey` Stable entitlement agreement family key. - `"omni_account_data_access"` - `reason: str` - `requested_entitlement_codes: List[EntitlementCode]` - `"omni.account_data"` - `trading_account_ids: List[int]` ### Open Screener Action - `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. - `sort_by: Optional[str]` Optional sort field for screener rows. - `sort_direction: Optional[str]` Optional sort direction (`ASC` or `DESC`). ### Prefill Cancel Order Action - `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) - `order_id: str` Order ID to cancel (from path parameter) ### Prefill New Order Action - `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 - `"COMMON_STOCK"` - `"PREFERRED_STOCK"` - `"OPTION"` - `"CASH"` - `"OTHER"` - `order_type: RequestOrderType` Type of order - `"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 - `"BUY"` - `"SELL"` - `"SELL_SHORT"` - `"OTHER"` - `time_in_force: RequestTimeInForce` Time in force - `"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. - `expires_at: Optional[datetime]` The timestamp when the order should expire (UTC). Required when time_in_force is GOOD_TILL_DATE. - `extended_hours: Optional[bool]` Allow trading outside regular trading hours. Some brokers disallow options outside RTH. - `instrument_id: Optional[InstrumentIDOrSymbol]` OEMS instrument UUID - `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. - `"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) - `"PRICE"` - `"BPS"` ### Prefill Order Action - `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. - `class PrefillNewOrderAction: …` Create one or more new orders. - `action_type: Literal["NEW"]` - `"NEW"` - `class PrefillCancelOrderAction: …` Cancel one or more existing orders. - `action_type: Literal["CANCEL"]` - `"CANCEL"` ### Prompt Button Action - `class PromptButtonAction: …` Prompt-style button behavior. - `prompt: str` Prompt text to submit as the next user turn. ### Screener Filter - `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 Action - `StructuredAction` 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. - `class PrefillOrder: …` Prefill an order ticket for user confirmation - `prefill_order: PrefillOrderAction` Prefill an order ticket for user confirmation - `class PrefillNewOrderAction: …` Create one or more new orders. - `action_type: Literal["NEW"]` - `"NEW"` - `class PrefillCancelOrderAction: …` Cancel one or more existing orders. - `action_type: Literal["CANCEL"]` - `"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. - `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: OpenEntitlementConsentAction` Open entitlement consent flow - `agreement_key: EntitlementAgreementKey` Stable entitlement agreement family key. - `"omni_account_data_access"` - `reason: str` - `requested_entitlement_codes: List[EntitlementCode]` - `"omni.account_data"` - `trading_account_ids: List[int]` ### Structured Action Button Action - `class StructuredActionButtonAction: …` Structured-action button behavior. - `action_id: Optional[str]` UUID of a `structured_action` content part in the same message. ### Suggested Actions Payload - `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. ### Symbol Chart - `class SymbolChart: …` Chart for a single symbol and timeframe. - `symbol: str` - `timeframe: Optional[str]` # Entitlements ## Get Entitlements `v1.omni_ai.entitlements.get_entitlements(EntitlementGetEntitlementsParams**kwargs) -> EntitlementGetEntitlementsResponse` **get** `/v1/omni-ai/entitlements` List caller's active entitlement grants. ### Parameters - `trading_account_id: Optional[int]` ### Returns - `class EntitlementGetEntitlementsResponse: …` - `data: EntitlementResourceList` - `agreement_id: str` - `entitlement_code: EntitlementCode` Stable entitlement code granted by an agreement. - `"omni.account_data"` - `entitlement_id: str` - `granted_at: str` - `trading_account_id: int` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.entitlements.get_entitlements() print(response) ``` #### Response ```json { "metadata": { "request_id": "request_id", "next_page_token": "U3RhaW5sZXNzIHJvY2tz", "page_number": 0, "previous_page_token": "U3RhaW5sZXNzIHJvY2tz", "total_items": 0, "total_pages": 0 }, "error": { "code": 400, "message": "Order quantity must be greater than zero", "details": [ { "foo": "bar" } ] }, "data": [ { "agreement_id": "agreement_id", "entitlement_code": "omni.account_data", "entitlement_id": "entitlement_id", "granted_at": "granted_at", "trading_account_id": 0 } ] } ``` ## Create Entitlements `v1.omni_ai.entitlements.create_entitlements(EntitlementCreateEntitlementsParams**kwargs) -> EntitlementCreateEntitlementsResponse` **post** `/v1/omni-ai/entitlements` Record consent and upsert one-or-more active grants. ### Parameters - `agreement_id: str` - `requested_entitlement_codes: List[EntitlementCode]` - `"omni.account_data"` - `trading_account_ids: Iterable[int]` ### Returns - `class EntitlementCreateEntitlementsResponse: …` - `data: EntitlementResourceList` - `agreement_id: str` - `entitlement_code: EntitlementCode` Stable entitlement code granted by an agreement. - `"omni.account_data"` - `entitlement_id: str` - `granted_at: str` - `trading_account_id: int` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.entitlements.create_entitlements( agreement_id="01JZ0000000000000000000000", requested_entitlement_codes=["omni.account_data"], trading_account_ids=[100019, 100021], ) print(response) ``` #### Response ```json { "metadata": { "request_id": "request_id", "next_page_token": "U3RhaW5sZXNzIHJvY2tz", "page_number": 0, "previous_page_token": "U3RhaW5sZXNzIHJvY2tz", "total_items": 0, "total_pages": 0 }, "error": { "code": 400, "message": "Order quantity must be greater than zero", "details": [ { "foo": "bar" } ] }, "data": [ { "agreement_id": "agreement_id", "entitlement_code": "omni.account_data", "entitlement_id": "entitlement_id", "granted_at": "granted_at", "trading_account_id": 0 } ] } ``` ## Delete Entitlement `v1.omni_ai.entitlements.delete_entitlement(strentitlement_id) -> EntitlementDeleteEntitlementResponse` **delete** `/v1/omni-ai/entitlements/{entitlement_id}` Revoke one entitlement grant by id. ### Parameters - `entitlement_id: str` ### Returns - `class EntitlementDeleteEntitlementResponse: …` - `data: DeleteEntitlementResponse` - `entitlement_id: str` - `revoked: bool` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.entitlements.delete_entitlement( "entitlement_id", ) print(response) ``` #### Response ```json { "metadata": { "request_id": "request_id", "next_page_token": "U3RhaW5sZXNzIHJvY2tz", "page_number": 0, "previous_page_token": "U3RhaW5sZXNzIHJvY2tz", "total_items": 0, "total_pages": 0 }, "error": { "code": 400, "message": "Order quantity must be greater than zero", "details": [ { "foo": "bar" } ] }, "data": { "entitlement_id": "entitlement_id", "revoked": true } } ``` ## Get Entitlement Agreements `v1.omni_ai.entitlements.get_entitlement_agreements() -> EntitlementGetEntitlementAgreementsResponse` **get** `/v1/omni-ai/entitlement-agreements` List current signable entitlement agreements for consent UX. ### Returns - `class EntitlementGetEntitlementAgreementsResponse: …` - `data: EntitlementAgreementResourceList` - `agreement_id: str` - `agreement_key: EntitlementAgreementKey` Stable entitlement agreement family key. - `"omni_account_data_access"` - `document_content: str` - `document_sha256: str` - `entitlement_codes: List[EntitlementCode]` - `"omni.account_data"` - `title: str` - `version: int` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.entitlements.get_entitlement_agreements() print(response) ``` #### Response ```json { "metadata": { "request_id": "request_id", "next_page_token": "U3RhaW5sZXNzIHJvY2tz", "page_number": 0, "previous_page_token": "U3RhaW5sZXNzIHJvY2tz", "total_items": 0, "total_pages": 0 }, "error": { "code": 400, "message": "Order quantity must be greater than zero", "details": [ { "foo": "bar" } ] }, "data": [ { "agreement_id": "agreement_id", "agreement_key": "omni_account_data_access", "document_content": "document_content", "document_sha256": "document_sha256", "entitlement_codes": [ "omni.account_data" ], "title": "title", "version": 0 } ] } ``` ## Domain Types ### Delete Entitlement Response - `class DeleteEntitlementResponse: …` - `entitlement_id: str` - `revoked: bool` ### Entitlement Agreement Key - `Literal["omni_account_data_access"]` Stable entitlement agreement family key. - `"omni_account_data_access"` ### Entitlement Agreement Resource - `class EntitlementAgreementResource: …` - `agreement_id: str` - `agreement_key: EntitlementAgreementKey` Stable entitlement agreement family key. - `"omni_account_data_access"` - `document_content: str` - `document_sha256: str` - `entitlement_codes: List[EntitlementCode]` - `"omni.account_data"` - `title: str` - `version: int` ### Entitlement Agreement Resource List - `List[EntitlementAgreementResource]` - `agreement_id: str` - `agreement_key: EntitlementAgreementKey` Stable entitlement agreement family key. - `"omni_account_data_access"` - `document_content: str` - `document_sha256: str` - `entitlement_codes: List[EntitlementCode]` - `"omni.account_data"` - `title: str` - `version: int` ### Entitlement Code - `Literal["omni.account_data"]` Stable entitlement code granted by an agreement. - `"omni.account_data"` ### Entitlement Resource - `class EntitlementResource: …` - `agreement_id: str` - `entitlement_code: EntitlementCode` Stable entitlement code granted by an agreement. - `"omni.account_data"` - `entitlement_id: str` - `granted_at: str` - `trading_account_id: int` ### Entitlement Resource List - `List[EntitlementResource]` - `agreement_id: str` - `entitlement_code: EntitlementCode` Stable entitlement code granted by an agreement. - `"omni.account_data"` - `entitlement_id: str` - `granted_at: str` - `trading_account_id: int` ### Entitlement Get Entitlements Response - `class EntitlementGetEntitlementsResponse: …` - `data: EntitlementResourceList` - `agreement_id: str` - `entitlement_code: EntitlementCode` Stable entitlement code granted by an agreement. - `"omni.account_data"` - `entitlement_id: str` - `granted_at: str` - `trading_account_id: int` ### Entitlement Create Entitlements Response - `class EntitlementCreateEntitlementsResponse: …` - `data: EntitlementResourceList` - `agreement_id: str` - `entitlement_code: EntitlementCode` Stable entitlement code granted by an agreement. - `"omni.account_data"` - `entitlement_id: str` - `granted_at: str` - `trading_account_id: int` ### Entitlement Delete Entitlement Response - `class EntitlementDeleteEntitlementResponse: …` - `data: DeleteEntitlementResponse` - `entitlement_id: str` - `revoked: bool` ### Entitlement Get Entitlement Agreements Response - `class EntitlementGetEntitlementAgreementsResponse: …` - `data: EntitlementAgreementResourceList` - `agreement_id: str` - `agreement_key: EntitlementAgreementKey` Stable entitlement agreement family key. - `"omni_account_data_access"` - `document_content: str` - `document_sha256: str` - `entitlement_codes: List[EntitlementCode]` - `"omni.account_data"` - `title: str` - `version: int` # Messages ## Get Message By ID `v1.omni_ai.messages.get_message_by_id(strmessage_id, MessageGetMessageByIDParams**kwargs) -> MessageGetMessageByIDResponse` **get** `/v1/omni-ai/messages/{message_id}` Get a finalized message by ID. Returns a single finalized message. Returns **404** if the message belongs to an in-progress assistant turn (use the response endpoint for live output). Once the turn completes, the message becomes available here. ### Parameters - `message_id: str` - `account_id: int` Account ID for the request ### Returns - `class MessageGetMessageByIDResponse: …` - `data: Message` Final immutable message. - `id: str` - `content: MessageContent` Finalized immutable message content container. Never includes thinking parts. - `parts: List[MessageContentPart]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember2: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember3: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember4: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `created_at: str` - `outcome: MessageOutcome` Immutable terminal outcome for a finalized assistant message. - `"completed"` - `"errored"` - `"canceled"` - `role: MessageRole` Finalized message role in the public contract. - `"USER"` - `"ASSISTANT"` - `seq: int` - `thread_id: str` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.messages.get_message_by_id( message_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id=0, ) print(response) ``` #### Response ```json { "data": { "content": { "parts": [ { "text": "**Pre-market as of 7:30 AM ET**\n\n ...", "type": "text" }, { "payload": { "actionButtons": [ { "buttonId": "btn_followup_0", "label": "Check my positions", "prompt": { "prompt": "What are my current positions?" } } ] }, "type": "suggested_actions" } ] }, "created_at": "2026-04-16T09:20:17.309212+00:00", "id": "019d9597-599c-7132-a7de-e5c21eaaab77", "outcome": "completed", "role": "ASSISTANT", "seq": 2, "thread_id": "019d9597-597c-7571-a0c9-a49c0e51f6eb" }, "metadata": { "request_id": "0f991501-757d-4051-bf00-6d7f452d6fcf" } } ``` ## Submit Feedback `v1.omni_ai.messages.submit_feedback(strmessage_id, MessageSubmitFeedbackParams**kwargs) -> MessageSubmitFeedbackResponse` **post** `/v1/omni-ai/messages/{message_id}/feedback` Submit feedback on a finalized assistant message. Attaches a score and optional comment to a finalized assistant message. Feedback is only valid for messages with role `ASSISTANT` that have reached a terminal outcome. ### Parameters - `message_id: str` - `account_id: int` Account ID for the request - `score: int` Feedback score (-1, 0, +1 or 1-5) - `comment: Optional[str]` Optional feedback comment - `metadata: Optional[object]` Optional metadata ### Returns - `class MessageSubmitFeedbackResponse: …` - `data: CreateFeedbackResponse` - `created_at: str` - `feedback_id: Optional[str]` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.messages.submit_feedback( message_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id=0, score=0, ) print(response) ``` #### Response ```json { "data": { "created_at": "2026-04-23T16:09:51.746912+00:00", "feedback_id": "019dbb1a-d782-7f42-8dd8-a1a7ca5d48e3" }, "metadata": { "request_id": "372a359a-fd4f-4c69-8f11-d80831aa5f23" } } ``` ## Domain Types ### Create Feedback Response - `class CreateFeedbackResponse: …` - `created_at: str` - `feedback_id: Optional[str]` ### Message Get Message By ID Response - `class MessageGetMessageByIDResponse: …` - `data: Message` Final immutable message. - `id: str` - `content: MessageContent` Finalized immutable message content container. Never includes thinking parts. - `parts: List[MessageContentPart]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember2: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember3: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember4: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `created_at: str` - `outcome: MessageOutcome` Immutable terminal outcome for a finalized assistant message. - `"completed"` - `"errored"` - `"canceled"` - `role: MessageRole` Finalized message role in the public contract. - `"USER"` - `"ASSISTANT"` - `seq: int` - `thread_id: str` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` ### Message Submit Feedback Response - `class MessageSubmitFeedbackResponse: …` - `data: CreateFeedbackResponse` - `created_at: str` - `feedback_id: Optional[str]` # Responses ## Get Response By ID `v1.omni_ai.responses.get_response_by_id(strresponse_id, ResponseGetResponseByIDParams**kwargs) -> ResponseGetResponseByIDResponse` **get** `/v1/omni-ai/responses/{response_id}` Poll a response for assistant output. Returns the current snapshot of an in-progress or completed response. While the status is `queued` or `running`, the content may be partial and may include `thinking` parts. Poll this endpoint periodically until the status reaches a terminal value (`succeeded`, `failed`, or `canceled`). Once terminal, the finalized assistant message is available in thread history via `GET /omni-ai/threads/{thread_id}/messages`. ### Parameters - `response_id: str` - `account_id: int` Account ID for the request ### Returns - `class ResponseGetResponseByIDResponse: …` - `data: Response` Dynamic pollable response. - `id: str` - `status: ResponseStatus` Dynamic lifecycle status for a pollable response. - `"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]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Thinking content part shown on dynamic response polling. - `type: Literal["thinking"]` - `"thinking"` - `class UnionMember2: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember3: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember4: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember5: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` - `output_message_id: Optional[str]` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.responses.get_response_by_id( response_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id=0, ) print(response) ``` #### Response ```json { "data": { "content": { "parts": [ { "text": "AAPL is currently trading at ...", "type": "text" }, { "thoughts": [ "Fetching current market data for AAPL..." ], "type": "thinking" } ] }, "id": "019dbafd-db54-7523-a412-ec9195cc5d99", "output_message_id": "019dbafd-db61-73a0-8bd9-d4034d132f81", "status": "succeeded", "thread_id": "019dbafd-db54-7523-a412-ec8a292246ad", "user_message_id": "019dbafd-db56-78a2-8a91-d54a39f44174" }, "metadata": { "request_id": "abc16101-2cbc-475a-84ef-98c8c588dcbb" } } ``` ## Cancel Response `v1.omni_ai.responses.cancel_response(strresponse_id, ResponseCancelResponseParams**kwargs) -> ResponseCancelResponseResponse` **delete** `/v1/omni-ai/responses/{response_id}` Cancel a response. Requests cancellation of a queued or running response. If the response has already reached a terminal status, this is an idempotent success. A canceled turn still produces a final assistant message with outcome `canceled` in the thread history. ### Parameters - `response_id: str` - `account_id: int` Account ID for the request ### Returns - `class ResponseCancelResponseResponse: …` - `data: CancelResponsePayload` - `canceled: bool` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.responses.cancel_response( response_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id=0, ) print(response) ``` #### Response ```json { "data": { "canceled": false }, "metadata": { "request_id": "fa26a786-f5d3-48b0-80eb-778e17af4964" } } ``` ## Domain Types ### Cancel Response Payload - `class CancelResponsePayload: …` - `canceled: bool` ### Error Status - `class ErrorStatus: …` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` ### Response - `class Response: …` Dynamic pollable response. - `id: str` - `status: ResponseStatus` Dynamic lifecycle status for a pollable response. - `"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]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Thinking content part shown on dynamic response polling. - `type: Literal["thinking"]` - `"thinking"` - `class UnionMember2: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember3: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember4: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember5: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` - `output_message_id: Optional[str]` ### Response Content - `class ResponseContent: …` Dynamic response content container. May include thinking parts. - `parts: List[ResponseContentPart]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Thinking content part shown on dynamic response polling. - `type: Literal["thinking"]` - `"thinking"` - `class UnionMember2: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember3: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember4: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember5: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` ### Response Content Part - `Union[UnionMember0, UnionMember1, UnionMember2, 3 more]` Dynamic content part visible on a pollable response. - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Thinking content part shown on dynamic response polling. - `type: Literal["thinking"]` - `"thinking"` - `class UnionMember2: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember3: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember4: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember5: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` ### Response Status - `Literal["queued", "running", "succeeded", 2 more]` Dynamic lifecycle status for a pollable response. - `"queued"` - `"running"` - `"succeeded"` - `"failed"` - `"canceled"` ### Response Get Response By ID Response - `class ResponseGetResponseByIDResponse: …` - `data: Response` Dynamic pollable response. - `id: str` - `status: ResponseStatus` Dynamic lifecycle status for a pollable response. - `"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]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Thinking content part shown on dynamic response polling. - `type: Literal["thinking"]` - `"thinking"` - `class UnionMember2: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember3: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember4: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember5: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` - `output_message_id: Optional[str]` ### Response Cancel Response Response - `class ResponseCancelResponseResponse: …` - `data: CancelResponsePayload` - `canceled: bool` # Threads ## Get Threads `v1.omni_ai.threads.get_threads(ThreadGetThreadsParams**kwargs) -> ThreadGetThreadsResponse` **get** `/v1/omni-ai/threads` List conversation threads. Returns thread metadata ordered by most recently created first. Use `page_size` and `page_token` for pagination. Thread objects contain only metadata (title, timestamps) — use the messages endpoint for conversation history. ### Parameters - `account_id: int` Account ID for the request - `page_size: Optional[int]` The number of items to return per page. Only used when page_token is not provided. - `page_token: Optional[Union[str, Base64FileInput]]` Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored. ### Returns - `class ThreadGetThreadsResponse: …` - `data: ThreadList` - `id: str` - `created_at: str` - `title: str` - `updated_at: str` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.threads.get_threads( account_id=0, ) print(response) ``` #### Response ```json { "data": [ { "created_at": "2026-04-23T15:15:54.929830+00:00", "id": "019dbae9-73b3-7fe0-bd14-25fe57e91475", "title": "What is current price of AAPL?", "updated_at": "2026-04-23T15:15:54.929830+00:00" } ], "metadata": { "request_id": "eb95e1b8-d245-41b1-bbd0-cc1073e68bfd" } } ``` ## Get Thread By ID `v1.omni_ai.threads.get_thread_by_id(strthread_id, ThreadGetThreadByIDParams**kwargs) -> ThreadGetThreadByIDResponse` **get** `/v1/omni-ai/threads/{thread_id}` Get a specific thread. Returns metadata (title, timestamps) for a single thread. Does not include messages — use `GET /omni-ai/threads/{thread_id}/messages` for conversation history. ### Parameters - `thread_id: str` - `account_id: int` Account ID for the request ### Returns - `class ThreadGetThreadByIDResponse: …` - `data: Thread` Thread metadata returned by list/get thread endpoints. - `id: str` - `created_at: str` - `title: str` - `updated_at: str` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.threads.get_thread_by_id( thread_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id=0, ) print(response) ``` #### Response ```json { "data": { "created_at": "2026-04-23T15:15:54.929830+00:00", "id": "019dbae9-73b3-7fe0-bd14-25fe57e91475", "title": "What is current price of AAPL?", "updated_at": "2026-04-23T15:15:54.929830+00:00" }, "metadata": { "request_id": "5683a394-6dd1-4843-8591-f102ced2e636" } } ``` ## Create Thread `v1.omni_ai.threads.create_thread(ThreadCreateThreadParams**kwargs) -> ThreadCreateThreadResponse` **post** `/v1/omni-ai/threads` Create a new conversation thread. Atomically creates a new thread and submits the first user turn. The response contains a `response_id` that should be polled via `GET /omni-ai/responses/{response_id}` for assistant output. Two creation modes are supported: - **instant** — provide `text` with a natural-language prompt. - **deep\_insights** — provide a `target` ticker and optional `thesis` for long-form research. ### Parameters - `account_id: int` - `type: Literal["instant", "deep_insights"]` Thread creation mode. - `"instant"` - `"deep_insights"` - `capabilities: Optional[List[Literal["PREFILL_ORDER", "OPEN_CHART", "OPEN_SCREENER", "OPEN_ENTITLEMENT_CONSENT"]]]` - `"PREFILL_ORDER"` - `"OPEN_CHART"` - `"OPEN_SCREENER"` - `"OPEN_ENTITLEMENT_CONSENT"` - `target: Optional[Target]` Deep-insights target payload. - `ticker: str` - `type: Literal["ticker"]` Deep-insights target type. Launch supports ticker-only. - `"ticker"` - `text: Optional[str]` - `thesis: Optional[str]` ### Returns - `class ThreadCreateThreadResponse: …` - `data: CreateThreadResponse` Response payload for thread creation. - `response_id: str` - `thread_id: str` - `user_message_id: str` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.threads.create_thread( account_id=19816, type="instant", ) print(response) ``` #### Response ```json { "data": { "response_id": "019dbae9-73b4-7760-a947-8b4bcab57c49", "thread_id": "019dbae9-73b3-7fe0-bd14-25fe57e91475", "user_message_id": "019dbae9-73b8-75b2-9c06-ac348927696d" }, "metadata": { "request_id": "f7a9ad4d-753a-403e-aa0e-ca151f991a81" } } ``` ## Get Thread Response `v1.omni_ai.threads.get_thread_response(strthread_id, ThreadGetThreadResponseParams**kwargs) -> ThreadGetThreadResponseResponse` **get** `/v1/omni-ai/threads/{thread_id}/response` Get the active response for a thread. Convenience endpoint to look up the currently active response for a thread without knowing the `response_id`. Useful when reloading a thread whose last finalized message is a `USER` message — this indicates an assistant turn is likely in progress. Returns **404** if no active response exists (the thread is idle). ### Parameters - `thread_id: str` - `account_id: int` Account ID for the request ### Returns - `class ThreadGetThreadResponseResponse: …` - `data: Response` Dynamic pollable response. - `id: str` - `status: ResponseStatus` Dynamic lifecycle status for a pollable response. - `"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]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Thinking content part shown on dynamic response polling. - `type: Literal["thinking"]` - `"thinking"` - `class UnionMember2: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember3: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember4: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember5: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` - `output_message_id: Optional[str]` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.threads.get_thread_response( thread_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id=0, ) print(response) ``` #### Response ```json { "data": { "content": { "parts": [ { "text": "", "type": "text" }, { "thoughts": [ "[1/4] Running parallel analysis on AAPL -- fundamentals, technicals, sentiment, and macro..." ], "type": "thinking" } ] }, "id": "019dbb03-cf23-74e1-9c31-ef0136ff7fed", "output_message_id": "019dbb03-cf32-74d1-906b-a148d4be3da9", "status": "running", "thread_id": "019dbb03-cf22-7da0-a663-f51c756efa07", "user_message_id": "019dbb03-cf24-7b03-8286-5bfc2411b052" }, "metadata": { "request_id": "927a85a6-b11b-4cc5-a2cd-3f46ae64e85d" } } ``` ## Get Messages `v1.omni_ai.threads.get_messages(strthread_id, ThreadGetMessagesParams**kwargs) -> ThreadGetMessagesResponse` **get** `/v1/omni-ai/threads/{thread_id}/messages` List finalized messages in a thread. Returns **finalized** messages in chronological order. Messages from in-progress assistant turns are excluded — use `GET /omni-ai/threads/{thread_id}/response` or `GET /omni-ai/responses/{response_id}` for live output. If the last finalized message has role `USER`, an active response likely exists and should be polled separately. ### Parameters - `thread_id: str` - `account_id: int` Account ID for the request - `page_size: Optional[int]` The number of items to return per page. Only used when page_token is not provided. - `page_token: Optional[Union[str, Base64FileInput]]` Token for retrieving the next or previous page of results. Contains encoded pagination state; when provided, page_size is ignored. ### Returns - `class ThreadGetMessagesResponse: …` - `data: MessageList` - `id: str` - `content: MessageContent` Finalized immutable message content container. Never includes thinking parts. - `parts: List[MessageContentPart]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember2: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember3: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember4: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `created_at: str` - `outcome: MessageOutcome` Immutable terminal outcome for a finalized assistant message. - `"completed"` - `"errored"` - `"canceled"` - `role: MessageRole` Finalized message role in the public contract. - `"USER"` - `"ASSISTANT"` - `seq: int` - `thread_id: str` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.threads.get_messages( thread_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id=0, ) print(response) ``` #### Response ```json { "data": [ { "content": { "parts": [ { "text": "How are the markets doing today?", "type": "text" } ] }, "created_at": "2026-04-16T09:20:17.274943+00:00", "id": "019d9597-5983-7691-8281-7ce264127740", "outcome": "completed", "role": "USER", "seq": 1, "thread_id": "019d9597-597c-7571-a0c9-a49c0e51f6eb" }, { "content": { "parts": [ { "text": "**Pre-market as of 7:30 AM ET**\n\n ...", "type": "text" }, { "payload": { "actionButtons": [ { "buttonId": "btn_followup_0", "label": "Check my positions", "prompt": { "prompt": "What are my current positions?" } } ] }, "type": "suggested_actions" } ] }, "created_at": "2026-04-16T09:20:17.309212+00:00", "id": "019d9597-599c-7132-a7de-e5c21eaaab77", "outcome": "completed", "role": "ASSISTANT", "seq": 2, "thread_id": "019d9597-597c-7571-a0c9-a49c0e51f6eb" } ], "metadata": { "request_id": "664c0f85-cdab-4fac-afe3-8ecc0148cd4a" } } ``` ## Create Message `v1.omni_ai.threads.create_message(strthread_id, ThreadCreateMessageParams**kwargs) -> ThreadCreateMessageResponse` **post** `/v1/omni-ai/threads/{thread_id}/messages` Continue an existing conversation thread. Appends a new user message to the thread and starts an assistant response. Only one response may be active per thread at a time — if the previous turn is still in progress, this endpoint returns **409 Conflict**. Wait for the active response to reach a terminal status before submitting the next turn. Poll the returned `response_id` via `GET /omni-ai/responses/{response_id}` for assistant output. ### Parameters - `thread_id: str` - `account_id: int` - `text: str` - `capabilities: Optional[List[Literal["PREFILL_ORDER", "OPEN_CHART", "OPEN_SCREENER", "OPEN_ENTITLEMENT_CONSENT"]]]` - `"PREFILL_ORDER"` - `"OPEN_CHART"` - `"OPEN_SCREENER"` - `"OPEN_ENTITLEMENT_CONSENT"` ### Returns - `class ThreadCreateMessageResponse: …` - `data: CreateMessageResponse` Response payload for continuing a thread with a new message. - `response_id: str` - `thread_id: str` - `user_message_id: str` ### Example ```python from clear_street import ClearStreet client = ClearStreet( api_key="My API Key", ) response = client.v1.omni_ai.threads.create_message( thread_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id=19816, text="Compare that to AMD.", ) print(response) ``` #### Response ```json { "data": { "response_id": "019dbaec-8dd3-7fa3-89d0-5303609f125f", "thread_id": "019dbae9-73b3-7fe0-bd14-25fe57e91475", "user_message_id": "019dbaec-8dd4-7f91-bce2-3ec8fba79eb7" }, "metadata": { "request_id": "48775400-61f4-4c6c-bc6d-8f4996c571c7" } } ``` ## Domain Types ### Create Message Response - `class CreateMessageResponse: …` Response payload for continuing a thread with a new message. - `response_id: str` - `thread_id: str` - `user_message_id: str` ### Create Thread Response - `class CreateThreadResponse: …` Response payload for thread creation. - `response_id: str` - `thread_id: str` - `user_message_id: str` ### Message - `class Message: …` Final immutable message. - `id: str` - `content: MessageContent` Finalized immutable message content container. Never includes thinking parts. - `parts: List[MessageContentPart]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember2: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember3: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember4: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `created_at: str` - `outcome: MessageOutcome` Immutable terminal outcome for a finalized assistant message. - `"completed"` - `"errored"` - `"canceled"` - `role: MessageRole` Finalized message role in the public contract. - `"USER"` - `"ASSISTANT"` - `seq: int` - `thread_id: str` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` ### Message Content - `class MessageContent: …` Finalized immutable message content container. Never includes thinking parts. - `parts: List[MessageContentPart]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember2: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember3: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember4: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` ### Message Content Part - `Union[UnionMember0, UnionMember1, UnionMember2, 2 more]` Final immutable content part visible on persisted messages. - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember2: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember3: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember4: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` ### Message List - `List[Message]` - `id: str` - `content: MessageContent` Finalized immutable message content container. Never includes thinking parts. - `parts: List[MessageContentPart]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember2: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember3: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember4: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `created_at: str` - `outcome: MessageOutcome` Immutable terminal outcome for a finalized assistant message. - `"completed"` - `"errored"` - `"canceled"` - `role: MessageRole` Finalized message role in the public contract. - `"USER"` - `"ASSISTANT"` - `seq: int` - `thread_id: str` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` ### Message Outcome - `Literal["completed", "errored", "canceled"]` Immutable terminal outcome for a finalized assistant message. - `"completed"` - `"errored"` - `"canceled"` ### Message Role - `Literal["USER", "ASSISTANT"]` Finalized message role in the public contract. - `"USER"` - `"ASSISTANT"` ### Thread - `class Thread: …` Thread metadata returned by list/get thread endpoints. - `id: str` - `created_at: str` - `title: str` - `updated_at: str` ### Thread List - `List[Thread]` - `id: str` - `created_at: str` - `title: str` - `updated_at: str` ### Thread Get Threads Response - `class ThreadGetThreadsResponse: …` - `data: ThreadList` - `id: str` - `created_at: str` - `title: str` - `updated_at: str` ### Thread Get Thread By ID Response - `class ThreadGetThreadByIDResponse: …` - `data: Thread` Thread metadata returned by list/get thread endpoints. - `id: str` - `created_at: str` - `title: str` - `updated_at: str` ### Thread Create Thread Response - `class ThreadCreateThreadResponse: …` - `data: CreateThreadResponse` Response payload for thread creation. - `response_id: str` - `thread_id: str` - `user_message_id: str` ### Thread Get Thread Response Response - `class ThreadGetThreadResponseResponse: …` - `data: Response` Dynamic pollable response. - `id: str` - `status: ResponseStatus` Dynamic lifecycle status for a pollable response. - `"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]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Thinking content part shown on dynamic response polling. - `type: Literal["thinking"]` - `"thinking"` - `class UnionMember2: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember3: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember4: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember5: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` - `output_message_id: Optional[str]` ### Thread Get Messages Response - `class ThreadGetMessagesResponse: …` - `data: MessageList` - `id: str` - `content: MessageContent` Finalized immutable message content container. Never includes thinking parts. - `parts: List[MessageContentPart]` - `class UnionMember0: …` Text content part. - `type: Literal["text"]` - `"text"` - `class UnionMember1: …` Structured action content part. - `type: Literal["structured_action"]` - `"structured_action"` - `class UnionMember2: …` Chart payload content part. - `type: Literal["chart"]` - `"chart"` - `class UnionMember3: …` Suggested actions payload content part. - `type: Literal["suggested_actions"]` - `"suggested_actions"` - `class UnionMember4: …` Escape-hatch custom payload content part. - `type: Literal["custom"]` - `"custom"` - `created_at: str` - `outcome: MessageOutcome` Immutable terminal outcome for a finalized assistant message. - `"completed"` - `"errored"` - `"canceled"` - `role: MessageRole` Finalized message role in the public contract. - `"USER"` - `"ASSISTANT"` - `seq: int` - `thread_id: str` - `error: Optional[ErrorStatus]` Shared sanitized error payload. - `code: str` - `message: str` - `details: Optional[object]` ### Thread Create Message Response - `class ThreadCreateMessageResponse: …` - `data: CreateMessageResponse` Response payload for continuing a thread with a new message. - `response_id: str` - `thread_id: str` - `user_message_id: str`