- Selecting common models from Anthropic, OpenAI, Google, and other providers
- Creating billable metrics, products, and rates based on your configured markup percentage(s)
- Automatically syncing newly released models to your rate card at your configured markup
Private previewToken Billing is in private preview. To request access, contact us via the Metronome support portal or email token-billing-team@stripe.com
Use case
Fictional company Designr is an AI-powered design tool. Customers use Designr to generate design assets, including prototypes, mockups, and images. Designr uses common AI models and charges customers a 10% markup on underlying model costs. Designr offers several plan tiers. Its Pro Plan includes 200 Designr Credits — a custom pricing unit — each month. If a customer uses all of their Designr Credits, they can purchase additional credits during the month.Set up your rate card
In Metronome, a rate card is your centralized price book, where you define pricing for all products. When you use Token Billing, Metronome automatically creates billable metrics, products, and rates for managed AI products based on the markup you enter. You do not need to create these separately. Because Designr uses a custom pricing unit, Designr Credits, first navigate to Offering > Pricing Units > Custom Pricing Units. Click + Add, then create a custom pricing unit named Designr Credits. Next, create your rate card.Note: When using Token Billing, non-USD fiat currencies are not supported, as provider prices are denominated in USD.
Create your rate card
- Click Offering in the left-hand sidebar.
- Navigate to the Rate Cards tab and select + Add.
- Enter the rate card name and description, then enable Charge based on AI provider pricing (managed). You can also add a human-readable alias, such as
default_rate_card, to reference the rate card more easily throughout the API. - Select the AI models you want to use. You can select all models from a provider or expand the provider to select individual models.
- Add any other usage-based, subscription, or composite products that you want to include on the same rate card.
- Click Next to proceed to the next page.
Set rates — Custom Pricing Unit
- Under Default markup for future AI models, enter the markup percentage that should automatically apply when new models are added to the rate card.
- In the upper-right corner of the AI models section, select USD. In the dropdown, select the Designr Credits custom pricing unit.
- In the modal, define a conversion rate between USD and Designr Credits.
- Expand each model to verify its distinct rates by author, provider, and token type.
- Click Save.
Set rates — USD
- Under Default markup for future AI models, enter the markup percentage that should automatically apply when new models are added to the rate card.
- Enter markup percentages for each selected model, or use Apply markup to all in the upper-right corner to apply the same markup percentage to every selected model.
- Expand each model to verify its distinct rates by author, provider, and token type.
- Click Save.
Define your pricing model
Because Designr’s Pro Plan includes an allocation of 200 Designr Credits per month, you can create a Package to encode the credit allocation alongside the rate card you just created. In Metronome, Packages define customer-facing offerings, such as Pro Plan or Max Plan, and simplify assigning PLG customers to these offerings.Provision customers
You are now ready to assign customers to the Pro Plan. Provisioning a customer with a package creates a contract: a customer-specific agreement that applies the terms from the package. Use the API call below to provision a customer with the Pro Plan:Integrate usage tracking
Ensure that your events follow the format below, withevent_type set to token-billing-tokens.
units_used field tracks the number of tokens consumed.
The model, provider, and token_type fields match the event to the correct rate. Supported values for token_type are:
input: Tokens in the promptoutput: Tokens in the responsecached_input: Cached prompt tokenscached_write: Cache-write tokens. Supported for Anthropic models and OpenAI GPT-5.6+ models only
/ingest endpoint. Then navigate to the Events page to confirm that the events have matched a billable metric.