NFT Storage logo

Free Storage for NFTs

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

Trusted by

#About

nft.storage is a brand new service, built specifically for storing off-chain NFT data. Data is stored decentralized on IPFS and Filecoin, and are referenced using content-addressed IPFS URIs that can be used in your smart contract without fear of the data being referenced changing.

To learn more about the importance of content addressing, check out this page on NFT School.

#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!

Optionally, you can provide additional redundancy by running your own IPFS node and pinning the CIDs of content uploaded to NFT.Storage.

Alternately, you can use an additional pinning service for redundancy (NFT.Storage already does this when it backs things up to Pinata). Doing this is not necessary, but might be of interest for users looking to be in full control of their data and its availability.

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.

If fetching content using a public IPFS gateway (e.g., directly using an HTTP URL or via Brave), note that the availability and speed of retrieving the content depends on the gateway. In cases where the gateway is unable to retrieve a given CID (e.g., returns a 429 error), you can try a different gateway or running and using your own IPFS node instead.

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!

Optionally, you can provide additional redundancy by running your own IPFS node and pinning the CIDs of content uploaded to NFT.Storage.

Alternately, you can use an additional pinning service for redundancy (NFT.Storage already does this when it backs things up to Pinata). Doing this is not necessary, but might be of interest for users looking to be in full control of their data and its availability.

#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.

If fetching content using a public IPFS gateway (e.g., directly using an HTTP URL or via Brave), note that the availability and speed of retrieving the content depends on the gateway. In cases where the gateway is unable to retrieve a given CID (e.g., returns a 429 error), you can try a different gateway or running and using your own IPFS node instead.

#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.

For additional example code, check out our GitHub repo and NFT School.

#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.

For additional example code, check out our GitHub repo.

#FAQ

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

NFT.Storage helps NFT developers today who are looking for easy APIs and best practices for storing their NFT data securely and resiliently. Even in the short-term, it is a trustless and decentralized solution. Users are able to cryptographically verify that the content identifiers that the service provides corresponds to their data, and that this data is hosted in multiple ways across the IPFS and Filecoin networks (allowing for accessibility across the network and preventing lock-in, with users also able to pin their data elsewhere to increase redundance).

Though we believe that there will always be value in some form of the libraries and services NFT.Storage provides, in the long-term the goal is to increasingly decentralize NFT.Storage. This includes relying more directly on the Filecoin network as the protocol continues to evolve. Some examples include storing data directly on the Filecoin network without putting it on a centralized IPFS node first and building oracles + DAOs + bridges to ensure n copies of data on the network (as Filecoin continues to evolve). We also want to make it easy for users to deploy and run their own NFT.Storage storage service. This, and other exciting things on the horizon, will help upgrade today's NFT.Storage 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 31GiB 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.

#Who can access the data I store on NFT.Storage?

All data uploaded to NFT.Storage is available to anyone who requests it using the correct CID. Do not store any private or sensitive information in an unencrypted form using NFT.Storage.

More FAQs here