← Todos los NIPs

NIP-94

Metadatos de archivos

BorradorEventos

El kind 1063 describe un archivo compartido (dónde descargarlo, su tipo, hash, tamaño y vistas previas) para que las apps de intercambio de archivos puedan indexarlos y filtrarlos en los relays.

De un vistazo

Estado
En uso, pero todavía puede cambiar.
Kinds
Tags
  • alt
  • blurhash
  • dim
  • i
  • image
  • m
  • magnet
  • ox
  • size
  • summary
  • thumb
  • url
  • x
Último cambio
13 jun 2026

Pruébalo

Edita el formulario o el JSON: ambos se mantienen sincronizados, la insignia indica si el resultado es válido y, al tocar cualquier campo, se explica qué hace.

Ejemplos
Válido 1 nota

Aún sin firmar · Solo claves de demo. Las claves secretas de estos personajes son públicas a propósito.

Formulario
1 ene 2025, 0:00 UTC

Contenido

Un pie o una descripción del archivo.

Tags

  1. url Obligatorio

    Dónde descargar el archivo.

  2. m Obligatorio

    El tipo MIME del archivo, en minúsculas.

  3. x Obligatorio

    SHA-256 del archivo.

  4. ox Recomendado

    SHA-256 del archivo original, antes de que el servidor lo modificara.

  5. size Opcional

    Tamaño del archivo.

  6. dim Opcional

    Tamaño de la imagen o del video.

  7. blurhash Opcional

    Un pequeño marcador de posición difuminado para mostrar mientras carga.

  8. thumb Opcional

    Una miniatura con la misma relación de aspecto.

  9. alt Opcional

    Descripción para quienes no pueden ver el archivo.

  10. fallback Opcional

    Otro sitio de donde obtener el archivo si url falla. Puede repetirse.

  11. service Opcional

    Qué tipo de servicio aloja el archivo.

Añadir tag

Cómo funciona este NIP

Paso 1 de 5

Súbelo a algún sitio

El archivo en sí vive en un servidor (NIP-96, Blossom) o en un torrent. Nostr solo lleva la descripción.

En el curso

Ningún capítulo del curso cubre este NIP todavía. El editor de arriba es la forma más rápida de empezar.

Usado por

Ver también

Especificación

El texto de las especificaciones se cita en inglés del repositorio nostr-protocol/nips. Nuestras explicaciones y la interfaz están traducidas. Código fuente en GitHub en el commit 0046368

Leer la especificación369 palabras, citadas del repositorio en el 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.

Event format

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 file
  • m 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 server
  • size (optional) size of file in bytes
  • dim (optional) size of file in pixels in the form <width>x<height>
  • magnet (optional) URI to magnet file
  • i (optional) torrent infohash
  • blurhash(optional) the blurhash to show while the file is being loaded by the client
  • thumb (optional) url of thumbnail with same aspect ratio
  • image (optional) url of preview image with same dimensions
  • summary (optional) text excerpt
  • alt (optional) description for accessibility
  • fallback (optional) zero or more fallback file sources in case url fails
  • service (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...
}

Suggested use cases

  • A relay for indexing shared files. For example, to promote torrents.
  • A pinterest-like client where people can share their portfolio and inspire others.
  • A simple way to distribute configurations and software updates.