A file upload API agents pay for themselves
Most upload APIs expect a developer account and an API key. Munition's upload route expects a payment: an agent with a wallet buys an upload slot over x402, sends the bytes and gets a public URL. Agents in an MCP client use the upload tool instead.
curl -sS -i https://api.munition.io/v1/uploads \
-H 'Content-Type: application/json' \
--data '{"filename":"agent-report.pdf","mime":"application/pdf","size":42000,"sha256":"b43cd80a9e6155029135a38c0559aff6696566c431bfb8a9c9433882898247d1","sha256Base64":"tDzYCp5hVQKRNaOMBVmv9mllZsQxv7ipyUM4gomCR9E=","tags":["agent-output","report"]}'Two ways to upload
HTTP takes two requests and no account. The MCP tool does both in one call, from a local path.
HTTP, paid with x402
No account- Send
POST /v1/uploadswith the file's name, type, size and SHA-256. Unpaid, it answers402with the price. - Pay with any x402 client and send the same request again. The answer has a presigned
uploadUrland the file's futurepublicUrl. PUTthe bytes touploadUrlwithin 10 minutes. The storage refuses bytes whose size or SHA-256 differ.
curl -sS -i https://api.munition.io/v1/uploads \
-H 'Content-Type: application/json' \
--data '{"filename":"agent-report.pdf","mime":"application/pdf","size":42000,"sha256":"b43cd80a9e6155029135a38c0559aff6696566c431bfb8a9c9433882898247d1","sha256Base64":"tDzYCp5hVQKRNaOMBVmv9mllZsQxv7ipyUM4gomCR9E=","tags":["agent-output","report"]}'Local server
- Add the server below to Claude Code, Codex, Cursor or Claude Desktop.
- Ask the agent to upload a path: the tool buys the slot and sends the bytes in one call.
{
"mcpServers": {
"munition": {
"command": "npx",
"args": [
"-y",
"@munition/mcp"
],
"env": {
"MUNITION_API_URL": "https://api.munition.io"
}
}
}
}Upload, and the other routes agents can pay for
One fixed price per call, the same over MCP and HTTP. The free tools cost nothing.
File upload
$0.005 per call
Local server · HTTP + x402
ReferenceOne local file, up to 10 MiB, at a public URL for 7 days. Renew it, list recent uploads or delete one. Needs the local package: the connector cannot read your disk.
- upload$0.005
- renew_upload$0.005
- recent_uploadsFree
- delete_uploadFree
HTML to PDF
$0.02 per call
Connector · Local server · HTTP + x402
ReferenceSelf-contained HTML in, an A4 PDF at a public link out. For reports, invoices and source lists the agent writes.
- render_pdf$0.02
Web search and page reading
$0.002 to $0.03 per call
Connector · Local server · HTTP + x402
ReferenceGoogle results, news, images and shopping; Exa search and cited answers; a page or a set of search results read as clean text.
- web_contents$0.002
- google_search$0.004
- google_news$0.004
- google_images$0.004
- google_shopping$0.004
- web_search$0.01
- web_find_similar$0.01
- web_answer$0.01
- web_scrape$0.015
- web_search_scrape$0.03
Forms
$0.01 per call
Connector · Local server · HTTP + x402
ReferenceA web form with up to 20 questions and a public link. People answer without an account; the agent reads the answers as JSON, up to 100 per form.
- create_form$0.01
- form_responsesFree
- close_formFree
Flight search
$0.001 to $0.05 per call
Connector · Local server · HTTP + x402
ReferenceLive offers from Duffel, the details of one offer, airport lookup, and free links that open the same search on KAYAK or Kiwi.com. Munition never books or sells a ticket.
- airports_search$0.001
- flight_offer_details$0.01
- search_flights$0.05
- flight_booking_linksFree
Try it
Once Munition is connected, ask in plain words. The agent picks the tool.
- File uploadLocal server
“Upload ./tmp/export.csv with Munition and include the URL in your answer. If the file is over 10 MiB, stop and tell me.”
- File uploadLocal server
“Upload ./build/report.html with Munition, tagged nightly, and post the link in the summary.”
- HTML to PDF
“Render the report as a PDF with Munition instead of uploading the HTML.”
Good to know
- Paid when the slot is created
- The upload slot is paid when it is created. Bytes not sent within 10 minutes are not refunded. Retrying with the same
Idempotency-Keyreturns the same slot. - Public by link
- Anyone with the URL can open an uploaded file or a rendered PDF until it expires. Never upload secrets,
.envfiles or customer data. - Limits
- One file per upload, up to 10 MiB. The URL lasts 7 days and can be renewed, up to 30 days after the upload.
FAQ
$0.005 per upload, paid in USDC with x402, on Base, Polygon, Arbitrum or Solana. The same route is sold over MPP at POST /v1/mpp/uploads.
When your app owns the files: private access, long retention, image transforms. Munition is for files an agent shares for a few days.
Not over HTTP: the payment is the authorization. The MCP tool uses a Munition account, created on first use.
Next step
Every upload field and limit
Request and response fields, renewal, deletion and errors are in the upload reference.