DOC-API-MODEL-schema-po7orad6ac#overview
UsageByModel
Usage attributed to a single model within one generation run.
LLMGenerationCompletedEvent.usage is the run-level aggregate, summed across every model the run called. A tool-using turn routinely spans several models, and the rate card prices per model, so billing needs the breakdown alongside the aggregate rather than instead of it. One entry per distinct model.
Meaning and usage
Section ID: DOC-API-MODEL-schema-po7orad6ac#meaning
See the definition above.
Usage profiles
Section ID: DOC-API-MODEL-schema-po7orad6ac#fields
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
In requests
Section ID: DOC-API-MODEL-schema-po7orad6ac#request
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-po7orad6ac#request-field-modelmodel | string | Optional | Model identifier as recorded on the assistant message that produced it. |
Section ID: DOC-API-MODEL-schema-po7orad6ac#request-field-callscalls | string (int64) | Optional | Provider completions attributed to this model within the run. Pattern: ^-?\d+$. |
Section ID: DOC-API-MODEL-schema-po7orad6ac#request-field-usageusage | Usage | Optional | Same shape as the run aggregate, scoped to this model. |
In responses
Section ID: DOC-API-MODEL-schema-po7orad6ac#response
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-po7orad6ac#field-modelSection ID: DOC-API-MODEL-schema-po7orad6ac#response-field-modelmodel | string | Optional | Model identifier as recorded on the assistant message that produced it. |
Section ID: DOC-API-MODEL-schema-po7orad6ac#field-callsSection ID: DOC-API-MODEL-schema-po7orad6ac#response-field-callscalls | string (int64) | Optional | Provider completions attributed to this model within the run. Pattern: ^-?\d+$. |
Section ID: DOC-API-MODEL-schema-po7orad6ac#field-usageSection ID: DOC-API-MODEL-schema-po7orad6ac#response-field-usageusage | Usage | Optional | Same shape as the run aggregate, scoped to this model. |
Where used
Section ID: DOC-API-MODEL-schema-po7orad6ac#where-used
Models containing this value
| Model | Relationship |
|---|---|
| LLMGenerationCompletedEvent | Nested in model |
| LLMGenerationCompletedEvent | Nested in model |
Download the public reference contract.
Document ID: DOC-API-MODEL-schema-po7orad6ac