Uploads a file to IPFS which makes your NFT storage easy. You can use the returned ipfs_url with Upload metadata to IPFS to mint your NFT.

If you prefer hosting files in your own servers, you can skip this step. Otherwise, we recommend using IPFS because it's an industry standard for decentralized storage and guarantees the immutability of your files.
We use nft.storage to pin the files with Filecoin, which ensures that your important data is retained in IPFS.

Supports all file types and maximum file size is 50MB. For higher limits, see pricing.

Useful for:

  • Storing your NFT files easily and according to the industry standards.

Related:

Example Requests in cURL, Python & JS

curl --request POST \
    --url 'https://api.nftport.xyz/v0/files' \
    --header 'Authorization: API Key Here' \
    --header 'Content-Type: multipart/form-data' \
    --form 'file=@/path/to/file_to_upload.png;type=image/png'
import requests

file = open("image.png", "rb")

response = requests.post(
    "https://api.nftport.xyz/v0/files",
    headers={"Authorization": 'API-Key-Here'},
    files={"file": file}
)
const fs = require('fs');
const fetch = require('node-fetch');
const FormData = require('form-data');

const form = new FormData();
const fileStream = fs.createReadStream('image.jpg');
form.append('file', fileStream);

const options = {
  method: 'POST',
  body: form,
  headers: {
    "Authorization": "API-Key-Here",
  },
};

fetch("https://api.nftport.xyz/v0/files", options)
  .then(response => {
    return response.json()
  })
  .then(responseJson => {
    // Handle the response
    console.log(responseJson);
  })
Language
Authorization
Header
Click Try It! to start a request and see the response here!