Limits at a glance
Exceeding most limits does not return an error. Box truncates the input to the limit and processes what it can. For details, see .
Box AI uses large language models, so the page guidance on this page is an estimate. Results vary with the density and content of each document.
Can Box AI extract from a 300-page document without splitting it?
Sometimes. Whether an extraction completes depends on the token limit for processing, not the page count. A sparse 300-page document can complete in one call, while a dense 48-page brochure might not. For reliable results, split long documents into segments of about 50 pages. Box offers two agents forPOST /ai/extract_structured:
- Standard Extract Agent: recommended for high-volume, structured or semi-structured documents with 50 pages or fewer and fewer than 20 extraction fields.
- Enhanced Extract Agent: recommended for complex, large, or unstructured documents with 50 pages or more and more than 20 extraction fields, such as contracts or clinical reports.
ai_agent object to your request:
Scanned documents and the page limit
extract_structured applies additional processing to scanned documents, including automatic OCR and layout parsing, before extraction. For long scanned documents, see Recommended approach for long agreements.
Recommended approach for long agreements
For a long scanned document, such as a 300-page credit agreement:- Split the document into segments of about 50 pages, and upload each segment to Box as a separate file.
- Call
extract_structuredon each segment with the Enhanced Extract Agent. - Combine the results from each segment in your application.
One API for scanned PDFs, photos, and Word files
POST /ai/extract_structured accepts images, scanned documents, Office and Google files, PDFs, spreadsheets, and code or text files. You pass each file by its Box file ID in the items array. Box applies optical character recognition (OCR) automatically to images and scanned documents, so you do not need to convert photos to PDF or run a separate OCR step.
For the full list, see .
Documents that mix text and scanned pages
The Enhanced Extract Agent supports PDFs that mix text pages and scanned pages. Extraction quality is typically lower than for documents where every page contains text.OCR by endpoint
Not every endpoint applies OCR. Useextract_structured for scanned documents and photos.
extract_structured has explicit multilingual support for English, Japanese, Chinese, Korean, and Cyrillic-based languages.
Pricing and AI Units
Box AI API usage consumes AI Units. Each Box plan includes a monthly AI Unit allocation, and you can buy more.
What consumes AI Units:
- Box AI APIs: All calls to the Box AI API, including Ask, text generation, and extraction, are chargeable.
- Extraction through the Box MCP server: Extraction tasks that an MCP tool runs use the API and consume AI Units.
- Confidence scores and references: Turning on confidence levels or bounding boxes consumes additional AI Units.
- Premium models: Choosing a premium model increases the rate of AI Unit consumption.
Cost per request
AI Unit consumption per request depends on the endpoint, the agent and model tier, and whether you request confidence scores or references. For rates, see the Box AI Units consumption table.Extraction across millions of documents
There is no batch extract endpoint. Requests with several files return one combined answer, so for per-file results you callextract_structured once per file and run the requests concurrently:
- Find the files with a , by listing folder items, or from a workflow.
- Call
extract_structuredfor each file ID with an identity that can access the file. - If the API returns
429 Too Many Requests, wait for the time in theRetry-Afterheader and retry. See . - Save each result on the file as a .
