Billing for LLM tokensPrivate preview
Learn how to bill for LLM tokens.
Bill for LLM tokens without managing pricing complexity. Set your markup, pick your models, and route calls through our AI Gateway (or supported partners), or self-report your usage directly. We sync popular model prices, configure advanced usage-based billing for your margin, and record usage automatically. Billing for LLM tokens is a private preview feature, and we consider it experimental in nature.
Developer preview
This is an experimental private preview. We’re looking for developers willing to test the functionality and share their feedback. If you’re interested in additional capabilities such as tracking costs without billing for them immediately and credit-based systems, contact us at token-billing-team@stripe.com.
Overview
For example, say you’re building an AI app: you want a consistent 30% margin over raw LLM token costs across providers.
Billing automates the process and Stripe:
- Syncs the latest model prices across providers.
- Configures Usage-Based Billing for your token markup.
- Records usage automatically through our AI gateway, supported partners, or self-reported usage.
Flexible AI pricing models
Billing for LLM tokens allows you to set up the following AI pricing models and ensure a consistent margin:
- Credit packs and top-ups: Sell prepaid credit bundles that customers can purchase and apply toward token usage.
- Fixed fee with included usage: Charge a monthly fee that includes a set amount of token usage.
- Pure usage-based: Bill customers only for the tokens they consume, with no fixed fee.
- Hybrid models: Combine any of the above approaches to create custom pricing tiers.
Stripe sends a webhook alerting you when a customer’s credit balance hits zero. By default, Stripe charges overages for any usage accrued after the credit balance hits zero. To prevent this you can block the customer’s usage when you receive the alert that their credit balance hits zero.
All pricing models ensure that you maintain your configured margin percentage over underlying LLM costs.
Token prices in the Dashboard
See token prices across major providers in the Stripe Dashboard. We automatically update prices so you always have the current pricing information. You can adjust your markup at any time.
Automated token price tracking
When model providers update their pricing or release new models, we notify you of the changes. You can also choose from two additional levels of automatic action that you can configure per rate card:
- Apply to new customers: Automatically use updated prices for new customers by default.
- Apply to all customers: Automatically use updated prices for new customers, and also apply the new prices to existing customers.
One-click Usage-Based Billing setup for your token markup
Enter your desired markup (for example, 30%). Click Submit and we’ll configure the required Usage-Based Billing resources—prices, meters, and rate configuration. You only need to set your margin percentage to start using Usage-Based Billing.
Three ways to track usage
Stripe offers three approaches to track your customers’ LLM usage:
AI gateway (recommended)
Instead of maintaining both an LLM integration and a separate billing integration, use our AI Gateway to call models and record metered usage in one request. Provide your prompt, chosen model, and the Customer ID. We route to the provider, return the response, and attribute tokens by model and type. The AI Gateway is available to billing for LLM tokens users.
Integration partners
If you’ve already integrated with a different AI Gateway, we’ve partnered with industry leaders to capture usage automatically with no extra API calls:
Self-report usage
If you prefer to manage your own LLM provider connections, you can report usage to Stripe directly:
- The Stripe Meter API
- The Token Meter SDK
- The Vercel AI SDK
Join the waitlist
If you’re interested in the private preview, sign up and we’ll contact you if we have available space.