Skip to content
Dashboard

developers / API reference

Images API

The Images API: upload, read, edit and delete images, one by one or in bulk, with every endpoint's fields, who may call it, its rate limit and a curl example.

This page as Markdown

Upload an image

post/images

An API key made with a folder or a visibility (`constraints`) puts every upload there, whatever the body says.

Needs
Session or upload token
An upload token (ShareX's) may call this, and nothing else.
Rate limit
60 a minute
Per address, for this endpoint.
App scope
images:write
What an app's token or an API key needs.

Form data

Sent as multipart/form-data: the file as file, PNG, JPEG, WEBP, GIF, at most 16 MB; the fields below beside it.

  • penum

    The platform the upload is coming from: the website, or the uploader whose config, script or Shortcut sent it.

    One ofwebsitesharexishareflameshotksnipgreenshotshortcuthttp-shortcuts

  • vinteger

    The version of the platform or the platform configuration.

    More than 0

  • tinteger

    The timestamp of the platform configuration.

    More than 0

  • visibilityenum

    Who sees the image. Left out, the uploader's default visibility (Settings → Upload).

    One ofUnlistedPublicPrivate

  • folderIdnumber | null

    The id of a folder of yours to put the image in.

  • autoDeleteAtdate-time | null

    When the image deletes itself: a time in the future. Left out, the uploader's auto-delete setting counts from the upload.

Response

Returns an Image, plus these fields:

  • shareUrlstring
  • deleteUrlstring

Errors of its own

  • 402Storage limit reached

    With this in its data:

    • storageUsednumber
    • storageLimitnumber
  • 409

Request
curl -X POST 'https://api.hematite.gg/v1/images' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -F "file=@screenshot.png"
Example data
{
  "id": 1,
  "userId": 1,
  "createdAt": "2026-11-10T18:24:00.000Z",
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "title": "Clutch on Ascent",
  "description": "1v4 on the last round",
  "visibility": "Unlisted",
  "folderId": 1,
  "views": 0,
  "downloads": 0,
  "favorite": false,
  "application": "VALORANT",
  "filename": "a1b2c3d4e5f6.png",
  "size": 2457600,
  "width": 1920,
  "height": 1080,
  "nsfw": false,
  "storageId": 1,
  "autoDeleteAt": null,
  "hideUser": false,
  "shield": false,
  "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
  "privateLockedAt": "2026-11-10T18:24:00.000Z",
  "offlineAt": "2026-11-10T18:24:00.000Z",
  "storage": {
    "key": "images/a1b2c3d4e5f6.png"
  },
  "shareId": 1,
  "shareCode": "x7Kp2QmA",
  "likeCount": 0,
  "commentCount": 0,
  "meta": {
    "id": 1,
    "blurHash": "string",
    "dominantColor": "string",
    "palette": null,
    "hasAlpha": false,
    "animated": false,
    "orientation": 0
  },
  "treatment": "string",
  "burn": {
    "secondsPerView": 0,
    "viewsEach": 0,
    "viewsInAll": 0,
    "then": "Blur",
    "viewsUsed": 0,
    "burnedAt": "string"
  },
  "shareUrl": "https://hematite.gg/s/x7Kp2QmA",
  "deleteUrl": "https://hematite.gg/images/1/delete?t=hmd_live_…"
}

Get a single image by ID

get/images/:imageId

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:read
What an app's token or an API key needs.

Path parameters

  • imageIdrequired

    The image's id.

Response

Returns an Image.

Request
curl 'https://api.hematite.gg/v1/images/1' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "id": 1,
  "userId": 1,
  "createdAt": "2026-11-10T18:24:00.000Z",
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "title": "Clutch on Ascent",
  "description": "1v4 on the last round",
  "visibility": "Unlisted",
  "folderId": 1,
  "views": 0,
  "downloads": 0,
  "favorite": false,
  "application": "VALORANT",
  "filename": "a1b2c3d4e5f6.png",
  "size": 2457600,
  "width": 1920,
  "height": 1080,
  "nsfw": false,
  "storageId": 1,
  "autoDeleteAt": null,
  "hideUser": false,
  "shield": false,
  "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
  "privateLockedAt": "2026-11-10T18:24:00.000Z",
  "offlineAt": "2026-11-10T18:24:00.000Z",
  "storage": {
    "key": "images/a1b2c3d4e5f6.png"
  },
  "shareId": 1,
  "shareCode": "x7Kp2QmA",
  "likeCount": 0,
  "commentCount": 0,
  "meta": {
    "id": 1,
    "blurHash": "string",
    "dominantColor": "string",
    "palette": null,
    "hasAlpha": false,
    "animated": false,
    "orientation": 0
  },
  "treatment": "string",
  "burn": {
    "secondsPerView": 0,
    "viewsEach": 0,
    "viewsInAll": 0,
    "then": "Blur",
    "viewsUsed": 0,
    "burnedAt": "string"
  }
}

