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
}
}
Retrieves a run step.
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
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
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.
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.
Show child attributes
OK
Represents a step in execution of a run.
Was this page helpful?