Token-based pricing
Input and output can have different rates. Cache reads and cache writes are separate portions of the total input:
With an applicable 2× discount, this example rounds to 678 credits.
Context and service tiers
Where a model exposes long-context rates, those rates apply when pricing input is strictly greater thanlong_context_threshold. A supported priority service tier can also increase rates. The catalog does not expose every service-tier adjustment.
Usage fields differ between API formats. In native Messages responses, input_tokens can exclude the separate cache_read_input_tokens and cache_creation_input_tokens. Billing can use a local input estimate when it exceeds reported input usage, so raw upstream counters alone may not reproduce the final charge. Use request usage to inspect credits_used.
Fixed-cost operations and images
Models withcost_type: "fixed" use a base cost rather than the token formula, subject to the operation’s billing rules. Image generation/editing is charged per image: non-streaming requests use the number of returned images; completed streaming requests use the requested count. Do not assume one request always costs one image’s price.
See each image endpoint for access requirements. A model’s appearance in the public catalog is not a guarantee of eligibility.
Balance and discounts
- View your balance and plan in the dashboard, or call GET /v1/credits.
- Read active model-specific discounts with My Discounts.
- Use request usage for the recorded spend on a completed request.
