POST
/
api
/
ai
/
images
/
v2
/
image-analysis
Authorization
Body
curl --request POST \
  --url https://api.worqhat.com/api/ai/images/v2/image-analysis \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: multi-part/form-data' \
  --data '{
  "image": "/path/to/image.jpg"
}'
{
  "code": 200,
  "data": {
    "analysed_data": [
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ]
    ],
    "background": {
      "dominant_colors": [
        "Array"
      ],
      "quality": [
        "Object"
      ]
    },
    "foreground": {
      "dominant_colors": [
        "Array"
      ],
      "quality": [
        "Object"
      ]
    },
    "primary_colours": [
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ],
      [
        "Object"
      ]
    ],
    "quality": {
      "brightness": 74.43968200683594,
      "contrast": 85.29368591308594,
      "sharpness": 44.84498977661133
    }
  },
  "processing_count": 1,
  "processing_id": "9a7cc5d3-735a-4299-8d84-1fbaab309ba4",
  "processing_time": 3193,
  "status": "success"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multi-part/form-data
image
string

The image to be sent as input.

output_type
enum<string>

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.

Available options:
json,
text
question
string

The question to be answered by the AI. This is an optional parameter. If not provided, the AI will only send a description of the image and what it contains.

Response

200 - application/json
code
integer

The HTTP status code.

data
object

The response data.

processing_count
integer

The number of times the request has been processed.

processing_id
string

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

processing_time
integer

The time taken to process the request, in milliseconds.

status
string

Status indicating the success of the response.