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

# Billing and safety

> Control AI agent spending with credits, price limits, receipts, and safe recovery.

OpenTooler gives AI agents prepaid access to tools: your account balance is the hard spending limit, and calls are billed only after durable success.

## Credits and receipts

```bash theme={null}
opentooler billing balance --json
opentooler billing topup 10 --json
opentooler billing receipts list --json
opentooler billing receipts get rcpt_abc --json
```

`billing topup` creates a hosted checkout for an amount in USD. Receipts reconcile completed work.

## Set an agent's per-call maximum

```bash theme={null}
opentooler tools call video.transcript \
  --input '{"url":"https://www.youtube.com/watch?v=example"}' \
  --max-price 2.00 \
  --json
```

If the current quote is above the limit, OpenTooler stops before admission and returns a structured billing error.

## Idempotency and credentials

The CLI automatically creates an idempotency key for each paid agent call. If admission is uncertain, it returns `INVOCATION_ADMISSION_UNKNOWN` with a recovery command.

<Warning>
  Recover an uncertain paid call only with the exact same tool, input, and
  idempotency key. Do not create a new key or blindly repeat the call.
</Warning>

* Never put an API key in an agent prompt, command-line flag, or chat transcript.
* Use interactive login when setting up a local agent.
* Give unattended agents `OPENTOOLER_API_KEY` only through a secret manager or controlled environment.
* Do not instruct agents to inspect credential files.