Update an image

patch/images/:imageId

One a moderation decision marked NSFW keeps its mark (`403 IMAGE_NSFW_LOCKED`), and one it made private stays private (`403 IMAGE_PRIVATE_LOCKED`).

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:write
What an app's token or an API key needs.

Path parameters

  • imageIdrequired

    The image's id.

Body

Send at least one field.

  • titlestring

    At most 64 characters

  • descriptionstring

    At most 1000 characters

  • favoriteboolean
  • visibilityenum

    One ofUnlistedPublicPrivate

  • folderIdnumber | null

    The id of a folder of yours, or null for none.

  • nsfwboolean
  • autoDeleteAtdate-time | null

    When the image deletes itself: a time in the future, or null to keep it.

  • hideUserboolean
  • shieldboolean

    Shield: anyone but you sees it only through Shield's view (no download or file link, each view marked with who's looking), never as a file. It can't stop a screenshot

  • burnobject | null

    Burn, on a shielded image: the seconds each view shows it, the views each person gets, the views it has in all, and what happens after them (Blur, Private, Delete). null removes it; setting it needs Shield (400 BURN_NEEDS_SHIELD). A change to its limits starts the views in all over; the views each a person has had still count, for 30 days

Response

Returns an Image.

Request
curl -X PATCH 'https://api.hematite.gg/v1/images/1' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"Clutch on Ascent"}'
Example data
{
  "id": 1,
  "userId": 1,
  "createdAt": "2026-11-10T18:24:00.000Z",
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "title": "Clutch on Ascent",
  "description": "1v4 on the last round",
  "visibility": "Unlisted",
  "folderId": 1,
  "views": 0,
  "downloads": 0,
  "favorite": false,
  "application": "VALORANT",
  "filename": "a1b2c3d4e5f6.png",
  "size": 2457600,
  "width": 1920,
  "height": 1080,
  "nsfw": false,
  "storageId": 1,
  "autoDeleteAt": null,
  "hideUser": false,
  "shield": false,
  "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
  "privateLockedAt": "2026-11-10T18:24:00.000Z",
  "offlineAt": "2026-11-10T18:24:00.000Z",
  "storage": {
    "key": "images/a1b2c3d4e5f6.png"
  },
  "shareId": 1,
  "shareCode": "x7Kp2QmA",
  "likeCount": 0,
  "commentCount": 0,
  "meta": {
    "id": 1,
    "blurHash": "string",
    "dominantColor": "string",
    "palette": null,
    "hasAlpha": false,
    "animated": false,
    "orientation": 0
  },
  "treatment": "string",
  "burn": {
    "secondsPerView": 0,
    "viewsEach": 0,
    "viewsInAll": 0,
    "then": "Blur",
    "viewsUsed": 0,
    "burnedAt": "string"
  }
}

Delete an image

delete/images/:imageId

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:write
What an app's token or an API key needs.

Path parameters

  • imageIdrequired

    The image's id.

Response

data is empty: the status says it worked.

Request
curl -X DELETE 'https://api.hematite.gg/v1/images/1' \
  -H "Authorization: $HEMATITE_TOKEN"

Get comments for an image

get/images/:imageId/comments

Needs
No token needed
Anyone may call it.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
comments:read
What an app's token or an API key needs.

Path parameters

  • imageIdrequired

    The image's id.

Query

  • shareCodestringrequired

Response

Returns a list of Comments.

Request
curl 'https://api.hematite.gg/v1/images/1/comments?shareCode=x7Kp2QmA'
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "referenceType": "Image",
    "referenceId": 1,
    "content": "That last round",
    "parentId": null,
    "offlineAt": "2026-11-10T18:24:00.000Z",
    "likeCount": 0
  }
]

Delete an image by token

post/images/:imageId/delete-by-token

Needs
No token needed
Anyone may call it.
Rate limit
2 a minute
Per address, for this endpoint.
App scope
images:write
What an app's token or an API key needs.

Path parameters

  • imageIdrequired

    The image's id.

Body

  • tokenstringrequired

    The t of the image's delete link (deleteUrl), hmd_…. A link works for 24 hours.

Response

data is empty: the status says it worked.

Request
curl -X POST 'https://api.hematite.gg/v1/images/1/delete-by-token' \
  -H "Content-Type: application/json" \
  -d '{"token":"hms_live_m0plGGtn67kMZy6D_…"}'

Preview the card one of your images' links would show with a style you haven't saved (Settings → Embeds), made exactly as the share page's card is, the floor included: as anyone holding the link sees it, or as it would be marked NSFW, shielded, hiding you as its uploader, or private

post/images/:imageId/embed-preview

