Documentation Index
Fetch the complete documentation index at: https://docs.docex.dev/llms.txt
Use this file to discover all available pages before exploring further.
Billing
Billing is 2× the actual upstream provider cost, estimated before queueing and trued-up after completion. TheDOCEX_MARKUP_MULTIPLIERenvironment variable controls the markup (default:2).
Pricing model
Docex uses dynamic upstream-cost billing:- Before execution — the worker estimates cost based on file metadata (page count, image dimensions, task complexity)
- After execution — the actual upstream cost is measured and charged
- Markup — the billed amount is
upstreamCost × DOCEX_MARKUP_MULTIPLIER(default2×) - Refund — if actual cost is below the estimate, the difference is refunded to your wallet
Cost examples
| Input | Estimated upstream cost | Billed price (2×) |
|---|---|---|
| Single image analysis | ~0.05 | ~0.10 |
| 10-page PDF | ~0.50 | ~1.00 |
| 200-page PDF | ~2.00 | ~4.00 |
Confirmation threshold
Jobs exceedingDOCEX_COST_CONFIRMATION_THRESHOLD_USD (default $1.00) require explicit user confirmation. You can confirm by:
- Passing
confirmCost: truein the run request - Setting a
maxCostUsdbudget — the job aborts if the estimate exceeds it
Wallet
Docex uses a prepaid wallet. Top up via the dashboard or CLI:DOCEX_MIN_WALLET_TOP_UP_USD. Default top-up amount is configurable via DOCEX_DEFAULT_TOP_UP_USD.
Environment variables
| Variable | Default | Purpose |
|---|---|---|
DOCEX_MARKUP_MULTIPLIER | 2 | Markup on upstream cost |
DOCEX_COST_CONFIRMATION_THRESHOLD_USD | 1.00 | Jobs above this require confirmation |
DOCEX_MIN_WALLET_TOP_UP_USD | — | Minimum wallet recharge amount |
DOCEX_DEFAULT_TOP_UP_USD | — | Default wallet recharge amount |
DOCEX_BILLING_CURRENCY | USD | Wallet currency |