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.

POST/api/imagehost/upload

Authorizations

X-API-Keyheaderstringrequired
API key from your dashboard with the imagehost:upload permission. Treat it like a password.

Request Body

The request must be sent as multipart/form-data.

filebodyFilerequired
The file to upload. Allowed types: image/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

Request
curl -X POST https://haunt.gg/api/imagehost/upload \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@./screenshot.png"

Response

Response
File uploaded successfully.
{
  "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:

PlanMax file sizeTotal storage
Free75 MB1 GB
Premium150 MB10 GB
ImageHost250 MB100 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.