Skip to content
Dashboard

developers / API reference

Downloads API

The Downloads API: get a ShareX config with a new upload token, with every endpoint's fields, who may call it, its rate limit and a curl example.

This page as Markdown

Get an ishare configuration (`hematite-ishare.iscu`) for images: the file itself, saved rather than shown

get/downloads/configs/ishare/images

Each one holds a new upload token, working for 90 days, that counts toward the upload token limit.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
Not open to apps
An uploader's config, script or key carries a new upload token. Nor to API keys.

Response

data is empty: the status says it worked.

Request
curl 'https://api.hematite.gg/v1/downloads/configs/ishare/images' \
  -H "Authorization: $HEMATITE_TOKEN"

Get a ShareX configuration for images

get/downloads/configs/sharex/images

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
Not open to apps
An uploader's config, script or key carries a new upload token. Nor to API keys.

Response

data is empty: the status says it worked.

Request
curl 'https://api.hematite.gg/v1/downloads/configs/sharex/images' \
  -H "Authorization: $HEMATITE_TOKEN"

Get a new upload token for a phone's uploader, set up by hand: the answer is the only time it's shown

get/downloads/keys/:uploader

It works for 90 days and counts toward the upload token limit; `url` is where it uploads.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
Not open to apps
An uploader's config, script or key carries a new upload token. Nor to API keys.

Path parameters

  • uploaderenumrequired

    One ofshortcuthttp-shortcuts

Response

Returns an object with these fields:

  • tokenstring

    The upload token, hmu_…, shown only now.

  • notestring

    The name it's listed under in Settings → Security.

  • expiresAtstring | null

    When it stops working.

  • urlstring

    Where it uploads: POST /images on this api.

Request
curl 'https://api.hematite.gg/v1/downloads/keys/shortcut' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "token": "hms_live_m0plGGtn67kMZy6D_…",
  "note": "ShareX",
  "expiresAt": "string",
  "url": "https://cdn.hematite.gg/images/a1b2c3d4e5f6.png"
}

Get hematite's upload script for a screenshot tool: the file itself, saved rather than shown

get/downloads/scripts/:uploader

It uploads the image it's given and prints its link. Each one holds a new upload token, working for 90 days, that counts toward the upload token limit.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
Not open to apps
An uploader's config, script or key carries a new upload token. Nor to API keys.

Path parameters

  • uploaderenumrequired

    One offlameshotksnipgreenshot

Query

  • shellenum

    sh for macOS and Linux (hematite-upload.sh), powershell for Windows (hematite-upload.ps1; ksnip's is hematite-upload.cmd, which it can start). Left out, the one the tool runs: sh, or PowerShell for Greenshot.

    One ofshpowershell

Response

data is empty: the status says it worked.

Request
curl 'https://api.hematite.gg/v1/downloads/scripts/flameshot' \
  -H "Authorization: $HEMATITE_TOKEN"