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

List steps for a run

Lists the steps belonging to a run on a thread. Use cursor parameters to page through the steps, and set order to control their order by creation time.

7 parameters
thread_idstringrequired
The ID of the thread the run and its steps belong to.
run_idstringrequired
The ID of the run whose steps to list.
limitintegeroptional
Maximum number of steps to return, from 1 to 100. Defaults to 20 when omitted.
Default:20
orderstringoptional
Sort order by creation time: `asc` or `desc`. Defaults to `desc` when omitted.
Allowed:ascdescDefault:desc
afterstringoptional
Cursor for retrieving steps after the specified object ID.
beforestringoptional
Cursor for retrieving steps before the specified object ID.
include[]array<string>optional
Additional response fields to include. The supported value is `step_details.tool_calls[*].file_search.results[*].content`.

2 status codes
200Returns a page containing run step objects, cursor IDs for the first and last steps, and a `has_more` indicator.
objectstringrequired
dataarray<RunSteps>required
first_idstringrequired
last_idstringrequired
has_morebooleanrequired
429Returned when the request rate limit is exceeded.
errorobjectrequired

Error handling

A 429 is returned when the request rate limit is exceeded. The thread_id path parameter and run_id path parameter must identify the thread and run whose steps you want to list. limit must be between 1 and 100, order must be asc or desc, and include[] only supports step_details.tool_calls[*].file_search.results[*].content.