OCR service configuration
For OCR functionality, Reducto uses AWS Textract with automatic region selection and load balancing across multiple regions.Textract region configuration
Format
TheTEXTRACT_REGIONS environment variable accepts a comma-separated list of region:quota pairs:
- With quota:
region:quota(e.g.,us-east-1:100) - Without quota:
region(defaults to quota of 1) - Mixed:
us-east-1:50,us-west-2,eu-west-1:25
Use cases
This configuration is particularly useful for:- Government Cloud deployments requiring specific regions (e.g.,
us-gov-west-1,us-gov-east-1) - Data residency requirements restricting processing to certain geographic regions
- Custom quota management when you have different service limits across regions
- Network restrictions where only certain regions are accessible from your deployment
Examples
Government Cloud:Azure Vision OCR
For OCR functionality using Azure Computer Vision service.Single endpoint
Multiple endpoints (failover and load balancing)
For setups with multiple endpoints, useAZURE_VISION_ARRAY. If any endpoint returns an error (rate limits, connection failures, server errors), Reducto automatically tries the remaining endpoints before failing.
With
load_balance (default), requests are distributed randomly across endpoints. With priority, endpoints are tried in the order listed, useful when you have a preferred region and want others used only as fallbacks.
When
AZURE_VISION_ARRAY is set, AZURE_VISION_ENDPOINT and AZURE_VISION_KEY are ignored.LLM provider environment variables
Reducto supports multiple LLM providers through environment variables. Below is a complete list of supported providers and their required environment variables. Features that call an LLM, such as intelligent spreadsheet clustering (spreadsheet_table_clustering set to intelligent), use the providers that you configure on this page. If none of them can serve intelligent clustering, Reducto uses default clustering.
LiteLLM proxy
OpenAI
Azure OpenAI
Anthropic
google:<model>, for example google:gemini-3.7-flash, to call Gemini on Vertex AI.
Gemini API through Google AI Studio
Usegoogle_aistudio:<model>. Set GEMINI_API_KEY to your Google AI Studio key, and name the provider in a deployment setting: LOCAL_KV_MODEL, AGENTIC_TABLES_MODEL, or LOCAL_EXTRACT_CITATIONS_MODEL. An API request cannot set it:
LITELLM_PROXY_URL is set, and GCP_REGION does not apply to it.
AWS Bedrock
AI usage tracking
Reducto includes a comprehensive AI usage tracking system that monitors language model consumption throughout the document processing pipeline. This feature provides detailed insights into token usage, request counts, and model utilization for billing and optimization purposes.How AI usage tracking works
The AI usage tracking system operates at the block level within the parsing pipeline:- Token Counting: Each AI operation (table summarization, figure analysis, key-value extraction, etc.) records token consumption
- Request Tracking: The system counts API calls made to each model
- Model Identification: Usage is tracked per model type with provider information
- Aggregation: Usage is aggregated across all blocks and pages for comprehensive reporting
Available via /parse API
AI usage information is currently only available through the/parse API endpoint using the custom_format parameter. This feature is not available in other API endpoints.
Usage information structure
When enabled, the system returns anAIUsageInfo object containing:
Field descriptions
did_use_ai_models: Boolean indicating whether any AI models were used during processingai_usage_info: Array of usage information objects, one per model type usedpromptTokenCount: Total input tokens sent to the modelcompletionTokenCount: Total output tokens generated by the modelcachedTokenCount: Total cached tokens used (when supported by provider)requestCount: Number of API calls made to this modelmodelType: Standardized model identifiermodelProvider: Provider name (e.g., “anthropic”, “openai”)modelRateLimitFamily: Rate limiting group for the model
Enabling AI usage tracking
To retrieve AI usage information, set thecustom_format parameter to "ai_usage" in your /parse request:
Tracked AI operations
The system tracks usage from these AI-powered features:- Table Summarization: Analysis and description of complex tables
- Figure Summarization: Analysis and description of images and charts
- Key-Value enrichment: Enrichment for form-like regions within documents
Model name standardization
The system automatically standardizes model names for consistent reporting:- Internal model identifiers are mapped to standard formats
- Provider information is automatically added
- Rate limit families are identified for capacity planning
Possible model identifiers
The following model identifiers may appear in themodelType field of AI usage tracking responses, if you have OpenAI and Anthropic access enabled:
OpenAI models
gpt-4o-2024-08-06gpt-4o-mini-2024-07-18
Anthropic models
claude-3-5-haiku-20241022claude-3-5-sonnet-20240620