Upload a file to IPFS

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.


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 '[email protected]/path/to/file_to_upload.png;type=image/png'
import requests

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

response = requests.post(
    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
Click Try It! to start a request and see the response here!