How to Monetize AI APIs: Choosing The Right Metric

How to Monetize AI APIs: Choosing The Right Metric

Regarding charging for API usage, we usually gravitate towards charging per API call. While this can work for many use cases, it’s not optimal for everyone. This is where choosing the right metric to bill upon and finding a platform that supports it is crucial. In this blog, we will talk about choosing the right metric to bill upon and how to implement it in Moesif. Let’s begin by digging into what a billing metric is and how to decide which one is best to use with your AI APIs and services.

What is a Billing Metric?

In API monetization, including when monetizing AI APIs, a billing metric is the fundamental unit you use to measure how you will charge a customer for receiving value from your API. This metric is the foundation of your pricing model and directly determines how much you charge customers for using your API. In its simplest form, you may decide to charge a user based on the volume of events or API calls being made. This would mean measuring the number of API calls the user or company made to establish their billable amount. A more common approach with AI APIs would be to charge based on tokens used (input, output, or combined) and in this case, you would meter the tokens used in every API request.

Here are a few key points to know about when trying to understand and decide on a billing metric:

  • Usage-Based: Billing metrics are usually tied to how the customer uses your API. This could be the number of API calls, the volume of data transferred, or the amount of tokens consumed.
  • Pricing Alignment: Your API’s billing metric should align with its value. For example, if your API provides valuable data insights, your metric might be tied to the number of data records accessed.
  • Flexibility and Granularity: Good billing metrics offer flexibility. You might have multiple tiers or pricing plans based on different usage levels. The granularity of the metric (e.g., per API call vs. per thousand calls) allows you to adjust pricing based on various factors.
Learn More About Moesif Monetize in Minutes with Moesif 14 day free trial. No credit card required. Try for Free

AI Billing Metric Examples

Although every AI platform and API is unique, the way companies bill for usage tends to be similar. Later on we will chat more on exactly how to determine which metrics might be most suitable; however, here are a few examples of billing metrics that you might see when it comes to how you can charge for your AI APIs.

By Token

This is the most granular billing unit for AI services, particularly for Large Language Models (LLMs). Each token represents a text, such as a word or subword. For example, OpenAI’s API-accessible models are priced per 1,000 tokens, with different rates for input and output tokens. This metric is ideal for applications where the length of input/output text varies significantly, such as chatbots or content generation. Tracking token usage can help you keep a tighter coupling on usage and your underlying cost for running the platform. The end result by going this route is that you and your users can more accurately estimate and control costs.

By API Call

This metric is less granular than token-based billing and charges per API request made to the AI service. For example, some image generation APIs charge a fixed price per image generated, regardless of the complexity of the prompt. This metric suits applications with predictable or fixed-length input/output, such as image classification or sentiment analysis. It also might be easier for non-technical people to understand the pricing compared to pricing based on tokens, which would likely be confusing for less technical users. This approach does simplify billing but may not be as cost-effective for customers with high-volumes or if the underlying cost of the API call can fluctuate wildly, leading to potentially lower margins.

By User

The last billing metric we will explore is charging based on the number of users that are accessing the platform, also referred to as “pricing by seat”. This model charges based on the number of users or “seats” who have access to the AI service, often monthly or annually. A real-world example of this is how Notion offers the Notion AI add-on for AI capabilities, charging per AI-enabled seat. As you can see from our Notion example, this metric is common for collaborative AI tools or platforms, providing predictable pricing for businesses. The downfall to this approach is that it may not be the most cost-effective way to bill infrequent or low-volume users, leading to a cost-to-value ratio that could lead to churn or downgrades.

Although there are other ways to charge for AI API usage, these tend to be the most common metrics to bill on. Knowing what the options are, your next step will be to figure out which metric is best for your product or service. This is exactly what we will dig into next!

How Do You Decide on a Billing Metric?

The billing metric you choose for your AI API can significantly impact your revenue model, customer satisfaction, and the overall success of your product. It’s an extremely important decision so selecting a metric that aligns with your service’s value proposition, usage patterns, and target audience is crucial. Of course, you can always switch things up later or offer multiple models/metrics but this rework can sometimes be a significant lift. Getting as close as possible to the optimal end state is the goal in the first iteration. Here are some key factors to consider when making your decision:

Nature of the AI Service

The type of service you are offering makes a big impact on which billing metric you’ll want to go with. Looking at similar products or competitors can give you a good idea of how potential users currently pay for other services. Here are a points to consider:

  • Variability of Input/Output: If the length of input data or the volume of generated output varies significantly (e.g., chatbots, translation services), token-based billing offers a more granular and fair way to charge customers based on their actual usage.
  • Predictability of Usage: If your AI API has a more predictable usage pattern (e.g., image classification, sentiment analysis), a simpler model like API call-based billing might be sufficient.

Target Audience

