Skip to navigation

View an image annotation

View as Markdown

Look at one saved annotation to judge whether its mask is right.

Returns a webp of a square of the image around the annotation, with the mask’s painted area tinted orange. Pass show_mask=false to get the same square without the tint, which shows the pixels the mask covers. A small annotation is enlarged to 256 pixels across. The X-Image-View response header describes the view, and its summary says when the annotation is too long to fit in the square. Get annotation ids from get_image_annotations. Returns 400 for an annotation that cannot be shown, such as one whose mask is empty.

Requires an API key with the read scope.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

file_idstringRequired
annotation_idstringRequiredformat: "uuid"

Query parameters

show_maskbooleanOptionalDefaults to true

Response headers

X-Image-ViewstringOptional

A JSON object describing the view. label is the annotation’s label, image_size is the original image’s width and height, region is the square shown in those pixel coordinates, annotation_box is the annotation’s bounding box in the same coordinates, and size is the width and height of the webp.

Response

The view as a webp

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error
502
Bad Gateway Error