{"name":"ipfs-gateway","description":"Reads a CID through a fallback chain of public IPFS gateways and returns content type, size, gateway used, and body as base64, text, or JSON. Use it as an IPFS gateway API, CID gateway resolver, or decentralized file retrieval tool.","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"}