Skip to content

Media API

Method and path Authorization Purpose
PUT /upload signed Upload
HEAD /upload signed Check an upload: X-SHA-256, X-Content-Length, X-Content-Type
PUT /mirror signed Mirror: url, sha256
POST /n96 signed Upload as a form (NIP-96)
GET /n96 signed Own files (NIP-96)
GET /{sha256} none Download. An extension is allowed
DELETE /{sha256}, DELETE /n96/{sha256} signed Delete
GET /list/{pubkey} none Files of a user: since, until, limit (1000), offset
GET /.well-known/nostr/nip96.json none Capabilities and prices

Signed requests carry Authorization: Nostr <Base64 event>, with kind 24242 (Blossom) or 27235 (NIP-98).

Status Meaning
401 Authorization is missing, invalid or does not cover the file
402 Payment is required
403 Uploads are not allowed for this key
411 Length is missing
413 File is too large
415 Type is not accepted

The reason is in the header X-Reason.

Edge

Method and path Purpose
GET /{sha256} Download through the cache
POST /purge/{sha256} Remove from the cache. Needs EDGE_TOKEN