Check remaining credits
check_balanceCheck remaining account credits before a document batch or when a scan is refused for lack of credit. Shows free and paid balances, credits spent, and scan counters by status.
Instructions
Return how many credits are left on the account and what the current period has used: the balance, split into this month's free credits (100 every month, drawn first) and the paid credits, the credits spent, and the scan counters broken down by status (recognized, unreadable, no document found, unsupported document, rejected). Takes no arguments and calls GET /v1/usage; under the public sandbox key it answers without calling anything. One recognised document draws one credit, at $0.01; scans that recognised nothing are counted and never charged. Needs a real API key – under the public sandbox key there is no account behind the call, and the answer says so instead of reporting zeros that read like a balance. Use it before working through a batch of documents, or when a scan is refused for lack of credit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scans | Yes | ||
| period | Yes | Bounds of the current usage period (UTC calendar month). | |
| credits_spent | Yes | Credits charged within the period. | |
| free_allowance | Yes | This month's free credits, drawn before paid credits; null when the account may not draw free credits (its email address is not confirmed, or its free credits were withdrawn) and for a key with no account. | |
| balance_credits | Yes | Credits currently available to the account: this month's free credits plus the paid credits; null for a key with no account (the public sandbox key). | |
| paid_balance_credits | Yes | Paid credits: bought or granted to the account, drawn once this month's free credits are used up, and never reset; null only for a key with no account (the public sandbox key). | |
| credits_spent_by_kind | Yes | Credits charged within the period, by the kind that paid. |