GET
/
threads
/
{thread_id}
/
runs
/
{run_id}
/
steps
/
{step_id}
curl --request GET \
  --url https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}/steps/{step_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "object": "thread.run.step",
  "created_at": 123,
  "assistant_id": "<string>",
  "thread_id": "<string>",
  "run_id": "<string>",
  "type": "message_creation",
  "status": "in_progress",
  "step_details": {
    "type": "message_creation",
    "message_creation": {
      "message_id": "<string>"
    }
  },
  "last_error": {
    "code": "server_error",
    "message": "<string>"
  },
  "expired_at": 123,
  "cancelled_at": 123,
  "failed_at": 123,
  "completed_at": 123,
  "metadata": {},
  "usage": {
    "completion_tokens": 123,
    "prompt_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

thread_id
string
required

The ID of the thread to which the run and run step belongs.

run_id
string
required

The ID of the run to which the run step belongs.

step_id
string
required

The ID of the run step to retrieve.

Query Parameters

include[]
enum<string>[]

A list of additional fields to include in the response. Currently the only supported value is step_details.tool_calls[*].file_search.results[*].content to fetch the file search result content.

See the file search tool documentation for more information.

Response

200 - application/json

OK

Represents a step in execution of a run.