{"openapi":"3.1.0","info":{"title":"Munition API — render","version":"0.0.14","description":"Munition provides pay-per-call file sharing, HTML to PDF conversion, web search, page content extraction and flight data for AI agents. Upload a report or image and share its public download link; turn self-contained HTML into an A4 PDF; search and read web sources with Exa, Firecrawl and Serper. Direct HTTP services use USDC payments. The local @munition/mcp adapter supports files and flights; PDF and web research are HTTP-only.","x-guidance":"Munition provides USDC-paid x402/MPP services and free public tools for AI agents. Pay-per-call routes settle in stablecoin USDC via x402 on Base/Polygon/Arbitrum/Solana, or MPP on Base/Polygon/Arbitrum (Solana is x402 only); no API key or signup is required for direct x402 routes. Fetch /llms.txt for the full agent guide.\n\n## Which route to call\n- Web search: POST /v1/exa/search (0.01 USDC, neural, best for research questions and finding sources; add contents.text to get page text in the same call). For Google-style results with snippets use POST /v1/serper/search (0.004 USDC).\n- Read a page: POST /v1/firecrawl/scrape (0.015 USDC, renders JavaScript, returns markdown; use when a plain fetch returns empty, JS-only or 403). For many URLs cheaply use POST /v1/exa/contents (0.002 USDC for up to 20 URLs from Exa's cache).\n- Direct answer with citations: POST /v1/exa/answer (0.01 USDC).\n- Related pages / competitors of a URL: POST /v1/exa/find-similar (0.01 USDC).\n- News, images, products: POST /v1/serper/news, /v1/serper/images, /v1/serper/shopping (0.004 USDC each; country gl and language hl selectable).\n- Search + full content of each result in one call: POST /v1/firecrawl/search (0.03 USDC).\n- Deliver a file to a human: POST /v1/render/pdf (0.02 USDC, self-contained HTML → PDF link) or POST /v1/uploads (0.005 USDC, presigned upload slot → public link, 7 days).\n- Travel: POST /v1/flights/search (0.05 USDC), GET /v1/flights/offers/{id} (0.01 USDC), POST /v1/airports/search (0.001 USDC).\n- External flight search links: POST /v1/tools/flight-booking-links (free, no authentication or payment). Pass origin, destination, departureDate and optional returnDate to receive KAYAK and Kiwi.com search URLs. These start new searches and do not reserve a flight or guarantee a fare.\n\n## Calling convention for paid routes\n1. POST with a JSON body and no payment header → 402 with PAYMENT-REQUIRED (accepts[] with exact atomic amounts) and the Bazaar input/output schema.\n2. Sign and retry with PAYMENT-SIGNATURE. Send Idempotency-Key: replays return the stored result without a second charge.\n3. 400 = input rejected before any payment. 422/502 after payment = upstream provider failed; the response carries paidCallId for reconciliation, do not pay again blindly.\nAll paid-route prices are fixed per call and listed at /v1/tools/prices. The free flight-booking-links route accepts JSON directly and returns 200 on success or 400 for invalid input; no payment headers or Idempotency-Key are required.","contact":{"name":"Munition","email":"hello@munition.io","url":"https://munition.io"}},"x-agentcash-guidance":{"llmsTxtUrl":"https://api.munition.io/llms.txt","agentOpenApiUrl":"https://api.munition.io/openapi-agents.json"},"x-agentcash-provenance":{"ownershipProofs":["https://munition.io","https://api.munition.io/openapi.json","https://api.munition.io/.well-known/x402.json","https://api.munition.io/.well-known/mpp.json"]},"servers":[{"url":"https://api.munition.io"}],"tags":[],"paths":{"/v1/render/pdf":{"post":{"summary":"Convert HTML to PDF and return a public download link","description":"Convert self-contained HTML with inline CSS into an A4 PDF and return a public download URL. Use for agent-generated reports, invoices, proposals and source lists. Costs 0.020 USDC per call; accepts up to 1 MiB of HTML and produces up to 20 pages / 10 MiB. Submit HTML, not a webpage URL; scripts and external resources are rejected. Uses seven-day deletion eligibility, not a hard public-access cutoff; asynchronous cleanup and caches may persist. Not renewable. Non-guessable public URL, not private: do not submit sensitive content. HTTP x402 only; no PDF MCP tool or MPP route.","security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderPdfInput"}}}},"responses":{"200":{"description":"Public nonconfidential PDF, not renewable; seven-day deletion eligibility, not a hard public-access cutoff (asynchronous cleanup and caches may persist)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenderPdfOutput"}}}},"400":{"description":"Signed input rejected before payment verification, reservation or settlement. error.code=invalid_input; reason is invalid_json, invalid_input or forbidden_html, with at most three allowlisted path/rule issues and a minimal valid example. Submitted content is never echoed."},"402":{"description":"Unsigned requests receive the standard x402 PAYMENT-REQUIRED challenge before body parsing, including empty/malformed JSON; this is discovery, not input validation or renderer readiness. Canonical body schema: extensions.bazaar.schema.properties.input.properties.body. Signed payment rejection or settlement failure can also return 402; inspect the response, do not blindly pay again."},"409":{"description":"Replay conflict or payment requires reconciliation; do not pay again"},"503":{"description":"After signed input passes static validation, an unconfigured renderer is unpaid/unavailable; unsigned discovery does not check renderer configuration. render_settlement_unknown: ambiguous settlement, not proof of payment. Known-paid interrupted effect: pending manual reconciliation. Preserve paidCallId and payment evidence securely; do not pay again. No automatic PDF recovery/refund; owner-approved manual resolution: delivery without another charge or an explicitly authorized refund after verifying payment and non-delivery; no automatic refund or promised resolution SLA."}}}}},"components":{"securitySchemes":{"accountBearer":{"type":"http","scheme":"bearer","description":"Anonymous Munition account token created by /v1/accounts/bootstrap."}},"schemas":{"RenderPdfInput":{"type":"object","properties":{"html":{"type":"string","minLength":1,"maxLength":1048576,"description":"Self-contained HTML document (UTF-8, up to 1 MiB) with inline CSS. No JavaScript, iframes, forms, <link>, external or relative resources: scripting is disabled and document requests are intercepted/aborted in an offline browser context, not process-wide OS egress isolation. The Chromium sandbox is disabled; process isolation is a deployment concern. Embed images and fonts as data: URIs (png, jpeg, gif, webp, svg, woff/woff2/ttf/otf). Output is A4, up to 20 pages / 10 MiB on successful return, with a 10-second application-level render watchdog budget. Launch, shutdown and cleanup can extend elapsed call time; this is not a hard process-lifetime bound. Page and PDF-byte limits are checked after PDF allocation and do not bound peak memory or CPU."},"filename":{"type":"string","minLength":1,"maxLength":180,"description":"Optional filename used for a readable public URL slug, for example invoice-2026-09.pdf. Consecutive dots (..) anywhere are invalid."}},"required":["html"],"additionalProperties":false},"RenderPdfOutput":{"type":"object","properties":{"id":{"type":"string","description":"Munition render id."},"publicUrl":{"type":"string","format":"uri","description":"Non-guessable public files.munition.io URL of the rendered PDF; do not render confidential content. PDF render artifacts are not renewable via direct x402 or MPP upload-renew endpoints, unlike ordinary uploads."},"expiresAt":{"type":"string","format":"date-time","description":"Seven-day deletion eligibility, not an exact public-access cutoff. Daily cleanup and asynchronous S3 lifecycle deletion may run later; cached responses can persist. No hard deletion deadline is guaranteed. PDF render artifacts are not renewable."},"bytes":{"type":"integer","description":"Size of the PDF in bytes."},"pages":{"type":"integer","description":"Number of A4 pages in the PDF."},"sha256":{"type":"string","description":"Lowercase hex SHA-256 of the PDF bytes."},"renderMs":{"type":"integer","description":"Server-side render time in milliseconds."}},"required":["id","publicUrl","expiresAt","bytes","pages","sha256","renderMs"],"additionalProperties":false}}}}