Skip to main content

Billing

Billing is 2× the actual upstream provider cost, estimated before queueing and trued-up after completion. The DOCEX_MARKUP_MULTIPLIER environment variable controls the markup (default: 2).

Pricing model

Docex uses dynamic upstream-cost billing:
  1. Before execution — the worker estimates cost based on file metadata (page count, image dimensions, task complexity)
  2. After execution — the actual upstream cost is measured and charged
  3. Markup — the billed amount is upstreamCost × DOCEX_MARKUP_MULTIPLIER (default )
  4. Refund — if actual cost is below the estimate, the difference is refunded to your wallet

Cost examples

Confirmation threshold

Runs exceeding DOCEX_COST_CONFIRMATION_THRESHOLD_USD (default $1.00) require explicit user confirmation. You can confirm by:
  • Passing confirmCost: true in the run request
  • Setting a maxCostUsd budget — the job aborts if the estimate exceeds it

Wallet

Docex uses a prepaid wallet. Top up via the dashboard or CLI:
Minimum top-up amount is configurable via DOCEX_MIN_WALLET_TOP_UP_USD. Default top-up amount is configurable via DOCEX_DEFAULT_TOP_UP_USD.

Environment variables