Skip to content

Annotations

Retrieve annotations attached to Media Drive items. An annotation is a shape with a category and derived measurements, produced by an AI App or drawn by a reviewer. Every annotation belongs to an annotation set, identified by its labelGroupId. Endpoints return Annotation, Annotation Set or Annotation Summary Row objects.

Base URL

https://api.unleashlive.com

All endpoints require a Bearer token in the Authorization header. We recommend using a Personal Access Token (PAT). See the Authentication section for how to create one.

Authorization: Bearer <YOUR_PAT>

The team is resolved from the token.


POST /v1/library/annotations

Returns all annotations for the given Media Drive items, with decoded shape geometry. The response is an array of arrays: each inner array corresponds to the item at the same index in libraryItemIds, and is empty when that item has no annotations. Response is not paginated.

ParameterTypeDescription
libraryItemIdsString[]Required. Media Drive item IDs, as returned by the Media Drive API
{
"libraryItemIds": [
"MTc0NTg4NDIwMTAwMCM4N2UyZjllOS03Mjk2LTQ1NDktYThkMy1lMjA0OWUxN2E3MWU",
"MTc0NTg4NDIwMjAwMCMyNWJhYTA3Ny02YTRlLTQyNjQtYjg0Ni04ZjM0ZmJiMmFiYWE"
]
}

GET /v1/library/annotation/{libraryItemId}/{labelGroupId}/{labelId}

Returns a single Annotation with decoded shape geometry. Each path segment must be URL-encoded: a labelGroupId normally contains a #, which otherwise truncates the request at the fragment marker.

ParameterTypeDescription
libraryItemIdStringMedia Drive item ID
labelGroupIdStringAnnotation set ID, as returned on the annotation
labelIdStringAnnotation ID, the id field of the annotation
GET /v1/library/annotation/MTc0NTg4NDIwMTAwMCM4N2UyZjllOS03Mjk2LTQ1NDktYThkMy1lMjA0OWUxN2E3MWU/a3f21c40-9d17-4b8e-b2c1-77e0a94d3f12%231745884213000/7c3f5d81-2b64-4e0a-9f1d-3a8e5c2d7b40
StatusMeaning
404No annotation matches the given libraryItemId / labelGroupId / labelId.

POST /v1/annotation/set/{id}

Returns a paginated list of Annotation Set objects for one AI App or one project. Ordering is not guaranteed.

ParameterTypeDescription
idStringAI App (add-on) ID when type is ai-app, or project ID when type is project
ParameterTypeDescription
typeStringRequired. ai-app or project. Determines how id is resolved
libraryItemIdsString[]Optional scope filter. Applied only when type is ai-app
limitStringMaximum number of sets per page
nextTokenStringPagination token from a previous response

libraryItemIds matches by folder, not by file: a folder ID matches its whole subtree, and a file ID matches every set anchored in that file’s folder.

{
"type": "ai-app",
"libraryItemIds": [
"MTc0NTg4NDIwMDAwMCNiZGQ5NDM2YS0zZmQ0LTQ0YjQtOGZjYS03M2FmNmJlM2EyNDU"
],
"limit": "50"
}
StatusMeaning
422type is missing or not one of ai-app / project.
404A supplied libraryItemIds entry does not exist.

POST /v1/library/annotation/summary

Returns a paginated list of Annotation Summary Row objects: one row per annotation, joined with the Media Drive item it belongs to. Rows do not include shape or bbox.

ParameterTypeDescription
libraryItemIdArrString[]Required. Media Drive item IDs to summarise. Duplicates are ignored
limitIntegerMaximum number of source items per page. Defaults to 500, capped at 1000
nextTokenStringPagination token from a previous response
{
"libraryItemIdArr": [
"MTc0NTg4NDIwMTAwMCM4N2UyZjllOS03Mjk2LTQ1NDktYThkMy1lMjA0OWUxN2E3MWU",
"MTc0NTg4NDIwMjAwMCMyNWJhYTA3Ny02YTRlLTQyNjQtYjg0Ni04ZjM0ZmJiMmFiYWE"
],
"limit": 500
}

limit counts source items, not rows. A response that contains a nextToken string has a further page: pass the token to the next request, together with the same libraryItemIdArr. A response with no nextToken is the last page.


Responses may include additional fields that are not part of the API contract.

Coordinates are source-image pixels with the origin at the top-left corner, rounded to two decimal places. They are not normalised and not geographic. The variant is determined by shapeType.

To draw an overlay, scale each axis by the ratio of the rendered size to the source size. Take the source dimensions from the Media Drive item’s metadata.width and metadata.height:

const scaleX = renderedWidth / item.metadata.width;
const scaleY = renderedHeight / item.metadata.height;
// point: [shape.x * scaleX, shape.y * scaleY]
// rectangle: also scale shape.width by scaleX and shape.height by scaleY
shapeTypeshape fields
POINTx, y, and optional angle in degrees
RECTANGLEx, y (top-left corner), width, height
POLYGONvertices, an ordered array of { x, y }. The ring is closed implicitly
FieldTypeDescription
idStringAnnotation set ID. Appears as labelGroupId on its annotations
nameStringDisplay name of the set
classesObject[]Label classes used by the set, as { id, name }
annotationCountIntegerNumber of annotations in the set
createdAtIntegerUNIX timestamp in ms
updatedAtIntegerUNIX timestamp in ms
FieldTypeDescription
libraryItemIdStringMedia Drive item the annotation belongs to
fileNameStringName of the file
breadcrumbsStringFolder path of the item
tagsStringTags on the Media Drive item
isApprovedBooleanWhether the item has been reviewed and approved
addonIdStringAI App that produced the annotation. Empty string for hand-drawn annotations
labelGroupIdStringAnnotation set ID
annotationObjectid, name (the category), color, isAI, and any of severity, comment, area, distance, width, height, frameId, frameTimestamp that are set

Returned for every non-2xx response.

FieldTypeDescription
messageStringHuman-readable error message
nameStringError class name, for example ItemNotFoundException (404) or MissingParamsError (422)