TokenUsage schema
| Field | Type and description | ||||
|---|---|---|---|---|---|
prompt_tokens | integer Tokens in the prompt. | ||||
completion_tokens | integer Tokens in the generated completion. | ||||
total_tokens | integer Total tokens used. | ||||
reasoning_tokens | integer Tokens consumed by the model's reasoning trace. Returned by some models only; check for its presence rather than assume it. | ||||
prompt_tokens_details | object | null Breakdown of prompt token consumption. May be null or omitted.
|