Munition
File upload API

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.

Quick start · HTTP, paid with x402No account
For your own code or an agent with a wallet: no account, no key, one payment per upload.
bash
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
For your own code or an agent with a wallet: no account, no key, one payment per upload.
  1. Send POST /v1/uploads with the file's name, type, size and SHA-256. Unpaid, it answers 402 with the price.
  2. Pay with any x402 client and send the same request again. The answer has a presigned uploadUrl and the file's future publicUrl.
  3. PUT the bytes to uploadUrl within 10 minutes. The storage refuses bytes whose size or SHA-256 differ.
bash
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

Runs @munition/mcp on your machine with npx. Adds file upload, because it can read local paths.
  1. Add the server below to Claude Code, Codex, Cursor or Claude Desktop.
  2. Ask the agent to upload a path: the tool buys the slot and sends the bytes in one call.
json
{
  "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

    One 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
    Reference
  • HTML to PDF

    $0.02 per call

    Connector · Local server · HTTP + x402

    Self-contained HTML in, an A4 PDF at a public link out. For reports, invoices and source lists the agent writes.

    • render_pdf$0.02
    Reference
  • Web search and page reading

    $0.002 to $0.03 per call

    Connector · Local server · HTTP + x402

    Google 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
    Reference
  • Forms

    $0.01 per call

    Connector · Local server · HTTP + x402

    A 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
    Reference
  • Flight search

    $0.001 to $0.05 per call

    Connector · Local server · HTTP + x402

    Live 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
    Reference

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-Key returns 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, .env files 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.