The hamster for developers
The HTTP API follows the same rules as the website: no account needed, up to 200 MB per file, images and short videos only (PNG, JPEG, WebP, GIF, AVIF, MP4, WebM, detected from the content).
Upload
Want JSON?
Send Accept: application/json to also get the delete token and the expiry.
Delete
All endpoints
POST /api/uploadUpload: multipart field file, or url to import a link; optional expire (1h, 12h, 72h; omit for forever), style (random or cute), name (display name). Up to 90 MB per requestPUT /api/uploadSame, with the raw file as the body and the options in the query string (?expire=1h&style=cute&name=a.png)POST /api/uploads?size=…Chunked upload for files over 90 MB (up to 200 MB): the body is part 1 (5 to 90 MB); returns an upload session, the part size and the part countPUT /api/uploads/:nUpload part n with the header Sugi-Upload: <session>; returns the part's etagPOST /api/uploads/completeFinish a chunked upload with the session header and JSON {"etags": [...]}; returns the same as /api/upload. DELETE /api/uploads abortsPUT /api/upload/<link>Upload to a one-time link from the MCP tool create_upload: the body is the file (or a multipart "file" field), valid for 10 minutes and only once; returns the same JSON as /api/uploadGET /api/files/:idFile info (link, size, type, expiry)DELETE /api/files/:idDelete a file; needs the header Sugi-Token: <delete_token>POST /api/albumsMake one share link from files=id1,id2 (up to 100) and an optional title; returns the link and a delete tokenGET /api/albums/:idList the files in an albumDELETE /api/albums/:idDelete an album (its files stay); needs Sugi-TokenRate limits: each IP may start 10 uploads per 60 seconds (an upload, a link import and the start of a chunked upload each count once), and separately create 10 albums per 60 seconds. On top of that the firewall allows 5 requests per 10 seconds per IP to /upload, /api/upload and /api/uploads, and blocks for 10 seconds beyond that. Over a limit you get 429; wait a moment and try again.
The original POST /upload keeps working: PNG, JPEG, WebP and GIF only, up to 20 MB, links look like https://sugi.moe/<content hash>.png, the same content always gets the same link, and there is no delete token.
Install
A single bash script that only needs curl; works on macOS, Linux and WSL. It goes to ~/.local/bin/sugi and the installer checks the download's SHA-256.
Everyday commands
The CLI keeps delete tokens in ~/.config/sugi/history.jsonl, so sugi rm can only delete files uploaded from this machine. Files over 90 MB are uploaded in chunks automatically. Add --json for the full responses; a token in SUGI_TOKEN is sent as Authorization: Bearer.
Connect the sugi MCP server and your AI assistant can upload files, fetch links and make albums, then hand you the links. The server lives at https://sugi.moe/mcp (Streamable HTTP). If the AI can run commands, the fastest way to upload local files is the sugi up CLI; without it, create_upload hands out one-time upload links that curl can send files to, dozens of files in one tool call. upload_file (base64, up to 20 MB) is only for small content the AI generated itself.
Connect
Add this to claude_desktop_config.json and restart (mcp-remote bridges the remote server into the desktop app).
Add this to ~/.cursor/mcp.json.
Tools
create_uploadOne-time upload links for local files (up to 50 per call, valid 10 minutes), uploaded with curl -Tupload_fileUpload base64 content (up to 20 MB), for small generated contentupload_urlCopy an image or video from the web to sugicreate_albumBundle files into one share linkget_fileLook up a file's link, size and expirydelete_fileDelete a file with the delete_token from its uploadTry saying
https://sugi.moe/a/w8k2ru5d