OpenAI API

RunStepCompletionUsage

object

Usage statistics related to the run step. This value will be null while the run step’s status is in_progress.

completion_tokensintegerrequired

Number of completion tokens used over the course of the run step.

prompt_tokensintegerrequired

Number of prompt tokens used over the course of the run step.

total_tokensintegerrequired

Total number of tokens used (prompt + completion).

Example

Run step delta object

object

Represents a run step delta i.e. any changed fields on a run step during streaming.

idstringrequired

The identifier of the run step, which can be referenced in API endpoints.

objectstringrequired

The object type, which is always thread.run.step.delta.

Allowed values:thread.run.step.delta

deltaobjectrequired

The delta containing the fields that have changed on the run step.

Show Child Parameters
Example

Message creation

object

Details of the message creation by the run step.

typestringrequired

Always message_creation.

Allowed values:message_creation

message_creationobject
Show Child Parameters
Example

Code interpreter tool call

object

Details of the Code Interpreter tool call the run step was involved in.

indexintegerrequired

The index of the tool call in the tool calls array.

idstring

The ID of the tool call.

typestringrequired

The type of tool call. This is always going to be code_interpreter for this type of tool call.

Allowed values:code_interpreter

code_interpreterobject

The Code Interpreter tool call definition.

Show Child Parameters
Example

Code interpreter image output

object
indexintegerrequired

The index of the output in the outputs array.

typestringrequired

Always image.

Allowed values:image

imageobject
Show Child Parameters
Example