Skip to main content

Get Run

Retrieves a run associated with a given thread.

Path Parameters
thread_id Thread Id REQUIRED
run_id Run Id REQUIRED
Responses
200

Successful Response

Schema OPTIONAL
_id Id OPTIONAL

MongoDB document ObjectID

id Id

The identifier, which can be referenced in API endpoints.

object Object22

Possible values: [thread.run]

The object type, which is always thread.run.

created_at Created At

The Unix timestamp (in seconds) for when the run was created.

thread_id Thread Id

The ID of the thread that was executed on as a part of this run.

assistant_id Assistant Id

The ID of the assistant used for execution of this run.

status Status2

Possible values: [queued, in_progress, requires_action, cancelling, cancelled, failed, completed, expired]

The status of the run, which can be either queued, in_progress, requires_action, cancelling, cancelled, failed, completed, or expired.

required_action object OPTIONAL

Details on the action required to continue the run. Will be null if no action is required.

type Type10

Possible values: [submit_tool_outputs]

For now, this is always submit_tool_outputs.

submit_tool_outputs object

Details on the tool outputs needed for this run to continue.

tool_calls object[]

A list of the relevant tool calls.

id Id

The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the Submit tool outputs to run endpoint.

type Type11

Possible values: [function]

The type of tool call the output is required for. For now, this is always function.

function object

The function definition.

name Name

The name of the function.

arguments Arguments

The arguments that the model expects you to pass to the function.

last_error object OPTIONAL

The last error associated with this run. Will be null if there are no errors.

code Code

Possible values: [server_error, rate_limit_exceeded]

One of server_error or rate_limit_exceeded.

message Message

A human-readable description of the error.

expires_at Expires At OPTIONAL

The Unix timestamp (in seconds) for when the run will expire.

started_at Started At OPTIONAL

The Unix timestamp (in seconds) for when the run was started.

cancelled_at Cancelled At OPTIONAL

The Unix timestamp (in seconds) for when the run was cancelled.

failed_at Failed At OPTIONAL

The Unix timestamp (in seconds) for when the run failed.

completed_at Completed At OPTIONAL

The Unix timestamp (in seconds) for when the run was completed.

model Model

The model that the assistant used for this run.

instructions Instructions

The instructions that the assistant used for this run.

tools undefined[]

The list of tools that the assistant used for this run.

file_ids string[]

The list of File IDs the assistant used for this run.

metadata object

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.

422

Validation Error

Schema OPTIONAL
detail object[] OPTIONAL
loc undefined[]
msg Message
type Error Type