Skip to content
Dashboard

Uploaders

ShareX setup: upload with one keypress

How to set up ShareX with hematite: download the config, add it to ShareX, and upload with one keypress. What each part does, and what its errors mean.

This page as Markdown

ShareX is a free screenshot tool for Windows. With hematite's config, a capture goes straight up and its link lands on your clipboard. The same file works in XerahS and SnapX. Without either, upload from the browser or set up another uploader.

Set it up

  1. Download your config. In hematite, open Settings → Uploaders and press Download config beside ShareX. You get sharex-config.sxcu.
  2. Open the file. With ShareX installed, opening a .sxcu file adds it to ShareX as a custom uploader.
  3. Choose it. In ShareX, under Destinations, set Image uploader to Custom image uploader, with hematite's as the one in use.
  4. Take a screenshot. When it's up, the link is on your clipboard.

Warning: The file holds a token: keep it to yourself

Each config you download carries a new upload token, which is shown nowhere else. Anyone with the file can upload to your account. If it gets out, remove the token (below) and download a new config.

What's in the file

The config is plain JSON. These are its parts and what each does:

sharex-config.sxcu
{
  "Version": "19.0.0",
  "Name": "hematite.gg - Images",
  "DestinationType": "ImageUploader",
  "RequestMethod": "POST",
  "RequestURL": "https://api.hematite.gg/v1/images",
  "Headers": {
    "Authorization": "hmu_live_…"
  },
  "Arguments": {
    "p": "sharex",
    "v": "1",
    "t": "1762885440000"
  },
  "Body": "MultipartFormData",
  "FileFormName": "file",
  "URL": "{json:data.shareUrl}",
  "DeletionURL": "{json:data.deleteUrl}",
  "ErrorMessage": "Error: {json:message}"
}
PartWhat it does
RequestURLWhere captures are sent: the API's upload endpoint, POST /images
Headers.AuthorizationYour upload token (hmu_live_…). It can upload and do nothing else
ArgumentsSays the upload comes from ShareX (p), which config it is (v) and when the file was made (t)
FileFormNameThe form field the image is sent in, file
URLThe link ShareX copies: the one your link settings make
DeletionURLA link that deletes the upload, kept in ShareX's history
ErrorMessageWhat ShareX shows when an upload fails: hematite's message

How ShareX uploads come out

  • They take your upload settings: who can see them (Unlisted unless you chose otherwise), when they delete themselves, how they're compressed and whether their file names are random.
  • Their link follows the same settings: share page or file, your domain, your share code's style.
  • They go in no folder. Move them from your images.

ShareX keeps a deletion link for each upload in its history. Opening it asks Delete this image?, and Delete permanently deletes it, no sign-in needed. A deletion link works for 24 hours after the upload; after that it says it expired, and you delete the image from your images.

Your upload tokens

A config's token lasts 90 days. You can have ten upload tokens at a time, counting every uploader's and the ones you made for your own scripts. They're listed beside the uploaders on Settings → Uploaders, and in Settings → Security under Upload tokens, each under the name of the uploader it's for (this one's is ShareX), with when it was made and when it expires. Remove one in either place and the config holding it stops working; the others carry on. With ten, remove one before you download a new config.

XerahS and SnapX

XerahS, the ShareX team's new app for Windows, macOS and Linux, reads the same config. It's before its 1.0, so it's set up by hand:

  1. Import it. In XerahS, open Settings → Destination Settings, press Add Custom Uploader, then Import..., and choose sharex-config.sxcu.
  2. Save it. Press Save to Plugins. Then, in the new uploader's … menu, choose Set as Default.
  3. Upload after a capture. Make sure uploading is among XerahS's tasks after a capture, as in ShareX.

Two things work differently from ShareX:

  • A failed upload goes elsewhere. When hematite refuses an upload, XerahS tries your other uploaders next, by default. If you've set up others, the capture can end up there.
  • The delete link is kept in its history, but there's no menu item to open it. Delete the image from your images instead.

Don't open the config with XerahS directly (double-click, or passing it on the command line): XerahS then uploads the file itself, token and all, to your file uploader.

SnapX, a fork of ShareX, reads the config too: under Settings → Destinations, Custom uploaders, press Import and choose the file (on Windows, opening it does the same). It then uploads with hematite at once, without asking first as ShareX does. SnapX has only test releases so far, and says it isn't ready for use. XerahS's iPhone app, in preview, opens the file from Files; it keeps no delete link.

Other uploaders

For a Mac, ishare has a config of its own. Flameshot, ksnip and Greenshot run hematite's upload script. On a phone, use a Shortcut on the iPhone or HTTP Shortcuts on Android.

When it fails

ShareX shows the error after Error:; API errors and rate limits has the full list.

ShareX saysWhat it meansWhat to do
Authentication is required for this route.The token is missing, expired or removedDownload a new config
Storage limit reachedYour plan's storage is fullDelete something, or see pricing
Request validation failed.The file is over 16 MB, or isn't PNG, JPEG, GIF or WebPCapture as PNG or JPEG, or make it smaller
ForbiddenThe token was used for something other than uploadingUse the config as it came
Too many requests. Please slow down and try again.Uploads past the limit, 60 a minuteWait a moment, then upload again