Skip to main content

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. 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

InputEstimated upstream costBilled price (2×)
Single image analysis~0.020.02–0.05~0.040.04–0.10
10-page PDF~0.100.10–0.50~0.200.20–1.00
200-page PDF~1.001.00–2.00~2.002.00–4.00

Confirmation threshold

Jobs 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:
docex billing top-up --amount 10
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

VariableDefaultPurpose
DOCEX_MARKUP_MULTIPLIER2Markup on upstream cost
DOCEX_COST_CONFIRMATION_THRESHOLD_USD1.00Jobs above this require confirmation
DOCEX_MIN_WALLET_TOP_UP_USDMinimum wallet recharge amount
DOCEX_DEFAULT_TOP_UP_USDDefault wallet recharge amount
DOCEX_BILLING_CURRENCYUSDWallet currency