Configuration
All DocIntel settings are managed via environment variables (or a .env file). Settings are grouped into nested sections — set them with a double-underscore delimiter.
bash
# Example: set the LLM provider
LLM__PROVIDER=openai
LLM__API_KEY=sk-...Server
| Variable | Default | Description |
|---|---|---|
SERVER__HOST | 0.0.0.0 | Bind address |
SERVER__PORT | 8200 | Bind port |
SERVER__WORKERS | 2 | Uvicorn worker count |
SERVER__LOG_LEVEL | info | Log level (debug, info, warning, error) |
SERVER__CORS_ORIGINS | * | Comma-separated allowed CORS origins |
SERVER__API_KEY | (empty) | Bearer token required on all API calls |
SERVER__MAX_UPLOAD_MB | 100 | Maximum file upload size in MB |
SERVER__MAX_CONCURRENT_JOBS | 10 | Max simultaneous background pipeline jobs |
LLM
| Variable | Default | Description |
|---|---|---|
LLM__PROVIDER | openai | openai · anthropic · gemini · ollama |
LLM__API_KEY | (empty) | API key for the chosen provider |
LLM__MODEL | gpt-5.6-terra | Override the default model (usually set via ModelRegistry) |
LLM__BASE_URL | (none) | Custom endpoint URL (for Ollama, Azure, etc.) |
LLM__TEMPERATURE | 0.0 | LLM temperature for extraction prompts |
LLM__MAX_TOKENS | 4096 | Max response tokens |
LLM__TIMEOUT_S | 60 | Per-call timeout in seconds |
Model Registry
All profiles use models from the central ModelRegistry. Override the four tiers by setting LLM__MODEL or editing config.py:
| Tier | Default Model | Used By |
|---|---|---|
FLAGSHIP | gpt-5.6-sol | AEC, Contract |
DEFAULT | gpt-5.6-terra | Financial, Scientific, General |
VISION | gpt-5.6-sol | Image / sketch parsing |
NANO | gpt-6-luna | High-volume, cost-sensitive extraction |
LLM Windows
Controls how document text is windowed before being sent to the LLM.
| Variable | Default | Description |
|---|---|---|
LLM_WINDOW__SIZE | 1000 | Characters per extraction window |
LLM_WINDOW__OVERLAP | 100 | Overlap between adjacent windows |
LLM_WINDOW__MIN_SIZE | 50 | Minimum window size (smaller chunks are merged) |
LLM_WINDOW__WINDOW_CONCURRENCY | 8 | Max concurrent LLM calls per document (1–64) |
LLM_WINDOW__JOB_TIMEOUT_S | 600 | Per-document wall-clock timeout (0 = unlimited) |
OCR
| Variable | Default | Description |
|---|---|---|
OCR__ENABLED | true | Enable OCR for scanned / image documents |
OCR__ENGINE | tesseract | tesseract · azure_doc_intel · google_vision · textract |
OCR__AZURE_ENDPOINT | (none) | Azure Document Intelligence endpoint |
OCR__AZURE_KEY | (none) | Azure Document Intelligence key |
OCR__GOOGLE_CREDENTIALS_JSON | (none) | Path to Google Cloud credentials JSON |
OCR__AWS_REGION | us-east-1 | AWS region for Textract |
OCR__LANGUAGES | en | Comma-separated OCR languages |
Sketch / Vision
| Variable | Default | Description |
|---|---|---|
SKETCH__ENGINE | openai-vision | openai-vision · azure-vision · google-vision · local |
SKETCH__MODEL | gpt-5.6-sol | Vision model ID |
SKETCH__DETAIL_LEVEL | high | OpenAI image detail: low · high · auto |
SKETCH__MAX_TOKENS | 2048 | Max tokens for vision model response |
SKETCH__CONFIDENCE_THRESHOLD | 0.5 | Minimum confidence for labels / objects |
Purple8 Graph (optional)
Connection to Purple8 Graph for knowledge graph emission. Not required — DocIntel works standalone.
| Variable | Default | Description |
|---|---|---|
GRAPH__BASE_URL | http://localhost:8100 | Purple8 Graph API URL |
GRAPH__API_KEY | (empty) | Graph API authentication key |
GRAPH__TENANT_ID | (none) | Multi-tenant tenant ID |
GRAPH__AUTO_COMMIT | true | Auto-commit extracted data to Graph |
GRAPH__TIMEOUT_S | 30 | Connection timeout |
Licensing
| Variable | Default | Description |
|---|---|---|
LICENSE__KEY | (optional) | Cryptographically signed license key string (omit for Community tier) |
LICENSE__ENFORCE | true | Set false to disable license enforcement (dev mode) |
LICENSE__GRACE_PERIOD_HOURS | 72 | Hours to allow after license expiry before blocking |
See Licensing & Installation for how to obtain and activate your license key.
Storage
DocIntel uses an embedded durable p8l log (SessionContentStore) at /data/docintel_jobs.p8l out of the box — no external Redis or database sidecar required.
| Variable | Default | Description |
|---|---|---|
STORAGE__TEMP_DIR | /tmp/purple8_docintel | Temporary file directory |
Example .env
bash
# === Required ===
LLM__API_KEY=sk-proj-...
SERVER__API_KEY=my-secret-api-key-32chars-min
# === License (optional) ===
LICENSE__KEY=eyJ0aWVyIjoicHJvIi...
# === LLM ===
LLM__PROVIDER=openai
# LLM__BASE_URL=http://localhost:11434 # Uncomment for Ollama
# === OCR ===
OCR__ENGINE=tesseract
# === Graph (optional) ===
# GRAPH__BASE_URL=http://localhost:8100
# GRAPH__API_KEY=graph-api-key
# === Storage ===
STORAGE__JOB_STORE=memory
# STORAGE__JOB_STORE=redis
# STORAGE__REDIS_URL=redis://localhost:6379/0
# === Server ===
SERVER__PORT=8200
SERVER__WORKERS=1
SERVER__LOG_LEVEL=info
SERVER__MAX_UPLOAD_MB=100
SERVER__MAX_CONCURRENT_JOBS=10