Nothing is saved.

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
A link preview's style is written in Settings → Embeds, which previews it. Nor to API keys.

Path parameters

  • imageIdrequired

    The image's id.

Body

  • styleobjectrequired

    The style your links' previews follow: a built-in as it is, or with your own choices and (from Silver) your own words and site line. Your choices are kept as a style of your own; the built-in's again, and its own style is what your links follow.

  • seenAsenumrequired

    Anyone: the image as it is. Nsfw, Shielded, UploaderHidden, Private: as it would be with that on, whatever it is now

    One ofAnyoneNsfwShieldedUploaderHiddenPrivate

Response

Returns an object with these fields:

  • cardEmbed | null

    The card its link would show with the style; null when it would have none (private): the site's name alone

  • pictureColorstring | null

    The picture's own colour as the bar would take it (Picture); null while the picture has none, or shows none (shielded)

Request
curl -X POST 'https://api.hematite.gg/v1/images/1/embed-preview' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"style":{"basedOn":"hematite","author":"Uploader","picture":"Large","cropToCard":false,"colour":"Hematite","colourHex":"string","showTime":false,"motion":false,"title":"Clutch on Ascent","description":"1v4 on the last round","site":"Hematite","siteText":"string"},"seenAs":"Anyone"}'
Example data
{
  "card": {
    "title": "Clutch on Ascent",
    "description": "1v4 on the last round",
    "site": {
      "name": "Ranked",
      "url": "https://cdn.hematite.gg/images/a1b2c3d4e5f6.png"
    },
    "author": {
      "name": "Ranked",
      "url": "https://cdn.hematite.gg/images/a1b2c3d4e5f6.png"
    },
    "color": "#c4d4e0",
    "layout": "large",
    "pictures": [
      {
        "url": "https://cdn.hematite.gg/images/a1b2c3d4e5f6.png",
        "width": 1920,
        "height": 1080,
        "alt": "string",
        "type": "image/jpeg",
        "animated": false
      }
    ],
    "publishedAt": "string",
    "indexable": false
  },
  "pictureColor": "string"
}

Get what each of a link preview's variables says for one of your images (Settings → Embeds), as someone signed out who holds its link gets it: the editor renders your own words with them as you type, with the same template package the card is made with

get/images/:imageId/embed-values

Null when private: no card.

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
60 a minute
Per address, for this endpoint.
App scope
Not open to apps
A link preview's style is written in Settings → Embeds, which previews it. Nor to API keys.

Path parameters

  • imageIdrequired

    The image's id.

Response

Returns an object with these fields:

  • titlestring

    The image's title; empty when untitled

  • descriptionstring

    Its own description; empty when none

  • filenamestring

    The file's name as anyone with the link gets it

  • codestring

    Its link's code

  • widthinteger | null

    In pixels

  • heightinteger | null

    In pixels

  • sizeinteger | null

    In bytes

  • formatstring | null

    Its format's name, as PNG

  • datestring

    When it was uploaded, ISO 8601

  • expiresstring | null

    When it deletes itself, ISO 8601; null when it doesn't

  • viewsinteger
  • likesinteger
  • commentsinteger
  • uploaderstring | null

    You; null when it hides its uploader

  • folderstring | null

    Its folder's name where anyone may open the folder; null otherwise

  • domainstring | null

    The domain your links go to; null on hematite's own, or when it hides its uploader

  • gamestring | null

    Later, with game detection; null until then

  • levelinteger | null

    Later, with levels; null until then

Request
curl 'https://api.hematite.gg/v1/images/1/embed-values' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "title": "Clutch on Ascent",
  "description": "1v4 on the last round",
  "filename": "a1b2c3d4e5f6.png",
  "code": "x7Kp2QmA",
  "width": 1920,
  "height": 1080,
  "size": 2457600,
  "format": "string",
  "date": "string",
  "expires": "string",
  "views": 0,
  "likes": 0,
  "comments": 0,
  "uploader": "string",
  "folder": "string",
  "domain": "yourdomain.com",
  "game": "string",
  "level": 0
}

Regenerate share identifiers for an image

post/images/:imageId/regenerate-share-identifiers

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:write
What an app's token or an API key needs.

Path parameters

  • imageIdrequired

    The image's id.

Response

Returns an Image.

Request
curl -X POST 'https://api.hematite.gg/v1/images/1/regenerate-share-identifiers' \
  -H "Authorization: $HEMATITE_TOKEN"
