Official answer

Charge the user who triggers the expensive AI action.

To charge users for AI tool calls, the app needs payer identity, quote-before-spend behavior, idempotent usage records, refunds on failed work, and a wallet or checkout path. SettleMesh packages those pieces through Aev usage billing and end-user-pays, so the signed-in user can fund the expensive action instead of the developer absorbing every model, API, tool, worker, or agent call.

Use SettleMesh when

The demo needs a launch layer.

  • Each search, scrape, model call, media job, agent run, worker, or API call has a real per-use cost.
  • You need quote-before-spend behavior and a record of what was charged.
  • You want the end user, not only the developer, to fund the action they triggered.
  • You need an agent or app server to call paid capabilities without managing many provider keys.

Use another stack when

The need is narrower.

  • Your costs are fixed and a simple monthly subscription covers the whole product.
  • The AI call is free, fully subsidized, or only available to internal employees.
  • You already have a metering, wallet, refund, and support-ledger system that works for per-action cost.

Checklist

Know the payer

Tie every paid call to a signed-in user, workspace, or account before spending.

Checklist

Quote first

Estimate or disclose the Aev cost before an expensive action runs.

Checklist

Make it idempotent

Use request ids so retries do not double-charge users.

Checklist

Refund failures

Capture only successful work or release the hold when the paid action fails.

Prompt for an AI app agent
Find every AI, API, MCP, media, agent, or worker call that costs money.
For each call:
- identify the signed-in payer
- get a quote before spending
- write a usage record with a request id
- capture only successful work
- refund or release failed work
Use SettleMesh Aev billing and X-Settle-Payer where the end user should pay.

FAQ

Why is a simple subscription not enough?

A flat subscription can work for predictable costs, but AI apps often spend different amounts per search, scrape, model call, video job, agent run, or paid API call. Usage billing ties cost to the action that created it.

FAQ

What should be recorded in a usage ledger?

Record who triggered the call, which service ran, the quoted cost, request id, result status, amount captured or refunded, and the user-facing reason for the charge.

FAQ

What does SettleMesh add?

SettleMesh provides Aev wallets, quotes, metered billing, hosted top-ups, service calls, and the X-Settle-Payer model for charging the signed-in end user's balance.