{ "swagger": "2.0", "info": { "title": "Computer Vision Client", "description": "The Computer Vision API provides state-of-the-art algorithms to process images and return information. For example, it can be used to extract text using Read OCR, caption an image using descriptive natural language, detect objects, people, and more.", "version": "2023-02-01-preview" }, "paths": { "/imageanalysis:segment": { "post": { "tags": [ "OperationsApi" ], "summary": "Analyze the input image. The request either contains an image stream with any content type ['image/*', 'application/octet-stream'], or a JSON payload which includes a url property to be used to retrieve the image stream. An image stream of content type 'image/png' is returned, where the pixel values depend on the analysis mode. The returned image has the same dimensions as the input image for modes: foregroundMatting. The returned image has the same aspect ratio and same dimensions as the input image up to a limit of 16 megapixels for modes: backgroundRemoval.", "operationId": "ImageAnalysis_Segment", "consumes": [ "application/json" ], "produces": [ "image/png", "application/json" ], "parameters": [ { "in": "query", "name": "mode", "description": "The analysis mode requested. One of: backgroundRemoval, foregroundMatting.", "type": "string", "enum": [ "backgroundRemoval", "foregroundMatting" ], "x-ms-enum": { "name": "SegmentationModeApiModel", "modelAsString": true } }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "A JSON document with a URL pointing to the image that is to be analyzed.", "required": true, "schema": { "$ref": "#/definitions/ImageUrl" } } ], "responses": { "200": { "description": "Success", "schema": { "type": "file" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Segment_BackgroundRemoval_FromImageUrl": { "$ref": "./examples/Segment_BackgroundRemoval_FromImageUrl.json" }, "Segment_ForegroundMatting_FromImageUrl": { "$ref": "./examples/Segment_ForegroundMatting_FromImageUrl.json" } } } }, "/retrieval:vectorizeText": { "post": { "tags": [ "ImageRetrievalApi" ], "summary": "Return vector from a text.", "operationId": "ImageRetrieval_VectorizeText", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "model-version", "description": "Model version.", "type": "string" }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "Request of VectorizeText.", "schema": { "$ref": "#/definitions/VectorizeTextRequestApiModel" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SingleVectorResultApiModel" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "ImageRetrieval_VectorizeText": { "$ref": "./examples/ImageRetrieval_VectorizeText.json" } } } }, "/retrieval:vectorizeImage": { "post": { "tags": [ "ImageRetrievalApi" ], "summary": "Return vector from an image.", "operationId": "ImageRetrieval_VectorizeImage", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "model-version", "description": "Model version.", "type": "string" }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "A JSON document with a URL pointing to the image that is to be analyzed.", "required": true, "schema": { "$ref": "#/definitions/ImageUrl" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SingleVectorResultApiModel" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "ImageRetrieval_VectorizeImage": { "$ref": "./examples/ImageRetrieval_VectorizeImage.json" } } } }, "/imageanalysis:analyze": { "post": { "tags": [ "OperationsApi" ], "summary": "Analyze the input image. The request either contains image stream with any content type ['image/*', 'application/octet-stream'], or a JSON payload which includes an url property to be used to retrieve the image stream.", "operationId": "ImageAnalysis_Analyze", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "features", "description": "The visual features requested: tags, objects, caption, denseCaptions, read, smartCrops, people. This parameter needs to be specified if the parameter \"model-name\" is not specified.", "type": "array", "items": { "enum": [ "tags", "caption", "denseCaptions", "objects", "read", "smartCrops", "people" ], "type": "string", "x-ms-enum": { "name": "VisualFeatureApiModel", "modelAsString": true } }, "collectionFormat": "csv" }, { "in": "query", "name": "model-name", "description": "The name of the custom trained model. This parameter needs to be specified if the parameter \"features\" is not specified.", "type": "string" }, { "in": "query", "name": "language", "description": "The desired language for output generation. If this parameter is not specified, the default value is \"en\". See https://aka.ms/cv-languages for a list of supported languages.", "type": "string", "default": "en" }, { "in": "query", "name": "smartcrops-aspect-ratios", "description": "A list of aspect ratios to use for smartCrops feature. Aspect ratios are calculated by dividing the target crop width by the height. Supported values are between 0.75 and 1.8 (inclusive). Multiple values should be comma-separated. If this parameter is not specified, the service will return one crop suggestion with an aspect ratio it sees fit between 0.5 and 2.0 (inclusive).", "type": "string" }, { "in": "query", "name": "gender-neutral-caption", "description": "Boolean flag for enabling gender-neutral captioning for caption and denseCaptions features. If this parameter is not specified, the default value is \"false\".", "type": "boolean", "default": false }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "A JSON document with a URL pointing to the image that is to be analyzed.", "required": true, "schema": { "$ref": "#/definitions/ImageUrl" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ImageAnalysisResult" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "AnalyzeImage_CustomModel": { "$ref": "./examples/AnalyzeImage_CustomModel.json" } } } }, "/datasets/{name}": { "put": { "tags": [ "DatasetsApi" ], "summary": "Register a new dataset.\r\n \r\nStatus codes returned:\r\n- 201: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 409: A dataset with the specified name already exists.", "operationId": "Datasets_Register", "consumes": [ "application/json-patch+json" ], "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "A name that can be used to uniquely identify the dataset after it has been registered.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "Properties for the dataset, such as the list of URIs to the annotation files.", "required": true, "schema": { "$ref": "#/definitions/Dataset" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/Dataset" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "RegisterDataset_ImageClassification": { "$ref": "./examples/RegisterDataset_ImageClassification.json" } } }, "get": { "tags": [ "DatasetsApi" ], "summary": "Get information about a specific dataset.\r\n \r\nStatus codes returned:\r\n- 200: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 404: A dataset with the specified name was not found.", "operationId": "Datasets_Get", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "The name of the dataset to get.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "$ref": "#/parameters/ApiVersion" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Dataset" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Datasets_Get": { "$ref": "./examples/Datasets_Get.json" } } }, "patch": { "tags": [ "DatasetsApi" ], "summary": "Update the properties of an existing dataset.\r\n \r\nStatus codes returned:\r\n- 200: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 404: A dataset with the specified name was not found.\r\n- 412: An If-Match header was provided, but the given ETag did not match the current ETag value.", "operationId": "Datasets_Update", "consumes": [ "application/json-patch+json" ], "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "The name of the dataset to update.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "in": "header", "name": "If-Match", "description": "Optional ETag for the dataset to update.
\r\nIf an ETag is provided, then the dataset will be updated only if its current ETag value matches the given ETag.\r\nIf the ETag values don't match, then the update operation will fail with status code 412 (Precondition Failed).\r\nThis indicates that the dataset has been updated since the last time information for the dataset was obtained.
\r\nIf an ETag is not provided or its value is '*', then the dataset will always be updated regardless of the current ETag value.", "type": "string" }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "Properties to update on the existing dataset.", "required": true, "schema": { "$ref": "#/definitions/Dataset" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Dataset" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Datasets_Update": { "$ref": "./examples/Datasets_Update.json" } } }, "delete": { "tags": [ "DatasetsApi" ], "summary": "Unregister a dataset.\r\n \r\nStatus codes returned:\r\n- 204: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 404: A dataset with the specified name was not found.\r\n- 412: An If-Match header was provided, but the given ETag did not match the current ETag value.", "operationId": "Datasets_Unregister", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "The name of the dataset to unregister.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "in": "header", "name": "If-Match", "description": "Optional ETag for the dataset to unregister.
\r\nIf an ETag is provided, then the dataset will be unregistered only if its current ETag value matches the given ETag.\r\nIf the ETag values don't match, then the unregister operation will fail with status code 412 (Precondition Failed).\r\nThis indicates that the dataset has been updated since the last time information for the dataset was obtained.
\r\nIf an ETag is not provided or its value is '*', then the dataset will always be unregistered regardless of the current ETag value.", "type": "string" }, { "$ref": "#/parameters/ApiVersion" } ], "responses": { "204": { "description": "No Content" }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Datasets_Unregister": { "$ref": "./examples/Datasets_Unregister.json" } } } }, "/datasets": { "get": { "tags": [ "DatasetsApi" ], "summary": "Get a list of datasets that have been registered.\r\n \r\nStatus codes returned:\r\n- 200: Operation completed successfully.\r\n- 400: The request was malformed.", "operationId": "Datasets_List", "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "skip", "description": "Number of datasets to be skipped.", "type": "integer", "format": "int32", "default": 0, "maximum": 2147483647, "minimum": 0 }, { "in": "query", "name": "top", "description": "Number of datasets to be returned after skipping. The maximum allowed value is 30.", "type": "integer", "format": "int32", "default": 10, "maximum": 30, "minimum": 1 }, { "$ref": "#/parameters/ApiVersion" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/DatasetApiModelCollectionApiModel" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Datasets_List": { "$ref": "./examples/Datasets_List.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/models/{name}": { "put": { "tags": [ "ModelsApi" ], "summary": "Start training a custom model.\r\n \r\nStatus codes returned:\r\n- 201: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 409: A model with the specified name already exists.", "operationId": "Models_Create", "consumes": [ "application/json-patch+json" ], "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "A name that can be used to uniquely identify the model after it has been created.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "Properties for the model, such as the name of the dataset to use to train the model.", "required": true, "schema": { "$ref": "#/definitions/Model" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/Model" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Models_Create": { "$ref": "./examples/Models_Create.json" } } }, "get": { "tags": [ "ModelsApi" ], "summary": "Get information about a specific model.\r\n \r\nStatus codes returned:\r\n- 200: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 404: A model with the specified name was not found.", "operationId": "Models_Get", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "The name of the model to get.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "$ref": "#/parameters/ApiVersion" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/Model" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Models_Get": { "$ref": "./examples/Models_Get.json" } } }, "delete": { "tags": [ "ModelsApi" ], "summary": "Delete a custom model. A model can be deleted if it is in one of the 'Succeeded', 'Failed', or 'Canceled' states.\r\nIf a model is in the 'NotStarted' or 'Training' state, cancel training and wait for cancellation to finish before deleting the model.\r\n \r\nStatus codes returned:\r\n- 204: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 404: A model with the specified name was not found.", "operationId": "Models_Delete", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "The name of the model to delete.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "$ref": "#/parameters/ApiVersion" } ], "responses": { "204": { "description": "No Content" }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Models_Delete": { "$ref": "./examples/Models_Delete.json" } } } }, "/models": { "get": { "tags": [ "ModelsApi" ], "summary": "Get a list of the available models.\r\n \r\nStatus codes returned:\r\n- 200: Operation completed successfully.\r\n- 400: The request was malformed.", "operationId": "Models_List", "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "skip", "description": "Number of models to be skipped.", "type": "integer", "format": "int32", "default": 0, "maximum": 2147483647, "minimum": 0 }, { "in": "query", "name": "top", "description": "Number of models to be returned after skipping. The maximum allowed value is 30.", "type": "integer", "format": "int32", "default": 10, "maximum": 30, "minimum": 1 }, { "$ref": "#/parameters/ApiVersion" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ModelApiModelCollectionApiModel" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Models_List": { "$ref": "./examples/Models_List.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/models/{name}:cancel": { "post": { "tags": [ "ModelsApi" ], "summary": "Cancel model training.\r\n \r\nStatus codes returned:\r\n- 202: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 404: A model with the specified name was not found.", "operationId": "Models_CancelTraining", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "The name of the model to cancel training.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "$ref": "#/parameters/ApiVersion" } ], "responses": { "202": { "description": "Accepted" }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Models_CancelTraining": { "$ref": "./examples/Models_CancelTraining.json" } } } }, "/models/{name}/evaluations/{evaluationName}": { "put": { "tags": [ "ModelsApi" ], "summary": "Evaluate an existing model.\r\n \r\nStatus codes returned:\r\n- 201: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 409: An evaluation with the specified name already exists.", "operationId": "ModelEvaluations_Create", "consumes": [ "application/json-patch+json" ], "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "The name of the model to evaluate.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "in": "path", "name": "evaluationName", "description": "A name that can be used to uniquely identify the evaluation after it has been created.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "Properties for the evaluation, such as the name of the dataset to use to test the model.", "required": true, "schema": { "$ref": "#/definitions/ModelEvaluation" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/ModelEvaluation" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "ModelEvaluations_Create": { "$ref": "./examples/ModelEvaluations_Create.json" } } }, "get": { "tags": [ "ModelsApi" ], "summary": "Get information about a specific model evaluation.\r\n \r\nStatus codes returned:\r\n- 200: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 404: A model evaluation with the specified name was not found.", "operationId": "ModelEvaluations_Get", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "The name of the model to get the evaluation for.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "in": "path", "name": "evaluationName", "description": "The name of the model evaluation to get.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "$ref": "#/parameters/ApiVersion" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ModelEvaluation" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "ModelEvaluations_Get": { "$ref": "./examples/ModelEvaluations_Get.json" } } }, "delete": { "tags": [ "ModelsApi" ], "summary": "Delete a model evaluation. A model evaluation can be deleted if it is in the 'Succeeded' or 'Failed' states.\r\n \r\nStatus codes returned:\r\n- 204: Operation completed successfully.\r\n- 400: The request was malformed.\r\n- 404: A model evaluation with the specified name was not found.", "operationId": "ModelEvaluations_Delete", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "The name of the model to delete the evaluation for.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "in": "path", "name": "evaluationName", "description": "The name of the model evaluation to delete.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "$ref": "#/parameters/ApiVersion" } ], "responses": { "204": { "description": "No Content" }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "ModelEvaluations_Delete": { "$ref": "./examples/ModelEvaluations_Delete.json" } } } }, "/models/{name}/evaluations": { "get": { "tags": [ "ModelsApi" ], "summary": "Get a list of the available evaluations for a model.\r\n \r\nStatus codes returned:\r\n- 200: Operation completed successfully.\r\n- 400: The request was malformed.", "operationId": "ModelEvaluations_List", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "name", "description": "The name of the model to get evaluations for.", "required": true, "type": "string", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" }, { "in": "query", "name": "skip", "description": "Number of evaluations to be skipped.", "type": "integer", "format": "int32", "default": 0, "maximum": 2147483647, "minimum": 0 }, { "in": "query", "name": "top", "description": "Number of evaluations to be returned after skipping. The maximum allowed value is 30.", "type": "integer", "format": "int32", "default": 10, "maximum": 30, "minimum": 1 }, { "$ref": "#/parameters/ApiVersion" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ModelEvaluationApiModelCollectionApiModel" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "ModelEvaluations_List": { "$ref": "./examples/ModelEvaluations_List.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } } }, "definitions": { "BoundingBox": { "description": "A bounding box for an area inside an image.", "required": [ "h", "w", "x", "y" ], "type": "object", "properties": { "x": { "format": "int32", "description": "Left-coordinate of the top left point of the area, in pixels.", "minimum": 0, "type": "integer" }, "y": { "format": "int32", "description": "Top-coordinate of the top left point of the area, in pixels.", "minimum": 0, "type": "integer" }, "w": { "format": "int32", "description": "Width measured from the top-left point of the area, in pixels.", "minimum": 1, "type": "integer" }, "h": { "format": "int32", "description": "Height measured from the top-left point of the area, in pixels.", "minimum": 1, "type": "integer" } } }, "CaptionResult": { "description": "A brief description of what the image depicts.", "required": [ "confidence", "text" ], "type": "object", "properties": { "text": { "description": "The text of the caption.", "minLength": 1, "type": "string" }, "confidence": { "format": "double", "description": "The level of confidence the service has in the caption.", "maximum": 1, "minimum": 0, "type": "number" } } }, "CropRegion": { "description": "A region identified for smart cropping. There will be one region returned for each requested aspect ratio.", "required": [ "aspectRatio", "boundingBox" ], "type": "object", "properties": { "aspectRatio": { "format": "double", "description": "The aspect ratio of the crop region.", "type": "number" }, "boundingBox": { "$ref": "#/definitions/BoundingBox" } } }, "DenseCaption": { "description": "A brief description of what the image depicts.", "required": [ "confidence", "text" ], "type": "object", "properties": { "text": { "description": "The text of the caption.", "minLength": 1, "type": "string" }, "confidence": { "format": "double", "description": "The level of confidence the service has in the caption.", "maximum": 1, "minimum": 0, "type": "number" }, "boundingBox": { "$ref": "#/definitions/BoundingBox" } } }, "DenseCaptionsResult": { "description": "A list of captions.", "required": [ "values" ], "type": "object", "properties": { "values": { "description": "A list of captions.", "type": "array", "items": { "$ref": "#/definitions/DenseCaption" } } } }, "Description": { "description": "A brief description of what the image depicts.", "required": [ "confidence", "text" ], "type": "object", "properties": { "text": { "description": "The text of the caption.", "minLength": 1, "type": "string" }, "confidence": { "format": "double", "description": "The level of confidence the service has in the caption.", "maximum": 1, "minimum": 0, "type": "number" } } }, "DescriptionResult": { "description": "A list of descriptions sorted by confidence level.", "required": [ "values" ], "type": "object", "properties": { "values": { "description": "A list of descriptions sorted by confidence level.", "type": "array", "items": { "$ref": "#/definitions/Description" } } } }, "DetectedObject": { "description": "Describes a detected object in an image.", "required": [ "boundingBox", "tags" ], "type": "object", "properties": { "id": { "description": "Id of the detected object.", "minLength": 1, "type": "string" }, "boundingBox": { "$ref": "#/definitions/BoundingBox" }, "tags": { "description": "Classification confidences of the detected object.", "minItems": 1, "type": "array", "items": { "$ref": "#/definitions/Tag" } } } }, "DetectedPerson": { "description": "A person detected in an image.", "required": [ "boundingBox", "confidence" ], "type": "object", "properties": { "boundingBox": { "$ref": "#/definitions/BoundingBox" }, "confidence": { "format": "double", "description": "Confidence score of having observed the person in the image, as a value ranging from 0 to 1.", "maximum": 1, "minimum": 0, "type": "number" } } }, "DocumentLanguage": { "description": "An object representing the detected language for a given text span.", "required": [ "confidence", "languageCode", "spans" ], "type": "object", "properties": { "spans": { "description": "Location of the text elements in the concatenated content the language applies to.", "type": "array", "items": { "$ref": "#/definitions/DocumentSpan" } }, "languageCode": { "description": "Detected language. Value may an ISO 639-1 language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"zh-Hans\").", "minLength": 1, "type": "string" }, "confidence": { "format": "double", "description": "Confidence of correctly identifying the language.", "maximum": 1, "minimum": 0, "type": "number" } } }, "DocumentLine": { "description": "A content line object consisting of an adjacent sequence of content elements, such as words and selection marks.", "required": [ "boundingBox", "content", "spans" ], "type": "object", "properties": { "content": { "description": "Concatenated content of the contained elements in reading order.", "minLength": 1, "type": "string" }, "boundingBox": { "description": "Bounding box of the line.", "type": "array", "items": { "format": "double", "type": "number" } }, "spans": { "description": "Location of the line in the reading order concatenated content.", "type": "array", "items": { "$ref": "#/definitions/DocumentSpan" } } } }, "DocumentPage": { "description": "The content and layout elements extracted from a page from the input.", "required": [ "angle", "height", "lines", "pageNumber", "spans", "width", "words" ], "type": "object", "properties": { "height": { "format": "double", "description": "The height of the image/PDF in pixels/inches, respectively.", "type": "number" }, "width": { "format": "double", "description": "The width of the image/PDF in pixels/inches, respectively.", "type": "number" }, "angle": { "format": "double", "description": "The general orientation of the content in clockwise direction, measured in degrees between (-180, 180].", "type": "number" }, "pageNumber": { "format": "int32", "description": "1-based page number in the input document.", "type": "integer" }, "words": { "description": "Extracted words from the page.", "type": "array", "items": { "$ref": "#/definitions/DocumentWord" } }, "spans": { "description": "Location of the page in the reading order concatenated content.", "type": "array", "items": { "$ref": "#/definitions/DocumentSpan" } }, "lines": { "description": "Extracted lines from the page, potentially containing both textual and visual elements.", "type": "array", "items": { "$ref": "#/definitions/DocumentLine" } } } }, "DocumentSpan": { "description": "Contiguous region of the concatenated content property, specified as an offset and length.", "required": [ "length", "offset" ], "type": "object", "properties": { "offset": { "format": "int32", "description": "Zero-based index of the content represented by the span.", "type": "integer" }, "length": { "format": "int32", "description": "Number of characters in the content represented by the span.", "type": "integer" } } }, "DocumentStyle": { "description": "An object representing observed text styles.", "required": [ "spans" ], "type": "object", "properties": { "isHandwritten": { "description": "Is content handwritten or not.", "type": "boolean" }, "spans": { "description": "Location of the text elements in the concatenated content the style applies to.", "type": "array", "items": { "$ref": "#/definitions/DocumentSpan" } }, "confidence": { "format": "double", "description": "Confidence of correctly identifying the style.", "type": "number" } } }, "DocumentWord": { "description": "A word object consisting of a contiguous sequence of characters. For non-space delimited languages,\r\nsuch as Chinese, Japanese, and Korean, each character is represented as its own word.", "required": [ "boundingBox", "confidence", "content", "span" ], "type": "object", "properties": { "content": { "description": "Text content of the word.", "minLength": 1, "type": "string" }, "boundingBox": { "description": "Bounding box of the word.", "type": "array", "items": { "format": "double", "type": "number" } }, "confidence": { "format": "double", "description": "Confidence of correctly extracting the word.", "type": "number" }, "span": { "$ref": "#/definitions/DocumentSpan" } } }, "ErrorResponse": { "description": "Response returned when an error occurs.", "required": [ "error" ], "type": "object", "properties": { "error": { "$ref": "#/definitions/ErrorResponseDetails" } } }, "ErrorResponseDetails": { "description": "Error info.", "required": [ "code", "message" ], "type": "object", "properties": { "code": { "description": "Error code.", "type": "string" }, "message": { "description": "Error message.", "type": "string" }, "target": { "description": "Target of the error.", "type": "string" }, "details": { "description": "List of detailed errors.", "type": "array", "items": { "$ref": "#/definitions/ErrorResponseDetails" } }, "innererror": { "$ref": "#/definitions/ErrorResponseInnerError" } } }, "ErrorResponseInnerError": { "description": "Detailed error.", "required": [ "code", "message" ], "type": "object", "properties": { "code": { "description": "Error code.", "type": "string" }, "message": { "description": "Error message.", "type": "string" }, "innererror": { "$ref": "#/definitions/ErrorResponseInnerError" } } }, "ImageAnalysisResult": { "description": "Describe the combined results of different types of image analysis.", "required": [ "metadata", "modelVersion" ], "type": "object", "properties": { "customModelResult": { "$ref": "#/definitions/ImagePredictionResult" }, "captionResult": { "$ref": "#/definitions/CaptionResult" }, "objectsResult": { "$ref": "#/definitions/ObjectsResult" }, "readResult": { "$ref": "#/definitions/ReadResult" }, "denseCaptionsResult": { "$ref": "#/definitions/DenseCaptionsResult" }, "modelVersion": { "description": "Model Version.", "minLength": 1, "type": "string" }, "metadata": { "$ref": "#/definitions/ImageMetadataApiModel" }, "tagsResult": { "$ref": "#/definitions/TagsResult" }, "smartCropsResult": { "$ref": "#/definitions/SmartCropsResult" }, "peopleResult": { "$ref": "#/definitions/PeopleResult" } } }, "ImageMetadataApiModel": { "description": "The image metadata information such as height and width.", "required": [ "height", "width" ], "type": "object", "properties": { "width": { "format": "int32", "description": "The width of the image in pixels.", "minimum": 1, "type": "integer" }, "height": { "format": "int32", "description": "The height of the image in pixels.", "minimum": 1, "type": "integer" } } }, "ImagePredictionResult": { "description": "Describes the prediction result of an image.", "type": "object", "properties": { "tagsResult": { "$ref": "#/definitions/TagsResult" }, "objectsResult": { "$ref": "#/definitions/ObjectsResult" } } }, "ImageUrl": { "description": "A JSON document with a URL pointing to the image that is to be analyzed.", "required": [ "url" ], "type": "object", "properties": { "url": { "description": "Publicly reachable URL of an image.", "type": "string" } } }, "ObjectsResult": { "description": "Describes detected objects in an image.", "required": [ "values" ], "type": "object", "properties": { "values": { "description": "An array of detected objects.", "type": "array", "items": { "$ref": "#/definitions/DetectedObject" } } } }, "PeopleResult": { "description": "An object describing whether the image contains people.", "required": [ "values" ], "type": "object", "properties": { "values": { "description": "An array of detected people.", "type": "array", "items": { "$ref": "#/definitions/DetectedPerson" } } } }, "ReadResult": { "description": "The results of an Read operation.", "required": [ "content", "pages", "stringIndexType" ], "type": "object", "properties": { "stringIndexType": { "description": "The method used to compute string offset and length, possible values include: 'textElements', 'unicodeCodePoint', 'utf16CodeUnit' etc.", "minLength": 1, "type": "string" }, "content": { "description": "Concatenate string representation of all textual and visual elements in reading order.", "minLength": 1, "type": "string" }, "pages": { "description": "A list of analyzed pages.", "type": "array", "items": { "$ref": "#/definitions/DocumentPage" } }, "styles": { "description": "Extracted font styles.", "type": "array", "items": { "$ref": "#/definitions/DocumentStyle" } } } }, "SingleVectorResultApiModel": { "description": "Results of image vectorization.", "type": "object", "properties": { "vector": { "description": "Vector of the image.", "type": "array", "items": { "format": "float", "type": "number" } }, "modelVersion": { "description": "Model version.", "type": "string" } } }, "SmartCropsResult": { "description": "Smart cropping result.", "required": [ "values" ], "type": "object", "properties": { "values": { "description": "Recommended regions for cropping the image.", "type": "array", "items": { "$ref": "#/definitions/CropRegion" } } } }, "Tag": { "description": "An entity observation in the image, along with the confidence score.", "required": [ "confidence", "name" ], "type": "object", "properties": { "name": { "description": "Name of the entity.", "minLength": 1, "type": "string" }, "confidence": { "format": "double", "description": "The level of confidence that the entity was observed.", "maximum": 1, "minimum": 0, "type": "number" } } }, "TagsResult": { "description": "A list of tags with confidence level.", "required": [ "values" ], "type": "object", "properties": { "values": { "description": "A list of tags with confidence level.", "type": "array", "items": { "$ref": "#/definitions/Tag" } } } }, "VectorizeTextRequestApiModel": { "description": "Model for VectorizeText request.", "required": [ "text" ], "type": "object", "properties": { "text": { "description": "Text for vectorization.", "minLength": 1, "type": "string" } } }, "Dataset": { "description": "Describes a dataset, which represents a set of images and annotations that can be used for training or testing a model.", "type": "object", "properties": { "annotationKind": { "description": "The kind of annotations contained in the annotation files.\r\nFor example, \"ImageClassification\" to specify that the annotation file contain object labels for training or testing a multiclass image classification model.", "enum": [ "imageClassification", "imageObjectDetection" ], "type": "string", "x-ms-enum": { "name": "AnnotationKindApiModel", "modelAsString": true } }, "annotationFileUris": { "description": "List of absolute URIs to annotation files, each of which must be stored as a blob in an Azure Storage blob container.\r\nEach file must follow the COCO format for the specified AnnotationKind, with each image path being an absolute URI to a blob in a blob container.\r\nThe Computer Vision resource must have permission to read the annotation files and all referenced image files.\r\nThis can be done by turning on System managed identities for the Computer Vision resource, then assigning the identity to a role that has permission to read from the blob container containing the annotation and image files.", "maxItems": 10, "type": "array", "items": { "format": "uri", "type": "string" } }, "customProperties": { "description": "Dictionary of arbitrary key-value pairs for use by the application. A maximum of 10 key-value pairs are allowed.", "maxLength": 10, "type": "object", "additionalProperties": { "type": "string" } }, "name": { "description": "Read only. The name that is used to uniquely identify the dataset.", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$", "type": "string" }, "createdDateTime": { "format": "date-time", "description": "Read only. The date and time when the dataset was first registered, in UTC.", "type": "string" }, "updatedDateTime": { "format": "date-time", "description": "Read only. The date and time when the dataset was last updated, in UTC.", "type": "string" }, "eTag": { "description": "Read only. The latest ETag for the dataset. May be used with the 'If-Match' header when updating or deleting a dataset.", "type": "string" }, "authentication": { "$ref": "#/definitions/StorageAuthenticationSettingsApiModel" } } }, "DatasetApiModelCollectionApiModel": { "description": "Contains an array of results that may be paginated.", "required": [ "value" ], "type": "object", "properties": { "value": { "description": "The array of results.", "type": "array", "items": { "$ref": "#/definitions/Dataset" } }, "nextLink": { "description": "A link to the next set of paginated results, if there are more results available; not present otherwise.", "type": "string" } } }, "Model": { "description": "Describes a training run for training a custom model.", "required": [ "trainingParameters" ], "type": "object", "properties": { "name": { "description": "Read only. The name that is used to uniquely identify the training run.", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$", "type": "string" }, "createdDateTime": { "format": "date-time", "description": "Read only. The date and time when the training run was first created, in UTC.", "type": "string" }, "updatedDateTime": { "format": "date-time", "description": "Read only. The date and time when the training run was last updated, in UTC.", "type": "string" }, "status": { "description": "Read only. The current state of the training run.", "enum": [ "notStarted", "training", "succeeded", "failed", "cancelling", "cancelled" ], "type": "string", "x-ms-enum": { "name": "ModelStateApiModel", "modelAsString": true } }, "trainingParameters": { "$ref": "#/definitions/TrainingParameters" }, "trainingCostInMinutes": { "format": "int32", "description": "Read only. Actual training cost consumed, in minutes. Present only if the training run as completed.", "type": "integer", "readOnly": true }, "error": { "$ref": "#/definitions/ErrorResponseDetails" }, "modelPerformance": { "$ref": "#/definitions/ModelPerformance" }, "evaluationParameters": { "$ref": "#/definitions/ModelEvaluationParameters" } } }, "ModelApiModelCollectionApiModel": { "description": "Contains an array of results that may be paginated.", "required": [ "value" ], "type": "object", "properties": { "value": { "description": "The array of results.", "type": "array", "items": { "$ref": "#/definitions/Model" } }, "nextLink": { "description": "A link to the next set of paginated results, if there are more results available; not present otherwise.", "type": "string" } } }, "ModelEvaluation": { "description": "Describes an evaluation run for evaluating the accuracy of a model using a test set.", "required": [ "evaluationParameters" ], "type": "object", "properties": { "name": { "description": "Read only. The name that is used to uniquely identify the evaluation run.", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$", "type": "string" }, "modelName": { "description": "Read only. The model to evaluate.", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$", "type": "string" }, "createdDateTime": { "format": "date-time", "description": "Read only. The date and time when the evaluation run was first created, in UTC.", "type": "string" }, "updatedDateTime": { "format": "date-time", "description": "Read only. The date and time when the evaluation run was last updated, in UTC.", "type": "string" }, "status": { "description": "Read only. The current state of the evaluation run.", "enum": [ "notStarted", "running", "succeeded", "failed" ], "type": "string", "x-ms-enum": { "name": "ModelEvaluationStateApiModel", "modelAsString": true } }, "evaluationParameters": { "$ref": "#/definitions/ModelEvaluationParameters" }, "error": { "$ref": "#/definitions/ErrorResponseDetails" }, "modelPerformance": { "$ref": "#/definitions/ModelPerformance" } } }, "ModelEvaluationApiModelCollectionApiModel": { "description": "Contains an array of results that may be paginated.", "required": [ "value" ], "type": "object", "properties": { "value": { "description": "The array of results.", "type": "array", "items": { "$ref": "#/definitions/ModelEvaluation" } }, "nextLink": { "description": "A link to the next set of paginated results, if there are more results available; not present otherwise.", "type": "string" } } }, "ModelEvaluationParameters": { "description": "Parameters for specifying how a model is evaluated.", "type": "object", "properties": { "testDatasetName": { "description": "The dataset name used for testing.", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$", "type": "string" } } }, "ModelPerformance": { "description": "Performance metrics for a custom trained model.", "required": [ "tagPerformance" ], "type": "object", "properties": { "accuracyTop1": { "format": "double", "description": "Read only. For multiclass classification models. The proportion of test samples where the ground truth class matches the predicted class.", "type": "number", "readOnly": true }, "accuracyTop5": { "format": "double", "description": "Read only. For multiclass classification models. The proportion of test samples where the ground truth class is in the top five predicted classes.", "type": "number", "readOnly": true }, "averagePrecision": { "format": "double", "description": "Read only. A measure of the model performance, it summarizes the precision and recall at different confidence thresholds.", "type": "number", "readOnly": true }, "calibrationECE": { "format": "double", "description": "Read only. For multiclass classification models. Expected calibration error.", "type": "number", "readOnly": true }, "meanAveragePrecision30": { "format": "double", "description": "Read only. For object detection models. Mean average precision at a threshold of 30%.", "type": "number", "readOnly": true }, "meanAveragePrecision50": { "format": "double", "description": "Read only. For object detection models. Mean average precision at a threshold of 50%.", "type": "number", "readOnly": true }, "meanAveragePrecision75": { "format": "double", "description": "Read only. For object detection models. Mean average precision at a threshold of 75%.", "type": "number", "readOnly": true }, "tagPerformance": { "description": "Read only. Performance metrics for each tag recognized by the model.", "type": "object", "additionalProperties": { "$ref": "#/definitions/ModelTagPerformance" } } } }, "ModelTagPerformance": { "description": "Performance metrics for each tag recognized by a custom trained model.", "type": "object", "properties": { "accuracy": { "format": "double", "description": "Read only. For multiclass models. Tag accuracy.", "type": "number", "readOnly": true }, "averagePrecision50": { "format": "double", "description": "Read only. For object detection models. Average precision at a threshold of 50%.", "type": "number", "readOnly": true } } }, "StorageAuthenticationSettingsApiModel": { "description": "Describes the storage authentication settings.", "required": [ "kind" ], "type": "object", "properties": { "kind": { "description": "The storage authentication kind.", "enum": [ "none", "managedIdentity", "sas" ], "type": "string", "x-ms-enum": { "name": "StorageAuthenticationKindApiModel", "modelAsString": true } }, "sasToken": { "description": "Optional. The sas token to access container. Only needed when Kind = Sas.", "type": "string" } } }, "TrainingParameters": { "description": "Parameters for specifying how a training run trains a custom model.", "required": [ "timeBudgetInHours", "trainingDatasetName" ], "type": "object", "properties": { "trainingDatasetName": { "description": "The dataset name used for training.", "maxLength": 255, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$", "type": "string" }, "timeBudgetInHours": { "format": "int32", "description": "Time budget for training, in hours. The minimum allowed value is 1, and the maximum allowed value is 288 hours.\r\nThis is the maximum amount of compute time that will be spent to train the model.", "maximum": 288, "minimum": 1, "type": "integer" }, "modelKind": { "description": "Model kind.", "enum": [ "Generic-Classifier", "Generic-Detector" ], "type": "string", "x-ms-enum": { "name": "ModelKindApiModel", "modelAsString": true } } } } }, "parameters": { "ApiVersion": { "in": "query", "name": "api-version", "description": "Requested API version.", "required": true, "type": "string", "x-ms-parameter-location": "client" } }, "x-ms-paths": { "/imageanalysis:segment?overload=stream": { "post": { "tags": [ "OperationsApi" ], "summary": "Analyze the input image. The request either contains an image stream with any content type ['image/*', 'application/octet-stream'], or a JSON payload which includes a url property to be used to retrieve the image stream. An image stream of content type 'image/png' is returned, where the pixel values depend on the analysis mode. The returned image has the same dimensions as the input image for modes: foregroundMatting. The returned image has the same aspect ratio and same dimensions as the input image up to a limit of 16 megapixels for modes: backgroundRemoval.", "operationId": "ImageAnalysis_SegmentFromImageStream", "consumes": [ "application/octet-stream", "image/jpeg", "image/gif", "image/tiff", "image/bmp", "image/png" ], "produces": [ "image/png", "application/json" ], "parameters": [ { "in": "query", "name": "mode", "description": "The analysis mode requested. One of: backgroundRemoval, foregroundMatting.", "type": "string", "enum": [ "backgroundRemoval", "foregroundMatting" ], "x-ms-enum": { "name": "SegmentationModeApiModel", "modelAsString": true } }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "An image stream.", "required": true, "schema": { "format": "byte", "type": "string" } } ], "responses": { "200": { "description": "Success", "schema": { "type": "file" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "Segment_BackgroundRemoval_FromImageStream": { "$ref": "./examples/Segment_BackgroundRemoval_FromImageStream.json" }, "Segment_ForegroundMatting_FromImageStream": { "$ref": "./examples/Segment_ForegroundMatting_FromImageStream.json" } } } }, "/retrieval:vectorizeImage?overload=stream": { "post": { "tags": [ "ImageRetrievalApi" ], "summary": "Return vector from an image.", "operationId": "ImageRetrieval_VectorizeImageFromImageStream", "consumes": [ "application/octet-stream", "image/jpeg", "image/gif", "image/tiff", "image/bmp", "image/png" ], "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "model-version", "description": "Model version.", "type": "string" }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "An image stream.", "required": true, "schema": { "format": "byte", "type": "string" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/SingleVectorResultApiModel" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "ImageRetrieval_VectorizeImageFromImageStream": { "$ref": "./examples/ImageRetrieval_VectorizeImageFromImageStream.json" } } } }, "/imageanalysis:analyze?overload=stream": { "post": { "tags": [ "OperationsApi" ], "summary": "Analyze the input image. The request either contains image stream with any content type ['image/*', 'application/octet-stream'], or a JSON payload which includes an url property to be used to retrieve the image stream.", "operationId": "ImageAnalysis_AnalyzeFromImageStream", "consumes": [ "application/octet-stream", "image/jpeg", "image/gif", "image/tiff", "image/bmp", "image/png" ], "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "features", "description": "The visual features requested: tags, objects, caption, denseCaptions, read, smartCrops, people. This parameter needs to be specified if the parameter \"model-name\" is not specified.", "type": "array", "items": { "enum": [ "tags", "caption", "denseCaptions", "objects", "read", "smartCrops", "people" ], "type": "string", "x-ms-enum": { "name": "VisualFeatureApiModel", "modelAsString": true } }, "collectionFormat": "csv" }, { "in": "query", "name": "model-name", "description": "The name of the custom trained model. This parameter needs to be specified if the parameter \"features\" is not specified.", "type": "string" }, { "in": "query", "name": "language", "description": "The desired language for output generation. If this parameter is not specified, the default value is \"en\". See https://aka.ms/cv-languages for a list of supported languages.", "type": "string", "default": "en" }, { "in": "query", "name": "smartcrops-aspect-ratios", "description": "A list of aspect ratios to use for smartCrops feature. Aspect ratios are calculated by dividing the target crop width by the height. Supported values are between 0.75 and 1.8 (inclusive). Multiple values should be comma-separated. If this parameter is not specified, the service will return one crop suggestion with an aspect ratio it sees fit between 0.5 and 2.0 (inclusive).", "type": "string" }, { "in": "query", "name": "gender-neutral-caption", "description": "Boolean flag for enabling gender-neutral captioning for caption and denseCaptions features. If this parameter is not specified, the default value is \"false\".", "type": "boolean", "default": false }, { "$ref": "#/parameters/ApiVersion" }, { "in": "body", "name": "body", "description": "An image stream.", "required": true, "schema": { "format": "byte", "type": "string" } } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/ImageAnalysisResult" } }, "default": { "description": "Error", "schema": { "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string" } } } }, "x-ms-examples": { "AnalyzeImageFromImageStream_CustomModel": { "$ref": "./examples/AnalyzeImageFromImageStream_CustomModel.json" } } } } } }