---
title: "Analyze Image"
method: POST
path: "/image:analyze"
---

# Analyze Image

`POST /image:analyze`

A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.

## Query parameters

- `api-version` string, required

## Request body

- AnalyzeImageOptions — The image analysis request.
  - `image` ImageData, required — The image can be either base64 encoded bytes or a blob URL. You can choose only one of these options. If both are provided, the request will be refused. The maximum image size is 2048 x 2048 pixels and should not exceed 4 MB, while the minimum image size is 50 x 50 pixels.
    - `content` string, byte — The Base64 encoding of the image.
    - `blobUrl` string, uri — The blob url of the image.
  - `categories` ImageCategory[] — The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned.
  - `outputType` 'FourSeverityLevels' — This refers to the type of image analysis output. If no value is assigned, the default value will be "FourSeverityLevels".

## Response `200`

The request has succeeded.

- AnalyzeImageResult — The image analysis response.
  - `categoriesAnalysis` ImageCategoriesAnalysis[], required — Analysis result for categories.
    - `category` 'Hate' | 'SelfHarm' | 'Sexual' | 'Violence', required — The harm category supported in Image content analysis.
    - `severity` integer — The value increases with the severity of the input content. The value of this field is determined by the output type specified in the request. The output type could be ‘FourSeverityLevels’, and the output value can be 0, 2, 4, 6.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/cognitiveservices-contentsafety.md) · [All operations](https://skmtc.net/azure/apis/cognitiveservices-contentsafety/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/cognitiveservices-contentsafety/versions/d4969093cba0/schema)
