Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.).

interface Usage {
    completion_tokens: number;
    prompt_tokens: number;
    total_tokens: number;
}

Properties

completion_tokens: number

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

prompt_tokens: number

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

total_tokens: number

Total number of tokens used (prompt + completion).