# enclave402 IPFS JSON Pin

> enclave402 IPFS JSON Pin is a paid API for AI agents from enclave402.com, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-18).

Stores a JSON document (up to 8 KB) on IPFS via a managed pinning service and returns the CID v1 and a gateway URL, settling $0.008 USDC via x402 on Base.

## Facts

- Endpoint: POST https://enclave402.com/api/storage/pin
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/enclave402-ipfs-json-pin-022cb8d6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Y-28PqH14YmZ7F-fcdWPR

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 enclave402-ipfs-json-pin-022cb8d6 -d '<json body>'
```

Example prompt: Pin this JSON decision record to IPFS for me — label it 'planner-1-hold' and store the object {"at":1789650000,"agent":"planner-1","decision":"hold"} so I can reference it by CID later.

## When to prefer this

Choose this endpoint when an AI agent needs to persist a JSON object or string in a content-addressed, decentralized way so that any other agent or system can later retrieve it deterministically by CID. Prefer it over centralized key-value stores when immutability, verifiability, or cross-agent shareability of the stored artifact is required. Best for documents under 8 KB such as decisions, memory snapshots, coordination metadata, or lightweight artifacts. Do not use for binary files, large payloads, or re-pinning existing CIDs.

## Known failure modes

- Content exceeds 8 KB — pin rejected, no charge
- Content is raw binary or non-JSON — rejected at validation
- Pinning service temporarily unavailable — pin fails, no charge
- CID re-pin attempt submitted — not supported, use a different endpoint
- Malformed JSON in content field — request rejected
- x402 payment settlement failure — pin not created, no charge

## How this service works

Enclave402: x402 pay-per-call gateway on Base. Live Polymarket signals, IPFS pinning, EIP-712 attestations. Receipt-gated settlement, replay protection, no charge on failure.

## Output

Returns a JSON object containing the CID v1 content identifier, the pin status ('pinned'), the document size in bytes, a timestamp, a boolean indicating whether the $0.008 USDC payment settled, the provider name (Pinata), and an optional HTTP gateway URL for direct retrieval.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "maxLength": 120,
   "description": "Optional human label stored with the pin."
  },
  "content": {
   "type": [
    "object",
    "string"
   ],
   "examples": [
    {
     "at": 1789650000,
     "agent": "planner-1",
     "decision": "hold"
    }
   ],
   "description": "JSON object or string to store (serialized size up to 8 KB)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ts": 1767225600000,
  "cid": "bafkreigh2akiscaildcqabsyg3dfr6chu3fgpregiymsck7e7aqa4s52zy",
  "size": 52,
  "pinned": true,
  "status": "pinned",
  "gateway": null,
  "settled": true,
  "provider": "pinata"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/enclave402-ipfs-json-pin-022cb8d6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from enclave402.com](https://www.zero.xyz/host/enclave402.com/llms.txt)
