{"name":"ipfs-fetch","description":"Fetches IPFS content by CID through public gateways and returns it as base64, UTF-8 text, or parsed JSON. Resolves a CID (CIDv0 Qm... or CIDv1 bafy...) and optional sub-path through a fallback chain of public gateways (cloudflare-ipfs.com, ipfs.io, dweb.link). Hard cap 5 MB with HEAD pre-flight and streaming size guard so oversized files are rejected before full download. Use it as an IPFS gateway API, CID resolver, Web3 storage retrieval, NFT metadata fetcher, Filecoin gateway, or decentralized content reader.","price":"$0.005","method":"POST","input_schema":{"properties":{"cid":{"type":"string","description":"IPFS CID, CIDv0 (Qm... base58, 46 chars) or CIDv1 (bafy... base32). Required."},"path":{"type":"string","description":"Optional sub-path inside the IPFS directory, e.g. '/index.html' or 'metadata.json'. Leading slash optional."},"max_bytes":{"type":"number","description":"Maximum response size in bytes. Default 1000000 (1 MB). Hard-capped at 5000000 (5 MB)."},"output":{"type":"string","enum":["base64","text","json"],"description":"How to return the content. 'base64' (default — safe for binary), 'text' (UTF-8 decode), or 'json' (UTF-8 decode + JSON.parse). Returns 502 if 'json' is requested and the body doesn't parse."}},"required":["cid"]},"input_example":{"cid":"bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi","output":"text"},"output_example":{"cid":"bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi","gateway_used":"https://cloudflare-ipfs.com","content_type":"text/plain","size_bytes":12,"content":"Hello World\n","source":"ipfs"},"x402_payment_required":true,"x402_facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}