Custom Models - Get
Get detailed information about a custom model.
GET {endpoint}/formrecognizer/v2.1/custom/models/{modelId}
GET {endpoint}/formrecognizer/v2.1/custom/models/{modelId}?includeKeys={includeKeys}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). |
|
model
|
path | True |
string (uuid) |
Model identifier. |
|
include
|
query |
boolean |
Include list of extracted keys in model information. |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | True |
string |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Success |
|
| Other Status Codes |
Response entity accompanying non-successful responses containing additional details about the error. |
Security
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
Examples
Get custom model
Sample request
GET {endpoint}/formrecognizer/v2.1/custom/models/f973e3c1-1148-43bb-bea8-49d0603ab3a8
Sample response
{
"modelInfo": {
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
"modelName": "my composed model",
"status": "ready",
"createdDateTime": "2019-05-01T10:53:21Z",
"lastUpdatedDateTime": "2019-05-01T10:53:23Z",
"attributes": {
"isComposed": true
}
},
"keys": {
"clusters": {
"0": [
"Invoice",
"123112313"
],
"1": [
"Please remit payment to:",
"Microsoft"
]
}
},
"trainResult": {
"trainingDocuments": [],
"fields": [],
"averageModelAccuracy": 0,
"errors": []
},
"composedTrainResults": [
{
"modelId": "4afb20d6-3ed0-4cde-ba40-dbd6207268dd",
"trainingDocuments": [],
"fields": [],
"averageModelAccuracy": 0,
"errors": []
},
{
"modelId": "6f841356-aa32-42c9-a739-2182c47b79c9",
"trainingDocuments": [],
"fields": [],
"averageModelAccuracy": 0,
"errors": []
}
]
}
Definitions
| Name | Description |
|---|---|
| Attributes |
Optional model attributes. |
|
Error |
|
|
Error |
|
|
Form |
Report for a custom model training field. |
|
Keys |
Keys extracted by the custom model. |
| Model |
Response to the get custom model operation. |
|
Model |
Basic custom model information. |
|
Model |
Status of the model. |
|
Training |
Report for a custom model training document. |
|
Train |
Custom model training result. |
|
Train |
Status of the training operation. |
Attributes
Optional model attributes.
| Name | Type | Default value | Description |
|---|---|---|---|
| isComposed |
boolean |
False |
Is this model composed? (default: false). |
ErrorInformation
| Name | Type | Description |
|---|---|---|
| code |
string |
|
| message |
string |
ErrorResponse
| Name | Type | Description |
|---|---|---|
| error |
FormFieldsReport
Report for a custom model training field.
| Name | Type | Description |
|---|---|---|
| accuracy |
number |
Estimated extraction accuracy for this field. |
| fieldName |
string |
Training field name. |
KeysResult
Keys extracted by the custom model.
| Name | Type | Description |
|---|---|---|
| clusters |
object |
Object mapping clusterIds to a list of keys. |
Model
Response to the get custom model operation.
| Name | Type | Description |
|---|---|---|
| composedTrainResults |
Training result for composed model. |
|
| keys |
Keys extracted by the custom model. |
|
| modelInfo |
Basic custom model information. |
|
| trainResult |
Training result for custom model. |
ModelInfo
Basic custom model information.
| Name | Type | Description |
|---|---|---|
| attributes |
Optional model attributes. |
|
| createdDateTime |
string (date-time) |
Date and time (UTC) when the model was created. |
| lastUpdatedDateTime |
string (date-time) |
Date and time (UTC) when the status was last updated. |
| modelId |
string (uuid) |
Model identifier. |
| modelName |
string |
Optional user defined model name (max length: 1024). |
| status |
Status of the model. |
ModelStatus
Status of the model.
| Value | Description |
|---|---|
| creating | |
| ready | |
| invalid |
TrainingDocumentInfo
Report for a custom model training document.
| Name | Type | Description |
|---|---|---|
| documentName |
string |
Training document name. |
| errors |
List of errors. |
|
| pages |
integer (int32) |
Total number of pages trained. |
| status |
Status of the training operation. |
TrainResult
Custom model training result.
| Name | Type | Description |
|---|---|---|
| averageModelAccuracy |
number |
Average accuracy. |
| errors |
Errors returned during the training operation. |
|
| fields |
List of fields used to train the model and the train operation error reported by each. |
|
| modelId |
string (uuid) |
Model identifier. |
| trainingDocuments |
List of the documents used to train the model and any errors reported in each document. |
TrainStatus
Status of the training operation.
| Value | Description |
|---|---|
| succeeded | |
| partiallySucceeded | |
| failed |