English
English
Appearance
English
English
Appearance
Upload your first file to IPFS in under two minutes.

Sign up at ipfs.ninja with your Google account. A default API key is created automatically. Go to your Profile page to view and manage your API keys.
WARNING
Note: API keys don't expire. You can create multiple keys and revoke them individually from your Profile page.
Send a POST request to /upload/new with your content. Here's an example uploading a JSON object:
curl -X POST https://api.ipfs.ninja/upload/new \
-H "X-Api-Key: bws_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"content": {
"name": "My NFT",
"description": "A permanent file on IPFS",
"image": "ipfs://QmExampleCID..."
},
"description": "NFT metadata"
}'const response = await fetch("https://api.ipfs.ninja/upload/new", {
method: "POST",
headers: {
"X-Api-Key": "bws_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
content: {
name: "My NFT",
description: "A permanent file on IPFS",
image: "ipfs://QmExampleCID..."
},
description: "NFT metadata"
})
});
const data = await response.json();
console.log(data.cid); // "QmXmCX9S6ANV..."
console.log(data.uris.url); // "https://ipfs.ninja/ipfs/QmXmCX9S6ANV..."The API returns the CID, file size, and access URIs:
{
"cid": "QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN",
"sizeMB": 0.001,
"uris": {
"ipfs": "ipfs://QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN",
"url": "https://ipfs.ninja/ipfs/QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN"
}
}Access your file in two ways:
curl https://ipfs.ninja/ipfs/QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwNcurl https://api.ipfs.ninja/file/QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN \
-H "X-Api-Key: bws_your_api_key_here"Response:
{
"cid": "QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN",
"fileName": "NFT metadata",
"fileType": "json",
"sizeMB": 0.001,
"createdAt": 1711036800000,
"uris": {
"ipfs": "ipfs://QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN",
"url": "https://ipfs.ninja/ipfs/QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN"
}
}Already using S3? Point your existing AWS SDK at https://s3.ipfs.ninja and use your API key as credentials:
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";
const s3 = new S3Client({
endpoint: "https://s3.ipfs.ninja",
credentials: { accessKeyId: "bws_prefix", secretAccessKey: "bws_fullkey" },
region: "us-east-1",
forcePathStyle: true
});
await s3.send(new PutObjectCommand({
Bucket: "my-project",
Key: "my-file.json",
Body: JSON.stringify({ hello: "IPFS" })
}));See S3 Compatibility for full documentation with Python, Go, and migration examples.