openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 30.2 kB
JSON
{"openapi":"3.0.0","info":{"description":"Extracts information from forms and images into structured data.","title":"Form Recognizer Client","version":"2.0-preview","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/FormRecognizer.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"cognitiveservices-FormRecognizer","x-tags":["Azure","Microsoft"]},"security":[{"apim_key":[]}],"paths":{"/custom/models":{"get":{"description":"Get information about all custom models","operationId":"GetCustomModels","parameters":[{"description":"Specify whether to return summary or full list of models.","in":"query","name":"op","required":false,"schema":{"type":"string","enum":["full","summary"],"default":"full"},"examples":{"List custom models":{"value":"full"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models"},"examples":{"List custom models":{"$ref":"#/components/examples/List_custom_models"}}}}},"default":{"description":"Response entity accompanying non-successful responses containing additional details about the error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"List Custom Models","x-ms-pageable":{"itemName":"modelList","nextLinkName":"nextLink"}},"post":{"description":"Create and train a custom model. The request must include a source parameter that is either an externally accessible Azure storage blob container Uri (preferably a Shared Access Signature Uri) or valid path to a data folder in a locally mounted drive. When local paths are specified, they must follow the Linux/Unix path format and be an absolute path rooted to the input mount configuration setting value e.g., if '{Mounts:Input}' configuration setting value is '/input' then a valid source path would be '/input/contosodataset'. All data to be trained is expected to be under the source folder or sub folders under it. Models are trained using documents that are of the following content type - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff'. Other type of content is ignored.","operationId":"TrainCustomModelAsync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainRequest"}}},"description":"Training request parameters.","required":true},"responses":{"201":{"description":"Request is queued successfully.","headers":{"Location":{"description":"Location and ID of the model being trained. The status of model training is specified in the status property at the model location.","schema":{"type":"string"},"example":"{endpoint}/formrecognizer/v2.0-preview/custom/models/{modelId}"}}},"default":{"description":"Response entity accompanying non-successful responses containing additional details about the error.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Train Custom Model"}},"/custom/models/{modelId}":{"delete":{"description":"Mark model for deletion. Model artifacts will be permanently removed within a predetermined period.","operationId":"DeleteCustomModel","parameters":[{"description":"Model identifier.","in":"path","name":"modelId","required":true,"schema":{"type":"string","format":"uuid"},"examples":{"Delete custom model":{"value":"{Model Id}"}}}],"responses":{"204":{"description":"Successfully marked model for deletion. Model artifacts will be removed within a predefined time period."},"default":{"description":"Response entity accompanying non-successful responses containing additional details about the error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Delete Custom Model"},"get":{"description":"Get detailed information about a custom model.","operationId":"GetCustomModel","parameters":[{"description":"Model identifier.","in":"path","name":"modelId","required":true,"schema":{"type":"string","format":"uuid"},"examples":{"Get custom model":{"value":"{Model Id}"}}},{"description":"Include list of extracted keys in model information.","in":"query","name":"includeKeys","required":false,"x-nullable":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"},"examples":{"Get custom model":{"$ref":"#/components/examples/Get_custom_model"}}}}},"default":{"description":"Response entity accompanying non-successful responses containing additional details about the error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Custom Model"}},"/custom/models/{modelId}/analyze":{"post":{"description":"Extract key-value pairs, tables, and semantic values from a given document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png' or 'image/tiff'. Alternatively, use 'application/json' type to specify the location (Uri or local path) of the document to be analyzed.","operationId":"AnalyzeWithCustomModel","parameters":[{"description":"Model identifier.","in":"path","name":"modelId","required":true,"schema":{"type":"string","format":"uuid"},"examples":{"Analyze form with custom model":{"value":"{Model Id}"}}},{"description":"Include text lines and element references in the result.","in":"query","name":"includeTextDetails","required":false,"x-nullable":false,"schema":{"type":"boolean","default":false}}],"requestBody":{"$ref":"#/components/requestBodies/SourceDataStream"},"responses":{"202":{"description":"Request is queued successfully.","headers":{"Operation-Location":{"description":"URL containing the resultId used to track the progress and obtain the result of the analyze operation.","schema":{"type":"string"},"example":"{endpoint}/formrecognizer/v2.0-preview/custom/models/{modelId}/analyzeResults/{resultId}"}}},"default":{"description":"Response entity accompanying non-successful responses containing additional details about the error.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Analyze Form"}},"/custom/models/{modelId}/analyzeResults/{resultId}":{"get":{"description":"Obtain current status and the result of the analyze form operation.","operationId":"GetAnalyzeFormResult","parameters":[{"description":"Model identifier.","in":"path","name":"modelId","required":true,"schema":{"type":"string","format":"uuid"},"examples":{"Get analyze form result":{"value":"{model Id}"}}},{"description":"Analyze operation result identifier.","in":"path","name":"resultId","required":true,"schema":{"type":"string","format":"uuid"},"examples":{"Get analyze form result":{"value":"{result Id}"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeOperationResult"},"examples":{"Get analyze form result":{"$ref":"#/components/examples/Get_analyze_form_result"}}}}},"default":{"description":"Response entity accompanying non-successful responses containing additional details about the error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Analyze Form Result"}},"/layout/analyze":{"post":{"description":"Extract text and layout information from a given document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png' or 'image/tiff'. Alternatively, use 'application/json' type to specify the location (Uri or local path) of the document to be analyzed.","operationId":"AnalyzeLayoutAsync","requestBody":{"$ref":"#/components/requestBodies/SourceDataStream"},"responses":{"202":{"description":"Request is queued successfully.","headers":{"Operation-Location":{"description":"URL containing the resultId used to track the progress and obtain the result of the analyze operation.","schema":{"type":"string"},"example":"{endpoint}/formrecognizer/v2.0-preview/layout/analyzeResults/{resultId}"}}},"default":{"description":"Response entity accompanying non-successful responses containing additional details about the error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Analyze Layout"}},"/layout/analyzeResults/{resultId}":{"get":{"description":"Track the progress and obtain the result of the analyze layout operation","operationId":"GetAnalyzeLayoutResult","parameters":[{"description":"Analyze operation result identifier.","in":"path","name":"resultId","required":true,"schema":{"type":"string","format":"uuid"},"examples":{"Get analyze layout result":{"value":"{result Id}"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeOperationResult"},"examples":{"Get analyze layout result":{"$ref":"#/components/examples/Get_analyze_layout_result"}}}}},"default":{"description":"Response entity accompanying non-successful responses containing additional details about the error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Analyze Layout Result"}},"/prebuilt/receipt/analyze":{"post":{"description":"Extract field text and semantic values from a given receipt document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png' or 'image/tiff'. Alternatively, use 'application/json' type to specify the location (Uri or local path) of the document to be analyzed.","operationId":"AnalyzeReceiptAsync","parameters":[{"description":"Include text lines and element references in the result.","in":"query","name":"includeTextDetails","required":false,"x-nullable":false,"schema":{"type":"boolean","default":false}}],"requestBody":{"$ref":"#/components/requestBodies/SourceDataStream"},"responses":{"202":{"description":"Request is queued successfully.","headers":{"Operation-Location":{"description":"URL containing the resultId used to track the progress and obtain the result of the analyze operation.","schema":{"type":"string"},"example":"{endpoint}/formrecognizer/v2.0-preview/prebuilt/receipt/analyzeResults/{resultId}"}}},"default":{"description":"Response entity accompanying non-successful responses containing additional details about the error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Analyze Receipt"}},"/prebuilt/receipt/analyzeResults/{resultId}":{"get":{"description":"Track the progress and obtain the result of the analyze receipt operation.","operationId":"GetAnalyzeReceiptResult","parameters":[{"description":"Analyze operation result identifier.","in":"path","name":"resultId","required":true,"schema":{"type":"string","format":"uuid"},"examples":{"Get analyze receipt result":{"value":"{result Id}"}}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeOperationResult"},"examples":{"Get analyze receipt result":{"$ref":"#/components/examples/Get_analyze_receipt_result"}}}}},"default":{"description":"Response entity accompanying non-successful responses containing additional details about the error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Get Analyze Receipt Result"}}},"servers":[{"url":"https://azure.local"},{"url":"{endpoint}/formrecognizer/v2.0-preview","variables":{"endpoint":{"description":"Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).","x-ms-parameter-location":"client","x-ms-skip-url-encoding":true,"default":"none"}}}],"components":{"examples":{"List_custom_models":{"value":{"modelList":[{"createdDateTime":"2019-05-01T10:53:21Z","lastUpdatedDateTime":"2019-05-01T10:53:23Z","modelId":"f973e3c1-1148-43bb-bea8-49d0603ab3a8","status":"ready"},{"createdDateTime":"2019-05-01T10:53:21Z","lastUpdatedDateTime":"2019-05-01T10:53:23Z","modelId":"f973e3c1-0001-43bb-bea8-49d0603ab3a8","status":"ready"}],"nextLink":"","summary":{"count":5,"lastUpdatedDateTime":"2019-05-01T10:53:21Z","limit":5000}}},"Get_custom_model":{"value":{"keys":{"clusters":{"0":["Invoice","123112313"],"1":["Please remit payment to:","Microsoft"]}},"modelInfo":{"createdDateTime":"2019-05-01T10:53:21Z","lastUpdatedDateTime":"2019-05-01T10:53:23Z","modelId":"f973e3c1-1148-43bb-bea8-49d0603ab3a8","status":"ready"},"trainResult":{"averageModelAccuracy":0,"errors":[],"fields":[],"trainingDocuments":[]}}},"Get_analyze_form_result":{"value":{"analyzeResult":{"documentResults":[],"errors":[],"pageResults":[],"readResults":[],"version":"v2.0"},"createdDateTime":"2019-05-01T10:53:21Z","lastUpdatedDateTime":"2019-05-01T10:53:23Z","status":"running"}},"Get_analyze_layout_result":{"value":{"analyzeResult":{"pageResults":[],"readResults":[],"version":"v2.0"},"createdDateTime":"2019-05-01T10:53:21Z","lastUpdatedDateTime":"2019-05-01T10:53:23Z","status":"succeeded"}},"Get_analyze_receipt_result":{"value":{"analyzeResult":{"documentResults":[],"errors":[],"pageResults":[],"readResults":[],"version":"v2.0"},"createdDateTime":"2019-05-01T10:53:21Z","lastUpdatedDateTime":"2019-05-01T10:53:23Z","status":"running"}}},"parameters":{"Endpoint":{"description":"Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).","in":"path","name":"endpoint","required":true,"x-ms-parameter-location":"client","x-ms-skip-url-encoding":true,"schema":{"type":"string"}}},"requestBodies":{"SourceDataStream":{"content":{"application/pdf":{"schema":{"$ref":"#/components/schemas/SourceDataStream"}},"application/json":{"schema":{"$ref":"#/components/schemas/SourceDataStream"}},"image/jpeg":{"schema":{"$ref":"#/components/schemas/SourceDataStream"}},"image/png":{"schema":{"$ref":"#/components/schemas/SourceDataStream"}},"image/tiff":{"schema":{"$ref":"#/components/schemas/SourceDataStream"}}},"description":".json, .pdf, .jpg, .png or .tiff type file stream.","x-ms-parameter-location":"method"}},"securitySchemes":{"apim_key":{"in":"header","name":"Ocp-Apim-Subscription-Key","type":"apiKey"}},"schemas":{"AnalyzeOperationResult":{"description":"Status and result of the queued analyze operation.","properties":{"analyzeResult":{"$ref":"#/components/schemas/AnalyzeResult"},"createdDateTime":{"description":"Date and time (UTC) when the analyze operation was submitted.","format":"date-time","type":"string","nullable":false},"lastUpdatedDateTime":{"description":"Date and time (UTC) when the status was last updated.","format":"date-time","type":"string","nullable":false},"status":{"$ref":"#/components/schemas/OperationStatus"}},"required":["status","createdDateTime","lastUpdatedDateTime"],"type":"object"},"AnalyzeResult":{"description":"Analyze operation result.","properties":{"documentResults":{"description":"Document-level information extracted from the input.","items":{"$ref":"#/components/schemas/DocumentResult"},"type":"array"},"errors":{"description":"List of errors reported during the analyze operation.","items":{"$ref":"#/components/schemas/ErrorInformation"},"type":"array"},"pageResults":{"description":"Page-level information extracted from the input.","items":{"$ref":"#/components/schemas/PageResult"},"type":"array"},"readResults":{"description":"Text extracted from the input.","items":{"$ref":"#/components/schemas/ReadResult"},"type":"array"},"version":{"description":"Version of schema used for this result.","type":"string"}},"required":["version","readResults"],"type":"object"},"BoundingBox":{"description":"Quadrangle bounding box, with coordinates specified relative to the top-left of the original image. The eight numbers represent the four points, clockwise from the top-left corner relative to the text orientation. For image, the (x, y) coordinates are measured in pixels. For PDF, the (x, y) coordinates are measured in inches.","items":{"type":"number","nullable":false},"maxItems":8,"minItems":8,"type":"array"},"Confidence":{"description":"Confidence value.","maximum":1,"minimum":0,"type":"number","nullable":false},"DataTable":{"description":"Information about the extracted table contained in a page.","properties":{"cells":{"description":"List of cells contained in the table.","items":{"$ref":"#/components/schemas/DataTableCell"},"type":"array"},"columns":{"description":"Number of columns.","minimum":1,"type":"integer","nullable":false},"rows":{"description":"Number of rows.","minimum":1,"type":"integer","nullable":false}},"required":["rows","columns","cells"],"type":"object"},"DataTableCell":{"description":"Information about the extracted cell in a table.","properties":{"boundingBox":{"$ref":"#/components/schemas/BoundingBox"},"columnIndex":{"description":"Column index of the cell.","minimum":0,"type":"integer","nullable":false},"columnSpan":{"default":1,"description":"Number of columns spanned by this cell.","minimum":1,"type":"integer","nullable":false},"confidence":{"$ref":"#/components/schemas/Confidence"},"elements":{"description":"When includeTextDetails is set to true, a list of references to the text elements constituting this table cell.","items":{"$ref":"#/components/schemas/ElementReference"},"type":"array"},"isFooter":{"default":false,"description":"Is the current cell a footer cell?","type":"boolean","nullable":false},"isHeader":{"default":false,"description":"Is the current cell a header cell?","type":"boolean","nullable":false},"rowIndex":{"description":"Row index of the cell.","minimum":0,"type":"integer","nullable":false},"rowSpan":{"default":1,"description":"Number of rows spanned by this cell.","minimum":1,"type":"integer","nullable":false},"text":{"description":"Text content of the cell.","type":"string"}},"required":["rowIndex","columnIndex","text","boundingBox","confidence"],"type":"object"},"DocumentResult":{"description":"A set of extracted fields corresponding to the input document.","properties":{"docType":{"description":"Document type.","type":"string"},"fields":{"additionalProperties":{"$ref":"#/components/schemas/FieldValue"},"description":"Dictionary of named field values.","type":"object"},"pageRange":{"description":"First and last page number where the document is found.","items":{"minimum":1,"type":"integer","nullable":false},"maxItems":2,"minItems":2,"type":"array"}},"required":["docType","pageRange","fields"]},"ElementReference":{"description":"Reference to a line or word.","type":"string"},"ErrorInformation":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorInformation"}},"required":["error"],"type":"object"},"FieldValue":{"description":"Recognized field value.","properties":{"boundingBox":{"$ref":"#/components/schemas/BoundingBox"},"confidence":{"$ref":"#/components/schemas/Confidence"},"elements":{"description":"When includeTextDetails is set to true, a list of references to the text elements constituting this field.","items":{"$ref":"#/components/schemas/ElementReference"},"type":"array"},"page":{"description":"The 1-based page number in the input document.","minimum":1,"type":"integer","nullable":false},"text":{"description":"Text content of the extracted field.","type":"string"},"type":{"$ref":"#/components/schemas/FieldValueType"},"valueArray":{"description":"Array of field values.","items":{"$ref":"#/components/schemas/FieldValue"},"type":"array"},"valueDate":{"description":"Date value.","format":"date-time","type":"string","nullable":false},"valueInteger":{"description":"Integer value.","type":"integer","nullable":false},"valueNumber":{"description":"Floating point value.","type":"number","nullable":false},"valueObject":{"additionalProperties":{"$ref":"#/components/schemas/FieldValue"},"description":"Dictionary of named field values.","type":"object"},"valuePhoneNumber":{"description":"Phone number value.","type":"string"},"valueString":{"description":"String value.","type":"string"},"valueTime":{"description":"Time value.","format":"date-time","type":"string","nullable":false}},"required":["type"],"type":"object"},"FieldValueType":{"description":"Semantic data type of the field value.","enum":["string","date","time","phoneNumber","number","integer","array","object"],"type":"string","x-ms-enum":{"modelAsString":false,"name":"FieldValueType"},"nullable":false},"FormFieldsReport":{"description":"Report for a custom model training field.","properties":{"accuracy":{"description":"Estimated extraction accuracy for this field.","type":"number","nullable":false},"fieldName":{"description":"Training field name.","type":"string"}},"required":["fieldName","accuracy"],"type":"object"},"KeyValueElement":{"description":"Information about the extracted key or value in a key-value pair.","properties":{"boundingBox":{"$ref":"#/components/schemas/BoundingBox"},"elements":{"description":"When includeTextDetails is set to true, a list of references to the text elements constituting this key or value.","items":{"$ref":"#/components/schemas/ElementReference"},"type":"array"},"text":{"description":"The text content of the key or value.","type":"string"}},"required":["text"],"type":"object"},"KeyValuePair":{"description":"Information about the extracted key-value pair.","properties":{"confidence":{"$ref":"#/components/schemas/Confidence"},"key":{"$ref":"#/components/schemas/KeyValueElement"},"label":{"description":"A user defined label for the key/value pair entry.","type":"string"},"value":{"$ref":"#/components/schemas/KeyValueElement"}},"required":["key","value","confidence"],"type":"object"},"KeysResult":{"description":"Keys extracted by the custom model.","properties":{"clusters":{"additionalProperties":{"items":{"type":"string"},"type":"array","uniqueItems":true},"description":"Object mapping clusterIds to a list of keys.","type":"object"}},"required":["clusters"],"type":"object"},"Language":{"description":"Language code","enum":["en","es"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Language"},"nullable":false},"Model":{"description":"Response to the get custom model operation.","properties":{"keys":{"$ref":"#/components/schemas/KeysResult"},"modelInfo":{"$ref":"#/components/schemas/ModelInfo"},"trainResult":{"$ref":"#/components/schemas/TrainResult"}},"required":["modelInfo"],"type":"object"},"ModelInfo":{"description":"Basic custom model information.","properties":{"createdDateTime":{"description":"Date and time (UTC) when the model was created.","format":"date-time","type":"string","nullable":false},"lastUpdatedDateTime":{"description":"Date and time (UTC) when the status was last updated.","format":"date-time","type":"string","nullable":false},"modelId":{"description":"Model identifier.","format":"uuid","type":"string","nullable":false},"status":{"description":"Status of the model.","enum":["creating","ready","invalid"],"type":"string","x-ms-enum":{"modelAsString":false,"name":"ModelStatus"},"nullable":false}},"required":["modelId","status","createdDateTime","lastUpdatedDateTime"],"type":"object"},"Models":{"description":"Response to the list custom models operation.","properties":{"modelList":{"description":"Collection of trained custom models.","items":{"$ref":"#/components/schemas/ModelInfo"},"type":"array"},"nextLink":{"description":"Link to the next page of custom models.","type":"string"},"summary":{"description":"Summary of all trained custom models.","properties":{"count":{"description":"Current count of trained custom models.","type":"integer","nullable":false},"lastUpdatedDateTime":{"description":"Date and time (UTC) when the summary was last updated.","format":"date-time","type":"string","nullable":false},"limit":{"description":"Max number of models that can be trained for this subscription.","type":"integer","nullable":false}},"required":["count","limit","lastUpdatedDateTime"],"type":"object"}},"type":"object"},"OperationStatus":{"description":"Status of the queued operation.","enum":["notStarted","running","succeeded","failed"],"type":"string","x-ms-enum":{"modelAsString":false,"name":"OperationStatus"},"nullable":false},"PageResult":{"description":"Extracted information from a single page.","properties":{"clusterId":{"description":"Cluster identifier.","format":"int32","minimum":0,"type":"integer","nullable":false},"keyValuePairs":{"description":"List of key-value pairs extracted from the page.","items":{"$ref":"#/components/schemas/KeyValuePair"},"type":"array"},"page":{"description":"Page number.","format":"int32","minimum":1,"type":"integer","nullable":false},"tables":{"description":"List of data tables extracted from the page.","items":{"$ref":"#/components/schemas/DataTable"},"type":"array"}},"required":["page"],"type":"object"},"ReadResult":{"description":"Text extracted from a page in the input document.","properties":{"angle":{"description":"The general orientation of the text in clockwise direction, measured in degrees between (-180, 180].","exclusiveMinimum":true,"maximum":180,"minimum":-180,"type":"number","nullable":false},"height":{"description":"The height of the image/PDF in pixels/inches, respectively.","minimum":0,"type":"number","nullable":false},"language":{"$ref":"#/components/schemas/Language"},"lines":{"description":"When includeTextDetails is set to true, a list of recognized text lines. The maximum number of lines returned is 300 per page. The lines are sorted top to bottom, left to right, although in certain cases proximity is treated with higher priority. As the sorting order depends on the detected text, it may change across images and OCR version updates. Thus, business logic should be built upon the actual line location instead of order.","items":{"$ref":"#/components/schemas/TextLine"},"type":"array"},"page":{"description":"The 1-based page number in the input document.","minimum":1,"type":"integer","nullable":false},"unit":{"description":"The unit used by the width, height and boundingBox properties. For images, the unit is \"pixel\". For PDF, the unit is \"inch\".","enum":["pixel","inch"],"type":"string","x-ms-enum":{"modelAsString":false,"name":"LengthUnit"},"nullable":false},"width":{"description":"The width of the image/PDF in pixels/inches, respectively.","minimum":0,"type":"number","nullable":false}},"required":["page","angle","width","height","unit"],"type":"object"},"SourceDataStream":{"description":"A PDF document, image (jpg/png/tiff), or JSON file to analyze.","type":"object"},"SourcePath":{"description":"Uri or local path to source data.","properties":{"source":{"description":"File source path.","maxLength":2048,"minLength":0,"type":"string"}},"type":"object"},"TextLine":{"description":"An object representing an extracted text line.","properties":{"boundingBox":{"$ref":"#/components/schemas/BoundingBox"},"language":{"$ref":"#/components/schemas/Language"},"text":{"description":"The text content of the line.","type":"string"},"words":{"description":"List of words in the text line.","items":{"$ref":"#/components/schemas/TextWord"},"type":"array"}},"required":["text","boundingBox","words"],"type":"object"},"TextWord":{"description":"An object representing a word.","properties":{"boundingBox":{"$ref":"#/components/schemas/BoundingBox"},"confidence":{"$ref":"#/components/schemas/Confidence"},"text":{"description":"The text content of the word.","type":"string"}},"required":["boundingBox","text"],"type":"object"},"TrainRequest":{"description":"Request parameter to train a new custom model.","properties":{"source":{"description":"Source path containing the training documents.","maxLength":2048,"minLength":0,"type":"string"},"sourceFilter":{"$ref":"#/components/schemas/TrainSourceFilter"},"useLabelFile":{"default":false,"description":"Use label file for training a model.","type":"boolean"}},"required":["source"],"type":"object"},"TrainResult":{"description":"Custom model training result.","properties":{"averageModelAccuracy":{"description":"Average accuracy.","type":"number","nullable":false},"errors":{"description":"Errors returned during the training operation.","items":{"$ref":"#/components/schemas/ErrorInformation"},"type":"array"},"fields":{"description":"List of fields used to train the model and the train operation error reported by each.","items":{"$ref":"#/components/schemas/FormFieldsReport"},"type":"array"},"trainingDocuments":{"description":"List of the documents used to train the model and any errors reported in each document.","items":{"$ref":"#/components/schemas/TrainingDocumentInfo"},"type":"array"}},"required":["trainingDocuments"],"type":"object"},"TrainSourceFilter":{"description":"Filter to apply to the documents in the source path for training.","properties":{"includeSubFolders":{"default":false,"description":"A flag to indicate if sub folders within the set of prefix folders will also need to be included when searching for content to be preprocessed.","type":"boolean","nullable":false},"prefix":{"description":"A case-sensitive prefix string to filter documents in the source path for training. For example, when using a Azure storage blob Uri, use the prefix to restrict sub folders for training.","maxLength":1024,"minLength":0,"type":"string"}},"type":"object"},"TrainingDocumentInfo":{"description":"Report for a custom model training document.","properties":{"documentName":{"description":"Training document name.","type":"string"},"errors":{"description":"List of errors.","items":{"$ref":"#/components/schemas/ErrorInformation"},"type":"array"},"pages":{"description":"Total number of pages trained.","format":"int32","type":"integer","nullable":false},"status":{"description":"Status of the training operation.","enum":["succeeded","partiallySucceeded","failed"],"type":"string","x-ms-enum":{"modelAsString":false,"name":"TrainStatus"},"nullable":false}},"required":["documentName","pages","errors","status"],"type":"object"}}}}