Your billing metric and pricing should match the target audience. For instance, if you are offering a B2C application mainly targeted at mobile users who are non-technical, pricing “by token” might lead to confusion or stop users from signing up. These are the factors to consider:

  • Technical vs. Non-Technical Users: Technical users might be more comfortable with token-based billing, while non-technical users might prefer a simpler model like per-API call or per-user pricing.
  • Budget Sensitivity: Consider your target audience’s budget constraints and willingness to pay. Some users might prefer a fixed monthly fee (like user-based billing) for predictable costs, while others might be willing to pay per use or go with usage-based pricing for flexibility.

Business Model

Your business model will play a big role in how you approach your chosen metric. For example, if your business model is dependent on making $X in revenue per token, then aligning your pricing and billing metric at the token level is likely advantageous. Here are a few things to consider in this regard:

  • Value Proposition: Align your billing metric with the value your AI service delivers. If the core value lies in the complexity of the output (e.g., high-quality generated content), token-based billing might be more appropriate.
  • Revenue Goals: Determine whether you want to optimize for revenue per user, revenue per API call, or total revenue. Your billing metric should support your chosen revenue model.

Flexibility and Transparency

Certain billing metrics may allow more flexibility than others. Balancing flexibility, transparency, and revenue generation is a key aspect of deciding which metric is the best fit for your customers and business. When looking at this factor, consider this:

  • Pricing Tiers: Consider offering different pricing tiers based on usage levels, features, or customer segments. This can attract a wider range of customers with varying needs and budgets.
  • Transparent Communication: Communicate your billing metric and pricing structure to your customers to avoid confusion or frustration. Use tools like Moesif to provide detailed usage reports and insights.

Monitoring and Iteration

As mentioned at the start, nothing is set in stone when it comes to billing metrics, even if it might be a bit of a lift to change things up. That being said, as with any piece of the revenue puzzle, you should be monitoring how your chosen billing metric is performing from an adoption and revenue standpoint.

  • Track Usage Data: Continuously monitor your API usage data to understand how your customers use your service. This will help you identify trends, optimize pricing, and refine your billing model.
  • Be Adaptable: The AI landscape is constantly evolving, so be prepared to adjust your billing metric or pricing strategy to stay competitive and meet your customers’ needs.

By carefully considering these factors and leveraging tools like Moesif to gain deep insights into your API usage and costs, you can choose the most appropriate billing metric for your AI API, maximize the value you provide to your customers, and ensure the financial sustainability of your business.

Implementing Billing Metrics in Moesif

Now that you know your options and which is best for your use case, it comes down to figuring out how to implement your billing metric so that you can actually start driving revenue! This is where Moesif comes in handy. Within the Moesif platform, we use our Billing Meters feature to help implement the mechanisms needed to gather data about API calls and measure usage against your desired metric.

For a deeper dive into Meosif’s API monetization capabilities, check out our docs!

First, let’s look at what it takes to implement billing based on a per token billing metric. For this, you will create a new billing meter, dial in the filter to determine which API calls you’d like to monetize, and then create a Custom Metric. For most AI APIs that consume tokens, the amount of tokens consumed by the query will usually be in either a field in the body or header of the response. For example, if you’re charging on output tokens and this value is in the X-Output-Token-Count header, in Moesif you would click the Metrics dropdown and under Custom Metric click Select Field…. In the case that you want to get a total of all the tokens used by this particular user, you’d select sum as your aggregation method. In Moesif, this is how this would look on the billing Meter screen.

Select Sum

Next, we will do the same initial steps to create a meter, add in the necessary filter, and then select Volume > Event Count as the metric from the Metrics dropdown (this is the default metric selected when you create a meter). This is an example of what this would look like in Moesif:

Event Count

Lastly, in the case where you want a subscriber to pay a charge per user of your AI API, you’ll follow the same steps as earlier: creating a meter, dialing in the filter to meet your criteria, and then selecting Uniques > Unique Users from the Metrics dropdown. This is what it would look like in Moesif:

Metrics Dropdown

With this, we’ve used Moesif Billing Meters to implement three of the most common billing metrics for metering and charging AI API usage using Moesif. These meters will then aggregate the usage depending on the filter and metric you’ve specified and then report it to the billing provider so the user can be charged. These simple steps set you up to take full advantage of easily creating revenue streams from your AI APIs.

Conclusion

Choosing the right billing metric is a critical step for successfully monetizing your AI API. By understanding the unique nature of your service, your target audience, and your business model, you can align your pricing strategy and billing metrics with the value you deliver. This can help create a win-win scenario for both you and your customers. Of course, the ideal billing metric will depend on the specific context of your AI offering. Even after you’ve chosen a billing metric and implemented the mechanisms to support it, continuous monitoring and adaptation are key to ensuring your pricing model remains relevant and profitable as your API and customer base evolve.

Ready to streamline your AI API monetization? Sign up for a free Moesif account today and discover how easy it is to implement flexible billing metrics, gain valuable insights into user behavior, and unlock the full revenue potential of your AI platform.

Learn More About Moesif Deep API Observability with Moesif 14 day free trial. No credit card required. Try for Free
Monitor REST APIs With Moesif Monitor REST APIs With Moesif

Monitor REST APIs With Moesif

Learn More