Drop API

A self-hosted drop-and-share service. Throw any file (or paste any text) at it, get an unlisted URL that auto-renders the best viewer for whatever you sent. Designed for friend-to-friend sharing and for handing context to AI assistants in a single link.

For AI agents

Two endpoints turn any share into instant LLM context:

  • GET /s/<id>/raw — single concatenated text dump of every text/code/md file with === filename === separators. Binaries get a one-line stub. Paste this URL into Claude/ChatGPT and it ingests the whole share.
  • GET /s/<id>/manifest.json — structured JSON catalog with every file's name, size, mime, kind, direct URL, and thumbnail URL. CORS-open.

Need to create shares programmatically? Send Authorization: Bearer <DROP_AGENT_TOKEN> on any mutation endpoint instead of relying on browser cookies. The token bypasses owner checks on every share.

Quick examples

Create a share + upload a file (cookies)

# in a browser, just visit https://drop.blanket.party — drag-drop, done.
# from a script:
SID=$(curl -s -X POST -H 'Content-Type: application/json' \
  -d '{"title":"demo","description":"from cli"}' \
  https://drop.blanket.party/api/shares | jq -r .id)

curl -X POST --data-binary @screenshot.png \
  "https://drop.blanket.party/api/shares/$SID/files?name=screenshot.png"

curl -X POST "https://drop.blanket.party/api/shares/$SID/complete"
echo "https://drop.blanket.party/s/$SID"

With a bearer token (for AI agents, CI, CLI tools)

export DROP="https://drop.blanket.party"
TOKEN="${DROP_AGENT_TOKEN}"   # ask homelab owner

# create
SID=$(curl -s -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"title":"agent run"}' \
  $DROP/api/shares | jq -r .id)

# upload many files preserving paths
for f in src/**/*.py; do
  curl -X POST -H "Authorization: Bearer $TOKEN" --data-binary @"$f" \
    "$DROP/api/shares/$SID/files?name=${f}"
done

curl -X POST -H "Authorization: Bearer $TOKEN" "$DROP/api/shares/$SID/complete"
echo "$DROP/s/$SID"

Pull a share back into an LLM context

# everything-as-text:
curl https://drop.blanket.party/s/<id>/raw

# only text/code/md:
curl 'https://drop.blanket.party/s/<id>/raw?text_only=1'

# specific files:
curl 'https://drop.blanket.party/s/<id>/raw?files=README.md,src/main.py'

# structured catalog (so you can pick what to pull individually):
curl https://drop.blanket.party/s/<id>/manifest.json | jq

Edit a text file on a share you own

# get fileId from manifest first
curl -X PUT -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content":"# updated\n\nrewritten via api"}' \
  https://drop.blanket.party/api/shares/<id>/files/<fileId>

What renders inline

KindFormatsViewer
Imagepng, jpg, gif, webp, avif, bmp, icoThumbnail grid + lightbox slideshow
Videomp4, webm, mov, mkv, m4vInline HTML5 player with seek
Audiomp3, wav, flac, ogg, m4a, aac, opusInline player
PDFpdfIframe embed
Markdownmd, markdownCustom renderer (links, tables, code w/ copy)
Codepy, ts, json, sh, sql, … (~25 langs)Lazy-loaded shiki w/ line numbers
Texttxt, csv, log, conf, env, …Plain text in code viewer
OtheranyDownload card with size + mime

Dangerous types (HTML, SVG, XML) are stored as text/plain so uploaded content cannot execute on the drop.blanket.party origin. Files are served with strict CSP + X-Content-Type-Options: nosniff.

URL patterns

/Landing — drag-drop UI + paste-text tab + your recent shares
/s/<id>Share view (auto-renders all files)
/s/<id>/<file>Direct file URL (stable, embeddable, range-supported)
/s/<id>/<file>?w=400WebP thumbnail (200, 400, 800, 1200, 1600)
/s/<id>/rawPlain-text dump for AI ingestion
/s/<id>/manifest.jsonStructured catalog
/s/<id>/downloadZip of entire share
/llms.txtMachine-readable description of this service

Limits

  • 60-day default expiry (set via ?expireDays=N on create, max 365)
  • Code/text inline render: 2 MB or 2,000 lines (rest via download)
  • Raw dump: 20 MB total, 2 MB per file
  • Body size for uploads: 2 GB (Next.js server action limit)
  • Thumbnails snap to {200, 400, 800, 1200, 1600} — over that, original is served
docs · Blanket Drop