What is MPP?
MPP (Machine Payments Protocol) is an open, HTTP-native payment standard built on the402 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: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
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.Search
Adding
contents.summary costs another $0.001 per result.
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:- Send a request without an API key or payment credential. Exa returns
402with aWWW-Authenticate: Paymentchallenge containing the price, token, recipient, network, and sponsorship details. - Sign the challenge and retry with
Authorization: Payment <credential>. - Exa processes the request while settling the payment. After settlement confirms, Exa returns the results with a
Payment-Receiptheader. If settlement fails, Exa returns402with a fresh challenge and no results.
Inspect a payment challenge
You can inspect the price and payment details without a wallet: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
Can I use MPP and an API key together?
Can I use MPP and an API key together?
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.What happens if settlement fails after my request was processed?
What happens if settlement fails after my request was processed?
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.Which wallets are supported?
Which wallets are supported?
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
- MPP protocol docs: protocol details and authentication format
- mppx documentation: MPP TypeScript SDK reference
- pympp documentation: MPP Python SDK reference
- Tempo: Tempo network documentation
- Pay with x402: pay for the same endpoints with x402
- Exa Search API guide: full search parameter reference
- Exa Contents API guide: full contents parameter reference