Amazon Comprehend · Schema
ClassifyDocumentResponse
Amazon Web ServicesMachine LearningNatural Language ProcessingText Analysis
Properties
| Name | Type | Description |
|---|---|---|
| Classes | array | The classes used by the document being analyzed. These are used for models trained in multi-class mode. Individual classes are mutually exclusive and each document is expected to have only a single cl |
| Labels | array | The labels used in the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exc |
| DocumentMetadata | object | |
| DocumentType | array | The document type for each page in the input document. This field is present in the response only if your request includes the Byte parameter. |
| Errors | array | Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors. |
| Warnings | array | Warnings detected while processing the input document. The response includes a warning if there is a mismatch between the input document type and the model type associated with the endpoint that you s |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/amazon-comprehend/json-schema/amazon-comprehend-classify-document-response-schema.json",
"title": "ClassifyDocumentResponse",
"x-generated": "2026-11-11",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/amazon-comprehend-amazon-comprehend-api-openapi.yml#/components/schemas/ClassifyDocumentResponse",
"type": "object",
"properties": {
"Classes": {
"type": "array",
"items": {
"$ref": "#/$defs/DocumentClass"
},
"description": "The classes used by the document being analyzed. These are used for models trained in multi-class mode. Individual classes are mutually exclusive and each document is expected to have only a single class assigned to it. For example, an animal can be a dog or a cat, but not both at the same time. For prompt safety classification, the response includes only two classes (SAFE_PROMPT and UNSAFE_PROMPT), along with a confidence score for each class. The value range of the score is zero to one, where one is the highest confidence."
},
"Labels": {
"type": "array",
"items": {
"$ref": "#/$defs/DocumentLabel"
},
"description": "The labels used in the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exclusive. For example, a movie can be just an action movie, or it can be an action movie, a science fiction movie, and a comedy, all at the same time."
},
"DocumentMetadata": {
"$ref": "#/$defs/DocumentMetadata"
},
"DocumentType": {
"type": "array",
"items": {
"$ref": "#/$defs/DocumentTypeListItem"
},
"description": "The document type for each page in the input document. This field is present in the response only if your request includes the Byte parameter."
},
"Errors": {
"type": "array",
"items": {
"$ref": "#/$defs/ErrorsListItem"
},
"description": "Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors."
},
"Warnings": {
"type": "array",
"items": {
"$ref": "#/$defs/WarningsListItem"
},
"description": "Warnings detected while processing the input document. The response includes a warning if there is a mismatch between the input document type and the model type associated with the endpoint that you specified. The response can also include warnings for individual pages that have a mismatch. The field is empty if the system generated no warnings."
}
},
"$defs": {
"DocumentClass": {
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "The name of the class."
},
"Score": {
"type": "number",
"description": "The confidence score that Amazon Comprehend has this class correctly attributed."
},
"Page": {
"type": "integer",
"description": "Page number in the input document. This field is present in the response only if your request includes the Byte parameter."
}
}
},
"DocumentLabel": {
"type": "object",
"properties": {
"Name": {
"type": "string",
"description": "The name of the label."
},
"Score": {
"type": "number",
"description": "The confidence score that Amazon Comprehend has this label correctly attributed."
},
"Page": {
"type": "integer",
"description": "Page number where the label occurs. This field is present in the response only if your request includes the Byte parameter."
}
}
},
"DocumentMetadata": {
"type": "object",
"properties": {
"Pages": {
"type": "integer",
"description": "Number of pages in the document."
},
"ExtractedCharacters": {
"type": "array",
"items": {
"$ref": "#/$defs/ExtractedCharactersListItem"
},
"description": "List of pages in the document, with the number of characters extracted from each page."
}
}
},
"DocumentTypeListItem": {
"type": "object",
"properties": {
"Page": {
"type": "integer",
"description": "Page number."
},
"Type": {
"type": "string",
"enum": [
"NATIVE_PDF",
"SCANNED_PDF",
"MS_WORD",
"IMAGE",
"PLAIN_TEXT",
"TEXTRACT_DETECT_DOCUMENT_TEXT_JSON",
"TEXTRACT_ANALYZE_DOCUMENT_JSON"
],
"description": "Document type."
}
}
},
"ErrorsListItem": {
"type": "object",
"properties": {
"Page": {
"type": "integer",
"description": "Page number where the error occurred."
},
"ErrorCode": {
"type": "string",
"enum": [
"TEXTRACT_BAD_PAGE",
"TEXTRACT_PROVISIONED_THROUGHPUT_EXCEEDED",
"PAGE_CHARACTERS_EXCEEDED",
"PAGE_SIZE_EXCEEDED",
"INTERNAL_SERVER_ERROR"
],
"description": "Error code for the cause of the error."
},
"ErrorMessage": {
"type": "string",
"description": "Text message explaining the reason for the error."
}
}
},
"ExtractedCharactersListItem": {
"type": "object",
"properties": {
"Page": {
"type": "integer",
"description": "Page number."
},
"Count": {
"type": "integer",
"description": "Number of characters extracted from each page."
}
}
},
"WarningsListItem": {
"type": "object",
"properties": {
"Page": {
"type": "integer",
"description": "Page number in the input document."
},
"WarnCode": {
"type": "string",
"enum": [
"INFERENCING_PLAINTEXT_WITH_NATIVE_TRAINED_MODEL",
"INFERENCING_NATIVE_DOCUMENT_WITH_PLAINTEXT_TRAINED_MODEL"
],
"description": "The type of warning."
},
"WarnMessage": {
"type": "string",
"description": "Text message associated with the warning."
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/amazon-comprehend-classify-document-response"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.