{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ai-foundry/json-schema/azure-ai-foundry-image-analysis-result-schema.json",
  "title": "ImageAnalysisResult",
  "description": "Represents the outcome of an Image Analysis operation.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-ai-foundry-imageanalysis-analyze-api-openapi.yml#/components/schemas/ImageAnalysisResult",
  "type": "object",
  "properties": {
    "captionResult": {
      "$ref": "#/$defs/CaptionResult",
      "description": "The generated phrase that describes the content of the analyzed image.",
      "x-ms-client-name": "caption"
    },
    "denseCaptionsResult": {
      "$ref": "#/$defs/DenseCaptionsResult",
      "description": "The up to 10 generated phrases, the first describing the content of the whole image,\nand the others describing the content of different regions of the image.",
      "x-ms-client-name": "denseCaptions"
    },
    "metadata": {
      "$ref": "#/$defs/ImageMetadata",
      "description": "Metadata associated with the analyzed image."
    },
    "modelVersion": {
      "type": "string",
      "description": "The cloud AI model used for the analysis"
    },
    "objectsResult": {
      "$ref": "#/$defs/ObjectsResult",
      "description": "A list of detected physical objects in the analyzed image, and their location.",
      "x-ms-client-name": "objects"
    },
    "peopleResult": {
      "$ref": "#/$defs/PeopleResult",
      "description": "A list of detected people in the analyzed image, and their location.",
      "x-ms-client-name": "people"
    },
    "readResult": {
      "$ref": "#/$defs/ReadResult",
      "description": "The extracted printed and hand-written text in the analyze image. Also knows as OCR.",
      "x-ms-client-name": "read"
    },
    "smartCropsResult": {
      "$ref": "#/$defs/SmartCropsResult",
      "description": "A list of crop regions at the desired as aspect ratios (if provided) that can be used as image thumbnails.\nThese regions preserve as much content as possible from the analyzed image, with priority given to detected faces.",
      "x-ms-client-name": "smartCrops"
    },
    "tagsResult": {
      "$ref": "#/$defs/TagsResult",
      "description": "A list of content tags in the analyzed image.",
      "x-ms-client-name": "tags"
    }
  },
  "required": [
    "metadata",
    "modelVersion"
  ],
  "$defs": {
    "CaptionResult": {
      "type": "object",
      "description": "Represents a generated phrase that describes the content of the whole image.",
      "properties": {
        "confidence": {
          "type": "number",
          "format": "float",
          "description": "A score, in the range of 0 to 1 (inclusive), representing the confidence that this description is accurate.\nHigher values indicating higher confidence.",
          "minimum": 0,
          "maximum": 1
        },
        "text": {
          "type": "string",
          "description": "The text of the caption.",
          "minLength": 1
        }
      },
      "required": [
        "confidence",
        "text"
      ]
    },
    "CropRegion": {
      "type": "object",
      "description": "A region at the desired aspect ratio that can be used as image thumbnail.\nThe region preserves as much content as possible from the analyzed image, with priority given to detected faces.",
      "properties": {
        "aspectRatio": {
          "type": "number",
          "format": "float",
          "description": "The aspect ratio of the crop region.\nAspect ratio is calculated by dividing the width of the region in pixels by its height in pixels.\nThe aspect ratio will be in the range 0.75 to 1.8 (inclusive) if provided by the developer during the analyze call.\nOtherwise, it will be in the range 0.5 to 2.0 (inclusive).",
          "minimum": 0
        },
        "boundingBox": {
          "$ref": "#/$defs/ImageBoundingBox",
          "description": "The bounding box of the region."
        }
      },
      "required": [
        "aspectRatio",
        "boundingBox"
      ]
    },
    "DenseCaption": {
      "type": "object",
      "description": "Represents a generated phrase that describes the content of the whole image or a region in the image",
      "properties": {
        "confidence": {
          "type": "number",
          "format": "float",
          "description": "A score, in the range of 0 to 1 (inclusive), representing the confidence that this description is accurate.\nHigher values indicating higher confidence.",
          "minimum": 0,
          "maximum": 1
        },
        "text": {
          "type": "string",
          "description": "The text of the caption.",
          "minLength": 1
        },
        "boundingBox": {
          "$ref": "#/$defs/ImageBoundingBox",
          "description": "The image region of which this caption applies."
        }
      },
      "required": [
        "confidence",
        "text",
        "boundingBox"
      ]
    },
    "DenseCaptionsResult": {
      "type": "object",
      "description": "Represents a list of up to 10 image captions for different regions of the image.\nThe first caption always applies to the whole image.",
      "properties": {
        "values": {
          "type": "array",
          "description": "The list of image captions.",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/DenseCaption"
          }
        }
      },
      "required": [
        "values"
      ]
    },
    "DetectedObject": {
      "type": "object",
      "description": "Represents a physical object detected in an image.",
      "properties": {
        "boundingBox": {
          "$ref": "#/$defs/ImageBoundingBox",
          "description": "A rectangular boundary where the object was detected."
        },
        "tags": {
          "type": "array",
          "description": "A single-item list containing the object information.",
          "minItems": 0,
          "items": {
            "$ref": "#/$defs/DetectedTag"
          }
        }
      },
      "required": [
        "boundingBox",
        "tags"
      ]
    },
    "DetectedPerson": {
      "type": "object",
      "description": "Represents a person detected in an image.",
      "properties": {
        "boundingBox": {
          "$ref": "#/$defs/ImageBoundingBox",
          "description": "A rectangular boundary where the person was detected.",
          "readOnly": true
        },
        "confidence": {
          "type": "number",
          "format": "float",
          "description": "A score, in the range of 0 to 1 (inclusive), representing the confidence that this detection was accurate.\nHigher values indicating higher confidence.",
          "minimum": 0,
          "maximum": 1,
          "readOnly": true
        }
      },
      "required": [
        "boundingBox",
        "confidence"
      ]
    },
    "DetectedTag": {
      "type": "object",
      "description": "A content entity observation in the image. A tag can be a physical object, living being, scenery, or action\nthat appear in the image.",
      "properties": {
        "confidence": {
          "type": "number",
          "format": "float",
          "description": "A score, in the range of 0 to 1 (inclusive), representing the confidence that this entity was observed.\nHigher values indicating higher confidence.",
          "minimum": 0,
          "maximum": 1
        },
        "name": {
          "type": "string",
          "description": "Name of the entity.",
          "minLength": 1
        }
      },
      "required": [
        "confidence",
        "name"
      ]
    },
    "DetectedTextBlock": {
      "type": "object",
      "description": "Represents a single block of detected text in the image.",
      "properties": {
        "lines": {
          "type": "array",
          "description": "A list of text lines in this block.",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/DetectedTextLine"
          }
        }
      },
      "required": [
        "lines"
      ]
    },
    "DetectedTextLine": {
      "type": "object",
      "description": "Represents a single line of text in the image.",
      "properties": {
        "text": {
          "type": "string",
          "description": "Text content of the detected text line.",
          "minLength": 1
        },
        "boundingPolygon": {
          "type": "array",
          "description": "A bounding polygon around the text line. At the moment only quadrilaterals are supported (represented by 4 image points).",
          "minItems": 4,
          "maxItems": 4,
          "items": {
            "$ref": "#/$defs/ImagePoint"
          }
        },
        "words": {
          "type": "array",
          "description": "A list of words in this line.",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/DetectedTextWord"
          }
        }
      },
      "required": [
        "text",
        "boundingPolygon",
        "words"
      ]
    },
    "DetectedTextWord": {
      "type": "object",
      "description": "A word object consisting of a contiguous sequence of characters. For non-space delimited languages,\nsuch as Chinese, Japanese, and Korean, each character is represented as its own word.",
      "properties": {
        "text": {
          "type": "string",
          "description": "Text content of the word.",
          "minLength": 1
        },
        "boundingPolygon": {
          "type": "array",
          "description": "A bounding polygon around the word. At the moment only quadrilaterals are supported (represented by 4 image points).",
          "minItems": 4,
          "maxItems": 4,
          "items": {
            "$ref": "#/$defs/ImagePoint"
          }
        },
        "confidence": {
          "type": "number",
          "format": "float",
          "description": "The level of confidence that the word was detected. Confidence scores span the range of 0.0 to 1.0 (inclusive), with higher values indicating a higher confidence of detection.",
          "minimum": 0,
          "maximum": 1
        }
      },
      "required": [
        "text",
        "boundingPolygon",
        "confidence"
      ]
    },
    "ImageBoundingBox": {
      "type": "object",
      "description": "A basic rectangle specifying a sub-region of the image.",
      "properties": {
        "x": {
          "type": "integer",
          "format": "int32",
          "description": "X-coordinate of the top left point of the area, in pixels.",
          "minimum": 0
        },
        "y": {
          "type": "integer",
          "format": "int32",
          "description": "Y-coordinate of the top left point of the area, in pixels.",
          "minimum": 0
        },
        "w": {
          "type": "integer",
          "format": "int32",
          "description": "Width of the area, in pixels.",
          "minimum": 0,
          "x-ms-client-name": "width"
        },
        "h": {
          "type": "integer",
          "format": "int32",
          "description": "Height of the area, in pixels.",
          "minimum": 0,
          "x-ms-client-name": "height"
        }
      },
      "required": [
        "x",
        "y",
        "w",
        "h"
      ]
    },
    "ImageMetadata": {
      "type": "object",
      "description": "Metadata associated with the analyzed image.",
      "properties": {
        "height": {
          "type": "integer",
          "format": "int32",
          "description": "The height of the image in pixels.",
          "minimum": 1
        },
        "width": {
          "type": "integer",
          "format": "int32",
          "description": "The width of the image in pixels.",
          "minimum": 1
        }
      },
      "required": [
        "height",
        "width"
      ]
    },
    "ImagePoint": {
      "type": "object",
      "description": "Represents the coordinates of a single pixel in the image.",
      "properties": {
        "x": {
          "type": "integer",
          "format": "int32",
          "description": "The horizontal x-coordinate of this point, in pixels. Zero values corresponds to the left-most pixels in the image.",
          "minimum": 0
        },
        "y": {
          "type": "integer",
          "format": "int32",
          "description": "The vertical y-coordinate of this point, in pixels. Zero values corresponds to the top-most pixels in the image.",
          "minimum": 0
        }
      },
      "required": [
        "x",
        "y"
      ]
    },
    "ObjectsResult": {
      "type": "object",
      "description": "Represents a list of physical object detected in an image and their location.",
      "properties": {
        "values": {
          "type": "array",
          "description": "A list of physical object detected in an image and their location.",
          "minItems": 0,
          "items": {
            "$ref": "#/$defs/DetectedObject"
          }
        }
      },
      "required": [
        "values"
      ]
    },
    "PeopleResult": {
      "type": "object",
      "description": "Represents a list of people detected in an image and their location.",
      "properties": {
        "values": {
          "type": "array",
          "description": "A list of people detected in an image and their location.",
          "minItems": 0,
          "items": {
            "$ref": "#/$defs/DetectedPerson"
          }
        }
      },
      "required": [
        "values"
      ]
    },
    "ReadResult": {
      "type": "object",
      "description": "The results of a Read (OCR) operation.",
      "properties": {
        "blocks": {
          "type": "array",
          "description": "A list of text blocks in the image. At the moment only one block is returned, containing all the text detected in the image.",
          "minItems": 1,
          "maxItems": 1,
          "items": {
            "$ref": "#/$defs/DetectedTextBlock"
          }
        }
      },
      "required": [
        "blocks"
      ]
    },
    "SmartCropsResult": {
      "type": "object",
      "description": "Smart cropping result. A list of crop regions at the desired as aspect ratios (if provided) that can be used as image thumbnails.\nThese regions preserve as much content as possible from the analyzed image, with priority given to detected faces.",
      "properties": {
        "values": {
          "type": "array",
          "description": "A list of crop regions.",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/CropRegion"
          }
        }
      },
      "required": [
        "values"
      ]
    },
    "TagsResult": {
      "type": "object",
      "description": "A list of entities observed in the image. Tags can be physical objects, living being, scenery, or actions\nthat appear in the image.",
      "properties": {
        "values": {
          "type": "array",
          "description": "A list of tags.",
          "minItems": 0,
          "items": {
            "$ref": "#/$defs/DetectedTag"
          }
        }
      },
      "required": [
        "values"
      ]
    }
  }
}