NFT Storage logo

Free Storage for NFTs

Free decentralized storage and bandwidth for NFTs on IPFS logo IPFS and Filecoin logo Filecoin.

#About

nft.storage is a brand new service, built specifically for storing off-chain NFT data. Data is stored decentralized on IPFS and Filecoin.

#Store

Just upload your data and you'll receive an IPFS hash of the content (a CID) that can be used in on-chain NFT data as a pointer to the content.

Filecoin provides long term storage for the data ensuring that even if nft.storage is attacked or taken down the NFT data persists!

diagram of storage with nft.storage

#Retrieve

NFT data stored by nft.storage can be accessed from the decentralized IPFS network from any peer that has the content. CIDs reference immutable content so you can be sure the content you access is the content referenced in the NFT.

The data can be fetched directly in the browser using Brave, or via a public IPFS gateway, or by using IPFS Desktop or the IPFS command line.

diagram of retrieval with nft.storage
diagram of storage and retrieval with nft.storage

#Store

Just upload your data and you'll receive an IPFS hash of the content (a CID) that can be used in on-chain NFT data as a pointer to the content.

Filecoin provides long term storage for the data ensuring that even if nft.storage is attacked or taken down the NFT data persists!

#Retrieve

NFT data stored by nft.storage can be accessed from the decentralized IPFS network from any peer that has the content. CIDs reference immutable content so you can be sure the content you access is the content referenced in the NFT.

The data can be fetched directly in the browser using Brave, or via a public IPFS gateway, or by using IPFS Desktop or the IPFS command line.

#Getting started

  1. Step 1

    Register an nft.storage account so that you can create API access keys.

    arrow down
  2. Step 2

    Create an API access key and note it down.

    arrow down
  3. Step 3

    Choose a method to get your NFT data stored:

#JS Client Library

Install the JS library:

npm install nft.storage

Use the client in Node.js or the browser:

import { NFTStorage, File } from 'nft.storage'

const apiKey = 'YOUR_API_KEY'
const client = new NFTStorage({ token: apiKey })

const metadata = await client.store({
  name: 'Pinpie',
  description: 'Pin is not delicious beef!',
  image: new File([/* data */], 'pinpie.jpg', { type: 'image/jpg' })
})
console.log(metadata.url)
// ipfs://bafyreib4pff766vhpbxbhjbqqnsh5emeznvujayjj4z2iu533cprgbz23m/metadata.json

View the full library reference docs.

#Raw HTTP Request

Configure your HTTP client and set the Authorization header:

"Authorization": "Bearer YOUR_API_KEY"

Submit a HTTP POST request to api.nft.storage/upload, passing the file data in the request body. e.g.

curl -X POST --data-binary @art.jpg -H 'Authorization: Bearer YOUR_API_KEY' https://api.nft.storage/upload

Successful requests will receive a HTTP 200 status and application/json response like:

{
  "ok": true,
  "value": { "cid": "bafy..." }
}

Check the API Docs for information on uploading multiple files and the other available endpoints.

#FAQ

#What is the long-term vision for NFT.Storage?

NFT.Storage fills the gap for NFT developers today who are looking for easy APIs and best practices for storing their NFT data securely and resiliently. In the long-term, NFT.Storage will hopefully decentralize itself out of existence, upgrading today's implementation into the provably permanent storage solutions of tomorrow.

#How long will data be stored on NFT.storage?

Data will be available in IPFS indefinitely as well as stored in long-term, redundant Filecoin storage deals with the global community of miners. See the Terms of Service for details.

#Are there any size restrictions for stored NFTs?

NFT.storage can store NFTs up to 32GB in size! (There was previously a 100MB limit due to Cloudflare workers but NFT.storage now supports chunked uploads, allowing files bigger than 100MB to be uploaded! 🎉)

#Where can I learn more about NFT best practices?

Visit NFT School for information on NFT best practices as well as a variety of helpful tutorials and how-to guides for NFT developers.