Skip to main content
Section ID: DOC-API-MODEL-schema-1i6q4qpg72#overview

CompletionTokensDetails

Breakdown of completion-token usage. Categories are measured by different upstream tokenizers and need not sum to completion_tokens; reasoning_tokens can exceed completion_tokens. One category must not be derived by subtracting the others.

Type-reference view: API Schema 9frhv4euve, API Schema 9ftjkkjhfa. Request and response views describe this type; they do not declare an endpoint.

Meaning and usage​

Section ID: DOC-API-MODEL-schema-1i6q4qpg72#meaning

See the definition above.

Usage profiles​

Section ID: DOC-API-MODEL-schema-1i6q4qpg72#fields

UsageFields and validation
In requestsView fields
In responsesView fields

In requests​

Section ID: DOC-API-MODEL-schema-1i6q4qpg72#request

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1i6q4qpg72#request-field-reasoningtokensreasoningTokensstring (int64)OptionalTokens used for reasoning/thinking. Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1i6q4qpg72#request-field-imagetokensimageTokensstring (int64)OptionalCompletion tokens emitted as image output. Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1i6q4qpg72#request-field-audiotokensaudioTokensstring (int64)OptionalCompletion tokens emitted as audio output. Pattern: ^-?\d+$.

In responses​

Section ID: DOC-API-MODEL-schema-1i6q4qpg72#response

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1i6q4qpg72#field-reasoningtokensSection ID: DOC-API-MODEL-schema-1i6q4qpg72#response-field-reasoningtokensreasoningTokensstring (int64)OptionalTokens used for reasoning/thinking. Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1i6q4qpg72#field-imagetokensSection ID: DOC-API-MODEL-schema-1i6q4qpg72#response-field-imagetokensimageTokensstring (int64)OptionalCompletion tokens emitted as image output. Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1i6q4qpg72#field-audiotokensSection ID: DOC-API-MODEL-schema-1i6q4qpg72#response-field-audiotokensaudioTokensstring (int64)OptionalCompletion tokens emitted as audio output. Pattern: ^-?\d+$.

Where used​

Section ID: DOC-API-MODEL-schema-1i6q4qpg72#where-used

ReferenceRelationship
Withdraw your rating on a messagePOST /api/v1/llm/delete-message-rating
Get full conversation statePOST /api/v1/llm/conversation-state
Rate an assistant messagePOST /api/v1/llm/rate-message
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
Append a message without generatingPOST /api/v1/llm/append-message
Send a message to a conversationPOST /api/v1/llm/send-message
ReceiveMessageRequestAPI JSON uses JSON field names (camelCase).
ClientToolDispatchAPI JSON uses JSON field names (camelCase).
Models containing this value
ModelRelationship
UsageNested in model
UsageNested in model

Download the public reference contract.

Document ID: DOC-API-MODEL-schema-1i6q4qpg72