# IPFS File Fetch via CID Gateway

> IPFS File Fetch via CID Gateway is a paid API for AI agents from x402-gateway-production.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Retrieves a file from IPFS by its Content Identifier (CID) through an HTTP gateway

## Facts

- Endpoint: GET https://x402-gateway-production.up.railway.app/api/ipfs/get
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-gateway-production-up-railway-app-0fd0b562
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v0iEoi7650fw-J76v9fXq

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-gateway-production-up-railway-app-0fd0b562
```

Example prompt: Can you fetch the file stored on IPFS with CID QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco for me?

## When to prefer this

Use this endpoint when you need to retrieve a specific file from IPFS by its CID over HTTP without running your own IPFS node. Ideal for Web3 workflows, NFT metadata retrieval, decentralized app data access, or when content has been stored on IPFS and you have the hash. Prefer this over other IPFS gateways when you are already operating in the x402 micropayment ecosystem.

## Known failure modes

- CID not found or not pinned on accessible IPFS nodes — returns 404
- Invalid or malformed CID format — returns 400 bad request
- IPFS network timeout if content is not readily available — returns 504 or timeout error
- Content no longer available if unpinned — gateway cannot retrieve it

## How this service works

Fetch a file from IPFS by CID via gateway

## Output

Returns the raw file content stored at the given IPFS CID — could be text, JSON, binary data, images, or any other file type depending on what was stored at that address.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "cid"
     ],
     "properties": {
      "cid": {
       "type": "string",
       "example": "QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
       "description": "IPFS CID"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-gateway-production-up-railway-app-0fd0b562/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production.up.railway.app](https://www.zero.xyz/host/x402-gateway-production.up.railway.app/llms.txt)