Example data
{
  "id": 1,
  "userId": 1,
  "createdAt": "2026-11-10T18:24:00.000Z",
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "title": "Clutch on Ascent",
  "description": "1v4 on the last round",
  "visibility": "Unlisted",
  "folderId": 1,
  "views": 0,
  "downloads": 0,
  "favorite": false,
  "application": "VALORANT",
  "filename": "a1b2c3d4e5f6.png",
  "size": 2457600,
  "width": 1920,
  "height": 1080,
  "nsfw": false,
  "storageId": 1,
  "autoDeleteAt": null,
  "hideUser": false,
  "shield": false,
  "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
  "privateLockedAt": "2026-11-10T18:24:00.000Z",
  "offlineAt": "2026-11-10T18:24:00.000Z",
  "storage": {
    "key": "images/a1b2c3d4e5f6.png"
  },
  "shareId": 1,
  "shareCode": "x7Kp2QmA",
  "likeCount": 0,
  "commentCount": 0,
  "meta": {
    "id": 1,
    "blurHash": "string",
    "dominantColor": "string",
    "palette": null,
    "hasAlpha": false,
    "animated": false,
    "orientation": 0
  },
  "treatment": "string",
  "burn": {
    "secondsPerView": 0,
    "viewsEach": 0,
    "viewsInAll": 0,
    "then": "Blur",
    "viewsUsed": 0,
    "burnedAt": "string"
  }
}

Update many images

patch/images/bulk

If a moderation decision locked any of them (an NSFW mark, Private) and the change would undo it, nothing changes (`403 IMAGE_NSFW_LOCKED` or `IMAGE_PRIVATE_LOCKED`, the locked ones in `data.ids`).

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:write
What an app's token or an API key needs.

Body

Send at least one field besides ids.

  • idsnumber[]required

    Ids of your own images. If any isn't one, the whole request is refused.

    1 to 100 items, no repeats

  • titlestring

    At most 64 characters

  • descriptionstring

    At most 1000 characters

  • favoriteboolean
  • visibilityenum

    One ofUnlistedPublicPrivate

  • folderIdnumber | null

    The id of a folder of yours, or null for none.

  • nsfwboolean
  • autoDeleteAtdate-time | null

    When the image deletes itself: a time in the future, or null to keep it.

  • hideUserboolean

    Hide you as their uploader: your name and avatar stay off their share pages, and no one else sees them in your folders

Response

Returns a list of Images.

Request
curl -X PATCH 'https://api.hematite.gg/v1/images/bulk' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ids":[1],"title":"Clutch on Ascent"}'
Example data
[
  {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "title": "Clutch on Ascent",
    "description": "1v4 on the last round",
    "visibility": "Unlisted",
    "folderId": 1,
    "views": 0,
    "downloads": 0,
    "favorite": false,
    "application": "VALORANT",
    "filename": "a1b2c3d4e5f6.png",
    "size": 2457600,
    "width": 1920,
    "height": 1080,
    "nsfw": false,
    "storageId": 1,
    "autoDeleteAt": null,
    "hideUser": false,
    "shield": false,
    "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
    "privateLockedAt": "2026-11-10T18:24:00.000Z",
    "offlineAt": "2026-11-10T18:24:00.000Z",
    "storage": {
      "key": "images/a1b2c3d4e5f6.png"
    },
    "shareId": 1,
    "shareCode": "x7Kp2QmA",
    "likeCount": 0,
    "commentCount": 0,
    "meta": {
      "id": 1,
      "blurHash": "string",
      "dominantColor": "string",
      "palette": null,
      "hasAlpha": false,
      "animated": false,
      "orientation": 0
    },
    "treatment": "string",
    "burn": {
      "secondsPerView": 0,
      "viewsEach": 0,
      "viewsInAll": 0,
      "then": "Blur",
      "viewsUsed": 0,
      "burnedAt": "string"
    }
  }
]

Delete many images

delete/images/bulk

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
120 a minute
Per address, for this endpoint.
App scope
images:write
What an app's token or an API key needs.

Body

  • idsnumber[]required

    Ids of your own images. If any isn't one, the whole request is refused.

    1 to 100 items, no repeats

Response

data is empty: the status says it worked.

Request
curl -X DELETE 'https://api.hematite.gg/v1/images/bulk' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ids":[1]}'

Build a zip of the requested images owned by you and return a short-lived URL to download it

post/images/bulk/download

Needs
Session token
The token from signing in, in the Authorization header.
Rate limit
2 a minute
Per address, for this endpoint.
App scope
images:read
What an app's token or an API key needs.

Body

  • idsnumber[]required

    Ids of your own images. If any isn't one, the whole request is refused.

    1 to 100 items, no repeats

Response

Returns an object with these fields:

  • imagesmap of number

    A map of image IDs to their new download count

  • urlstring

    Presigned URL for the zip (expires shortly).

Request
curl -X POST 'https://api.hematite.gg/v1/images/bulk/download' \
  -H "Authorization: $HEMATITE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ids":[1]}'
Example data
{
  "images": {
    "imagesKey": 0
  },
  "url": "https://cdn.hematite.gg/images/a1b2c3d4e5f6.png"
}