Skip to main content

Update Media Annotations

POSThttps://api.perceptpixel.com/v1/media/:uid/annotations

Updates the annotations of a media item.

Path Parameters

  • :uid - The unique identifier of the media item.

Request Body

The request body is the same format as the response of the Get Media Annotations API, with the fields being optional.

  • captions - An array of Caption objects.
  • tags - An array of Tag objects.

If either captions or tags are not provided, the existing captions or tags will be retained. To remove captions, or tags, specify an empty array for the respective field.

The type definitions for Caption and Tag are defined in the Media Upload API.

{
"captions": [
{
"text": "A cat perched on a staircase",
"confidence": 1.0
}
],
"tags": [
{
"name": "cat",
"confidence": 1.0
},
{
"name": "stairs",
"confidence": 1.0
},
{
"name": "sitting",
"confidence": 0.7
}
]
}

Response

The response will be same as the Get Media Annotations API, with the updated values of the request.