# Billing for LLM tokens Learn how to bill for LLM tokens. Bill for LLM tokens without building a pricing engine. Stripe handles model price updates and usage metering for you. Stripe syncs model prices across providers and records usage automatically, and you set your own margin. This is the case whether you route through the Stripe AI Gateway, use a supported partner, or self-report. > Billing for LLM tokens is in private preview and not yet available to all users. To request access or suggest new functionality such as credit-based systems or cost tracking without immediate billing, contact us at [token-billing-team@stripe.com](mailto:token-billing-team@stripe.com). ## Define your pricing model ### Dashboard setup Set your markup percentage in the Dashboard and Stripe configures all the underlying [Usage-Based Billing](https://docs.stripe.com/billing/subscriptions/usage-based/advanced/compare.md) resources for you, including prices, meters, and rate configuration. ### Automatic price updates Stripe syncs token prices for OpenAI, Anthropic, and Google models, so your pricing always reflects current costs. When providers update their pricing or release new models, we notify you and can automatically apply new prices to all customers. We’re actively expanding model support. If you need price tracking for models we don’t yet support, let us know at [token-billing-team@stripe.com](mailto:token-billing-team@stripe.com). ### Supports any pricing model - **Usage-based**: Bill customers only for the tokens they consume, with no fixed fee. - **Fixed fee with included usage**: Charge a monthly fee that includes a set amount of token usage. - **Credit packs and top-ups**: Sell prepaid credit bundles that customers purchase and apply toward token usage. - **Hybrid models**: Combine any of the above approaches to create custom pricing tiers. **Customizable**: Add your own usage-based rates alongside LLM token rates. Charge for custom models you’ve built or other non-LLM usage on the same pricing plan. ## Track your AI usage After you set up your pricing model, connect your LLM usage to Stripe. We meter tokens per customer, segmented by: - Model (for example, GPT-5.4, Claude Opus 4.6) - Token type (input, output, and cached tokens for supported models) You can connect your LLM usage to Stripe in three different ways: with the Stripe AI Gateway, through one of our integration partners, or by self-reporting usage. ### Connect with the Stripe AI Gateway (recommended) Route your LLM requests through the Stripe AI Gateway with an API call. Provide your prompt, model, and Customer ID, and Stripe: 1. Routes the request to the appropriate provider (OpenAI, Anthropic, or Google). 1. Returns the model’s response to your application. 1. Records token usage for billing automatically. 1. Rejects requests when a customer has no credit left (when enabled for your account). [Contact us](mailto:token-billing-team@stripe.com) to request this feature. ### Integration partners If you already use a third-party AI gateway, we partner with providers who can report usage to Stripe. After a one-time setup in your partner’s dashboard, usage syncs automatically: - [OpenRouter](https://openrouter.ai/) - [Vercel](https://vercel.com/) - [Cloudflare](https://www.cloudflare.com/) ### Self-report usage If you manage your own LLM provider connections, report usage to Stripe directly using any of these options: - [Stripe Meter API](https://docs.stripe.com/api/billing/meter-event/create.md): Allows you to send your own usage events - [Token Meter SDK](https://www.npmjs.com/package/@stripe/token-meter): Wraps the OpenAI SDK to meter and report usage - [Vercel AI SDK](https://www.npmjs.com/package/@stripe/ai-sdk): Wraps the Vercel AI SDK to meter and report usage ## Join the waitlist If you’re interested in the private preview, sign up and we’ll contact you if we have available space.