---
title: "Create Run Stream Route"
method: POST
path: "/api/threads/{thread_id}/runs/stream"
tags: ["run"]
---

# Create Run Stream Route

`POST /api/threads/{thread_id}/runs/stream`

Creates a new run and streams the results.

## Path parameters

- `thread_id` string, uuid, required

## Request body

- RunCreateInput
  - `model` 'gpt-4o'
  - `instructions` string, nullable
  - `additional_instructions` string, nullable
  - `knowledge_base_id` string, uuid, nullable
  - `context_limit` integer, nullable — The maximum number of context chunks to include.
  - `codex_access_key` string, nullable
  - `tools` union[], nullable
    - union
      - CodexV0Tool
        - `type` 'codex_v0'
        - `access_key` string, required
      - NoOpTool
        - `type` 'noop'
  - `assistant_id` string, uuid, required
  - `additional_messages` MessageCreate[]
    - `thread_id` string, uuid, required
    - `role` 'user' | 'assistant', required
    - `content` string, required
    - `metadata` MessageMetadata, required
      - `trustworthiness_score` number, nullable
      - `trustworthiness_explanation` string, nullable
      - `is_expert_answer` boolean, nullable
      - `is_bad_response` boolean, nullable
      - `citations` string[], nullable
      - `scores` ResponseScoreMetadata
        - `trustworthiness` object, nullable
        - `response_helpfulness` object, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2025-04-14** `b890eea39144` — 4 info
  - added the new optional request property `additional_messages/items/metadata/is_bad_response`
  - added the new optional request property `additional_messages/items/metadata/is_expert_answer`
  - added the new optional request property `additional_messages/items/metadata/scores`
  - added the new optional request property `codex_access_key`
- **2025-01-22** `2aa38a4bc52c` — 1 breaking, 1 warning, 2 info
  - removed `#/components/schemas/AlphaV0Tool` from the `tools/anyOf[subschema #1]/items/` request property `anyOf` list
  - removed the request property `tools/anyOf[subschema #1]/items/anyOf[subschema #2: NoOpTool]/name`
  - added the new optional request property `tools/anyOf[subschema #1]/items/anyOf[subschema #2: NoOpTool]/type`
  - added `#/components/schemas/CodexV0Tool` to the `tools/anyOf[subschema #1]/items/` request property `anyOf` list
- **2025-01-15** `92f517edd77d` — 1 info
  - added the new optional request property `additional_messages/items/metadata/trustworthiness_explanation`
- **2025-01-02** `60c8c820f2cb` — 1 info
  - added the new optional request property `tools`
- **2024-12-13** `a5e85dccbbe3` — 1 info
  - added the new optional request property `context_limit`

[Full history](https://skmtc.dev/cleanlab/apis/agility/changes/api/threads/:thread_id/runs/stream/post.md)

---

[API](https://skmtc.dev/cleanlab/apis/agility.md) · [All operations](https://skmtc.dev/cleanlab/apis/agility/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cleanlab/agility/revisions/b890eea39144/schema)
