> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/document-ai/developer-documentation/classification-1/bulk-document-classification.md).

# Bulk document classification

```json
{"openapi":"3.1.0","info":{"title":"Document AI API","version":"1.0.0"},"tags":[{"name":"Classification"}],"servers":[{"description":"UAT","url":"https://api-docai-uat.uptiq.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-Api-Key","type":"apiKey"}},"schemas":{"ClassifyBulkRequest.981af89":{"properties":{"context":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"description":"Per-file classification context strings. Length must match files array.","title":"Context"},"custom_document_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"description":"Custom document types applied to all files. If provided, classification is restricted to these types.","title":"Custom Document Types"},"custom_document_types_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"URL to custom document types JSON file. Merged with custom_document_types for all files.","title":"Custom Document Types Url"},"entities":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"default":null,"description":"Entity ID-to-name mapping for Excel workbook classification across all files: {entityId: entityName, ...}","title":"Entities"},"files":{"description":"List of files to classify","items":{"$ref":"#/components/schemas/ClassifyBulkRequest.981af89.ClassifyBulkRequestFile"},"title":"Files","type":"array"},"metadata":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"default":null,"description":"Per-file metadata dicts. Length must match files array.","title":"Metadata"},"model":{"anyOf":[{"enum":["gpt-4.1","gpt-5.1","gemini-3","openrouter/z-ai/glm-5.2","openrouter/deepseek/deepseek-v4-pro"],"type":"string"},{"type":"null"}],"default":null,"description":"LLM model for classification (applies to all files). Defaults to gemini-3 if not specified.","title":"Model"},"use_custom_types_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"If true, only custom_document_types are valid. Applied to all files.","title":"Use Custom Types Only"}},"required":["files"],"title":"ClassifyBulkRequest","type":"object"},"ClassifyBulkRequest.981af89.ClassifyBulkRequestFile":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Base64-encoded file content","title":"Content"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Public URL to file","title":"File Url"}},"title":"ClassifyBulkRequestFile","type":"object"},"ClassifyBulkResponse.981af89":{"properties":{"failed":{"description":"Number of failed files","title":"Failed","type":"integer"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Status message","title":"Message"},"results":{"description":"Per-file processing results","items":{"$ref":"#/components/schemas/ClassifyBulkResponse.981af89.ClassifyBulkResponseResult"},"title":"Results","type":"array"},"status":{"default":"success","enum":["success","error"],"title":"Status","type":"string"},"successful":{"description":"Number of successfully classified files","title":"Successful","type":"integer"},"total":{"description":"Total number of files submitted","title":"Total","type":"integer"}},"required":["results","total","successful","failed"],"title":"ClassifyBulkResponse","type":"object"},"ClassifyBulkResponse.981af89.ClassifyBulkResponseResult":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Classification document ID","title":"Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Error message if status is 'error'","title":"Error"},"index":{"description":"Index of the file in the input array","title":"Index","type":"integer"},"requestId":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Request ID","title":"Requestid"},"status":{"description":"Processing status","enum":["success","error"],"title":"Status","type":"string"},"storage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Cloud storage reference","title":"Storage"}},"required":["index","status"],"title":"ClassifyBulkResponseResult","type":"object"},"ValidationError.6a07bef":{"description":"Model of a validation error response.","items":{"$ref":"#/components/schemas/ValidationError.6a07bef.ValidationErrorElement"},"title":"ValidationError","type":"array"},"ValidationError.6a07bef.ValidationErrorElement":{"description":"Model of a validation error response element.","properties":{"ctx":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Error context"},"loc":{"items":{"type":"string"},"title":"Missing field name","type":"array"},"msg":{"title":"Error message","type":"string"},"type":{"title":"Error type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationErrorElement","type":"object"}}},"paths":{"/classify/bulk":{"post":{"description":"","operationId":"post__classify_bulk","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyBulkRequest.981af89"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyBulkResponse.981af89"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError.6a07bef"}}},"description":"Bad Request"},"401":{"description":"Authentication required — the `X-Api-Key` header is missing or invalid."}},"summary":"Bulk document classification","tags":["Classification"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uptiq.ai/document-ai/developer-documentation/classification-1/bulk-document-classification.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
