> 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.

# Accept a payment for an API request

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.

#### Set up your account for agents

In the [Mitu dashboard](https://app.mitu.ai), 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.

#### Put a price on an operation

#### Through Mitu

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.

#### With the SDK

Add the Mitu SDK to your backend and attach it to the route you want to charge for, with the price of each request. The SDK asks the agent to pay, checks the payment and only then lets the request reach your handler.

The quickstarts for [TypeScript](/sdks/typescript/quickstart), [Python](/sdks/python/quickstart) and [Go](/sdks/go/quickstart) show the change for each language.

#### 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.

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

The [API monetisation](/guides/api-monetisation) guide covers fixed and dynamic pricing, sessions and how to choose between charging through Mitu and with the SDK.