This example covers standard API token charges in USD. It does not recreate Claude app subscriptions, other models, batch or fast processing, partner cloud pricing, tool charges, or negotiated discounts. Those need their own prices or meters. The plan and event names below are examples for your Flexprice account, not Anthropic product names or API payloads.
Claude Sonnet 4.6 token prices
The official model pricing table lists these rates. A million tokens is a price presentation unit, not a minimum purchase: meter raw token counts and use the equivalent decimal per-token rate.
Cache writes are not cache reads. A newly cached token uses the write rate for its cache lifetime, while a reused token uses the cache-hit rate. Each input token belongs to one billing category for a request; do not charge a cache write or read again as uncached input.
How Anthropic’s pricing maps to Flexprice
The example uses a monthly billing cycle with usage billed in arrears. That is a choice for your Flexprice plan, not a claim about Anthropic’s payment collection cadence. It has no subscription fee, included allowance, or recurring credit grant. If your product sells prepaid credits, configure the wallet funding and credit rules separately from these token rates.
Set up the metered features
Create five metered features with Event Nameclaude_request, Aggregation SUM, token units, and periodic usage. Apply the filter model = claude-sonnet-4-6 to every meter. Each meter sums a different property from the same event.
Read the completed request’s usage data on your server and normalize it into these properties. Use the provider’s uncached input count, not a total input count that also includes cache reads or writes. Split cache writes by lifetime instead of adding an aggregate cache-write count on top of its lifetime breakdown. See Anthropic’s prompt caching documentation for the usage fields.
The aggregate
cache_creation_input_tokens equals the sum of the two cache-write lifetime fields. Do not send it as another billable meter when you send the breakdown.
Configure the usage-only plan
Create a plan named Claude API Standard with currency USD and a monthly billing period. Link all five features to it. Add a usage-based flat-fee charge to each feature with these amounts per token:
Use the meter attached to each feature when configuring its price. Do not round the per-token amount to cents, use a package that rounds usage up to a million tokens, or add a free-token allowance. A display unit such as “million tokens” changes reporting presentation, not these billing amounts.
Send usage and check the arithmetic
Subscribe a customer to the plan, then send usage events from your server. The following is an illustrative normalized Flexprice event, not an actual Claude response:event_id stable when retrying the same request and use the actual request timestamp. Send the final token counts once per completed request rather than billing both streaming updates and the final total.
For 1,000 such requests, the aggregate usage and charges are:
Compare each feature’s usage and charge with this calculation before using the configuration for live billing. This guide describes a setup; it does not claim that resources or invoices have been created in your account.
Pricing sources
Pricing checked on 2026-11-04.- Anthropic model pricing: standard Sonnet 4.6 token rates, USD denomination, and cache-write and cache-hit categories.
- Anthropic prompt caching: cache lifetimes and usage accounting.

