Check prepaid balance
get_balanceShows how many scanned pages are left on the prepaid balance for this API key.
Use when: before a batch of scans or photos, or when parse_invoice answered insufficient_balance and the remaining amount must be confirmed. Do not use when: the user asks about invoice content — that is get_result.
Side effects and cost: none. The number comes from the same counter that blocks parsing, so it can change between two calls while a batch is running.
Parameter interactions and edge cases: this is the same counter that blocks parsing, so a balance of zero makes the next parse_invoice fail with insufficient_balance and a topup_link is the only way forward. Two keys of one account see the same number, because usage is counted per account. The number can drop between two calls while a batch runs, and pages parsed on the free cabinet allowance are not part of it.
Returns: {ok, balance} with remaining pages and the current plan.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_balance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | DueBuddy API key (starts with dd_). Omit it when the server was added with an X-Api-Key header or DUEBUDDY_API_KEY is set; the call returns api_key_required instead of raising. |