The Grok-4.6 Chat Completions API now provides visibility into cached token counts. This information is available in API responses, specifically within the usage.prompt_tokens_details.cached_tokens field.
Key Points
- Cached tokens are reported in API responses.
- The specific field for cached tokens is
usage.prompt_tokens_details.cached_tokens. - This applies to the Grok-4.6 Chat Completions API.
Context
According to xAI's documentation, understanding prompt caching billing involves reviewing these cached token counts. The information is part of the broader usage and pricing details for their advanced API features.
Why It Matters
Builders can use this detailed token reporting to monitor and understand the cost implications of prompt caching when utilizing the Grok-4.6 Chat Completions API.
What To Do
- Review API responses from the Grok-4.6 Chat Completions API for the
usage.prompt_tokens_details.cached_tokensfield. - Compare reported cached token counts against billing statements.
- Note how prompt caching impacts overall token usage and costs.
