swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Image:analyze API schemes: - https tags: - name: Image:analyze paths: /image:analyze: post: operationId: microsoftAzureImageoperationsAnalyzeimage summary: Microsoft Azure Analyze Image description: 'A synchronous API for the analysis of potentially harmful image content. Currently, it supports four categories: Hate, SelfHarm, Sexual, and Violence.' parameters: - $ref: '#/parameters/Azure.Core.Foundations.ApiVersionParameter' - name: body in: body description: The image analysis request. required: true schema: $ref: '#/definitions/AnalyzeImageOptions' responses: '200': description: The request has succeeded. schema: $ref: '#/definitions/AnalyzeImageResult' default: description: An unexpected error response. schema: $ref: '#/definitions/Azure.Core.Foundations.ErrorResponse' headers: x-ms-error-code: type: string description: String error code indicating what went wrong. x-ms-examples: Analyze Image: $ref: ./examples/AnalyzeImage.json tags: - Image:analyze definitions: ImageCategoriesAnalysis: type: object description: Image analysis result. properties: category: $ref: '#/definitions/ImageCategory' description: The image analysis category. severity: type: integer format: int32 description: 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. required: - category AnalyzeImageOptions: type: object description: The image analysis request. properties: image: $ref: '#/definitions/ImageData' description: The image needs to be analyzed. categories: type: array description: The categories will be analyzed. If they are not assigned, a default set of analysis results for the categories will be returned. items: $ref: '#/definitions/ImageCategory' outputType: type: string description: This refers to the type of image analysis output. If no value is assigned, the default value will be "FourSeverityLevels". default: FourSeverityLevels enum: - FourSeverityLevels x-ms-enum: name: AnalyzeImageOutputType modelAsString: true values: - name: FourSeverityLevels value: FourSeverityLevels description: Output severities in four levels, the value could be 0,2,4,6. required: - image Azure.Core.Foundations.ErrorResponse: type: object description: A response containing error details. properties: error: $ref: '#/definitions/Azure.Core.Foundations.Error' description: The error object. required: - error ImageData: type: object description: 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. properties: content: type: string format: byte description: The Base64 encoding of the image. blobUrl: type: string format: uri description: The blob url of the image. AnalyzeImageResult: type: object description: The image analysis response. properties: categoriesAnalysis: type: array description: Analysis result for categories. items: $ref: '#/definitions/ImageCategoriesAnalysis' x-ms-identifiers: [] required: - categoriesAnalysis Azure.Core.Foundations.InnerError: type: object description: An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. properties: code: type: string description: One of a server-defined set of error codes. innererror: $ref: '#/definitions/Azure.Core.Foundations.InnerError' description: Inner error. Azure.Core.Foundations.Error: type: object description: The error object. properties: code: type: string description: One of a server-defined set of error codes. message: type: string description: A human-readable representation of the error. target: type: string description: The target of the error. details: type: array description: An array of details about specific errors that led to this reported error. items: $ref: '#/definitions/Azure.Core.Foundations.Error' x-ms-identifiers: [] innererror: $ref: '#/definitions/Azure.Core.Foundations.InnerError' description: An object containing more specific information than the current object about the error. required: - code - message ImageCategory: type: string description: Image analyze category. enum: - Hate - SelfHarm - Sexual - Violence x-ms-enum: name: ImageCategory modelAsString: true parameters: Azure.Core.Foundations.ApiVersionParameter: name: api-version in: query description: The API version to use for this operation. required: true type: string minLength: 1 x-ms-parameter-location: method x-ms-client-name: apiVersion x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'