Day 3

Day 3: Credits

Ever thought a feature was really dumb, only for it to turn out to be a customer favorite? That's exactly what happened with our credit-based pricing system.

When one of our first customers asked for credit-based pricing, we begrudgingly shipped it thinking it would only serve a few niche companies. Turns out, we couldn't have been more wrong.

Credits are cool now?

Historically, credits have been usage-based pricing's less popular sibling, primarily used by compute-focused devtools to charge for differently priced compute instances. But we're seeing a rapid shift in that trend.

With the emergence of AI agents (which have different costs per workflow) and models of varying intelligence levels (which price differently based on their power), credits have become a great way to have usage-based components with varying costs draw from a single balance.

Autumn's customers love being able to experiment with this, without needing any dev work. Moral of the story: your users are often right!

Building OpenAI's Pricing Model with Autumn

To demonstrate how powerful this can be, let's walk through building OpenAI's pricing model using Autumn's new Credit Systems feature.

OpenAI has different pricing for input and output tokens, charging more for more powerful models. These tokens draw from a credit balance that users can top up at any time.


How It Works

Step 1: Define Your Features We start by defining four features: o1-input-tokens, o1-output-tokens, o3-input-tokens, and o3-output-tokens.

Step 2: Create a Credit System Next, we create a credit system (top right of above image) so all token usage comes from a common balance. We've translated OpenAI's token prices from dollars to cents, entering the per-token cost in cents for each feature type. This will let users choose their top-up amount to the nearest cent (see Step 3).

Step 3: Set the Price Per Credit We set the price per credit at 1 cent each and select the prepaid option so users can purchase credits upfront during checkout.

Step 4: Purchasing When we go to checkout, we can pass in the options property into the body of our /attach request. I selected quantity as 1000 (cents), so I'm charged 10 USD.

Step 5: Use tokens Now from our OpenAI application, I just need to tell Autumn how many input and output tokens have been used with the /events endpoint, and all the billing is taken care of!


The User Experience

When a user has 0 credits and tries to use tokens, Autumn's entitled endpoint informs the application that the action isn't allowed.

After purchasing credits ($5 = 500 credits), the user's balance is topped up. Every time they use a token, a usage event is sent to Autumn, which automatically deducts the appropriate amount based on the credit system definition.

As an admin, you can also gift credits to users directly from the Autumn dashboard, instantly updating their balance.

Try us out for free today

Need help with complex pricing models? Book some time with us