# Spraay IPFS Content Gateway – Retrieve by CID

> Spraay IPFS Content Gateway – Retrieve by CID is a paid API for AI agents from gateway.spraay.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-16).

Fetches pinned content stored on IPFS by its Content Identifier (CID) via the Spraay gateway.

## Facts

- Endpoint: GET https://gateway.spraay.app/api/v1/storage/get
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spraay-ipfs-content-gateway-retrieve-by-cid-0ffc35da
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RaQBCa5-qUVpwsQUm7XDW

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 spraay-ipfs-content-gateway-retrieve-by-cid-0ffc35da
```

Example prompt: Can you fetch the content pinned on IPFS with CID bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi for me?

## When to prefer this

Use this endpoint when you need to retrieve content pinned on IPFS and want a pay-per-use gateway accessed via the x402 micropayment protocol without setting up your own IPFS node or gateway infrastructure. Ideal for AI agents operating in Web3 environments that already use Spraay for payments, escrow, or DeFi and want a single integrated platform.

## Known failure modes

- Invalid or malformed CID returns an error response
- CID not found or not pinned on this gateway returns 404
- Payment failure (insufficient USDC balance) blocks the request
- Network timeout if the IPFS content is not readily available
- Large files may time out or return partial content

## How this service works

Retrieve pinned content by CID.

## Output

Returns the raw content of the pinned IPFS object associated with the provided CID — this may be a file, JSON document, image binary, or any other data type that was originally stored. The response includes the content itself along with its CID reference.

## 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"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "cid": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spraay-ipfs-content-gateway-retrieve-by-cid-0ffc35da/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.spraay.app](https://www.zero.xyz/host/gateway.spraay.app/llms.txt)
