Skip to navigation

Accept a payment for an API request

Put a price on an operation in your API and get paid by AI agents each time they call it.
View as Markdown

When AI agents use your API, you can charge them for each request. The agent pays before the request is fulfilled, so your API only serves calls that have already been paid for. You can price an operation through Mitu without changing your code, or charge inside your own backend with the Mitu SDK.

1

Set up your account for agents

In the Mitu dashboard, open the Agents section and complete the setup with Accept payments from agents turned on. This gives your business a name and an address that agents can reach.

2

Put a price on an operation

Select Integration under Agents and enter the base URL of your API, so Mitu knows where to send requests. Then open Tools and add the operation you want to charge for, or import it from your OpenAPI document, and set its price.

Agents call the operation through your Mitu address. Mitu collects the payment and then forwards the request to your API, which responds exactly as it does today.

3

Make a paid request

Call the operation from an AI agent, or from any client that can pay. The first response asks for payment, and once it has been made the request goes through and your API returns its normal response.

4

Follow the payment

Each paid request appears in Transactions, the funds are added to your Balances, and the dashboard shows how many agents are paying you. To act on payments in your own systems, configure a webhook.

The API monetisation guide covers fixed and dynamic pricing, sessions and how to choose between charging through Mitu and with the SDK.