1. What is cost_in_usd_ticks in xAI API usage responses?
Every xAI completion response reports granular billing via cost_in_usd_ticks measured in ten-billionths of a US dollar (10,000,000,000 ticks = $1.00 USD), enabling sub-cent audit precision.
In-depth engineering guide to xAI token economics, caching rules, rate limits, and official vendor documentation sources.
Every xAI completion response reports granular billing via cost_in_usd_ticks measured in ten-billionths of a US dollar (10,000,000,000 ticks = $1.00 USD), enabling sub-cent audit precision.
For Grok reasoning models, you must pass back the prior reasoning_content (or encrypted reasoning payload) unchanged in subsequent turns; stripping or altering reasoning history invalidates the cached prefix.
Yes. Both cached prompt tokens and hidden reasoning tokens count against your per-model Tokens Per Minute (TPM) limit, triggering HTTP 429 errors if sudden bursts exceed your tier.
Cached input tokens are typically discounted by 75% (e.g., $0.75/1M vs. $3.00/1M on Grok 4.20) with no manual cache setup fees.
Read response.usage.prompt_tokens_details.cached_tokens; a non-zero value close to your system prefix confirms routing hit the active cache node.
No. Once your cumulative spend crosses a tier milestone ($50, $250, $1,000, $5,000), the higher RPS and TPM limits remain permanently unlocked on your account.
Token pricing, 200K long-context thresholds, and cost_in_usd_ticks
x-grok-conv-id routing, reasoning history rules, and RPS/TPM tiers