> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mitu.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mitu.ai/_mcp/server.

# API monetisation

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.

| Approach     | How it works                                                                                                                                                          | Best for                                                                  |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| Through Mitu | Agents reach your API through your [agent gateway](/guides/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 SDK | Agents call your API at its own address. The [Mitu SDK](/sdks/overview) 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.](/_fern-files/_img/b1d1639ad793105127e372586031e847553e8fc9bcb93bf22f28136a258a5b8e.webp)

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

#### Enable agent payments

In the [Mitu dashboard](https://app.mitu.ai), make sure **Accept payments from agents** is turned on for your [agent service](/platform/your-agent-service/overview). It is required for both approaches.

#### Choose how each operation is priced

Decide the pricing model for each operation agents can use.

| Model   | How the price is set                                     | Example use                                     |
| ------- | -------------------------------------------------------- | ----------------------------------------------- |
| Free    | No payment is taken.                                     | Searching a catalogue or checking availability. |
| Fixed   | The same price for every call.                           | A data lookup or a generated report.            |
| Dynamic | Your API calculates the price for each request.          | A booking priced by date and duration.          |
| Session | The 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.

#### Put the prices in place

#### Through Mitu

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](/platform/your-agent-service/tools/pricing). Publish your changes to make the prices live.

#### With the SDK

Install the SDK in your backend and attach it to each route you want to charge for, with its price. The SDK answers unpaid requests with a payment requirement, confirms payment when the agent retries and only then passes the request to your handler. The quickstarts for [TypeScript](/sdks/typescript/quickstart), [Python](/sdks/python/quickstart) and [Go](/sdks/go/quickstart) show the change for each language.

#### 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](/platform/additional-information/test-and-live) explains how to move to production.

#### Fulfil paid requests

By the time a request reaches your handler, it has been paid for. [Verify the request](/platform/security/request-verification) 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.

#### 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](/guides/get-started/webhooks/configure-webhooks) 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.