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

PromptTokensDetails

Breakdown of prompt token usage by category (input-side cache accounting)

Subset semantics: cached_tokens and cache_write_tokens are a breakdown of prompt_tokens, so cached_tokens + cache_write_tokens <= Usage.prompt_tokens. Ordinary (full-rate) prompt tokens = prompt_tokens - cached_tokens - cache_write_tokens. audio_tokens / video_tokens are modality breakdowns of prompt_tokens (also a subset).

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-1ivj82m55o#meaning

See the definition above.

Usage profiles​

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

UsageFields and validation
In requestsView fields
In responsesView fields

In requests​

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

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1ivj82m55o#request-field-cachedtokenscachedTokensstring (int64)OptionalPrompt tokens served from cache (cache READ). Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1ivj82m55o#request-field-cachewritetokenscacheWriteTokensstring (int64)OptionalPrompt tokens written to cache this call (cache WRITE). Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1ivj82m55o#request-field-audiotokensaudioTokensstring (int64)OptionalPrompt tokens from audio input (multimodal). Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1ivj82m55o#request-field-videotokensvideoTokensstring (int64)OptionalPrompt tokens from video input (multimodal). Pattern: ^-?\d+$.

In responses​

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

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1ivj82m55o#field-cachedtokensSection ID: DOC-API-MODEL-schema-1ivj82m55o#response-field-cachedtokenscachedTokensstring (int64)OptionalPrompt tokens served from cache (cache READ). Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1ivj82m55o#field-cachewritetokensSection ID: DOC-API-MODEL-schema-1ivj82m55o#response-field-cachewritetokenscacheWriteTokensstring (int64)OptionalPrompt tokens written to cache this call (cache WRITE). Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1ivj82m55o#field-audiotokensSection ID: DOC-API-MODEL-schema-1ivj82m55o#response-field-audiotokensaudioTokensstring (int64)OptionalPrompt tokens from audio input (multimodal). Pattern: ^-?\d+$.
Section ID: DOC-API-MODEL-schema-1ivj82m55o#field-videotokensSection ID: DOC-API-MODEL-schema-1ivj82m55o#response-field-videotokensvideoTokensstring (int64)OptionalPrompt tokens from video input (multimodal). Pattern: ^-?\d+$.

Where used​

Section ID: DOC-API-MODEL-schema-1ivj82m55o#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-1ivj82m55o