---
title: "GET /threads/{threadId}/runs"
method: GET
path: "/threads/{threadId}/runs"
---

# GET /threads/{threadId}/runs

`GET /threads/{threadId}/runs`

Gets a list of runs for a specified thread.

## Path parameters

- `threadId` string, required

## Query parameters

- `limit` integer
- `order` 'asc' | 'desc'
- `after` string
- `before` string

## Response `200`

The requested list of thread runs.

- object — The response data for a requested list of items.
  - `object` 'list', required — The object type, which is always list.
  - `data` ThreadRun[], required — The requested list of items.
    - `id` string, required — The identifier, which can be referenced in API endpoints.
    - `object` 'thread.run', required — The object type, which is always 'thread.run'.
    - `thread_id` string, required — The ID of the thread associated with this run.
    - `assistant_id` string, required — The ID of the assistant associated with the thread this run was performed against.
    - `status` 'queued' | 'in_progress' | 'requires_action' | 'cancelling' | 'cancelled' | 'failed' | 'completed' | 'expired', required — Possible values for the status of an assistant thread run.
    - `required_action` RequiredAction — An abstract representation of a required action for an assistant thread run to continue.
      - `type` string, required — The object type.
    - `last_error` RunError, required — The details of an error as encountered by an assistant thread run.
      - `code` string, required — The status for the error.
      - `message` string, required — The human-readable text associated with the error.
    - `model` string, required — The ID of the model to use.
    - `instructions` string, required — The overridden system instructions used for this assistant thread run.
    - `tools` ToolDefinition[], required — The overridden enabled tools used for this assistant thread run.
      - `type` string, required — The object type.
    - `created_at` integer, required — The Unix timestamp, in seconds, representing when this object was created.
    - `expires_at` integer, nullable, required — The Unix timestamp, in seconds, representing when this item expires.
    - `started_at` integer, nullable, required — The Unix timestamp, in seconds, representing when this item was started.
    - `completed_at` integer, nullable, required — The Unix timestamp, in seconds, representing when this completed.
    - `cancelled_at` integer, nullable, required — The Unix timestamp, in seconds, representing when this was cancelled.
    - `failed_at` integer, nullable, required — The Unix timestamp, in seconds, representing when this failed.
    - `incomplete_details` 'max_completion_tokens' | 'max_prompt_tokens', required — The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.
    - `usage` RunCompletionUsage, required — Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).
      - `completion_tokens` integer, required — Number of completion tokens used over the course of the run.
      - `prompt_tokens` integer, required — Number of prompt tokens used over the course of the run.
      - `total_tokens` integer, required — Total number of tokens used (prompt + completion).
    - `temperature` number, float, nullable — The sampling temperature used for this run. If not set, defaults to 1.
    - `top_p` number, float, nullable — The nucleus sampling value used for this run. If not set, defaults to 1.
    - `max_prompt_tokens` integer, nullable, required — The maximum number of prompt tokens specified to have been used over the course of the run.
    - `max_completion_tokens` integer, nullable, required — The maximum number of completion tokens specified to have been used over the course of the run.
    - `truncation_strategy` TruncationObject, required — Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run.
      - `type` 'auto' | 'last_messages', required — The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the `lastMessages` count most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.
      - `last_messages` integer, nullable — The number of most recent messages from the thread when constructing the context for the run.
    - `tool_choice` unknown, required
    - `parallel_tool_calls` boolean, required — Whether to enable parallel function calling during tool use.
    - `response_format` unknown, required
    - `metadata` object, nullable, required — A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.
  - `first_id` string, required — The first ID represented in this list.
  - `last_id` string, required — The last ID represented in this list.
  - `has_more` boolean, required — A value indicating whether there are additional values available not captured in this list.

---

[API](https://skmtc.net/azure/apis/ai-openai-assistants-openapiv2.md) · [All operations](https://skmtc.net/azure/apis/ai-openai-assistants-openapiv2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/ai-openai-assistants-openapiv2/revisions/453a64f820f0/schema)
