Skip to main content

CompletionTokensDetails

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

Usage profiles​

UsageFields and validation
In requestsView fields
In responsesView fields
In webhook payloadsView fields

In requests​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
reasoningTokensinteger (int32)OptionalTokens used for reasoning/thinking. Minimum: -2147483648. Maximum: 2147483647.
imageTokensinteger (int32)OptionalCompletion tokens emitted as image output. Minimum: -2147483648. Maximum: 2147483647.
audioTokensinteger (int32)OptionalCompletion tokens emitted as audio output. Minimum: -2147483648. Maximum: 2147483647.

In responses​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
reasoningTokensinteger (int32)OptionalTokens used for reasoning/thinking. Minimum: -2147483648. Maximum: 2147483647.
imageTokensinteger (int32)OptionalCompletion tokens emitted as image output. Minimum: -2147483648. Maximum: 2147483647.
audioTokensinteger (int32)OptionalCompletion tokens emitted as audio output. Minimum: -2147483648. Maximum: 2147483647.

In webhook payloads​

Webhook JSON uses protobuf field names (snake_case).

FieldTypePresenceMeaning
reasoning_tokensinteger (int32)OptionalTokens used for reasoning/thinking. Minimum: -2147483648. Maximum: 2147483647.
image_tokensinteger (int32)OptionalCompletion tokens emitted as image output. Minimum: -2147483648. Maximum: 2147483647.
audio_tokensinteger (int32)OptionalCompletion tokens emitted as audio output. Minimum: -2147483648. Maximum: 2147483647.

Where used​

ReferenceRelationship
Append a message without generatingPOST /api/v1/llm/append-message
Send a message to a conversationPOST /api/v1/llm/send-message
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
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
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
llm.generation_completedWebhook JSON uses protobuf field names (snake_case).
llm.message_publishedWebhook JSON uses protobuf field names (snake_case).
UsageNested in model
UsageNested in model
UsageNested in model

Download the public reference contract.

Document: DOC-API-MODEL-completion-tokens-details.