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 MarkdownUpload 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.
penumThe platform the upload is coming from: the website, or the uploader whose config, script or Shortcut sent it.
One of
websitesharexishareflameshotksnipgreenshotshortcuthttp-shortcutsvintegerThe version of the platform or the platform configuration.
More than 0
tintegerThe timestamp of the platform configuration.
More than 0
visibilityenumWho sees the image. Left out, the uploader's default visibility (Settings → Upload).
One of
UnlistedPublicPrivatefolderIdnumber | nullThe id of a folder of yours to put the image in.
autoDeleteAtdate-time | nullWhen the image deletes itself: a time in the future. Left out, the uploader's auto-delete setting counts from the upload.
Errors of its own
402Storage limit reachedWith this in its data:
storageUsednumberstorageLimitnumber
409
curl -X POST 'https://api.hematite.gg/v1/images' \
-H "Authorization: $HEMATITE_TOKEN" \
-F "file=@screenshot.png"{
"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
imageIdrequiredThe image's id.
Response
Returns an Image.
curl 'https://api.hematite.gg/v1/images/1' \
-H "Authorization: $HEMATITE_TOKEN"{
"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
imageIdrequiredThe image's id.
Body
Send at least one field.
titlestringAt most 64 characters
descriptionstringAt most 1000 characters
favoritebooleanvisibilityenumOne of
UnlistedPublicPrivatefolderIdnumber | nullThe id of a folder of yours, or null for none.
nsfwbooleanautoDeleteAtdate-time | nullWhen the image deletes itself: a time in the future, or null to keep it.
hideUserbooleanshieldbooleanShield: 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 | nullBurn, 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
secondsPerViewinteger | nullrequiredviewsEachinteger | nullrequiredviewsInAllinteger | nullrequiredthenenum | nullrequiredOne of
BlurPrivateDelete
Response
Returns an Image.
curl -X PATCH 'https://api.hematite.gg/v1/images/1' \
-H "Authorization: $HEMATITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Clutch on Ascent"}'{
"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
imageIdrequiredThe image's id.
Response
data is empty: the status says it worked.
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
imageIdrequiredThe image's id.
Query
shareCodestringrequired
Response
Returns a list of Comments.
curl 'https://api.hematite.gg/v1/images/1/comments?shareCode=x7Kp2QmA'[
{
"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
imageIdrequiredThe image's id.
Body
tokenstringrequiredThe t of the image's delete link (deleteUrl), hmd_…. A link works for 24 hours.
Response
data is empty: the status says it worked.
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
imageIdrequiredThe image's id.
Body
styleobjectrequiredThe 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.
basedOnenumrequiredThe built-in it starts from, whose words the card says where it has none of its own
One of
hematiteminimaldetailedgamerphoto-modequietauthorenumrequiredWho the card names over its title, in Discord through oEmbed: Uploader (the uploader, or a folder's owner) or None. Hiding yourself as an image's uploader, or hiding your page, names nobody whatever the style says
One of
UploaderNonepictureenumrequiredHow the card shows its picture: Large under the words, Small beside them (square), Alone (Discord shows only the picture; elsewhere the large card), None. An image marked NSFW or shielded shows none whatever the style says
One of
LargeSmallAloneNonecropToCardbooleanrequiredWith a large picture: cropped to 1.91 : 1, the shape X, Facebook, LinkedIn and WhatsApp draw, round its busiest part
colourenumrequiredThe colour of Discord's bar, the only platform that shows one: Hematite (the accent's ice steel), Picture (the picture's own, made light enough to read on Discord's grey) or Custom (colourHex)
One of
HematitePictureCustomcolourHexstring | nullrequiredYour own colour: # and six hex digits. Needed with Custom; kept otherwise, so choosing Custom again finds it
showTimebooleanrequiredWhen it was uploaded, under the card in each reader's own time (Discord)
motionbooleanrequiredAn animated GIF or WebP moves in the card; off, it's its first frame
titlestring | nullIts own title, a template (concept 11 §3: {title|"A screenshot"}), at most 300 characters and one line; null or left out says the built-in's. From Silver
descriptionstring | nullIts own description, a template, at most 600 characters, from Silver; "" leaves it out of the card (every plan); null or left out says the built-in's
siteenumThe site line over the title: Hematite, Domain (the domain your links go to, while it works) or Custom (siteText). Anything but Hematite from Silver
One of
HematiteDomainCustomsiteTextstring | nullIts own site name with site Custom, a template, at most 32 characters and one line, saying no service, brand or authority. Kept while another site line is chosen
seenAsenumrequiredAnyone: the image as it is. Nsfw, Shielded, UploaderHidden, Private: as it would be with that on, whatever it is now
One of
AnyoneNsfwShieldedUploaderHiddenPrivate
Response
Returns an object with these fields:
cardEmbed | nullThe card its link would show with the style; null when it would have none (private): the site's name alone
pictureColorstring | nullThe picture's own colour as the bar would take it (Picture); null while the picture has none, or shows none (shielded)
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"}'{
"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
imageIdrequiredThe image's id.
Response
Returns an object with these fields:
titlestringThe image's title; empty when untitled
descriptionstringIts own description; empty when none
filenamestringThe file's name as anyone with the link gets it
codestringIts link's code
widthinteger | nullIn pixels
heightinteger | nullIn pixels
sizeinteger | nullIn bytes
formatstring | nullIts format's name, as PNG
datestringWhen it was uploaded, ISO 8601
expiresstring | nullWhen it deletes itself, ISO 8601; null when it doesn't
viewsintegerlikesintegercommentsintegeruploaderstring | nullYou; null when it hides its uploader
folderstring | nullIts folder's name where anyone may open the folder; null otherwise
domainstring | nullThe domain your links go to; null on hematite's own, or when it hides its uploader
gamestring | nullLater, with game detection; null until then
levelinteger | nullLater, with levels; null until then
curl 'https://api.hematite.gg/v1/images/1/embed-values' \
-H "Authorization: $HEMATITE_TOKEN"{
"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
}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[]requiredIds of your own images. If any isn't one, the whole request is refused.
1 to 100 items, no repeats
titlestringAt most 64 characters
descriptionstringAt most 1000 characters
favoritebooleanvisibilityenumOne of
UnlistedPublicPrivatefolderIdnumber | nullThe id of a folder of yours, or null for none.
nsfwbooleanautoDeleteAtdate-time | nullWhen the image deletes itself: a time in the future, or null to keep it.
hideUserbooleanHide 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.
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"}'[
{
"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[]requiredIds 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.
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[]requiredIds 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 numberA map of image IDs to their new download count
urlstringPresigned URL for the zip (expires shortly).
curl -X POST 'https://api.hematite.gg/v1/images/bulk/download' \
-H "Authorization: $HEMATITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ids":[1]}'{
"images": {
"imagesKey": 0
},
"url": "https://cdn.hematite.gg/images/a1b2c3d4e5f6.png"
}