# Kleros IPFS Gateway - Pin File to IPFS

> Kleros IPFS Gateway - Pin File to IPFS is a paid API for AI agents from kleros-ipfs-gateway.fly.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Uploads and pins a file to IPFS via the Kleros-operated IPFS gateway, returning a content-addressed CID

## Facts

- Endpoint: POST https://kleros-ipfs-gateway.fly.dev/upload-to-ipfs
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kleros-ipfs-gateway-pin-file-to-ipfs-1607208b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pCHCRdeftLRTGHtvtHMu3

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 kleros-ipfs-gateway-pin-file-to-ipfs-1607208b -d '<json body>'
```

Example prompt: Can you pin this PDF file to IPFS using the Kleros gateway so I get back a permanent content-addressed CID I can reference on-chain?

## When to prefer this

Use this endpoint when you need to pin a file to IPFS quickly and cost-effectively (at $0.01 USDC per call) without running your own IPFS node, especially in Kleros-ecosystem workflows where IPFS evidence or metadata storage is required for dispute resolution or on-chain references.

## Known failure modes

- File too large — gateway may reject oversized uploads
- Invalid or missing file payload — returns 400 bad request
- Payment failure — x402 payment of $0.01 USDC not provided or invalid, returns 402
- Gateway unavailable — fly.dev instance down, returns 503
- Unsupported file type — certain MIME types may be rejected

## How this service works

Pin a file to IPFS

## Output

Returns an IPFS CID (content identifier) and/or IPFS URI pointing to the pinned file, confirming the file is stored and retrievable from the IPFS network via the Kleros-operated gateway.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kleros-ipfs-gateway-pin-file-to-ipfs-1607208b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kleros-ipfs-gateway.fly.dev](https://www.zero.xyz/host/kleros-ipfs-gateway.fly.dev/llms.txt)
