Save 5m can be used entirely from the command line. When curl or wget is detected (via User-Agent), responses are plain text instead of JSON.
# save text to slot 12 curl -X PUT -H 'X-Save5m: 1' -d 'hello world' save5m.com/api/12 # read it back curl save5m.com/api/12 # pipe from stdin echo 'hello' | curl -X PUT -H 'X-Save5m: 1' -d @- save5m.com/api/12 # delete curl -X PUT -H 'X-Save5m: 1' -d '' save5m.com/api/12 # usage help curl save5m.com
Home page. Returns a usage cheat sheet for CLI clients, or the slot grid for browsers.
Retrieve stored content from a slot.
text/plain). For file slots, returns the binary file with Content-Disposition header. Empty slots return 404.{"text": "...", "ttl": 290, "filename": ""}Save content to a slot. Requires the X-Save5m: 1 header (CSRF protection).
Plain text body — saves text. Empty body deletes the slot.
JSON body (Content-Type: application/json) — saves a file:
{"filename": "photo.jpg", "data": "<base64-encoded content>"}
Text Saved. TTL: 300s{"message": "Text Saved.", "ttl": 300}# save curl -X PUT -H 'X-Save5m: 1' -d 'my secret note' save5m.com/api/42 # retrieve curl save5m.com/api/42
cat ~/.ssh/config | curl -X PUT -H 'X-Save5m: 1' -d @- save5m.com/api/42
curl -X PUT -H 'X-Save5m: 1' \
-H 'Content-Type: application/json' \
-d "{\"filename\":\"photo.jpg\",\"data\":\"$(base64 -w0 photo.jpg)\"}" \
save5m.com/api/42
curl -OJ save5m.com/api/42
wget -qO- save5m.com/api/42
wget --content-disposition save5m.com/api/42
Valid slot IDs are 11 through 99 (89 slots). Invalid slot IDs return 404.
X-Save5m: 1 header is required on all PUT requests. This prevents browsers from being tricked into saving data via cross-site requests. For CLI usage it's just one extra -H flag.