Developers

Image upload API

Upload images to your RAGE.WTF image host from any program with an API key, and the full response and error reference.

The upload API is what ShareX uses, and any other tool or script can use it too. Uploads land in your image host, with the same limits as uploading in the browser.

Request#

PartValue
MethodPOST
URLhttps://rage.wtf/api/image-host/upload
Headerx-api-key: rage-your-key (API keys)
Bodymultipart/form-data with the image in the field image (the name file also works)

The old address https://rage.wtf/api/imagehost/upload works the same way.

Response#

Status 200:

{
  "url": "https://rage.wtf/yourname/AbC1234",
  "direct_url": "https://...",
  "thumbnail_url": "https://...",
  "id": "q2V0...",
  "short_id": "AbC1234",
  "duplicate": false
}
FieldMeaning
urlThe share link, with your chosen domain and name.
direct_urlThe image file itself.
thumbnail_urlA small preview (up to 400 pixels, WebP).
idThe image’s internal ID.
short_idThe 7 character code at the end of the share link.
duplicatetrue if you already had exactly this image in the same folder, and its existing link was returned instead of a copy.

What happens to the upload#

  • With the Image Host plan, it goes into the folder chosen under ShareX uploads go to in the Folders tab, unless an automation sends it somewhere else. On the free plan there are no folders.
  • Your expiring uploads setting and upload rules apply.

Limits#

LimitValue
File typesPNG, JPG, GIF, WebP
File size10 MB (requests over 12 MB are refused before upload)
Image size64 megapixels
Storage50 MB free, 10 GB on the Image Host plan
Uploads60 per minute per account
Key1000 requests per hour

Errors#

Errors return JSON with an error message, which ShareX shows as the error:

{ "error": "Files can be up to 10 MB." }
Statuserror
400Send the image as multipart form data (field "image").
400Add the image in the "image" field.
400The file is empty.
401Send your API key in the x-api-key header.
401That API key is invalid, expired or rate limited.
403This account is suspended.
413Files can be up to 10 MB. (also sent straight away, before reading, when the request is over 12 MB)
413That image has too many pixels (64 megapixels at most).
413Your free 50 MB are full. Delete images or upgrade to the Image Host plan.
413Your storage is full. Delete some images to upload more.
415That file isn't a readable image.
415Use a PNG, JPG, GIF or WebP image.
415That image is damaged and can't be read.
429You're doing that too often. Try again in 40 seconds. (the wait varies; the retry-after header gives it in seconds)
500The upload failed on our side. Try again.

Examples#

curl#

curl -X POST https://rage.wtf/api/image-host/upload 
  -H "x-api-key: rage-your-key" 
  -F "[email protected]"

JavaScript (Node.js 20 or newer)#

import { openAsBlob } from 'node:fs';

const form = new FormData();
form.append('image', await openAsBlob('screenshot.png'), 'screenshot.png');

const response = await fetch('https://rage.wtf/api/image-host/upload', {
  method: 'POST',
  headers: { 'x-api-key': process.env.RAGE_API_KEY },
  body: form
});

const data = await response.json();
if (!response.ok) throw new Error(data.error);
console.log(data.url);