Pin files, serve via dedicated gateways, publish mutable IPNS names — all through a simple REST API. Free tier included.
// Install and configure IPFS const { create } = require('ipfs-http-client'); const client = create({ host: 'localhost', port: 5001, protocol: 'http' }); // Upload file const { cid } = await client.add( Buffer.from(JSON.stringify(data)) ); console.log('CID:', cid.toString());
const res = await fetch("https://api.ipfs.ninja/upload/new", { method: "POST", headers: { "X-Api-Key": "ninja_..." }, body: JSON.stringify({ content: data }) }); const { cid } = await res.json();
Upload any file
JSON, images, PDFs, binary — auto-detected. Add custom metadata to every upload.
Dedicated gateways
Personal subdomain, gateway tokens, and IP/origin restrictions.
Pin existing CIDs
Fetch any CID from the IPFS network and pin it to your account.
Image optimization
Resize, reformat, and adjust quality on-the-fly via query params.
Signed upload tokens
Let clients upload directly without exposing your API keys.
Usage analytics
Per-key filtering, daily upload charts, storage and bandwidth tracking.
Upload, retrieve, and integrate — all through a simple REST API.
Read a file from disk and upload it to IPFS with a single fetch call.
import { readFileSync } from "fs"; // Read the image file const image = readFileSync("./photo.png"); // Upload to IPFS const res = await fetch("https://api.ipfs.ninja/upload/new", { method: "POST", headers: { "X-Api-Key": "ninja_your_api_key", "Content-Type": "application/json", }, body: JSON.stringify({ content: image.toString("base64"), description: "My photo", }), }); const { cid, uris } = await res.json(); console.log(cid); // QmXk7VRz... console.log(uris.url); // https://ipfs.ninja/ipfs/QmXk7...
The API returns a permanent content identifier and a gateway URL.
{ "cid": "QmXk7VRz4qoG5Dg8sFL4bYWHpKe4F", "sizeMB": 0.042, "uris": { "ipfs": "ipfs://QmXk7VRz4qoG5Dg8sFL4bYWHpKe4F", "url": "https://ipfs.ninja/ipfs/QmXk7VRz4qoG5Dg..." } }
List uploads or fetch any file by CID — from code or any IPFS gateway.
// List all your uploaded files const files = await fetch( "https://api.ipfs.ninja/upload/list?from=1&to=9999999999999", { headers: { "X-Api-Key": "ninja_your_api_key" } } ).then((r) => r.json()); console.log(files); // [{ cid: "QmXk7...", fileType: "image", sizeMB: 0.042 }] // Or fetch directly via any IPFS gateway: // https://ipfs.ninja/ipfs/QmXk7VRz4qoG5Dg8sFL4bYWHpKe4F
Simple, predictable pricing. Scale when you're ready — not when a bill surprises you.
Try IPFS Ninja free — no credit card
For side projects
For growing apps
For production workloads at scale
Paid plans start at $5/mo — transparent pricing, hard caps, no hidden fees.
| Feature | IPFS Ninja | Pinata |
|---|---|---|
| Free tier | 50 files, 1 GB, 2 GB bw | 500 files, 1 GB |
| Lowest paid plan | $5/mo | $20/mo |
| Dedicated gateway | All paid plans | Up to 3 |
| Gateway access modes | 3 modes | Token-gated |
| Client-side upload tokens | Presigned URLs | |
| Per-file analytics | Paid plans | |
| Image optimization | Paid plans | |
| Bandwidth overage | Hard cap (no surprise bills) | $0.08/GB |
| IPNS mutable names | Up to 10 | |
| API style | REST + S3-compatible | REST + JS SDK |
| MCP Server (AI assistants) | ||
| CAR import (DAG import) | Paid plans only |
Everything you need to know about IPFS Ninja.