$ man cid-fetch
/cid-fetch
PRICE / CALL
$0.005
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
edgemarketCATEGORY
uncategorized
STATUS
● live
NAME
cid-fetch — cid fetch api / ipfs content reader / decentralized file fetcher
synonym alias of ipfs-fetch — reuses the canonical handler.
SYNOPSIS
POST https://x402.agentutility.ai/cid-fetch
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
CID fetch API / IPFS content reader / decentralized file fetcher. Resolves an IPFS CID and optional path through public gateways, returning text, JSON, or base64 with a 5 MB cap.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| cid | string | IPFS CID, CIDv0 (Qm... base58, 46 chars) or CIDv1 (bafy... base32). Required. | required |
| path | string | Optional sub-path inside the IPFS directory, e.g. '/index.html' or 'metadata.json'. Leading slash optional. | optional |
| max_bytes | number | Maximum response size in bytes. Default 1000000 (1 MB). Hard-capped at 5000000 (5 MB). | optional |
| output | string | 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. enum: base64 · text · json | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| cid | string | — |
| gateway_used | string | — |
| content_type | string | — |
| size_bytes | string | — |
| content | string | — |
| source | string | — |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.agentutility.ai/cid-fetch \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# Install the MCP package for this endpoint's cluster npx -y @agentutility/mcp-<cluster> # Required: EVM private key with USDC on Base export X402_PRIVATE_KEY=0x... # Then call the cid-fetch tool from your MCP-aware agent.
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- edge-marketcidfetchcid-fetch
- methods
- POST
- cluster
- edgemarket
- price
- $0.005 USDC per call
ADJACENT — other endpoints in edgemarket
| endpoint | description | price |
|---|---|---|
| agent-card-resolve | Agent card resolver / ERC-8004 Identity Registry lookup / Trustless Agents / agentId → owner + agentURI / A2A identity / agent.json fetch… | $0.005 |
| arbitrage-spread | Cross-exchange arbitrage spread / max-min price / CEX price dispersion / spread % calculator. | $0.005 |
| basename-resolve | Basename resolver / Coinbase Basenames / .base.eth lookup / Base name service / on-chain name resolution. | $0.005 |
| defi-yield-pools | DeFi yield pools / APY aggregator / yield-farming opportunities / DeFiLlama yields / cross-protocol APY ranking / stablecoin yields / LP… | $0.005 |
| hyperliquid-perps | Hyperliquid perps market data / perpetual futures market lookup / crypto derivatives feed. | $0.005 |
| ipfs | IPFS API / IPFS fetch / IPFS content retrieval / CID resolver. | $0.005 |
| ipfs-fetch | IPFS fetch / IPFS gateway / Web3 storage retrieval / NFT metadata fetcher / Filecoin gateway / decentralized content / pinned-content reader. | $0.005 |
| ipfs-gateway | IPFS gateway fetcher / CID gateway resolver / decentralized file retrieval. | $0.005 |
SEE ALSO