Document Models - Compose Model

Creates a new document model from document types of existing document models.

POST {endpoint}/documentintelligence/documentModels:compose?api-version=2024-02-29-preview

URI Parameters

Name In Required Type Description
endpoint
path True

string

The Document Intelligence service endpoint.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Required Type Description
componentModels True

ComponentDocumentModelDetails[]

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

The request has been accepted for processing, but processing has not yet completed.

Headers

  • Operation-Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

An unexpected error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

OAuth2Auth

Type: oauth2
Flow: accessCode
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize
Token URL: https://login.microsoftonline.com/common/oauth2/token

Scopes

Name Description
https://cognitiveservices.azure.com/.default

Examples

Compose Document Model

Sample Request

POST https://myendpoint.cognitiveservices.azure.com/documentintelligence/documentModels:compose?api-version=2024-02-29-preview

{
  "modelId": "composedModel",
  "description": "Composed model description",
  "componentModels": [
    {
      "modelId": "model1"
    },
    {
      "modelId": "model2"
    }
  ]
}

Sample Response

Operation-Location: https://myendpoint.cognitiveservices.azure.com/documentintelligence/operations/b704bb00-d130-4f3f-a1d8-ca96de3eabb4?api-version=2024-02-29-preview

Definitions

Name Description
ComponentDocumentModelDetails

A component of a composed document model.

ComposeDocumentModelRequest

Request body to create a composed document model from component document models.

Error

The error object.

ErrorResponse

Error response object.

InnerError

An object containing more specific information about the 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

ComponentDocumentModelDetails[]

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

The error object.

Name Type Description
code

string

One of a server-defined set of error codes.

details

Error[]

An array of details about specific errors that led to this reported error.

innererror

InnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

ErrorResponse

Error response object.

Name Type Description
error

Error

Error info.

InnerError

An object containing more specific information about the error.

Name Type Description
code

string

One of a server-defined set of error codes.

innererror

InnerError

Inner error.

message

string

A human-readable representation of the error.