Image source. Accepts any of:
/tmp/scan.png).data:image/...;base64, prefix).Optional strategyVision strategy controlling which tiers are used.
'progressive' — start local, escalate to cloud only when confidence
is below confidenceThreshold. Best cost/quality balance.'local-only' — never call cloud APIs. For air-gapped / privacy use.'cloud-only' — skip local processing, send straight to a cloud LLM.
Highest quality but highest cost.'progressive'
Optional confidenceMinimum confidence threshold (0-1) to accept an OCR result from a local tier without escalating to the next tier.
Only meaningful for the 'progressive' strategy.
0.7
Optional providerCloud LLM provider for tier-3 fallback (e.g. 'openai', 'anthropic',
'google'). When omitted the provider is auto-detected from environment
variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.).
Optional modelCloud LLM model override. When omitted the provider's default vision
model is used (e.g. gpt-4o for OpenAI).
Optional apiAPI key for the cloud provider. When omitted the key is read from the standard environment variable for the provider.
Options accepted by performOCR.