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

# Wallet, Runs & Usage

> Check your wallet balance, list runs, view usage history, and manage billing from the SDK or CLI.

# Wallet, Runs & Usage

## Wallet

Check your prepaid wallet balance:

```js theme={null}
const wallet = await docex.wallet();
console.log(wallet.balanceUsd);
```

```bash theme={null}
docex wallet
```

## Runs

List recent analysis runs:

```js theme={null}
const runs = await docex.listRuns();
```

Get a specific run:

```js theme={null}
const run = await docex.getRun("job_abc123");
```

## Run trace

View the provider execution trace for debugging:

```js theme={null}
const trace = await docex.runTrace("job_abc123");
```

## Usage

Get usage statistics since a date:

```js theme={null}
const usage = await docex.usage({ since: "2025-01-01" });
```

```bash theme={null}
docex usage --since 2025-01-01
```

## Billing status

```js theme={null}
const status = await docex.billingStatus();
```

```bash theme={null}
docex billing status
```

## Top up

Create a billing top-up session:

```js theme={null}
const session = await docex.createBillingTopUpSession({ amountUsd: 10 });
```

```bash theme={null}
docex billing top-up --amount 10
```
