Images

Save annotations on an image

Save masks on an image as annotations, one per entry.

Each entry is a binary mask PNG (white-on-transparent, base64-encoded) for a label; labels are created on first use. Saving is additive, so a label can accumulate several masks on the same image. The annotations a segmentation model returns from predict can be passed straight through; each names the file it was predicted for, and one for a different file rejects the request. Leave is_human_vetted false for automated saves: the mask editor flags unvetted masks for review, and only vetted masks feed training. The file must be a processed image. All-or-nothing: one bad entry rejects the whole request.

Requires an API key with the write scope.

post/api/v1/images/{file_id}/annotations

Request

  • Base URL: https://platform.labric.co
  • URL: https://platform.labric.co/api/v1/images/{file_id}/annotations
  • Auth: HTTP bearer

Path parameters

file_idstring required

Request body

Response

OK

idstring uuid required
labelstring required
mask_urlstring nullable
widthinteger nullable
heightinteger nullable
is_human_vettedboolean
foreground_fractionnumber double nullable

Changes

No recorded changes to this operation across all 1 revision of this API.