Skip to main content

Documentation Index

Fetch the complete documentation index at: https://nexus.gerowallet.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

The IPFS API provides endpoints for resolving content from the InterPlanetary File System. This is particularly useful for fetching NFT metadata and images stored on IPFS.

Available endpoints

Resolve IPFS content

Fetch content from IPFS by CID or path

What is IPFS?

IPFS (InterPlanetary File System) is a distributed file system used to store NFT metadata, images, and other decentralized content. Content is addressed by its hash (CID), ensuring immutability.

CID formats

The API supports both CID versions:
VersionExampleDescription
CIDv0Qm...Legacy format, starts with “Qm”
CIDv1ba...Modern format, starts with “ba”

Accepted path formats

The path parameter accepts multiple formats:
# Raw CID
QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG

# CID with path
QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/image.png

# With ipfs:// prefix
ipfs://QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG

# With ipfs/ prefix
ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG
All formats are normalized and processed identically.

Gateway fallback

Gero Nexus fetches IPFS content through multiple gateways with automatic fallback:
  1. Primary gateway - Low latency, high availability
  2. Secondary gateways - Backup for redundancy
  3. Public gateways - Final fallback option
If all gateways fail, the API returns a 503 Service Unavailable error.

Response format

The endpoint returns the raw content with appropriate Content-Type headers based on the file type. Common IPFS content includes:
Content TypeDescription
application/jsonNFT metadata files
image/png, image/jpegNFT images
video/mp4NFT videos
text/htmlHTML content

Example: Fetch NFT metadata

curl -X GET "https://nexus-dev.gerowallet.io/api/ipfs?path=QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG" \
  -H "Authorization: Bearer your-token"

Rate limits

IPFS resolution is rate-limited to prevent abuse. Large files may take longer to fetch, especially from slower gateways.

Caching

Responses are cached to improve performance for frequently accessed content. The cache duration varies based on content type and size.