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:
- upload: upload files and shorten links
- read: list your uploads, albums and links
- delete: delete uploads and links
- bio: read and change your bio page
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}
/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
/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"
/api/uploads/{id}
delete
Delete one of your uploads.
/api/uploads/bulk-delete
delete
Delete several uploads: {"ids": ["abc", "def"]}.
/api/me
read
Your account: username, storage use, the server’s addresses and which features are on.
/api/albums
read
Your albums. GET /api/albums/{id} lists the files in one.
/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
/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.
?w=400/?h=300: fit inside that size (never upscales)?w=200&h=200&fit=cover: fill the box exactly, cropping the edges?fmt=webp(or png, jpg) and?q=80for quality?blur=10: blur (up to 50)
Limits
Be gentle: requests are rate limited per IP and per account, and uploads count toward your storage.