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

# GET /threads/{threadId}/runs/{runId}/steps

`GET /threads/{threadId}/runs/{runId}/steps`

Gets a list of run steps from a thread run.

## Path parameters

- `threadId` string, required
- `runId` string, required

## Query parameters

- `include[]` string[]
- `api-version` string, required
- `limit` integer
- `order` 'asc' | 'desc'
- `after` string
- `before` string

## Response `200`

The requested list of run steps.

- object — The response data for a requested list of items.
  - `data` RunStep[], required — The requested list of items.
    - `id` string, required — The identifier, which can be referenced in API endpoints.
    - `object` 'thread.run.step', required — The object type, which is always 'thread.run.step'.
    - `type` 'message_creation' | 'tool_calls', required — The possible types of run steps.
    - `assistant_id` string, required — The ID of the agent associated with the run step.
    - `thread_id` string, required — The ID of the thread that was run.
    - `run_id` string, required — The ID of the run that this run step is a part of.
    - `status` 'in_progress' | 'cancelled' | 'failed' | 'completed' | 'expired', required — Possible values for the status of a run step.
    - `step_details` RunStepDetails, required — An abstract representation of the details for a run step.
      - `type` 'message_creation' | 'tool_calls', required — The possible types of run steps.
    - `last_error` RunStepError, required — The error information associated with a failed run step.
      - `code` 'server_error' | 'rate_limit_exceeded', required — Possible error code values attributable to a failed run step.
      - `message` string, required — The human-readable text associated with this error.
    - `created_at` integer, required — The Unix timestamp, in seconds, representing when this object was created.
    - `expired_at` integer, nullable, required — The Unix timestamp, in seconds, representing when this item expired.
    - `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.
    - `usage` RunStepCompletionUsage — Usage statistics related to the run step.
      - `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).
    - `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.
  - `last_id` string — 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.

## Other responses

- `default` — An unexpected error response.

---

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