Step 1 of 5
Upload somewhere
The file itself lives on a server (NIP-96, Blossom) or a torrent. Nostr only carries the description.
NIP-94
DraftEvents
Kind 1063 describes a shared file (where to download it, its type, hash, size and previews) so file-sharing apps can index and filter files on relays.
Edit the form or the JSON: both stay in sync, the badge says whether the result is valid, and tapping any field explains it.
Not signed yet · Demo keys only. These personas' secret keys are public on purpose.
Select any field in the form or the JSON to see what it does.
Step 1 of 5
The file itself lives on a server (NIP-96, Blossom) or a torrent. Nostr only carries the description.
No course chapter covers this NIP yet. The editor above is the quickest way in.
imeta tags reuse these fields inside other events.
NIP-96 servers return a kind 1063-shaped description after upload.
Blossom servers address files by the same SHA-256 hash.
Torrents (NIP-35) are another way to share files over nostr.
Specification text is quoted in English from the nostr-protocol/nips repository. Our explanations and the interface are translated. Source on GitHub at commit 0046368
The purpose of this NIP is to allow an organization and classification of shared files. So that relays can filter and organize in any way that is of interest. With that, multiple types of filesharing clients can be created. NIP-94 support is not expected to be implemented by "social" clients that deal with kind:1 notes or by longform clients that deal with kind:30023 articles.
This NIP specifies the use of the 1063 event kind, having in content a description of the file content, and a list of tags described below:
url the url to download the filem a string indicating the data type of the file. The MIME types format must be used, and they should be lowercase.x containing the SHA-256 hexencoded string of the file.ox containing the SHA-256 hexencoded string of the original file, before any transformations done by the upload serversize (optional) size of file in bytesdim (optional) size of file in pixels in the form <width>x<height>magnet (optional) URI to magnet filei (optional) torrent infohashblurhash(optional) the blurhash to show while the file is being loaded by the clientthumb (optional) url of thumbnail with same aspect ratioimage (optional) url of preview image with same dimensionssummary (optional) text excerptalt (optional) description for accessibilityfallback (optional) zero or more fallback file sources in case url failsservice (optional) service type which is serving the file (eg. NIP-96){
"kind": 1063,
"tags": [
["url",<string with URI of file>],
["m", <MIME type>],
["x", <Hash SHA-256>],
["ox", <Hash SHA-256>],
["size", <size of file in bytes>],
["dim", <size of file in pixels>],
["magnet", <magnet URI> ],
["i", <torrent infohash>],
["blurhash", <value>],
["thumb", <string with thumbnail URI>, <Hash SHA-256>],
["image", <string with preview URI>, <Hash SHA-256>],
["summary", <excerpt>],
["alt", <description>]
],
"content": "<caption>",
// other fields...
}