Path parameters
-
The ID of the thread to which the run and run step belongs.
-
The ID of the run to which the run step belongs.
-
The ID of the run step to retrieve.
Query parameters
-
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.
Value is
step_details.tool_calls[*].file_search.results[*].content
.
GET
/threads/{thread_id}/runs/{run_id}/steps/{step_id}
curl \
--request GET 'https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}/steps/{step_id}' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"id": "string",
"object": "thread.run.step",
"created_at": 42,
"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": 42,
"cancelled_at": 42,
"failed_at": 42,
"completed_at": 42,
"metadata": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"usage": {
"completion_tokens": 42,
"prompt_tokens": 42,
"total_tokens": 42
}
}