Upload File
Upload an image or video to your haunt.gg ImageHost.
Upload an image or video to your haunt.gg ImageHost. The file is stored in your personal bucket, gets a randomly generated name, and is served from your configured ImageHost CDN. Folder assignment is handled automatically by your folder rules.
/api/imagehost/uploadAuthorizations
X-API-Keyheaderstringrequiredimagehost:upload permission. Treat it like a password.Request Body
The request must be sent as multipart/form-data.
filebodyFilerequiredimage/png, image/jpeg, image/webp, image/gif, image/avif, video/mp4, video/webm, video/quicktime.The destination folder is determined server-side by your configured folder
rules (matched against MIME type, extension, or original filename). There is
no folder parameter — manage routing from the dashboard.
Example Request
curl -X POST https://haunt.gg/api/imagehost/upload \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@./screenshot.png"Response
{
"ok": true,
"url": "https://i.haunt.gg/aB3xK9pQ.png",
"id": "c2f1a4d3-8b6e-4f12-9a5d-2e7c1b8a3f04",
"fileName": "aB3xK9pQ",
"fileExtension": "png",
"fileSize": 18234,
"mime": "image/png"
}Limits
Per-file and total storage limits depend on your plan:
| Plan | Max file size | Total storage |
|---|---|---|
| Free | 75 MB | 1 GB |
| Premium | 150 MB | 10 GB |
| ImageHost | 250 MB | 100 GB |
Files exceeding your plan's per-file limit are rejected with
413 FILE_TOO_LARGE. If your bucket is full, new uploads return
400 QUOTA_EXCEEDED — delete files or upgrade your plan to free up space.