July 8, 2026 · Together AI
Usage object token details vary by model; read both shapes defensively
The usage object varies by model. Reasoning models nest cached and reasoning token counts under prompt_tokens_details and completion_tokens_details, while some non-reasoning models return cached_tokens at the top level. Read both shapes defensively so clients do not silently report zero.
See OpenAI compatibility for examples.