Skip to Content
DevelopersMedia uploads

Media uploads

Images and videos used in profiles (avatar, banner), live stream covers, clips, and product photos need to be available on Nostr as URLs. To get a URL from a file, upload it to a media hosting service.

If users don’t have their own media hosting, they can use nostr.build  — a NIP-96 file storage service. All uploads to nostr.build require NIP-98 authentication.

Upload flow

  1. Discover the upload endpoint:
curl https://nostr.build/.well-known/nostr-basics/nip96.json
  1. Upload with NIP-98 auth:
AUTH=$(nak event -k 27235 \ -t u=https://nostr.build/api/v2/nip96/upload \ -t method=POST \ --sec <nsec1...> < /dev/null 2>/dev/null | base64) curl -X POST \ -H "Authorization: Nostr $AUTH" \ -F "file=@image.jpg" \ https://nostr.build/api/v2/nip96/upload

The response contains a nip94_event with tags including the hosted URL. Use that URL in:

Last updated on