%20(1).png)
Best Metered Billing Software: 9 Tools Ranked (2026)
I tested 9 metered billing software platforms for metering accuracy, pricing, and real-time enforcement, with honest pros, cons, and prices for 2026.
Wondering what AI tokens cost? Explore token-based pricing with real examples, input vs. output rates, pros and cons, and tips to control AI spending.
Two customers use the same AI feature. One gets a short answer in seconds, while the other sends a lengthy prompt that triggers several model calls. Their requests look similar on the surface, yet the token costs are nowhere close.
With token-based pricing, those differences affect what customers pay and how your application tracks consumption. This guide breaks down token rates, real cost examples, pricing trade-offs, and the infrastructure needed to enforce spending limits.
Token-based pricing charges customers based on the number of AI tokens their requests consume. Providers measure tokens sent to a model and tokens generated in response, then apply the corresponding usage rates.
A token is a small unit of text, averaging around four characters or three-quarters of a word in English. The exact count depends on the model's tokenizer.
Our guide to what a token is in AI explains how models break down text and calculate token usage.
Input tokens are the content a model processes, while output tokens are the content it generates. Providers charge separate rates because processing existing context and producing new tokens require different amounts of computation.
The two token categories cover different parts of an AI request:
Output tokens often cost more because models generate them sequentially, with each new token depending on the preceding context. Input processing supports greater parallelism.
For example, Claude Haiku 4.5 (now a legacy model) and GPT-6 Astra both charge five times more for standard output tokens than standard input tokens.
AI agents make the difference more noticeable. A single task can trigger several model calls, each carrying its own context and generating more output.
Token-based pricing costs depend on the model, the number of tokens consumed, and the rates applied to each token type. Providers commonly publish prices per million tokens, even when individual requests consume much less.
The following standard API rates, as of October 2026, show the difference between a lower-cost model and a higher-priced model.
Disclaimer: Prices are subject to change without notice. Always visit the official company websites for the most up-to-date pricing information.
Cached input, longer contexts, processing modes, and other billable operations can change the final charge.
Calculate token costs by multiplying input and output token counts by their respective rates, then adding the results.
For rates quoted per million tokens, use:
Total cost = (input tokens ÷ 1,000,000 × input rate) + (output tokens ÷ 1,000,000 × output rate)
Suppose your application sends 2,000 input tokens and receives 1,000 output tokens from Claude Haiku 4.5.
The same token counts would cost $0.07 with GPT-6 Astra at the listed rates.
A single request may cost less than a cent, but repeated model calls, long conversations, and concurrent agents can increase total consumption.
Engineering teams need to track those costs across customers, models, and features. Our AI token cost guide explains the metering and control requirements behind that work.
Token-based pricing ties charges to AI consumption, so it’s useful when customer workloads vary in size and intensity. The trade-off is less predictable spending and more responsibility for accurate usage accounting.
Token pricing works well when customers can monitor consumption and the application can control spending before expensive workloads proceed.
Token-based pricing charges for the tokens an AI model consumes, but customers don't always pay for AI usage in raw tokens. Some products convert consumption into credits, include an allowance in a subscription, or charge for user access.
Each approach changes what customers see on their bills and what engineering teams need to build.
For AI products, pricing determines what customers pay, while metering and enforcement control consumption, especially when agents share allowances or run concurrent requests.
Token-based pricing works by measuring consumption, applying model rates, and recording billable usage against the correct customer. Products with prepaid allowances or spending caps also need to authorize requests before costly computation begins.
Two functions support the process:
A billing provider can use the metered data to calculate charges or generate invoices. The application still needs to apply any required limits while workloads run.
For example, an AI agent can start several requests before earlier responses finish. A dashboard that updates after completion may show accurate historical consumption without preventing the next expensive operation.
Request-time checks and atomic credit operations help protect shared allowances during concurrent activity.
Token-based pricing gets harder when multiple AI requests share the same usage limits and credit balances. Counting tokens is simple enough, but keeping those counts accurate across agents, services, and retries requires more coordination.
Four problems can disrupt usage tracking and enforcement:
Consider a customer with 100 credits remaining. Two agents each request 80 credits and check the balance at the same time. Both get approved, which leaves the account 60 credits over its limit.
Preventing these errors requires atomic credit deductions, idempotent usage events, and reliable enforcement, even when services slow down or fail.
Token-based pricing architecture connects token metering, rate calculation, entitlements, and spending controls. Your application checks what a customer can consume before running an expensive AI request, then records the actual usage once the operation finishes.
Five components handle usage tracking, pricing, and enforcement:
Direct token billing can work without a credit wallet. Products offering prepaid credits need a ledger to track balances, expiry, and consumption across requests.
A request moves through seven steps when credit balances and spending controls apply:
Actual consumption can differ from the initial estimate, especially with streaming responses or multi-step agents. The application has to reconcile the final amount and handle retries, cancellations, and partial failures.
Entitlements control token usage by checking which AI models customers can access and how much they can consume before a request runs. These rules cover monthly token allowances, credit balances, and spending limits based on each customer's plan.
Allowances may come from a base plan, parent plan, add-ons, trials, or promotional overrides. When those sources conflict, the most generous valid value wins.
Role-based access control (RBAC) manages user permissions, while entitlements define commercial access and consumption limits. Together, they help the application decide whether a request can proceed.
An entitlement check returns access status, usage limits, current consumption, and whether unlimited usage is allowed, giving the application the information needed to enforce each customer's plan.
A credit ledger records where customer credits come from, how they're consumed, and when they expire. A simple balance counter cannot explain which grants were used or account for refunds and adjustments.
For AI products offering prepaid credits, the infrastructure needs:
Prepaid credits may also require financial reporting based on the customer's contract and applicable accounting rules. Our AI credit infrastructure guide explains how wallets, ledgers, and enforcement work together in production.
Implementing token-based pricing starts with defining what customers pay for, then building the systems to track consumption and enforce spending limits.
The following six steps cover the decisions engineering teams need to make before production:
Start with the billable unit. Will customers pay for input and output tokens separately? How will cached inputs, reasoning tokens, and different AI models affect the price?
Your usage rules should also cover retries, failed requests, and streaming responses. For example, a model might generate part of a response before the connection fails. Decide whether that consumption is billable and how your application records it.
These decisions form the foundation for metering, pricing, and customer invoices.
A new model launches, an enterprise customer negotiates a higher allowance, or a plan changes mid-cycle. Hardcoded pricing rules turn each adjustment into an engineering task.
Keep plans, model access, quotas, and credit allowances in a central product catalog. Your application can then resolve the customer's current rules without duplicating them across services.
Packaging changes can happen through configuration, while changes to the underlying pricing mechanism may still require code.
Before an AI request consumes compute, check whether the customer's plan permits the operation and whether sufficient allowance remains.
The response should tell your application whether to approve the request, enforce a hard stop, permit a soft limit, or offer an upgrade.
Plan for slow responses and service failures, too. Define timeouts and fallback behavior that protect spending limits without causing unnecessary interruptions.
Consider two AI agents drawing from the same credit wallet. Both see enough credits to proceed, but their combined requests exceed the available balance.
Atomic reservations or deductions prevent both requests from spending the same credits. Every service accessing the wallet needs to follow the same rules.
Test concurrent operations, introduce delays, and retry requests using identical idempotency keys. Check that failed operations, refunds, and final settlements leave the ledger accurate.
Synthetic tests can confirm that your calculations work, and historical usage tells you how those calculations behave with actual customer workloads.
Replay an approved, sanitized sample of production traffic in staging. Include long prompts, model changes, retries, and interrupted responses.
Compare calculated charges against expected rates. If your product uses credits, make sure that grants expire correctly and balances follow the configured burn order.
A token pricing system can pass individual request tests and still fail when hundreds of operations overlap.
Test at expected peak traffic, with several agents consuming the same customer allowance. Introduce cache misses, delayed entitlement responses, and temporary service outages.
Measure decision latency, rejected requests, duplicate events, and balance accuracy after recovery. The goal is to confirm that usage limits hold under production load, including when dependencies fail.
Building token-based pricing in-house makes sense when you have a few AI models and simple usage charges. You can track tokens, apply model rates, and record consumption without much infrastructure.
Things get more complicated when customers share credit wallets, negotiate custom allowances, or run multiple agents against the same balance.
Your engineering team now needs to manage:
AI coding tools make the first version faster to build than ever, but they don’t remove the edge cases or the upkeep.
A system designed around today’s pricing model also has to change when the model does a few months later. Each change pulls engineers back off the AI product they were hired to build.
We saw these challenges firsthand with Miro. After adopting Stigg, Miro launched a credit-based AI pricing model in six weeks and saved 5,000 engineering hours.
Build in-house when your requirements are limited and manageable. Buying becomes more practical when maintaining credits, entitlements, and spending controls starts taking engineering time away from your AI product.
Token-based pricing can break when usage tracking, credit balances, and spending limits fall out of sync. These five mistakes can lead to incorrect charges, overspending, and extra engineering work.
The common thread is consistency. Token metering, credit deductions, and entitlement checks need to agree across services, even when requests overlap or fail.
Your first token-based pricing implementation might need a usage table and a few model rates. Add prepaid credits, contract overrides, multiple agents, and concurrent requests, and the supporting infrastructure starts demanding its own testing, monitoring, and recovery procedures.
Stigg gives engineering teams a dedicated usage runtime for those production requirements. Entitlements, credits, usage limits, and spending policies are enforced synchronously, which allows your application to use consistent commercial rules across services.
Stigg covers the infrastructure that grows around token-based pricing:
Stigg helps control what gets spent, with entitlements, credit balances, and spending limits enforced as requests arrive. Explore Stigg's documentation to see how these controls work inside your application's request flow.
Token-based pricing charges customers based on the number of AI tokens they consume. Providers apply separate rates to input tokens (prompts and context) and output tokens (generated responses). The total cost depends on the model and usage volume.
The cost of 1,000 tokens varies by model, token type, and caching conditions. For example, 1,000 tokens cost $0.001 for input or $0.005 for output with Claude Haiku 4.5, based on standard API rates as of October 2026.
3. How much do 1 million AI tokens cost?
1 million AI tokens cost $1 for input or $5 for output with Claude Haiku 4.5. GPT-6 Astra costs $10 per million input tokens and $50 per million output tokens at standard short-context rates as of October 2026.
Output tokens cost more because AI models generate responses one token at a time, which requires more sequential computation than processing input text. Providers reflect the additional processing cost in their output token rates.
Yes, billing systems can calculate charges and invoice token usage, but they cannot guarantee real-time spending enforcement on their own. AI products need request-time entitlement checks and credit controls to prevent overspending when multiple agents share an allowance.