Per-token rates
See models for context windows and capabilities.
Prompt caching
When a request reuses a prefix that’s already cached, those cache-read input tokens are billed at 10% of the model’s standard input rate. Cache creation (processing tokens and making them eligible for possible later reuse) is charged at the standard input rate — there’s no cache-write premium, and a cache write does not guarantee a later cache read. Output tokens are always billed at the standard rate. Caching is automatic; cached and uncached input tokens are reported separately in the responseusage. Cache hits are best-effort, and cached-token counts are measured per request rather than accumulated across a conversation. Use the reported cache-read tokens to determine whether the discount applied. See prompt caching.