DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • AI Advancement for API and Microservices
  • LLM: Trust, but Verify
  • What Is FaceIO Facial Recognition?  A Guide to Face Analyzers and Recognizers
  • Accelerating AI Inference With TensorRT

Trending

  • Power BI Embedded Analytics — Part 2: Power BI Embedded Overview
  • How the Go Runtime Preempts Goroutines for Efficient Concurrency
  • Infrastructure as Code (IaC) Beyond the Basics
  • A Modern Stack for Building Scalable Systems
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Monetizing AI-Based Apps With Usage-Based Billing

Monetizing AI-Based Apps With Usage-Based Billing

This is a quick intro on how to leverage pay-as-you-go pricing to ensure pricing aligns with customer value while keeping costs under control.

By 
Derric Gilling user avatar
Derric Gilling
DZone Core CORE ·
Mar. 06, 24 · Analysis
Likes (2)
Comment
Save
Tweet
Share
2.2K Views

Join the DZone community and get the full member experience.

Join For Free

In the last year, we have witnessed a surge in AI-based applications and APIs following the introduction of ChatGPT. This sparked the emergence of new enterprise use cases and workflows. Many of these solutions are delivered as APIs rather than traditional UI-based applications and target developers.  

However, monetizing AI-based APIs demands a strategic approach to ensure that the cost of API access reflects the value provided to customers. It's crucial to mitigate the potential for misuse and ensure that the pricing model is in line with the infrastructure costs, which can be substantial for powering these AI-based APIs. As a result, the conventional SaaS pricing model, offering unlimited API access, is not suitable for AI-based APIs. In this article, let's delve into potential methods for monetizing AI-based APIs.

Ensure Pricing Aligns to Customer Value

AI-based APIs, such as those using large language models (LLMs), are typically contextual and generate a response from some input. However, different inputs can create drastically different results.

A single, complex request that generates a large amount of information is likely far more valuable to a customer than a request that provides very little information or none at all. Of course, a customer could make a large number of small requests to formulate a result similar to one large request.

It may, therefore, make sense to align your pricing with the results rather than API calls. For LLMs like ChatGPT, one way to do this is to base pricing on the number of input and output tokens. For an audio API, on the other hand, it may mean looking at the length of the audio clip in minutes, as it doesn't matter whether the customer made a single API call or one hundred API calls to generate the necessary result.

It's also important to consider the accuracy and validity of the result. If the result generated has low confidence—potentially due to hallucinations—then it's not as valuable to the customer as an accurate and complete result.

One way to do this is via pay-as-you-go billing, also called consumption-based billing, which can charge customers based on their consumption.

Ensure Cost Scales With Pricing

Unlike traditional SaaS applications, infrastructure costs for AI-based applications typically make up a larger percentage of the overall operational budget. This can include the computing cost to train a new model, the cost of consuming other APIs like OpenAI, and the hosting cost to serve your API, among other things.

As a customer consumes more of your APIs, your direct cost typically goes up as well. However, not all API calls cost the same. Different requests could have different unit economics depending on the request inputs, which model is used, etc. For example, if you are leveraging ChatGPT, a request with a larger number of tokens will cost more than a request with a smaller number of tokens.

Similarly, different models and contexts have different price points. Using the 128k context GPT-4 Turbo costs more than using the GPT-3.5 Turbo with 16k context. Because of this, you'd want to also ensure this cost difference is incorporated in your API pricing. Otherwise, you might have price arbitrage.

Prevent Accidental Abuse

Even though the cost to host an AI-based API is high, each API call can be seen as a commodity. A developer using your API likely does not require extensive set-up work just to start using the API. This can open you to abuse and arbitrage.

One way this can happen is with postpaid billing, which is pay-as-you-go. A customer could sign up, enter their credit card, and drive up a $10,000 bill. By the time the credit card is charged, however, it's canceled.

There are a couple of ways to prevent this:

Explore Prepaid Billing

Prepaid billing is one way to reduce the risk of abuse by requiring your customers to pay upfront.

This can be done by either requiring the customer to purchase a predefined quota or by purchasing credits that can be consumed over time. Quotas are perfect when the usage is predictable. However, customers of AI-based APIs may have a large variance in their monthly usage.

Prepaid credits make the most sense here. A customer could use a small number of credits in one month and a large number of credits the following month.

Consider Threshold-Based Invoicing

The tricky part with prepaid billing is it creates friction in the onboarding. You are asking a customer to purchase something before they are fully successful with the API and know how much they plan on using.

One way to solve this while still preventing abuse is with a combination of postpaid billing and threshold-based invoicing. With this setup, a customer is still invoiced in arrears.

However, the invoice is sent as soon as a threshold is met. For example, if the threshold is $500, then an invoice is sent and payment made as soon as $500 of consumption is made rather than waiting until the billing day. This model is popular within the advertising industry as the credit extended to a customer is capped to the threshold.

AI API Machine learning

Published at DZone with permission of Derric Gilling. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • AI Advancement for API and Microservices
  • LLM: Trust, but Verify
  • What Is FaceIO Facial Recognition?  A Guide to Face Analyzers and Recognizers
  • Accelerating AI Inference With TensorRT

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!