---
title: "Create Thread"
method: POST
path: "/v1/omni-ai/threads"
tags: ["Omni AI"]
---

# Create Thread

`POST /v1/omni-ai/threads`

## Request

- Base URL: `https://api.clearstreet.com`
- URL: `https://api.clearstreet.com/v1/omni-ai/threads`
- Auth: HTTP bearer

Atomically create a conversation and submit its first user turn.
Use `instant` with `text` for a prompt, or `deep_insights` with a ticker
`target` and optional `thesis` for long-form research.

Poll the returned `response_id` via `GET /omni-ai/responses/{response_id}`
for assistant output.

Omit `account_id` to start without an account. The first accepted turn with
a selected account links that account permanently. Reuse `Idempotency-Key`
only for an identical request.

## Request body

- CreateThreadRequest: Create-thread request body.
  - `account_id` integer, nullable: Selected account for creation or the first account-linked turn. Omit for an unlinked conversation. An existing account link remains authoritative even when another account is selected.
  - `capabilities` Capability[]
  - `context` TurnContext: Client snapshots attached to one instant-chat user message. Context is separate from visible message text and does not grant account access. The compact JSON representation must not exceed 64 KiB.
    - `items` ContextItem[], required: One to four snapshots. Each snapshot's data may contain at most 32 levels of nesting.
      - `captured_at` string, date-time, nullable: Client-reported snapshot time. Omit when unknown.
      - `data` object, required: Relevant widget data, selections, and units. Use strings for exact decimals and large IDs.
      - `kind` string, required: Nonblank descriptive kind. New kinds do not require a backend release.
      - `label` string, required: Nonblank attachment label for conversation rendering.
  - `target` DeepInsightsTarget: Deep-insights target payload.
    - `ticker` string, required
    - `type` 'ticker', required: Deep-insights target type. Launch supports ticker-only.
  - `text` string, nullable
  - `thesis` string, nullable
  - `type` 'instant' | 'deep_insights', required: Thread creation mode.

## Response `200`

Thread created. Poll the returned `response_id` for assistant output.

- object
  - `error` ApiError: A direct mapping of tonic::Status, for use in HTTP responses.
    - `code` integer, required: The error code is used to identify the nature of the error. It corresponds to an HTTP status code.
    - `details` object[]
    - `message` string, required: A human-readable message providing more details about the error.
  - `metadata` ResponseMetadata, required: Metadata for the response. This will always contain a request ID which can be used to identify the request to Clear Street for tracing, and optionally may include pagination data.
    - `next_page_token` string, byte, nullable: Base64URL-encoded pagination token
    - `page_number` integer, nullable: Pagination. Included if this was a GET (list) response
    - `previous_page_token` string, byte, nullable: Base64URL-encoded pagination token
    - `request_id` string, required: A unique ID for this request, generated upon ingestion of the request.
    - `total_items` integer, nullable: Total number of items available (not just in this page).
    - `total_pages` integer, nullable: Total number of pages available.
  - `data` CreateThreadResponse, required: Response payload for thread creation.
    - `response_id` string, uuid, required
    - `thread_id` string, uuid, required
    - `user_message_id` string, uuid, required

## Other responses

- `400`: Invalid request or supplied account ID
- `401`: Authentication required
- `403`: Caller lacks linked-account access
- `404`: Resource not found or not owned by caller
- `409`: Thread scope changed or conflicting retry; refresh before retrying
- `422`: Malformed request payload
- `500`: Internal server error

## Changes

- **2026-10-16** `1bd9eddeffc8`: 6 breaking, 4 warning, 13 info
  - removed the required property `code` from the response with the `400` status
  - removed the required property `code` from the response with the `422` status
  - removed the required property `code` from the response with the `500` status
  - removed the required property `message` from the response with the `400` status
  - …19 more

[Operation history](https://skmtc.dev/clear-street/apis/clear-street-trading-api/changes/v1/omni-ai/threads/post.md)

---

[API](https://skmtc.dev/clear-street/apis/clear-street-trading-api.md) - [All operations](https://skmtc.dev/clear-street/apis/clear-street-trading-api/llms.txt) - [OpenAPI document](https://skmtc.dev/clear-street/apis/clear-street-trading-api/revisions/52e77ea7d731?raw)
