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
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
In requests
Section ID: DOC-API-MODEL-schema-1ivj82m55o#request
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1ivj82m55o#request-field-cachedtokenscachedTokens | string (int64) | Optional | Prompt tokens served from cache (cache READ). Pattern: ^-?\d+$. |
Section ID: DOC-API-MODEL-schema-1ivj82m55o#request-field-cachewritetokenscacheWriteTokens | string (int64) | Optional | Prompt tokens written to cache this call (cache WRITE). Pattern: ^-?\d+$. |
Section ID: DOC-API-MODEL-schema-1ivj82m55o#request-field-audiotokensaudioTokens | string (int64) | Optional | Prompt tokens from audio input (multimodal). Pattern: ^-?\d+$. |
Section ID: DOC-API-MODEL-schema-1ivj82m55o#request-field-videotokensvideoTokens | string (int64) | Optional | Prompt tokens from video input (multimodal). Pattern: ^-?\d+$. |
In responses
Section ID: DOC-API-MODEL-schema-1ivj82m55o#response
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1ivj82m55o#field-cachedtokensSection ID: DOC-API-MODEL-schema-1ivj82m55o#response-field-cachedtokenscachedTokens | string (int64) | Optional | Prompt 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-cachewritetokenscacheWriteTokens | string (int64) | Optional | Prompt 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-audiotokensaudioTokens | string (int64) | Optional | Prompt tokens from audio input (multimodal). Pattern: ^-?\d+$. |
Section ID: DOC-API-MODEL-schema-1ivj82m55o#field-videotokensSection ID: DOC-API-MODEL-schema-1ivj82m55o#response-field-videotokensvideoTokens | string (int64) | Optional | Prompt tokens from video input (multimodal). Pattern: ^-?\d+$. |
Where used
Section ID: DOC-API-MODEL-schema-1ivj82m55o#where-used
| Reference | Relationship |
|---|---|
| Withdraw your rating on a message | POST /api/v1/llm/delete-message-rating |
| Get full conversation state | POST /api/v1/llm/conversation-state |
| Rate an assistant message | POST /api/v1/llm/rate-message |
| Send a message and wait for the result | POST /api/v1/llm/send-message-sync |
| Submit client-side tool results and wait for the next segment | POST /api/v1/llm/submit-client-tool-results-sync |
| Append a message without generating | POST /api/v1/llm/append-message |
| Send a message to a conversation | POST /api/v1/llm/send-message |
| ReceiveMessageRequest | API JSON uses JSON field names (camelCase). |
| ClientToolDispatch | API JSON uses JSON field names (camelCase). |
Download the public reference contract.
Document ID: DOC-API-MODEL-schema-1ivj82m55o