Skip to main content

Generate Media Annotations

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

This endpoint returns AI-generated media annotations (captions and tags) for a given media item. The annotations can subsequently be saved to the original media object with a call to the Update Media Annotations endpoint.

Path Parameters

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

Response

The response of this endpoint is the same type as the response of the Get Media Annotations endpoint, which in turn is the request body of the Update Media Annotations endpoint.

{
"captions": [
{
"text": "a cat sitting on a staircase",
"confidence": 0.8548150062561035,
"boundingBox": {
"h": 4498,
"w": 3374,
"x": 0,
"y": 0
}
},
{
"text": "a cat sitting on a staircase",
"confidence": 0.8551633954048157,
"boundingBox": {
"h": 3294,
"w": 2484,
"x": 465,
"y": 643
}
}
],
"tags": [
{
"name": "sitting",
"confidence": 0.701623797416687
},
{
"name": "cat",
"confidence": 0.988628625869751
},
{
"name": "staircase",
"confidence": 0.978628625869751
}
]
}