{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ai-foundry/json-schema/azure-ai-foundry-content-analyzer-operation-status-schema.json",
  "title": "ContentAnalyzerOperationStatus",
  "description": "Provides status details for analyzer creation operations.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-ai-foundry-analyzers-api-openapi.yml#/components/schemas/ContentAnalyzerOperationStatus",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the operation."
    },
    "status": {
      "$ref": "#/$defs/Azure.Core.Foundations.OperationState",
      "description": "The status of the operation"
    },
    "error": {
      "$ref": "#/$defs/Azure.Core.Foundations.Error",
      "description": "Error object that describes the error when status is \"Failed\"."
    },
    "result": {
      "$ref": "#/$defs/ContentAnalyzer",
      "description": "The result of the operation."
    },
    "usage": {
      "$ref": "#/$defs/UsageDetails",
      "description": "Usage details of the analyzer creation operation."
    }
  },
  "required": [
    "id",
    "status"
  ],
  "$defs": {
    "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": "#/$defs/Azure.Core.Foundations.Error"
          }
        },
        "innererror": {
          "$ref": "#/$defs/Azure.Core.Foundations.InnerError",
          "description": "An object containing more specific information than the current object about the error."
        }
      },
      "required": [
        "code",
        "message"
      ]
    },
    "Azure.Core.Foundations.InnerError": {
      "type": "object",
      "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.",
      "properties": {
        "code": {
          "type": "string",
          "description": "One of a server-defined set of error codes."
        },
        "innererror": {
          "$ref": "#/$defs/Azure.Core.Foundations.InnerError",
          "description": "Inner error."
        }
      }
    },
    "Azure.Core.Foundations.OperationState": {
      "type": "string",
      "description": "Enum describing allowed operation states.",
      "enum": [
        "NotStarted",
        "Running",
        "Succeeded",
        "Failed",
        "Canceled"
      ],
      "x-ms-enum": {
        "name": "OperationState",
        "modelAsString": true,
        "values": [
          {
            "name": "NotStarted",
            "value": "NotStarted",
            "description": "The operation has not started."
          },
          {
            "name": "Running",
            "value": "Running",
            "description": "The operation is in progress."
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "The operation has completed successfully."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "The operation has failed."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "The operation has been canceled by the user."
          }
        ]
      }
    },
    "ContentAnalyzer": {
      "type": "object",
      "description": "Analyzer that extracts content and fields from multimodal documents.",
      "properties": {
        "analyzerId": {
          "type": "string",
          "description": "The unique identifier of the analyzer.",
          "minLength": 1,
          "maxLength": 64,
          "pattern": "^[a-zA-Z0-9._-]{1,64}$",
          "readOnly": true
        },
        "description": {
          "type": "string",
          "description": "A description of the analyzer."
        },
        "tags": {
          "type": "object",
          "description": "Tags associated with the analyzer.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "status": {
          "$ref": "#/$defs/ContentAnalyzerStatus",
          "description": "The status of the analyzer.",
          "readOnly": true
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time when the analyzer was created.",
          "readOnly": true
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time when the analyzer was last modified.",
          "readOnly": true
        },
        "warnings": {
          "type": "array",
          "description": "Warnings encountered while creating the analyzer.",
          "items": {
            "$ref": "#/$defs/Azure.Core.Foundations.Error"
          },
          "readOnly": true
        },
        "baseAnalyzerId": {
          "type": "string",
          "description": "The analyzer to incrementally train from.",
          "minLength": 1,
          "maxLength": 64,
          "pattern": "^[a-zA-Z0-9._-]{1,64}$",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "config": {
          "$ref": "#/$defs/ContentAnalyzerConfig",
          "description": "Analyzer configuration settings.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "fieldSchema": {
          "$ref": "#/$defs/ContentFieldSchema",
          "description": "The schema of fields to extracted.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "dynamicFieldSchema": {
          "type": "boolean",
          "description": "Indicates whether the result may contain additional fields outside of the defined schema.",
          "default": false,
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "processingLocation": {
          "type": "string",
          "description": "The location where the data may be processed.  Defaults to global.",
          "default": "global",
          "enum": [
            "geography",
            "dataZone",
            "global"
          ],
          "x-ms-enum": {
            "name": "ProcessingLocation",
            "modelAsString": true,
            "values": [
              {
                "name": "geography",
                "value": "geography",
                "description": "Data may be processed in the same geography as the resource."
              },
              {
                "name": "dataZone",
                "value": "dataZone",
                "description": "Data may be processed in the same data zone as the resource."
              },
              {
                "name": "global",
                "value": "global",
                "description": "Data may be processed in any Azure data center globally."
              }
            ]
          },
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "knowledgeSources": {
          "type": "array",
          "description": "Additional knowledge sources used to enhance the analyzer.",
          "items": {
            "$ref": "#/$defs/KnowledgeSource"
          },
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "models": {
          "type": "object",
          "description": "Mapping of model roles to specific model names.\nEx. { \"completion\": \"gpt-4.1\", \"embedding\": \"text-embedding-3-large\" }.",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "supportedModels": {
          "$ref": "#/$defs/SupportedModels",
          "description": "Chat completion and embedding models supported by the analyzer.",
          "readOnly": true
        }
      },
      "required": [
        "analyzerId",
        "status",
        "createdAt",
        "lastModifiedAt"
      ]
    },
    "ContentAnalyzerConfig": {
      "type": "object",
      "description": "Configuration settings for an analyzer.",
      "properties": {
        "returnDetails": {
          "type": "boolean",
          "description": "Return all content details."
        },
        "locales": {
          "type": "array",
          "description": "List of locale hints for speech transcription.",
          "items": {
            "type": "string"
          }
        },
        "enableOcr": {
          "type": "boolean",
          "description": "Enable optical character recognition (OCR)."
        },
        "enableLayout": {
          "type": "boolean",
          "description": "Enable layout analysis."
        },
        "enableFigureDescription": {
          "type": "boolean",
          "description": "Enable generation of figure description."
        },
        "enableFigureAnalysis": {
          "type": "boolean",
          "description": "Enable analysis of figures, such as charts and diagrams."
        },
        "enableFormula": {
          "type": "boolean",
          "description": "Enable mathematical formula detection."
        },
        "tableFormat": {
          "type": "string",
          "description": "Representation format of tables in analyze result markdown.",
          "default": "html",
          "enum": [
            "html",
            "markdown"
          ],
          "x-ms-enum": {
            "name": "TableFormat",
            "modelAsString": true,
            "values": [
              {
                "name": "html",
                "value": "html",
                "description": "Represent tables using HTML table elements: \\<table>, \\<th>, \\<tr>, \\<td>."
              },
              {
                "name": "markdown",
                "value": "markdown",
                "description": "Represent tables using GitHub Flavored Markdown table syntax, which does not support merged cells or rich headers."
              }
            ]
          }
        },
        "chartFormat": {
          "type": "string",
          "description": "Representation format of charts in analyze result markdown.",
          "default": "chartJs",
          "enum": [
            "chartJs",
            "markdown"
          ],
          "x-ms-enum": {
            "name": "ChartFormat",
            "modelAsString": true,
            "values": [
              {
                "name": "chartJs",
                "value": "chartJs",
                "description": "Represent charts as Chart.js code blocks."
              },
              {
                "name": "markdown",
                "value": "markdown",
                "description": "Represent charts as markdown tables."
              }
            ]
          }
        },
        "annotationFormat": {
          "type": "string",
          "description": "Representation format of annotations in analyze result markdown.",
          "default": "markdown",
          "enum": [
            "none",
            "markdown"
          ],
          "x-ms-enum": {
            "name": "AnnotationFormat",
            "modelAsString": true,
            "values": [
              {
                "name": "none",
                "value": "none",
                "description": "Do not represent annotations."
              },
              {
                "name": "markdown",
                "value": "markdown",
                "description": "Represent basic annotation information using markdown formatting."
              }
            ]
          }
        },
        "disableFaceBlurring": {
          "type": "boolean",
          "description": "Disable the default blurring of faces for privacy while processing the content."
        },
        "estimateFieldSourceAndConfidence": {
          "type": "boolean",
          "description": "Return field grounding source and confidence."
        },
        "contentCategories": {
          "type": "object",
          "description": "Map of categories to classify the input content(s) against.",
          "additionalProperties": {
            "$ref": "#/$defs/ContentCategoryDefinition"
          }
        },
        "enableSegment": {
          "type": "boolean",
          "description": "Enable segmentation of the input by contentCategories."
        },
        "segmentPerPage": {
          "type": "boolean",
          "description": "Force segmentation of document content by page."
        },
        "omitContent": {
          "type": "boolean",
          "description": "Omit the content for this analyzer from analyze result.\nOnly return content(s) from additional analyzers specified in contentCategories, if any."
        }
      }
    },
    "ContentAnalyzerStatus": {
      "type": "string",
      "description": "Status of a resource.",
      "enum": [
        "creating",
        "ready",
        "deleting",
        "failed"
      ],
      "x-ms-enum": {
        "name": "ContentAnalyzerStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "creating",
            "value": "creating",
            "description": "The resource is being created."
          },
          {
            "name": "ready",
            "value": "ready",
            "description": "The resource is ready."
          },
          {
            "name": "deleting",
            "value": "deleting",
            "description": "The resource is being deleted."
          },
          {
            "name": "failed",
            "value": "failed",
            "description": "The resource failed during creation."
          }
        ]
      }
    },
    "ContentCategoryDefinition": {
      "type": "object",
      "description": "Content category definition.",
      "properties": {
        "description": {
          "type": "string",
          "description": "The description of the category."
        },
        "analyzerId": {
          "type": "string",
          "description": "Optional analyzer used to process the content."
        },
        "analyzer": {
          "$ref": "#/$defs/ContentAnalyzer",
          "description": "Optional inline definition of analyzer used to process the content."
        }
      }
    },
    "ContentFieldDefinition": {
      "type": "object",
      "description": "Definition of the field using a JSON Schema like syntax.",
      "properties": {
        "method": {
          "$ref": "#/$defs/GenerationMethod",
          "description": "Generation method."
        },
        "type": {
          "$ref": "#/$defs/ContentFieldType",
          "description": "Semantic data type of the field value."
        },
        "description": {
          "type": "string",
          "description": "Field description."
        },
        "items": {
          "$ref": "#/$defs/ContentFieldDefinition",
          "description": "Field type schema of each array element, if type is array."
        },
        "properties": {
          "type": "object",
          "description": "Named sub-fields, if type is object.",
          "additionalProperties": {
            "$ref": "#/$defs/ContentFieldDefinition"
          }
        },
        "enum": {
          "type": "array",
          "description": "Enumeration of possible field values.",
          "items": {
            "type": "string"
          }
        },
        "enumDescriptions": {
          "type": "object",
          "description": "Descriptions for each enumeration value.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "$ref": {
          "type": "string",
          "description": "Reference to another field definition."
        },
        "estimateSourceAndConfidence": {
          "type": "boolean",
          "description": "Return grounding source and confidence."
        }
      }
    },
    "ContentFieldSchema": {
      "type": "object",
      "description": "Schema of fields to be extracted from documents.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the field schema.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "description": {
          "type": "string",
          "description": "A description of the field schema.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "fields": {
          "type": "object",
          "description": "The fields defined in the schema.",
          "additionalProperties": {
            "$ref": "#/$defs/ContentFieldDefinition"
          },
          "x-ms-mutability": [
            "read",
            "create"
          ]
        },
        "definitions": {
          "type": "object",
          "description": "Additional definitions referenced by the fields in the schema.",
          "additionalProperties": {
            "$ref": "#/$defs/ContentFieldDefinition"
          },
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "fields"
      ]
    },
    "ContentFieldType": {
      "type": "string",
      "description": "Semantic data type of the field value.",
      "enum": [
        "string",
        "date",
        "time",
        "number",
        "integer",
        "boolean",
        "array",
        "object",
        "json"
      ],
      "x-ms-enum": {
        "name": "ContentFieldType",
        "modelAsString": true,
        "values": [
          {
            "name": "string",
            "value": "string",
            "description": "Plain text."
          },
          {
            "name": "date",
            "value": "date",
            "description": "Date, normalized to ISO 8601 (YYYY-MM-DD) format."
          },
          {
            "name": "time",
            "value": "time",
            "description": "Time, normalized to ISO 8601 (hh:mm:ss) format."
          },
          {
            "name": "number",
            "value": "number",
            "description": "Number as double precision floating point."
          },
          {
            "name": "integer",
            "value": "integer",
            "description": "Integer as 64-bit signed integer."
          },
          {
            "name": "boolean",
            "value": "boolean",
            "description": "Boolean value."
          },
          {
            "name": "array",
            "value": "array",
            "description": "List of subfields of the same type."
          },
          {
            "name": "object",
            "value": "object",
            "description": "Named list of subfields."
          },
          {
            "name": "json",
            "value": "json",
            "description": "JSON object."
          }
        ]
      }
    },
    "GenerationMethod": {
      "type": "string",
      "description": "Generation method.",
      "enum": [
        "generate",
        "extract",
        "classify"
      ],
      "x-ms-enum": {
        "name": "GenerationMethod",
        "modelAsString": true,
        "values": [
          {
            "name": "generate",
            "value": "generate",
            "description": "Values are generated freely based on the content."
          },
          {
            "name": "extract",
            "value": "extract",
            "description": "Values are extracted as they appear in the content."
          },
          {
            "name": "classify",
            "value": "classify",
            "description": "Values are classified against a predefined set of categories."
          }
        ]
      }
    },
    "KnowledgeSource": {
      "type": "object",
      "description": "Knowledge source.",
      "properties": {
        "kind": {
          "$ref": "#/$defs/KnowledgeSourceKind",
          "description": "The kind of knowledge source."
        }
      },
      "required": [
        "kind"
      ]
    },
    "KnowledgeSourceKind": {
      "type": "string",
      "description": "Knowledge source kind.",
      "enum": [
        "labeledData"
      ],
      "x-ms-enum": {
        "name": "KnowledgeSourceKind",
        "modelAsString": true,
        "values": [
          {
            "name": "labeledData",
            "value": "labeledData",
            "description": "A labeled data knowledge source."
          }
        ]
      }
    },
    "SupportedModels": {
      "type": "object",
      "description": "Chat completion and embedding models supported by the analyzer.",
      "properties": {
        "completion": {
          "type": "array",
          "description": "Chat completion models supported by the analyzer.",
          "items": {
            "type": "string"
          }
        },
        "embedding": {
          "type": "array",
          "description": "Embedding models supported by the analyzer.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "UsageDetails": {
      "type": "object",
      "description": "Usage details.",
      "properties": {
        "documentPagesMinimal": {
          "type": "integer",
          "format": "int32",
          "description": "The number of document pages processed at the minimal level.\nFor documents without explicit pages (ex. txt, html), every 3000 UTF-16 characters is counted as one page."
        },
        "documentPagesBasic": {
          "type": "integer",
          "format": "int32",
          "description": "The number of document pages processed at the basic level.\nFor documents without explicit pages (ex. txt, html), every 3000 UTF-16 characters is counted as one page."
        },
        "documentPagesStandard": {
          "type": "integer",
          "format": "int32",
          "description": "The number of document pages processed at the standard level.\nFor documents without explicit pages (ex. txt, html), every 3000 UTF-16 characters is counted as one page."
        },
        "audioHours": {
          "type": "number",
          "format": "float",
          "description": "The hours of audio processed."
        },
        "videoHours": {
          "type": "number",
          "format": "float",
          "description": "The hours of video processed."
        },
        "contextualizationTokens": {
          "type": "integer",
          "format": "int32",
          "description": "The number of contextualization tokens consumed for preparing context, generating confidence scores, source grounding, and output formatting."
        },
        "tokens": {
          "type": "object",
          "description": "The number of LLM and embedding tokens consumed, grouped by model (ex. GTP 4.1) and type (ex. input, cached input, output).",
          "additionalProperties": {
            "format": "int32",
            "type": "integer"
          }
        }
      }
    }
  }
}