Document Models - Compose Model
Creates a new document model from document types of existing document models.
POST {endpoint}/formrecognizer/documentModels:compose?api-version=2023-07-31
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string url |
Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). |
api-version
|
query | True |
string |
Requested API version. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
The secret key for your Azure Cognitive Services subscription. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
componentModels | True |
List of component document models to compose. |
|
modelId | True |
string |
Unique document model name. |
description |
string |
Document model description. |
|
tags |
object |
List of key-value tag attributes associated with the document model. |
Responses
Name | Type | Description |
---|---|---|
202 Accepted |
Request is queued successfully. Headers Operation-Location: string |
|
Other Status Codes |
Error encountered. |
Security
Ocp-Apim-Subscription-Key
The secret key for your Azure Cognitive Services subscription.
Type:
apiKey
In:
header
Examples
Compose Document Model
Sample Request
POST https://myendpoint.cognitiveservices.azure.com/formrecognizer/documentModels:compose?api-version=2023-07-31
{
"modelId": "composedModel",
"description": "Composed model description",
"componentModels": [
{
"modelId": "model1"
},
{
"modelId": "model2"
}
]
}
Sample Response
Operation-Location: https://myendpoint.cognitiveservices.azure.com/formrecognizer/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2023-07-31
Definitions
Name | Description |
---|---|
Component |
A component of a composed document model. |
Compose |
Request body to create a composed document model from component document models. |
Error |
Error info. |
Error |
Error response object. |
Inner |
Detailed error. |
ComponentDocumentModelDetails
A component of a composed document model.
Name | Type | Description |
---|---|---|
modelId |
string |
Unique document model name. |
ComposeDocumentModelRequest
Request body to create a composed document model from component document models.
Name | Type | Description |
---|---|---|
componentModels |
List of component document models to compose. |
|
description |
string |
Document model description. |
modelId |
string |
Unique document model name. |
tags |
object |
List of key-value tag attributes associated with the document model. |
Error
Error info.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
details |
Error[] |
List of detailed errors. |
innererror |
Detailed error. |
|
message |
string |
Error message. |
target |
string |
Target of the error. |
ErrorResponse
Error response object.
Name | Type | Description |
---|---|---|
error |
Error info. |
InnerError
Detailed error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
innererror |
Detailed error. |
|
message |
string |
Error message. |