> 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/extraction-1/bulk-document-extraction-async.md).

# Bulk document extraction (Async)

```json
{"openapi":"3.1.0","info":{"title":"Document AI API","version":"1.0.0"},"tags":[{"name":"Extraction"}],"servers":[{"description":"UAT","url":"https://api-docai-uat.uptiq.ai"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"in":"header","name":"X-Api-Key","type":"apiKey"}},"schemas":{"ExtractBulkRequest.61b65c6":{"properties":{"files":{"description":"List of files to extract, each with content or file_url","items":{"$ref":"#/components/schemas/ExtractBulkRequest.61b65c6.ExtractBulkRequestFile"},"title":"Files","type":"array"}},"required":["files"],"title":"ExtractBulkRequest","type":"object"},"ExtractBulkRequest.61b65c6.ExtractBulkRequestFile":{"properties":{"additionalParams":{"anyOf":[{"$ref":"#/components/schemas/ExtractBulkRequest.61b65c6.AdditionalParams"},{"type":"null"}],"default":null,"description":"Additional extraction parameters for fine-grained control"},"agentInstructions":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"default":null,"description":"Additional system-level instructions injected into the LLM system prompt","title":"Agentinstructions"},"analysisDepth":{"anyOf":[{"enum":["quick","standard"],"type":"string"},{"type":"null"}],"default":"standard","description":"Depth of document analysis: 'quick' (skip classification if type provided) or 'standard' (full analysis)","title":"Analysisdepth"},"chartOfAccounts":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"default":null,"description":"Chart of accounts mapping. Flat array for standard: [{accountId, accountName}]. Structured dict for BusinessFinancialStatement: {BalanceSheet: [...], ProfitAndLossStatement: [...]}.","title":"Chartofaccounts"},"chartOfAccountsUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"URL to download chart of accounts JSON. Only used when chartOfAccounts is not provided directly.","title":"Chartofaccountsurl"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Base64-encoded file content","title":"Content"},"custom_document_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"description":"Custom document type names to use for V2 classification instead of the built-in list","title":"Custom Document Types"},"documentType":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Document type. Mutually exclusive with documentTypes; one is required.","title":"Documenttype"},"documentTypes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ExtractBulkRequest.61b65c6.DocumentTypeEntry"},"type":"array"},{"type":"null"}],"default":null,"description":"Multi-extraction document types. Mutually exclusive with documentType; one is required.","title":"Documenttypes"},"enableCaching":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"If true, store extraction result in cache for future requests","title":"Enablecaching"},"enableDocumentAnalysis":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Run AI document analysis to categorize content before extraction (V2 only)","title":"Enabledocumentanalysis"},"enableJudge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Enable LLM-as-Judge evaluation: a second LLM reviews extraction quality post-hoc","title":"Enablejudge"},"enablePageContent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Include page-wise OCR content and AI-generated summaries per page","title":"Enablepagecontent"},"enablePageSummaries":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Deprecated — use enablePageContent instead","title":"Enablepagesummaries"},"enableRawSections":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Include raw OCR text sections with bounding boxes in the result (V2 only)","title":"Enablerawsections"},"extractionFormat":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Custom extraction JSON schema defining the output structure. Overrides the default DocumentConfig format.","title":"Extractionformat"},"extractionPrompt":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Custom natural language prompt to guide LLM extraction behavior beyond the extractionFormat schema.","title":"Extractionprompt"},"file_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Public URL to file","title":"File Url"},"form8825Address":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Single property address (backward-compatible alias for form8825Addresses with one entry)","title":"Form8825Address"},"form8825Addresses":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"description":"Property addresses for Form 8825 direct deep extraction. Skips property identification and runs a native-PDF extraction per address.","title":"Form8825Addresses"},"formTypes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"description":"Form types (for tax documents)","title":"Formtypes"},"galleryIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"description":"Knowledge Search gallery IDs to tag the document into after extraction","title":"Galleryids"},"includeLayout":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Include document layout structure (tables, paragraphs, headings) in result","title":"Includelayout"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Industry name to load default chart of accounts from database for supported document types","title":"Industry"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Arbitrary key-value metadata to attach to the extraction record","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":"gemini-3","description":"LLM model for extraction","title":"Model"},"overrideCache":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"If true, bypass cached extraction results and re-extract from scratch","title":"Overridecache"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Natural language question to answer after extraction completes. Enables async Q&A on the result.","title":"Query"},"quickExtract":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Use Gemini native PDF extraction (bypasses Azure OCR). Faster but may have lower accuracy for complex layouts.","title":"Quickextract"},"rawExtractionOnly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Skip LLM extraction entirely; return only OCR/layout data without structured extraction","title":"Rawextractiononly"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Document subtype","title":"Subtype"},"tagInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Tag classification instructions (only used when documentType is OtherWithMetadata)","title":"Taginstructions"}},"title":"ExtractBulkRequestFile","type":"object"},"ExtractBulkRequest.61b65c6.AdditionalParams":{"properties":{"extractImages":{"default":false,"description":"When true, extract embedded images from well-formatted (digital) PDFs, store them in the storage bucket, and return signed URLs on result.extractedImages. Scanned/photo PDFs and non-PDF files are skipped with a message (imageExtraction.status). Signed URLs are valid for 7 days - consumers must fetch/copy within that window.","title":"Extractimages","type":"boolean"},"imageInstructions":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Free-text instruction used to vision-tag and rank extracted images (e.g. 'property photos and map locations'). Requires extractImages=true. Matching images are ranked first (matchScore); images are never dropped.","title":"Imageinstructions"},"returnFieldConfidences":{"default":false,"description":"When true, compute per-field confidence scores (inline + aggregate). Skips field confidence computation when false to reduce response size.","title":"Returnfieldconfidences","type":"boolean"}},"title":"AdditionalParams","type":"object"},"ExtractBulkRequest.61b65c6.DocumentTypeEntry":{"properties":{"documentType":{"description":"Document type for extraction","title":"Documenttype","type":"string"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Entity name for this extraction","title":"Entity"},"entityId":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Entity ID for this extraction","title":"Entityid"},"pageNumbers":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"default":null,"description":"Target page numbers (PDF)","title":"Pagenumbers"},"sheetNames":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"description":"Target sheet names (Excel)","title":"Sheetnames"}},"required":["documentType"],"title":"DocumentTypeEntry","type":"object"},"ExtractBulkResponse.61b65c6":{"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/ExtractBulkResponse.61b65c6.ExtractBulkResponseResult"},"title":"Results","type":"array"},"status":{"default":"success","description":"Status of the bulk extraction request","title":"Status","type":"string"},"successful":{"description":"Number of successfully queued files","title":"Successful","type":"integer"},"total":{"description":"Total number of files submitted","title":"Total","type":"integer"}},"required":["results","total","successful","failed"],"title":"ExtractBulkResponse","type":"object"},"ExtractBulkResponse.61b65c6.ExtractBulkResponseResult":{"properties":{"_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Document extraction ID","title":"Id"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Document type","title":"Document Type"},"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","title":"Status","type":"string"},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Document subtype","title":"Subtype"}},"required":["index","status"],"title":"ExtractBulkResponseResult","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":{"/extract/bulk":{"post":{"description":"","operationId":"post__extract_bulk","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractBulkRequest.61b65c6"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractBulkResponse.61b65c6"}}},"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 extraction (Async)","tags":["Extraction"]}}}}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
