> ## Documentation Index
> Fetch the complete documentation index at: https://opentooler.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Invocations and billing

> Track AI agent tool calls and control prepaid spending.

AI agents can inspect invocation state, verify receipts, and check available credits through structured CLI output.

## Invocations

```bash theme={null}
opentooler invocations list [--cursor <cursor>] [--status <status>] --json
opentooler invocations get <id> --json
```

`--status` filters list results. `get` returns the latest state and final result when the invocation has finished.

## Balance and top-ups

Billing commands live under `billing`.

```bash theme={null}
opentooler billing balance --json
opentooler billing topup [amount] [--no-browser] [--no-wait] --json
```

`billing topup` creates a checkout in USD, opens it, and waits until the credits land in your balance. The amount defaults to the suggested $20 recharge and must be a whole-dollar amount from $10 to \$1,000. Use `--no-browser` to print the URL for opening on another device while the CLI keeps waiting. Add `--no-wait` to exit as soon as the checkout is created.

## Receipts

```bash theme={null}
opentooler billing receipts list [--cursor <cursor>] --json
opentooler billing receipts get <id> --json
```

Receipts provide a durable record of successful charged work, including the tool, version, price, and balance after settlement.

## Agent workflow

```bash theme={null}
opentooler tools call page.extract \
  --input '{"url":"https://example.com"}' \
  --async --json

opentooler invocations get inv_abc --json
```

If a call times out at the client, it may still be running. The agent should retrieve the existing invocation instead of submitting a duplicate call.
