AI Usage Billing Made Simple with Kill Bill and Aviate

by | May 19, 2025 | AI Billing, Billing Systems, Metering, Subscriptions, Usage-based billing

AI-based products introduce new billing challenges. Whether selling token usage, inference time, or API calls, providers must manage metering, prepaid credits, invoicing, and payments — all while ensuring flexibility and scale. Traditionally, implementing this required custom logic, manual reconciliation, and duct-taped integrations.

Not anymore.

Introducing Kill Bill + Aviate

Kill Bill, the leading open-source billing platform, already provides rich support for catalogs, subscriptions, usage plans, and automated invoicing. Aviate, our new companion product, extends this with:

  • Scalable Metering APIs to track usage events (like AI input tokens).
  • Wallet and Credit Pools for prepaid or postpaid consumption.
  • Advanced Plan and Catalog Management integrated directly with Kill Bill.

Together, they offer a complete billing solution tailored for AI and other usage-based models.

AI Billing in Action

In our AI Usage Tutorial, we demonstrate a full example:

Step 1 — Define Pricing and Metering

  • Create a Billing Meter to track AI input tokens.
  • Create a Plan in Kill Bill, linked to this meter, defining:
    • Monthly billing
    • Tier pricing ($2 per million tokens)

Step 2 — Setup Customer and Wallet

  • Create a Kill Bill Account and a subscription on the usage plan.
  • Setup a Wallet in Aviate with prepaid credits and automatic top-off logic:
    • Initial credit of $10
    • Auto refill to $10 when balance falls below $5
    • Credit expiration support

Step 3 — Record AI Usage

  • As users consume tokens, record usage via Aviate’s metering API.
  • Aviate aggregates usage for invoicing.

Step 4 — Invoice and Collect Payment

  • Trigger Kill Bill’s invoice run to generate invoices based on usage.
  • Process payments and handle payment failures gracefully.
  • Wallet credits activate upon successful payment, enforcing prepaid logic.

Leverage our Aviate UI

The configuration of catalog entries can also be achieved through the Aviate UI as shown below:

Why This Matters

This end-to-end flow shows how you can:

  • Monetize AI products without building billing infrastructure from scratch.
  • Leverage Aviate for complex usage scenarios, fine-grained catalog management, wallet functionality and metering system
  • Leverage open-source Kill Bill for subscription management, invoicing and payments

Check-out our Aviate offerings here.

Related Articles