https://mpp.e2b.dev sells E2B sandboxes over the Machine Payments Protocol (MPP). An agent with a funded wallet creates, pauses, resumes, and kills sandboxes and pays for each request in stablecoins on Tempo. There is no signup, no API key, and no monthly plan.
Use it when the caller is an autonomous agent that holds its own wallet, or when you want to pay for sandboxes per use without an E2B team.
How it works
- The agent sends a normal E2B API request, for example
POST /sandboxes. - The proxy answers
402 Payment Requiredwith the exact price in theWWW-Authenticateheader. - An MPP client signs the payment from the wallet and sends the request again.
- The proxy settles the payment, forwards the request to E2B, and returns E2B’s response.
404 for them.
Once a sandbox exists, working inside it is free: commands, files, and network traffic go straight to the sandbox, not through the proxy. You pay only for compute time and lifecycle calls.
Check the price
Every route quotes its price before you pay. The 402 response names the template’s spec and the requested time indescription, and carries the amount in request (base64url JSON, $1 = 1000000):
Set up a wallet and pay
Pick how you want to hold the wallet. Both pay on Tempo mainnet, and gas is sponsored, so the wallet needs no other token.- Tempo Wallet (browser)
- mppx (terminal)
Tempo Wallet is Tempo’s own wallet. You sign in with a passkey, buy MACH with a card, and give your agent a spending limit. The agent never holds the wallet’s key, and you can see every payment it makes.MACH is an on-chain credit for paying approved merchants on Tempo, E2B included. $1 buys 1 MACH, and it does not expire. It can only be spent, not withdrawn, sent to another wallet, or swapped.
- Sign in at wallet.tempo.xyz and buy MACH on the Balances page. Card checkout takes $5 to $100. $5 buys hundreds of short sandboxes.
-
Connect your agent. In the agent’s terminal, install the
tempoCLI and log in:It opens a link with a short code. Check the code matches, set the agent’s spending limit, and approve. On a remote machine, add--no-browserand open the printed link yourself. -
Check the price without paying.
--machselects a MACH charge, and--max-spendcaps the payment in dollars: -
Buy a
basesandbox for 5 minutes in MACH by running the same command without--dry-run: -
List your sandboxes, then kill one. Replace
<sandboxID>with thesandboxIDfrom the create response:
curl -fsSL https://tempo.xyz/skills/wallet/SKILL.md and give it to Claude Code, Codex, or another agent, then ask it to buy an E2B sandbox from https://mpp.e2b.dev.Every payment shows up on the Activity page, so you can follow what the agent spends without touching the terminal. MACH pays one-off charges only. For sessions, fund the wallet with USDC.e or OUSD instead.Run code in the sandbox
Pay for lifecycle calls with themppx client, then attach the E2B SDK to the new sandbox with the returned envdAccessToken. The SDK talks to the sandbox directly, so commands, files, and every other in-sandbox call are free.
The example below pays from an mppx wallet key. With Tempo Wallet, create the sandbox with tempo request instead and pass its sandboxID, envdVersion, and envdAccessToken to new Sandbox(...) the same way.
Save the code as example.ts and run it with node example.ts (Node 22.18 or later runs TypeScript directly):
example.ts
Resuming with
connect takes several payment rounds: the wallet first proves it owns the sandbox, then pays the quote. The mppx library client handles this. The one-shot mppx <url> CLI retries only once, so use the library for connect, timeout, and refreshes.Pricing
Prices follow e2b.dev/pricing, paid in dollar-pegged stablecoins (1 token = $1), with a 5% launch discount on compute and a flat $0.0001 on every request.- Compute is billed up front for the requested time. Asking for 300 seconds costs 300 seconds, even if you kill the sandbox after 5. Request only what you need and extend with
timeoutorrefreshes. - vCPU and RAM come from the template. The only variable you control is the duration.
- Pausing costs only the flat fee. Unused paid time is not refunded or kept, and resuming a paused sandbox buys the requested time again.
base sandbox (2 vCPU, 512 MiB) costs $0.001824 for 1 minute and $0.008721 for 5 minutes.
Endpoints
Request and response bodies match the E2B REST API. The machine-readable spec is at
/openapi.json. The maximum timeout is 24 hours.
Templates
templateID accepts E2B’s public templates: base, code-interpreter-v1, desktop, claude, codex, amp, opencode, and openclaw. The 402 for a create names the template’s vCPU and RAM next to the price.
Sessions
Every route also accepts MPP sessions. The agent deposits once into a payment channel, then pays each request with a signed voucher instead of an on-chain transfer. Prices are the same as one-off charges, and closing the channel returns the unused deposit.-M deposit=0.05 locks $0.05 in the channel. Without it, the server suggests a $1 deposit. Replace <channel-id> with the channel ID the first command prints.
Limitations
- Only the public templates above. Custom templates, snapshots, and volumes are not available.
autoResumeis rejected. Resume a paused sandbox with a paidconnect.networkrules cannot use${e2b.secrets.*}or${e2b.identity.tokens.*}placeholders.- The E2B SDK’s own
Sandbox.createcannot pay. Create sandboxes over HTTP as shown above, then attach the SDK.