Prices are in US dollars per million tokens.
How tokens are counted
Every response reports its tokens inusage:
- Input is
prompt_tokensminuscached_tokens. - Cached input is
cached_tokens: input that was served from the prompt cache. See Prompt caching. - Output is
completion_tokens, including the model’s thinking when reasoning is on.
stream_options.include_usage.
Only successful responses (HTTP 2xx) are counted. If you close a stream early, generation stops.

