Skip to main content

What is MPP?

MPP (Machine Payments Protocol) is an open, HTTP-native payment standard built on the 402 Payment Required status code. It lets clients pay for API access per-request using multiple payment methods, including stablecoins on Tempo, with no accounts, API keys, or subscriptions needed. The examples on this page use Tempo; Exa currently settles MPP payments in USDC.e on Tempo mainnet. Exa supports MPP on two endpoints: /search and /contents. When you send a request without an API key or payment credential, Exa responds with 402 and a WWW-Authenticate: Payment challenge describing the price and how to pay. Your client signs a payment, retries the request with an Authorization: Payment credential, and receives the results once the payment settles on-chain. This is ideal for AI agents that need to autonomously pay for web search without pre-provisioned credentials.
MPP and API key access are independent. If your request includes an x-api-key header, the normal API key billing flow is used and MPP is bypassed entirely.

Supported endpoints

Other Exa endpoints do not accept MPP payments yet.

Get started

You need a Tempo-compatible wallet funded with USDC.e. Export your wallet’s private key before running an example:

Install the client

Make a paid search request

Use the MPP client to sign and submit a payment for a search request:
A successful run prints the search results and the Payment-Receipt header containing the on-chain transaction hash.

Pay from the command line

If you prefer not to manage a raw private key, use the Tempo Wallet CLI instead. tempo wallet login creates or connects a Tempo wallet, authorizes a local access key, and can include free MPP Credits for new sign-ups.

Install and authenticate

On a remote host without a local browser, use tempo wallet login --no-browser and open the printed URL on your device to authorize the CLI.

Check balances and credits

Make a paid request

tempo request intercepts the 402 Payment Required challenge, pays, and retries automatically. For full CLI reference, see the Tempo Wallet CLI docs and tempo request docs.

Gas fees

Exa sponsors the Tempo network fee and pays it in USDC.e. Your wallet only needs enough USDC.e for the API charge; it does not need pathUSD or another gas-token balance. You do not configure a fee payer. Exa’s payment challenge and the MPP SDK handle sponsorship automatically.

Pricing

MPP uses the same bundled pricing as API key billing. Exa calculates the price from the request parameters before processing the request. Adding contents.summary costs another $0.001 per result.
MPP search requests are capped at 10 results. If numResults is greater than 10, Exa uses 10 and prices the request for 10 results. If you need more, use API key billing.

Contents

Each requested content type costs $0.001 per URL: If you do not request text, highlights, or summary, Exa enables text by default.

Pricing examples

How the payment flow works

The SDK automates this flow, but you can inspect it directly over HTTP:
  1. Send a request without an API key or payment credential. Exa returns 402 with a WWW-Authenticate: Payment challenge containing the price, token, recipient, network, and sponsorship details.
  2. Sign the challenge and retry with Authorization: Payment <credential>.
  3. Exa processes the request while settling the payment. After settlement confirms, Exa returns the results with a Payment-Receipt header. If settlement fails, Exa returns 402 with a fresh challenge and no results.

Inspect a payment challenge

You can inspect the price and payment details without a wallet:
Look for the WWW-Authenticate: Payment header in the 402 response. Unpaid discovery requests are rate-limited, so use this for debugging rather than polling.

Payment reference

Exa accepts MPP payments in USDC.e on Tempo mainnet. USDC.e has 6 decimals. The challenge expresses prices in atomic units, so 7000 is $0.007 and 1000000 is $1.00.
Exa supports MPP and x402 on the same endpoints. An unauthenticated 402 response can include both the MPP WWW-Authenticate: Payment challenge and the x402 PAYMENT-REQUIRED header. Use the headers for the payment protocol your client supports.

Headers

Errors

Rate limits

MPP rate limits are shared with x402 and are separate from API key limits:

FAQ

If your request includes an x-api-key header, the API key flow takes priority and MPP is bypassed. They don’t stack. It’s one or the other per request.
Your response is blocked. You receive a 402 with a fresh WWW-Authenticate: Payment challenge so your client can retry. No results are returned until settlement succeeds.
Any Tempo-compatible EVM wallet the client SDK can sign with — a viem account with mppx (TypeScript), or an eth-account key with pympp (Python). For AI agents, use a wallet with a USDC.e balance on Tempo to cover request prices.

Resources

Last modified on July 31, 2026