Skip to content
Get started

Threads

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

Get Threads
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