get_credits
Check your credit balance and transaction history to audit what each analysis costs, verify sufficient credits before a batch, and resolve insufficient_credits errors.
Instructions
Get the credit balance and transaction ledger for this API key (GET /v1/credits). Returns balance_seconds (the authoritative balance, in billable seconds), grant_seconds, used_seconds, and a paginated transaction list where each debit carries the analysis/stream id it came from (source_id, source_type). Use this to audit what each analysis cost, check the balance before a batch job, or diagnose an insufficient_credits error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Transactions per page (default 20). | |
| before | No | Cursor — return transactions older than this id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object | Yes | ||
| has_more | Yes | ||
| transactions | Yes | ||
| used_seconds | Yes | ||
| grant_seconds | Yes | ||
| balance_seconds | Yes | Seconds of analysis remaining. The authoritative balance. |