AI Services

Analyze an image using AI

Changed on

Analyse an Image using AI. This endpoint helps to identify the different objects in the image, classify them and assign them under different aliases. It also analyses the Colour combinations of the different objects, describes the activities and the dominant colours in the image.

post/api/ai/images/v2/image-analysis

Request

Request body multi-part/form-data

imagesstring[]

The images to be sent as input. You can pass a maximum of 10 images.

output_type'json' | 'text'

The type of output to be generated. You can choose between json and text. json will return the text detection results as a JSON object with the scan words marked and positional information. text will return the text detection results as a plain text string with a proper description of the image and what it contains.

questionstring

The question to be answered by the AI or any specific command you would like the Model to take into consideration while analysing the image. This is an optional parameter. If not provided, the AI will only send a description of the image and what it contains.

training_datastring

The training data to be used for the AI. This is an optional parameter. If not provided, the AI will use the default training data. It is only applicable for Image Analysis process with Text as output_type.

stream_databoolean

Whether to stream the data as it is being generated. If set to true, the response will be streamed as the data is being generated. This is useful when you want to generate a lot of content and want to save the data as it is being generated. You need to handle Server Sent Events for this use case.

Response

OK

codeinteger

The HTTP status code.

statusstring

Status indicating the success of the response.

processing_timeinteger

The time taken to process the request, in milliseconds.

processing_idstring

A universally unique identifier for the request. This can be used to track the request in the logs.

processing_countinteger

The number of times the request has been processed.

Changes

    • warning

      removed the request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • warning

      removed the request property