Skip to navigation

Pricing

Charge for the operations agents use, with prices that are fixed, calculated per request or drawn from a prepaid session.
View as Markdown

Pricing lets you charge AI agents for the operations they use, at the moment they use them. Every tool is free until you set a price, and once priced, payment is collected from the agent before the request ever reaches your API. Your API therefore only performs work that has already been paid for, and it never needs to handle the payment itself.

The agent may pay over x402 or MPP, from its own funds or from a wallet its customer has provided. None of this affects the price you set or how your API responds, because the price belongs to the operation, not to the way it is paid.

Pricing models

ModelHow the price is determinedSuited to
FreeNo payment is taken.Catalogues, availability, quotes and any information an agent needs before deciding to buy.
FixedThe same price for every call, set on the tool.Lookups, reports, verifications and other operations with a known cost.
DynamicYour API calculates the price for each request.Bookings, purchases and any operation priced by its contents, such as quantity or duration.
SessionThe agent funds a deposit once, and each call draws the tool’s price from it.Sustained or high volume use, where paying separately for every call would be impractical.

How a paid call works

Sequence diagram with three participants, the AI agent, Mitu and your API. The agent calls a paid tool, 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 calls a priced tool
    Mitu responds with a payment requirement that states the amount and the payment methods accepted.
  2. The agent pays
    The agent completes the payment using one of the accepted methods, and Mitu confirms it.
  3. Your API does the work
    The request is forwarded to your API, signed and carrying the amount that was paid. Your API performs the operation and returns its usual response, which is passed back to the agent.

Setting a price

1

Choose the model

Open the tool under Tools in the Agents area of the Mitu dashboard and choose its pricing model. For a fixed price, enter the amount and currency. For a session, enter the price of each call and the largest deposit an agent can make.

2

Return a quote for dynamic pricing

With dynamic pricing, your API is first asked for the price. The request arrives without the x-mitu-amount-charged header, which tells your API that this is a request for a quote. Calculate the price and return it with a 402 status, without performing any of the work.

HTTP/1.1 402 Payment Required
Content-Type: application/json
{ "amount": "43.20", "currency": "USD" }

Return the amount as a positive decimal without a currency symbol. If the request cannot be priced, for example because the item is unavailable, return your usual error instead, and the agent is told why.

3

Fulfil the paid request

Once the agent has paid the quoted amount, the same request is sent again with x-mitu-amount-charged set to the amount paid. Verify the request, then perform the work.

app.post('/bookings', async (req, res) => {
const amount = req.get('x-mitu-amount-charged')
if (!amount) {
return res.status(402).json({ amount: priceFor(req.body), currency: 'USD' })
}
if (!verifyMituRequest(req, process.env.MITU_SIGNING_SECRET)) {
return res.sendStatus(401)
}
res.json(await createBooking(req.body))
})
4

Publish the change

Pricing changes are published together with your tools and instructions, and a new price applies from the next request.

Sessions

A session lets an agent pay once for a series of calls. The agent opens a session with a deposit up to the limit you have set, and each call to a session priced tool draws that tool’s price from the deposit, so no separate payment is needed per call. When the deposit is exhausted, the agent is asked to open a new session before it continues. A session pays only the business it was opened for, so a deposit made with your service can never be spent elsewhere.

Pricing practices

  1. Keep quoting and fulfilment separate
    Never create a booking, reserve stock or generate a report while you are only quoting, because the agent may decide not to pay.
  2. Prefer dynamic pricing for prices that change
    If a price depends on stock, quantity, duration or delivery, calculate it per request rather than updating a fixed price by hand.
  3. Leave decision making operations free
    Agents decide what to buy using catalogues, availability and quotes, so keeping those free leads to more completed purchases.
  4. Never charge twice for undelivered work
    If your API cannot complete a request that has been paid for, complete it later or refund the payment, but never ask the agent to pay again.

Pricing turns each operation in your API into something agents can buy on demand, with payment settled before any work begins. Prices remain entirely under your control, and every paid request reaches your API already verified and already paid for.