developers / API reference
Folders API
The Folders API: create, edit and delete folders, previews and ZIP downloads, with every endpoint's fields, who may call it, its rate limit and a curl example.
This page as MarkdownCreate a new folder
post/folders
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- folders:write
- What an app's token or an API key needs.
Body
namestringrequired1 to 64 characters
contentType"Image"required
Response
Returns a Folder.
Errors of its own
402Folder limit reachedWith this in its data:
folderCountnumberfolderLimitnumber
curl -X POST 'https://api.hematite.gg/v1/folders' \
-H "Authorization: $HEMATITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Ranked","contentType":"Image"}'{
"id": 1,
"userId": 1,
"createdAt": "2026-11-10T18:24:00.000Z",
"updatedAt": "2026-11-10T18:24:00.000Z",
"contentType": "Image",
"name": "Ranked",
"description": "1v4 on the last round",
"visibility": "Unlisted",
"color": "#c4d4e0",
"previewId": 1,
"downloads": 0,
"privateLockedAt": "2026-11-10T18:24:00.000Z",
"offlineAt": "2026-11-10T18:24:00.000Z",
"preview": {
"key": "images/a1b2c3d4e5f6.png"
},
"shareId": 1,
"shareCode": "x7Kp2QmA",
"contentCount": 1,
"size": 2457600,
"contentCountForOthers": 0,
"sizeForOthers": 0,
"viewCount": 0,
"likeCount": 0,
"commentCount": 0
}Get a single folder by ID
get/folders/:folderId
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- folders:read
- What an app's token or an API key needs.
Path parameters
folderIdrequiredThe folder's id.
Response
Returns a Folder.
curl 'https://api.hematite.gg/v1/folders/1' \
-H "Authorization: $HEMATITE_TOKEN"{
"id": 1,
"userId": 1,
"createdAt": "2026-11-10T18:24:00.000Z",
"updatedAt": "2026-11-10T18:24:00.000Z",
"contentType": "Image",
"name": "Ranked",
"description": "1v4 on the last round",
"visibility": "Unlisted",
"color": "#c4d4e0",
"previewId": 1,
"downloads": 0,
"privateLockedAt": "2026-11-10T18:24:00.000Z",
"offlineAt": "2026-11-10T18:24:00.000Z",
"preview": {
"key": "images/a1b2c3d4e5f6.png"
},
"shareId": 1,
"shareCode": "x7Kp2QmA",
"contentCount": 1,
"size": 2457600,
"contentCountForOthers": 0,
"sizeForOthers": 0,
"viewCount": 0,
"likeCount": 0,
"commentCount": 0
}Edit a folder
patch/folders/:folderId
One a moderation decision made private stays private (`403 FOLDER_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
- folders:write
- What an app's token or an API key needs.
Path parameters
folderIdrequiredThe folder's id.
Body
Send at least one field.
namestring1 to 64 characters
descriptionstringAt most 1000 characters
visibilityenumOne of
PublicUnlistedPrivatecolorstringA colour: # and six hex digits, as in #c4d4e0. Send it so; it's stored and sent back in lowercase. Six digits without the # are still taken for now.
Matches ^#?[0-9a-fA-F]{6}$
Response
Returns a Folder.
curl -X PATCH 'https://api.hematite.gg/v1/folders/1' \
-H "Authorization: $HEMATITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Ranked"}'{
"id": 1,
"userId": 1,
"createdAt": "2026-11-10T18:24:00.000Z",
"updatedAt": "2026-11-10T18:24:00.000Z",
"contentType": "Image",
"name": "Ranked",
"description": "1v4 on the last round",
"visibility": "Unlisted",
"color": "#c4d4e0",
"previewId": 1,
"downloads": 0,
"privateLockedAt": "2026-11-10T18:24:00.000Z",
"offlineAt": "2026-11-10T18:24:00.000Z",
"preview": {
"key": "images/a1b2c3d4e5f6.png"
},
"shareId": 1,
"shareCode": "x7Kp2QmA",
"contentCount": 1,
"size": 2457600,
"contentCountForOthers": 0,
"sizeForOthers": 0,
"viewCount": 0,
"likeCount": 0,
"commentCount": 0
}Delete a folder and its link
delete/folders/:folderId
Its images stay in your gallery, out of any folder, unless `withContent` is true: then they're deleted with it, for good.
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- folders:write
- What an app's token or an API key needs.
Path parameters
folderIdrequiredThe folder's id.
Body
withContentbooleanWhether the folder's images are deleted with it, for good (true), or stay in the gallery, out of any folder (false).
Default
false
Response
data is empty: the status says it worked.
curl -X DELETE 'https://api.hematite.gg/v1/folders/1' \
-H "Authorization: $HEMATITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"withContent":false}'Get comments for a folder
get/folders/:folderId/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
folderIdrequiredThe folder's id.
Query
shareCodestringrequiredThe share code of the folder.
Response
Returns a list of Comments.
curl 'https://api.hematite.gg/v1/folders/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
}
]Get the content of a folder: every image in it for its owner; for anyone else, with the folder's share code, the images in it that are Public or Unlisted and don't hide who uploaded them
get/folders/:folderId/content
Private ones, and those that hide their uploader, show only to the owner.
- Needs
- No token needed
- Anyone may call it.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- folders:read
- What an app's token or an API key needs.
Path parameters
folderIdrequiredThe folder's id.
Query
shareCodestringrequiredThe share code of the folder.
Response
Returns a list of Images.
curl 'https://api.hematite.gg/v1/folders/1/content?shareCode=x7Kp2QmA'[
{
"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"
}
}
]Increment the download count for a folder and return a URL to the folder zip: of every image in it for its owner, as stored, and for anyone else of the images they see in it (Public or Unlisted, not hiding who uploaded them), with the owner's watermark when they have one
post/folders/:folderId/download
- Needs
- No token needed
- Anyone may call it.
- Rate limit
- 2 a minute
- Per address, for this endpoint.
- App scope
- folders:read
- What an app's token or an API key needs.
Path parameters
folderIdrequiredThe folder's id.
Body
shareCodestringrequired
Response
Returns an object with these fields:
downloadsnumberThe new number of downloads for the folder.
urlstringThe presigned URL to the folder zip.
curl -X POST 'https://api.hematite.gg/v1/folders/1/download' \
-H "Content-Type: application/json" \
-d '{"shareCode":"x7Kp2QmA"}'{
"downloads": 0,
"url": "https://cdn.hematite.gg/images/a1b2c3d4e5f6.png"
}Make a folder's cover: a collage of its four newest images anyone with its link may see (Public or Unlisted, not hiding who uploaded them), never one marked NSFW
post/folders/:folderId/preview
A folder with none of those gets no cover, and loses the one it had.
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- folders:write
- What an app's token or an API key needs.
Path parameters
folderIdrequiredThe folder's id.
Response
Returns an object with these fields:
keystring
curl -X POST 'https://api.hematite.gg/v1/folders/1/preview' \
-H "Authorization: $HEMATITE_TOKEN"{
"key": "images/a1b2c3d4e5f6.png"
}Delete a folder preview
delete/folders/:folderId/preview
- Needs
- Session token
- The token from signing in, in the Authorization header.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- folders:write
- What an app's token or an API key needs.
Path parameters
folderIdrequiredThe folder's id.
Response
data is empty: the status says it worked.
curl -X DELETE 'https://api.hematite.gg/v1/folders/1/preview' \
-H "Authorization: $HEMATITE_TOKEN"Get the folder an image is in, with the image's share code
get/folders/by-content
An image that hides who uploaded it is in no folder for anyone but its uploader, as a folder names its owner. The folder's counts are of what the caller sees in it.
- Needs
- No token needed
- Anyone may call it.
- Rate limit
- 120 a minute
- Per address, for this endpoint.
- App scope
- folders:read
- What an app's token or an API key needs.
Query
folderIdnumberrequiredThe ID of the folder that contains the content
contentIdnumberrequiredThe ID of the content that is in the folder
contentShareCodestringrequiredThe share code of the content that is in the folder
Response
Returns a Folder.
curl 'https://api.hematite.gg/v1/folders/by-content?folderId=1&contentId=1&contentShareCode=string'{
"id": 1,
"userId": 1,
"createdAt": "2026-11-10T18:24:00.000Z",
"updatedAt": "2026-11-10T18:24:00.000Z",
"contentType": "Image",
"name": "Ranked",
"description": "1v4 on the last round",
"visibility": "Unlisted",
"color": "#c4d4e0",
"previewId": 1,
"downloads": 0,
"privateLockedAt": "2026-11-10T18:24:00.000Z",
"offlineAt": "2026-11-10T18:24:00.000Z",
"preview": {
"key": "images/a1b2c3d4e5f6.png"
},
"shareId": 1,
"shareCode": "x7Kp2QmA",
"contentCount": 1,
"size": 2457600,
"contentCountForOthers": 0,
"sizeForOthers": 0,
"viewCount": 0,
"likeCount": 0,
"commentCount": 0
}