---
title: "Returns a list of run steps belonging to a run."
method: GET
path: "/threads/{thread_id}/runs/{run_id}/steps"
tags: ["Assistants"]
---

# Returns a list of run steps belonging to a run.

`GET /threads/{thread_id}/runs/{run_id}/steps`

## Path parameters

- `thread_id` string, required
- `run_id` string, required

## Query parameters

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

## Response `200`

OK

- ListRunStepsResponse
  - `object` string, required
  - `data` RunStepObject[], required
    - `id` string, required — The identifier of the run step, which can be referenced in API endpoints.
    - `object` 'thread.run.step', required — The object type, which is always `thread.run.step`.
    - `created_at` integer, required — The Unix timestamp (in seconds) for when the run step was created.
    - `assistant_id` string, required — The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.
    - `thread_id` string, required — The ID of the [thread](/docs/api-reference/threads) that was run.
    - `run_id` string, required — The ID of the [run](/docs/api-reference/runs) that this run step is a part of.
    - `type` 'message_creation' | 'tool_calls', required — The type of run step, which can be either `message_creation` or `tool_calls`.
    - `status` 'in_progress' | 'cancelled' | 'failed' | 'completed' | 'expired', required — The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.
    - `step_details` union, required — The details of the run step.
      - object — Details of the message creation by the run step.
        - `type` 'message_creation', required — Always `message_creation`.
        - `message_creation` object, required
          - `message_id` string, required — The ID of the message that was created by this run step.
      - object — Details of the tool call.
        - `type` 'tool_calls', required — Always `tool_calls`.
        - `tool_calls` union[], required — An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.
          - union
            - RunStepDetailsToolCallsCodeObject — Details of the Code Interpreter tool call the run step was involved in.
              - …
            - RunStepDetailsToolCallsFileSearchObject
              - …
            - RunStepDetailsToolCallsFunctionObject
              - …
    - `last_error` object, nullable, required — The last error associated with this run step. Will be `null` if there are no errors.
      - `code` 'server_error' | 'rate_limit_exceeded', required — One of `server_error` or `rate_limit_exceeded`.
      - `message` string, required — A human-readable description of the error.
    - `expired_at` integer, nullable, required — The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.
    - `cancelled_at` integer, nullable, required — The Unix timestamp (in seconds) for when the run step was cancelled.
    - `failed_at` integer, nullable, required — The Unix timestamp (in seconds) for when the run step failed.
    - `completed_at` integer, nullable, required — The Unix timestamp (in seconds) for when the run step completed.
    - `metadata` Metadata, nullable, required — Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
    - `usage` RunStepCompletionUsage, nullable, required — Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.
      - `completion_tokens` integer, required — Number of completion tokens used over the course of the run step.
      - `prompt_tokens` integer, required — Number of prompt tokens used over the course of the run step.
      - `total_tokens` integer, required — Total number of tokens used (prompt + completion).
  - `first_id` string, required
  - `last_id` string, required
  - `has_more` boolean, required

---

[API](https://skmtc.net/openai/apis/openai-api-3.md) · [All operations](https://skmtc.net/openai/apis/openai-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openai/openai-api-3/versions/74cbcf73838f/schema)
