Skip to main content

IPFS

In addition to the Cardano ecosystem, Blockfrost also offers entry points to other ecosystems:

NetworkEndpoint
InterPlanetary File System (IPFS)https://ipfs.blockfrost.io/api/v0/

IPFS

IPFS, or InterPlanetary File System, is a distributed, peer-to-peer protocol designed for efficient and secure sharing of files and data across a global network. Is it commonly utilized for storing digital content externally from the main chain.

export BLOCKFROST_PROJECT_ID_IPFS=ipfs_YOUR_PROJECT_ID
curl "https://ipfs.blockfrost.io/api/v0/ipfs/add" \
-X POST \
-H "project_id: $BLOCKFROST_PROJECT_ID_IPFS" \
-F "file=@./static/img/logo.svg"

When executed correctly, you will receive a response in JSON format, resembling the following:

{
"name": "logo.svg",
"ipfs_hash": "QmUCXMTcvuJpwHF3gABRr69ceQR2uEG2Fsik9CyWh8MUoQ",
"size": "5617"
}

To learn more how to use IPFS with Blockfrost, have a look at the official Blockfrost documentation