Skip to content

API Reference

All endpoints, parameters, request/response formats, and error codes.

For press and integration use, see Brand Assets.

Base URL

https://api.ipfs.ninja

All requests require an API key via the X-Api-Key header. See Authentication for details.

Endpoints

MethodPathDescriptionPage
POST/upload/newUpload a file to IPFSFiles
GET/upload/listList uploaded filesFiles
GET/file/:cidGet file metadata by CIDFiles
PUT/files/:cid/nameRename a fileFiles
PUT/files/:cid/moveMove a file into a folderFolders
POST/pinPin existing CID from IPFS network (supports swarm-connect hints)Pinning
POST/pinsAlias of POST /pin (IPFS Pinning Services API spec path)Pinning
GET/pin/:cidCheck pin statusPinning
GET/pins/:cidAlias of GET /pin/:cidPinning
DELETE/pin/:cidDelete a pin (unpin from cluster if no other user holds the CID)Pinning
DELETE/pins/:cidAlias of DELETE /pin/:cidPinning
POST/foldersCreate folderFolders
GET/foldersList foldersFolders
PUT/folders/:folderIdUpdate folderFolders
DELETE/folders/:folderIdDelete folderFolders
POST/folders/:folderId/snapshotSnapshot a folder into a directory CIDFolders
PUT/folders/:folderId/corsSet per-bucket CORS configFolders
GET/folders/:folderId/corsGet per-bucket CORS configFolders
DELETE/folders/:folderId/corsRemove per-bucket CORS configFolders
GET/user/profileGet user profileProfile
POST/apikeysCreate API keyAPI Keys
GET/apikeysList API keysAPI Keys
DELETE/apikeys/:keyDelete API keyAPI Keys
GET/analyticsUsage analyticsAnalytics
PUT/gateway-settingsUpdate gateway settingsGateways
POST/gateway-tokensCreate gateway tokenGateways
GET/gateway-tokensList gateway tokensGateways
DELETE/gateway-tokens/:prefixDelete gateway tokenGateways
POST/upload/signed-urlGenerate signed upload tokenSigned Tokens
GET/signed-tokensList signed tokensSigned Tokens
DELETE/signed-tokens/:tokenIdRevoke signed tokenSigned Tokens
GET/image/:cidOptimize image on-the-flyImage Optimization

CIDv1 by default

Uploads and pins return modern CIDv1 (bafk… for small single-block content, bafy… for larger files and directories) following the IPIP-0499 unixfs-v1-2025 profile. Legacy Qm… CIDs from earlier uploads remain fully resolvable everywhere — Qm… is a valid input to any endpoint that accepts a CID.

S3-Compatible API

Use any AWS SDK to upload and manage files on IPFS Ninja. Point your S3 client at https://s3.ipfs.ninja with your API key as credentials.

https://s3.ipfs.ninja
S3 OperationDescription
PutObjectUpload a file to IPFS
GetObjectDownload a file
HeadObjectGet file metadata
DeleteObjectUnpin and delete a file
ListObjectsV2List files with prefix filtering
CreateMultipartUploadStart a multipart upload (up to 5 GB)
UploadPartUpload a part
CompleteMultipartUploadFinish multipart upload
ListBucketsList your gateways
CreateBucketCreate a gateway (bucket names are globally unique — returns BucketAlreadyExists if taken)
DeleteBucketDelete a gateway
PutBucketCorsConfigure per-bucket CORS rules (required for browser SDK usage)
GetBucketCorsRead the current CORS config for a bucket
DeleteBucketCorsRemove all CORS rules from a bucket

See S3 Compatibility for full documentation, code examples, and migration guides.