{"openapi":"3.1.0","info":{"title":"QRCode.Pub tools for agents","version":"1.0.0","description":"Pay-per-call HTTP tools for AI agents: QR code images, web page → Markdown extraction, page metadata and 30-day file hosting. Pay per call with USDC — x402 (Base or Solana) or MPP (USDC.e on Tempo, USDC on Base); no account, no API key. Docs: https://qrcode.pub/qr-code-api#x402","contact":{"name":"QRCode.Pub","url":"https://qrcode.pub/qr-code-api#x402","email":"starplayr@icloud.com"},"x-guidance":"Call any /x402/* endpoint with GET; a 402 answer carries the exact USDC amount and payTo in the PAYMENT-REQUIRED header (x402 v2 — pay with e.g. @x402/fetch) and the same price as MPP challenges in WWW-Authenticate: Payment (method tempo, USDC.e on Tempo; method evm, USDC on Base — pay with mppx). 4xx answers are never charged."},"x-service-info":{"categories":["tools","qr-code","web-extraction","file-hosting"],"docs":{"homepage":"https://qrcode.pub/","apiReference":"https://qrcode.pub/qr-code-api#x402","llms":"https://qrcode.pub/llms.txt"}},"servers":[{"url":"https://qrcode.pub"}],"paths":{"/api/qr":{"get":{"summary":"Generate a rate-limited QR code image","description":"Free, rate-limited QR code image (PNG or SVG). Same parameters as /x402/qr. Prefer /x402/qr for unattended agents.","security":[],"parameters":[{"name":"data","in":"query","required":true,"description":"Text or URL to encode (max 2000 chars)","schema":{"type":"string"}},{"name":"size","in":"query","required":false,"description":"Pixels, 32-2000 (default 300)","schema":{"type":"string"}},{"name":"format","in":"query","required":false,"description":"Image format (default png)","schema":{"type":"string","enum":["png","svg"]}},{"name":"ecc","in":"query","required":false,"description":"Error correction (default M)","schema":{"type":"string","enum":["L","M","Q","H"]}},{"name":"margin","in":"query","required":false,"description":"Quiet zone in modules, 0-20 (default 4)","schema":{"type":"string"}},{"name":"color","in":"query","required":false,"description":"Foreground hex, e.g. 1a237e","schema":{"type":"string"}},{"name":"bgcolor","in":"query","required":false,"description":"Background hex, e.g. ffffff","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad input (never charged)"}}}},"/x402":{"get":{"summary":"List the paid x402 endpoints and prices","description":"Free JSON list of the paid endpoints with their x402 payment requirements and Bazaar schemas.","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/x402/qr":{"get":{"summary":"Generate a QR code image (PNG or SVG)","description":"QR code image (PNG or SVG) for any text or link. Same parameters as the free /api/qr: data, size (32-2000), format (png|svg), ecc (L|M|Q|H), margin (0-20), color, bgcolor.","security":[],"parameters":[{"name":"data","in":"query","required":true,"description":"Text or URL to encode (max 2000 chars)","schema":{"type":"string"}},{"name":"size","in":"query","required":false,"description":"Pixels, 32-2000 (default 300)","schema":{"type":"string"}},{"name":"format","in":"query","required":false,"description":"Image format (default png)","schema":{"type":"string","enum":["png","svg"]}},{"name":"ecc","in":"query","required":false,"description":"Error correction (default M)","schema":{"type":"string","enum":["L","M","Q","H"]}},{"name":"margin","in":"query","required":false,"description":"Quiet zone in modules, 0-20 (default 4)","schema":{"type":"string"}},{"name":"color","in":"query","required":false,"description":"Foreground hex, e.g. 1a237e","schema":{"type":"string"}},{"name":"bgcolor","in":"query","required":false,"description":"Background hex, e.g. ffffff","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad input (never charged)"},"402":{"description":"Payment Required — x402 v2 PAYMENT-REQUIRED header (base64 JSON, also in the body; retry with PAYMENT-SIGNATURE) and MPP WWW-Authenticate: Payment challenges (retry with Authorization: Payment)"},"422":{"description":"Page could not be fetched or is not text (never charged)"}},"x-payment-info":{"offers":[{"amount":"5000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Generate a QR code image (PNG or SVG) — USDC.e on Tempo","intent":"charge","method":"tempo"},{"amount":"5000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Generate a QR code image (PNG or SVG) — USDC on Base","intent":"charge","method":"evm"}],"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"Fx3ufwEQjfVRFhD9HGDVrEzRdkVsu6Hd8UnUDwC2nFMV"}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50","chainId":4217,"recipient":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}},{"mpp":{"method":"evm","intent":"charge","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","chainId":8453,"recipient":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}}]}}},"/x402/extract":{"get":{"summary":"Extract a web page as clean Markdown with links","description":"Fetch a public web page and return its title, description, clean Markdown (scripts, styles, nav chrome removed) and the list of links. No model call, deterministic.","security":[],"parameters":[{"name":"url","in":"query","required":true,"description":"Public http(s) page to fetch","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","example":{"url":"https://example.com/","status":200,"title":"Example Domain","description":null,"markdown":"This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.","words":25,"links":[],"truncated":false}}}}},"400":{"description":"Bad input (never charged)"},"402":{"description":"Payment Required — x402 v2 PAYMENT-REQUIRED header (base64 JSON, also in the body; retry with PAYMENT-SIGNATURE) and MPP WWW-Authenticate: Payment challenges (retry with Authorization: Payment)"},"422":{"description":"Page could not be fetched or is not text (never charged)"}},"x-payment-info":{"offers":[{"amount":"10000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Extract a web page as clean Markdown with links — USDC.e on Tempo","intent":"charge","method":"tempo"},{"amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Extract a web page as clean Markdown with links — USDC on Base","intent":"charge","method":"evm"}],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"Fx3ufwEQjfVRFhD9HGDVrEzRdkVsu6Hd8UnUDwC2nFMV"}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50","chainId":4217,"recipient":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}},{"mpp":{"method":"evm","intent":"charge","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","chainId":8453,"recipient":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}}]}}},"/x402/meta":{"get":{"summary":"Fetch web page metadata (OpenGraph, Twitter, icons, JSON-LD)","description":"Fetch a public web page and return its metadata: title, description, canonical URL, language, OpenGraph and Twitter card tags, icons and parsed JSON-LD blocks.","security":[],"parameters":[{"name":"url","in":"query","required":true,"description":"Public http(s) page to fetch","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","example":{"url":"https://example.com/","status":200,"title":"Example Domain","description":null,"canonical":null,"lang":null,"og":{},"twitter":{},"icons":[],"jsonld":[]}}}}},"400":{"description":"Bad input (never charged)"},"402":{"description":"Payment Required — x402 v2 PAYMENT-REQUIRED header (base64 JSON, also in the body; retry with PAYMENT-SIGNATURE) and MPP WWW-Authenticate: Payment challenges (retry with Authorization: Payment)"},"422":{"description":"Page could not be fetched or is not text (never charged)"}},"x-payment-info":{"offers":[{"amount":"5000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Fetch web page metadata (OpenGraph, Twitter, icons, JSON-LD) — USDC.e on Tempo","intent":"charge","method":"tempo"},{"amount":"5000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Fetch web page metadata (OpenGraph, Twitter, icons, JSON-LD) — USDC on Base","intent":"charge","method":"evm"}],"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"Fx3ufwEQjfVRFhD9HGDVrEzRdkVsu6Hd8UnUDwC2nFMV"}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50","chainId":4217,"recipient":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}},{"mpp":{"method":"evm","intent":"charge","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","chainId":8453,"recipient":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}}]}}},"/x402/store":{"post":{"summary":"Host a file at a public URL for 30 days","description":"Upload a file (≤ 5 MB; png, jpeg, webp, gif, pdf, json, txt, md or csv) and get a stable public URL https://qrcode.pub/f/<id> that any agent, tool or browser can fetch for 30 days. Send the bytes as the raw request body with a Content-Type header, or as multipart/form-data field \"file\". Nothing executable is accepted (no HTML/SVG/JS). The answer includes a delete token.","security":[],"parameters":[{"name":"name","in":"query","required":false,"description":"Optional file name for Content-Disposition (letters, digits, . - _; max 80 chars)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","example":{"id":"k7m2p9x4q1z8w3n6","url":"https://qrcode.pub/f/k7m2p9x4q1z8w3n6","type":"image/png","bytes":1024,"name":"chart.png","expires":"2026-11-04T00:00:00.000Z","delete":"DELETE https://qrcode.pub/x402/store/k7m2p9x4q1z8w3n6 with header Authorization: Bearer <token>","token":"secret"}}}}},"400":{"description":"Bad input (never charged)"},"402":{"description":"Payment Required — x402 v2 PAYMENT-REQUIRED header (base64 JSON, also in the body; retry with PAYMENT-SIGNATURE) and MPP WWW-Authenticate: Payment challenges (retry with Authorization: Payment)"},"413":{"description":"File larger than 5 MB (never charged)"},"415":{"description":"Content-Type not accepted or bytes do not match it (never charged)"}},"requestBody":{"required":true,"description":"The file: raw bytes with a matching Content-Type, or multipart/form-data field \"file\".","content":{"image/png":{"schema":{"type":"string","contentEncoding":"binary"}},"image/jpeg":{"schema":{"type":"string","contentEncoding":"binary"}},"image/webp":{"schema":{"type":"string","contentEncoding":"binary"}},"image/gif":{"schema":{"type":"string","contentEncoding":"binary"}},"application/pdf":{"schema":{"type":"string","contentEncoding":"binary"}},"application/json":{"schema":{"type":"string","contentEncoding":"binary"}},"text/plain":{"schema":{"type":"string","contentEncoding":"binary"}},"text/markdown":{"schema":{"type":"string","contentEncoding":"binary"}},"text/csv":{"schema":{"type":"string","contentEncoding":"binary"}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"x-payment-info":{"offers":[{"amount":"10000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Host a file at a public URL for 30 days — USDC.e on Tempo","intent":"charge","method":"tempo"},{"amount":"10000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Host a file at a public URL for 30 days — USDC on Base","intent":"charge","method":"evm"}],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}},{"x402":{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"Fx3ufwEQjfVRFhD9HGDVrEzRdkVsu6Hd8UnUDwC2nFMV"}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50","chainId":4217,"recipient":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}},{"mpp":{"method":"evm","intent":"charge","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","chainId":8453,"recipient":"0xbE9a299e14b12F56a5B047c4bFFD8e715e2970a6"}}]}}},"/f/{id}":{"get":{"summary":"Fetch a hosted file","description":"Free public download of a file uploaded through /x402/store (until it expires).","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The file, with its original Content-Type"},"404":{"description":"Unknown or expired"}}}}}}