---
title: "Create run on existing thread (SSE)"
method: POST
path: "/v1/threads/{threadId}/runs"
tags: ["v1"]
---

# Create run on existing thread (SSE)

`POST /v1/threads/{threadId}/runs`

Starts a streaming run on an existing thread. Returns an SSE stream of AG-UI events.

## Path parameters

- `threadId` string, required

## Request body

- CreateRunRequest
  - `message` InputMessage, required
    - `role` 'user', required — Message role - must be 'user' for input messages
    - `content` union[], required — Content blocks (text, resource, or tool_result)
      - union
        - TextContent
          - `type` 'text', required — Content block type identifier
          - `text` string, required — The text content
        - ResourceContent
          - `type` 'resource', required — Content block type identifier
          - `resource` Resource, required
            - `uri` string — URI identifying the resource (e.g., file://, https://, s3://)
            - `name` string — Human-readable name for the resource
            - `description` string — Optional description of the resource
            - `mimeType` string — MIME type of the resource
            - `text` string — Inline text content (alternative to uri)
            - `blob` string — Base64-encoded blob data (alternative to uri or text)
            - `annotations` ResourceAnnotations
              - …
        - ToolResultContent
          - `type` 'tool_result', required — Content block type identifier
          - `toolUseId` string, required — ID of the tool call this result responds to
          - `content` union[], required — Result content (text or resource blocks)
            - union
              - …
          - `isError` boolean — Whether the tool call resulted in an error
    - `metadata` object — Additional metadata to attach to the message
    - `additionalContext` object — Additional context to provide to the AI beyond the user query, such as current page URL or application state
  - `userKey` string — Identifier for a user in your system. Required if no bearer token is provided.
  - `availableComponents` V1AvailableComponent[] — Available UI components the model can render
    - `name` string, required — Component name (e.g., 'StockChart')
    - `description` string, required — Description of what this component displays
    - `propsSchema` object, required — JSON Schema for component props
    - `stateSchema` object — Optional JSON Schema for component state
  - `tools` Tool[] — Client-side tools the model can call
    - `name` string, required — Unique tool name (a-z, A-Z, 0-9, _, -)
    - `description` string, required — Description of what the tool does
    - `inputSchema` object, required — JSON Schema for the tool's input parameters
    - `outputSchema` object — Optional JSON Schema for structured output
    - `strict` boolean — Enable strict schema validation (OpenAI feature)
    - `maxCalls` number — Per-tool call limit. Overrides the project's global maxToolCallLimit for this tool.
  - `toolChoice` union — How the model should use tools
    - 'auto' | 'required' | 'none'
    - object
      - `name` string
  - `previousRunId` string — ID of the previous run. Required when continuing a thread that already has messages.
  - `model` string — Override the default model
  - `maxTokens` number — Maximum tokens to generate
  - `temperature` number — Temperature for generation (0-2)
  - `runMetadata` object — Metadata for the run

## Response `200`

SSE stream of AG-UI events. Each event is sent as 'data: <json>\n\n' where <json> is a BaseEvent object.

## Other responses

- `404` — Thread not found
- `409` — Concurrent run conflict

---

[API](https://skmtc.net/tambo-ai/apis/tambo-api.md) · [All operations](https://skmtc.net/tambo-ai/apis/tambo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tambo-ai/tambo-api/versions/312691b28f1c/schema)
