Skip to main content

Wallet, Runs & Usage

Wallet

Check your prepaid wallet balance:
const wallet = await docex.wallet();
console.log(wallet.balanceUsd);
docex wallet

Runs

List recent analysis runs:
const runs = await docex.listRuns();
Get a specific run:
const run = await docex.getRun("job_abc123");

Run trace

View the provider execution trace for debugging:
const trace = await docex.runTrace("job_abc123");

Usage

Get usage statistics since a date:
const usage = await docex.usage({ since: "2025-01-01" });
docex usage --since 2025-01-01

Billing status

const status = await docex.billingStatus();
docex billing status

Top up

Create a billing top-up session:
const session = await docex.createBillingTopUpSession({ amountUsd: 10 });
docex billing top-up --amount 10