API

Everything the apps and ShareX do, you can do from your own scripts. Responses are JSON; errors look like {"error": "what went wrong"} with a fitting HTTP status.

Authentication

Send Authorization: Bearer <key>. Create keys in Settings → API keys and give each only the permissions it needs:

Your personal upload token (Settings → Upload token) also works and can do everything, so prefer a limited key for anything you share or run on another machine. API keys never have admin rights.

Base URL: {server}

POST /api/upload
upload

Upload a file as multipart/form-data in a field named file. Optional headers: X-Expires (1h, 1d, 7d, 30d, never) and X-Convert: gif (turns a video into a GIF). Returns url, raw_url, thumbnail_url and deletion_url.

curl -H "Authorization: Bearer $KEY" -F file=@cat.png {server}/api/upload
GET /api/uploads
read

Your uploads, newest first. Query: limit (≤100), offset, q (filename search), kind (all, image, video, other), sort (newest, oldest, views, largest), since (unix time).

curl -H "Authorization: Bearer $KEY" "{server}/api/uploads?limit=10&kind=image"
DELETE /api/uploads/{id}
delete

Delete one of your uploads.

POST /api/uploads/bulk-delete
delete

Delete several uploads: {"ids": ["abc", "def"]}.

GET /api/me
read

Your account: username, storage use, the server’s addresses and which features are on.

GET /api/albums
read

Your albums. GET /api/albums/{id} lists the files in one.

POST /api/links
upload

Shorten a link: {"url": "https://…"}. GET /api/links lists yours, DELETE /api/links/{id} removes one (delete permission).

curl -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"url":"https://example.com"}' {server}/api/links
GET /api/me/profile
bio

Your bio page settings. PUT the same JSON back (changed) to update the page.

Image URL tools

Add parameters to any direct image link (…/abc.png) to get a resized or converted copy. No key needed, results are cached.

Limits

Be gentle: requests are rate limited per IP and per account, and uploads count toward your storage.