SML Dual Market
Instant download · 7-day refunds on every product — see the refund policy · Veteran-owned small business
Buying guides · Published 2026-12-03 · prices read live from the catalog

How to Price a Pay-Per-Call API (x402)

Short answer: Divide your total monthly cost by the calls that actually deliver to get the breakeven price per call, then raise it to hit your target margin: target price = (total monthly cost ÷ (1 − target margin)) ÷ usable calls. Count only successful calls, include payment fees per call, and treat call volume as an assumption you test.

The inputs

These are the six inputs of the API Monetization Pricing Calculator, a pricing model plus pricing checklist.

The math

  1. Usable calls = expected calls × (1 − failed delivery rate)
  2. Total monthly cost = fixed cost + (variable cost + payment cost) × calls you serve
  3. Breakeven price per usable call = total monthly cost ÷ usable calls
  4. Required revenue = total monthly cost ÷ (1 − target margin)
  5. Target price per usable call = required revenue ÷ usable calls

Two things move the answer most: the failed delivery rate (failures raise the price of every good call) and your volume assumption (if real volume is half the forecast, the fixed cost per call doubles). Re-run the model with low, expected and high volume before you publish a price.

Charging per call with x402

x402 uses the HTTP status code 402 Payment Required: an unpaid request gets a 402 response with the price and payment terms, and the client (often an AI agent) retries with a signed USDC payment. No account or API key signup is needed.

A live example: Dual's own catalog API, https://dual.scriptmasterlabs.com/api/catalog/full, answers unpaid requests with HTTP 402 and charges $0.01 USDC per query on Base, with its terms published at https://dual.scriptmasterlabs.com/.well-known/x402 (both checked 2026-12-02).

One caution worth building into your ledger: a 402 challenge is not proof that a payment settled. Record revenue only from settlement evidence.

Step by step

  1. Fill in the six inputs with real costs from your last invoices.
  2. Compute breakeven and target price per usable call; round up to a clean price.
  3. Test the payment path before launch: 402 headers, USDC amount, client compatibility.
  4. Publish the price in your 402 response and your docs, and keep one source of truth for it.
  5. Log every settled payment and every failed call; re-price monthly from actuals.

Tools for each step

Price it, and keep a payment ledger alongside the pricing model: the x402 Revenue Vault pairs a pricing calculator with a payment ledger.

Price per decision, for AI decision APIs: the Jev Decision Model is an EPUB covering the confidence gate, pricing math per decision, wiring per-decision x402 billing, an implementation checklist and claim receipts.

Learn the model first: API Monetization with x402 covers the pay-per-call model end to end.

Learn the model from the guide side: the Pay-Per-Call API Guide walks the same ground as a reference guide.

Test before you ship: the x402 Payment Testing Tool checks 402 headers, USDC amounts and MCP compatibility before real clients hit your endpoint.

Related guides: x402 AI Agent Payments · How to Accept USDC Payments from AI Agents (MCP + x402)

What a clean price buys you

A per-call price is also a contract with the caller: this request, this amount, this delivery. Keeping it clean — one number, published in the machine-readable terms and the human docs alike — is what lets an agent decide in advance whether a call is worth making, budget for it, and pay without a negotiation or an account. That predictability is the product as much as the data behind the endpoint is.

Re-pricing from actuals, not forecasts

The first price you publish is built on assumptions: an expected call volume, an expected failure rate, an expected mix of cheap and expensive requests. Real traffic replaces every one of those assumptions with a measurement, and the model's job after launch is to absorb the measurements. Keep the ledger split the same way the model is split — fixed costs on one side, per-call costs on the other, settled payments separated from issued challenges — so that at the end of a month you can recompute the breakeven price from actuals without rebuilding the bookkeeping. If the recomputed breakeven sits above your published price, the gap is not a rounding problem; it means the forecast volume or failure rate was wrong, and the honest fixes are to raise the price, cut the failure rate, or cut a fixed cost — in that order of how directly each one moves the number.

Two disciplines protect the price once it is live. First, one source of truth: the price in your 402 response, the price in your documentation and the price in your pricing model must be the same number, changed in the same edit. Agents read the machine-readable terms, humans read the docs, and a disagreement between them is a dispute you created yourself. Second, test the payment path after every change the way a new client would meet it: an unpaid request should get a clean 402 with the current terms, and a paid request should settle and deliver. A price change that breaks the challenge response does not raise revenue; it ends it.

Frequently asked questions

Should failed calls be free?

Usually yes for the buyer, which is why the model divides cost by usable calls only: your failure cost is spread across successful calls.

Per call, per decision, or subscription?

Per call fits stateless lookups; per decision fits APIs that return a judgment (gate, score, verdict) where value varies by request; subscriptions fit steady human users. x402 suits the first two because agents can pay per request without an account.

How do I pick the expected call volume?

It's an assumption. Start conservative, price for the low case, and re-price from real usage.

Do I need a payment processor?

With x402 the client pays in USDC directly per request; you still pay network or facilitator fees, which belong in payment cost per call.

What's the most common pricing mistake?

Ignoring failures and fixed costs: pricing at variable cost alone loses money at real volumes.

Frequently paired