ShareX

A ShareX custom uploader that posts text to paste.hep.gg and copies the link.

ShareX can post to Snippets as a custom text uploader. On upload it sends your content to POST /api/paste with your bearer key and copies the returned link to your clipboard.

Uploader config

Create a key first, then add it to the config below. In ShareX, go to Destinations -> Custom uploader settings -> Import -> From clipboard (or save this as a .sxcu file and double-click it).

snippets.sxcu
{
  "Version": "15.0.0",
  "Name": "Hep.gg Snippets",
  "DestinationType": "TextUploader",
  "RequestMethod": "POST",
  "RequestURL": "https://paste.hep.gg/api/paste",
  "Headers": {
    "Authorization": "Bearer hepgg_pst_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "Body": "JSON",
  "Data": "{\"content\":\"{input}\",\"visibility\":\"unlisted\"}",
  "URL": "{json:data.url}"
}

What each field does:

Fields
RequestURL
stringoptional
The create endpoint, https://paste.hep.gg/api/paste.
Headers.Authorization
stringoptional
Your bearer key. Replace the placeholder with your real hepgg_pst_... key.
Body
stringoptional
JSON, so ShareX sends Content-Type: application/json.
Data
stringoptional
The JSON body. {input} is the text being uploaded. Add a language here if your captures are usually one language, for example \"language\":\"json\".
URL
stringoptional
{json:data.url} pulls the shareable link out of the response envelope and copies it to your clipboard.

Set it as the default text uploader

In ShareX: Destinations -> Text uploader -> Hep.gg Snippets. After that, ShareX's text-capture and "Upload text" actions post to Snippets and copy the https://paste.hep.gg/<id> link.

Troubleshooting

SymptomCauseFix
401 Invalid API keyTypo or wrong keyRe-copy the key from the dashboard.
401 API key disabledKey was disabled or the account was suspendedRe-enable or rotate the key in the dashboard.
413 Paste too largeCapture exceeds your plan cap (1 MB Free, 8 MB Prime)Upload less, or upgrade to Prime.
No link copiedURL field wrongConfirm it is exactly {json:data.url}.

For the full request and response shape, see Create a paste.