Image hosting

API reference

Everything an API key can do: upload an image, and delete one.

Basics #

Address https://eruptedhosting.com/api/v1
Authentication Authorization: Bearer YOUR_KEY on every request
Answers JSON

The key on its own (Authorization: YOUR_KEY) is accepted too, for tools that cannot send the word Bearer.

Requests are accepted from any website or game client, so the API can be called from a browser as well as from a server.

Upload an image #

POST /api/v1/images

Send the image in one of two ways.

As a form #

A multipart/form-data form with the image in a file field. The field can have any name.

curl -X POST https://eruptedhosting.com/api/v1/images \
  -H "Authorization: Bearer YOUR_KEY" \
  -F "[email protected]"

As the request body #

The image's bytes as the body. Put its name in an X-Filename header if you want one recorded.

curl -X POST https://eruptedhosting.com/api/v1/images \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "X-Filename: screenshot.png" \
  --data-binary "@screenshot.png"

The answer #

201 Created for a new image, or 200 OK if you had already uploaded this exact file (you get the link it already has).

{
  "url": "https://cdn.eruptedhosting.com/images/8f3c2a91d7e44c2b9f0a1b2c3d4e5f60.png",
  "id": 42,
  "image": {
    "id": 42,
    "name": "screenshot.png",
    "url": "https://cdn.eruptedhosting.com/images/8f3c2a91d7e44c2b9f0a1b2c3d4e5f60.png",
    "type": "image/png",
    "size": 248193,
    "width": 1920,
    "height": 1080,
    "created_at": "2026-10-05 14:02:11"
  }
}
Field Meaning
url The image's permanent public link
id The image's number, used to delete it
image.size Size in bytes
image.width, image.height Dimensions in pixels
image.created_at When it was uploaded (UTC)

Delete an image #

DELETE /api/v1/images/{id}
curl -X DELETE https://eruptedhosting.com/api/v1/images/42 \
  -H "Authorization: Bearer YOUR_KEY"

Answers { "ok": true }. The image's link stops working and its storage is given back.

Errors #

An error answers with a status code and a message:

{ "error": "There is not enough storage left for that image.", "code": "images_quota" }
Status code Meaning
400 Not a PNG, JPEG, WebP or GIF image, a damaged file, or no file in the request
401 bad_api_key The key is missing, mistyped or revoked
403 images_not_enabled The account has no image storage
404 No image with that number belongs to this account
413 images_quota The image would not fit in the storage left
413 The image is over the size limit for one image
429 Too many requests. Wait and try again
507 images_full Image hosting is full for everyone at the moment. Try again later

Limits #

  • 600 uploads an hour for each key.
  • The same file types, size limit and storage limit as uploading from the Portal. See Limits.