Skip to content
VerifiedXVerifiedX Docs
verifiedx.io
verifiedx.io

Web API: Media

The Media API uploads media files for NFTs and smart contracts and records which files belong to a smart contract. Files are stored in the explorer’s public asset bucket: https://rbx-nft-web-assets.s3.amazonaws.com/ on mainnet and https://rbx-nft-web-assets-testnet.s3.amazonaws.com/ on testnet.

/api/media/
POST /api/media/

Uploads one file and returns its public URL. The file is stored under a random 32-character folder with its original file name.

Request (multipart/form-data):

  • file: The media file to upload (maximum 150 MiB)

Example:

Terminal window
curl -X POST https://data-testnet.verifiedx.io/api/media/ -F "file=@artwork.png"

Response:

{
"url": "https://rbx-nft-web-assets.s3.amazonaws.com/jFhps372uEHEFHHSuYhWCI4c5LNUSxmf/artwork.png"
}

A request without a file answers 400 with {"detail": "No file in request."}; a larger file answers 400 with File exceeds max size: ….

POST /api/media/associate-media/{sc_id}/

Sets the asset URLs of an NFT smart contract. The map replaces the contract’s existing asset_urls.

Parameters:

  • sc_id (string): Smart contract identifier

Request:

{
"media_map": {
"artwork.png": "https://rbx-nft-web-assets.s3.amazonaws.com/jFhps372uEHEFHHSuYhWCI4c5LNUSxmf/artwork.png"
}
}

Response: the updated NFT, in the format described on the NFT page. An unknown sc_id answers 400 with {"detail": "Smart contract with identifier of … not found"}.

  • url: Public URL of the uploaded file
  • media_map: Map of file name to file URL; it becomes the NFT’s asset_urls
  • The explorer stores any file type; it does not convert files, generate thumbnails or previews, extract metadata, or pin files to IPFS
  • Uploaded files are publicly readable
  • The asset files an NFT carries on chain are defined by its smart contract; asset_urls is the explorer’s copy for display