Skip to navigation

API monetisation

Charge AI agents for each request to your API, with payment collected before any work is done.
View as Markdown

AI agents are software that act on behalf of people and businesses. They search, compare, book and buy, and increasingly they call APIs directly to complete those tasks. Unlike a person, an agent does not sign up for an account, enter card details or wait for a monthly invoice. It pays for what it uses, at the moment it uses it, and moves on.

API monetisation lets your business be paid in exactly that way. You set a price for each operation in your API, and every agent request is paid before it reaches your API, so your API only ever performs work that has already been paid for. There are no subscriptions to manage, no accounts to create for each agent and no invoices to chase.

Agents pay using open payment standards designed for software rather than people. With x402, an agent pays in USDC, a stablecoin whose value is tied one to one to the US dollar, by including a signed payment with its request. With MPP, an agent can pay in USDC or by card. You do not need to implement either standard. Mitu handles the payment and passes your API only requests that have already been paid for.

You can charge through Mitu, through the SDK in your own backend, or both.

ApproachHow it worksBest for
Through MituAgents reach your API through your agent gateway. Mitu collects payment before forwarding each request, and prices are set in the dashboard.APIs you are opening to agents through Mitu, with no change to your code.
With the SDKAgents call your API at its own address. The Mitu SDK collects payment inside your backend before the request reaches your handler.APIs that agents already call directly, at an address you control.

If you are setting up your agent gateway, charging through Mitu is the simplest choice, because the price is just one more setting on each tool. If agents already call your API directly and you want to keep that address, use the SDK.

How a paid request works

Sequence diagram with three participants, the AI agent, Mitu and your API. The agent calls a paid operation, Mitu replies with a payment requirement, the agent pays, Mitu confirms the payment and forwards the request to your API, which does the work and returns the result through Mitu to the agent.
Payment is completed before your API is asked to do any work.
  1. The agent makes a request
    The agent calls one of your priced operations, just as it would call any API.
  2. It is asked to pay
    Instead of a result, the agent receives a payment requirement stating the price and the payment methods accepted.
  3. It pays and asks again
    The agent completes the payment and repeats the request with proof of payment.
  4. Your API does the work
    The paid request reaches your API, signed and carrying the amount paid. Your API performs the operation and returns its usual response.

Setting up monetisation

1

Enable agent payments

In the Mitu dashboard, make sure Accept payments from agents is turned on for your agent service. It is required for both approaches.

2

Choose how each operation is priced

Decide the pricing model for each operation agents can use.

ModelHow the price is setExample use
FreeNo payment is taken.Searching a catalogue or checking availability.
FixedThe same price for every call.A data lookup or a generated report.
DynamicYour API calculates the price for each request.A booking priced by date and duration.
SessionThe agent pays a deposit once and each call draws on it.A long research task making many small calls.

Agents decide what to buy using catalogues, availability and quotes, so keeping those operations free leads to more completed purchases, while you charge for the operations that deliver value.

3

Put the prices in place

Under Tools, open each operation and set its pricing model and amount. For dynamic pricing, your API returns a quote when it is first asked, as described in Pricing. Publish your changes to make the prices live.

4

Test in the sandbox

Build and test your pricing with a test API key, so agents can pay without real money moving. Make a paid request from start to finish and confirm that it reaches your API only once it has been paid. Test and live explains how to move to production.

5

Fulfil paid requests

By the time a request reaches your handler, it has been paid for. Verify the request to confirm it came from Mitu, perform the work and return your usual response.

Treat payment and delivery as separate outcomes. If your API cannot complete a request that has already been paid for, complete it later or refund the payment, but never ask the agent to pay again.

6

Track your revenue

Every paid request appears in Transactions in the dashboard, and the dashboard shows how many agents are paying you. To record payments in your own systems as they happen, configure a webhook for completed payments.

Your API now earns from every request an agent makes, with payment settled before any work begins. As agents become a larger share of how software is used, the same prices and the same API serve them automatically, with no new accounts, contracts or billing to manage.