v1

latestOpenAPI 3.0.3MITraw.githubusercontent.com2025-02-09165953.5 KB
Analysis

Analyze - AI Vision General

The General mode serves a wide array of applications by providing detailed answers to diverse questions about an image. Users can inquire about any aspect of an image, such as identifying objects, understanding scenes, or interpreting text within the image.

post/analyze/ai_vision_general

Request body

asyncboolean

Whether to perform the analysis asynchronously. If true, the response is returned immediately and analysis is done in the background. Once complete, a webhook notification will be sent to the specified URL and/or to the URLs defined in the Webhook Notifications settings of your Cloudinary Console.

notification_urlstring

The webhook URL to notify when the analysis is complete. Only relevant when async is set to true.

promptsstring[]

One or more prompts of open questions or tasks with an open answer

Example request

{
  "source": {
    "asset_id": "e12345b5c456c8901bbb0efc00c0fcf",
    "uri": "https://res.cloudinary.com/demo/image/upload/sample.jpg"
  },
  "notification_url": "https://path.to/webhook"
}

Response

Analysis succeeded

request_idstring

Example response

{
  "data": {
    "analysis": {
      "responses": [
        {
          "value": "The image contains one cat."
        },
        {
          "value": "The cat is on top of the table."
        }
      ],
      "model_version": 1
    }
  },
  "limits": {
    "items": [
      {
        "type": "ai_vision",
        "used_by_request": 123,
        "remaining": 500,
        "limit": 10000,
        "reset_time": "2024-01-20T12:34:56Z"
      }
    ]
  },
  "request_id": "17c3b70c5096df0e77e838323abb7029"
}