get_balance
Get a user's credit balance(s). Identify the user by email (checked first) or user_id (your external user ID). An unknown user returns an empty balances array, not an error. Costs 1 CRD (platform credit) per call, charged even when the call is then rejected (a 429 RATE_LIMITED costs nothing). Error results include request_id; quote it to support.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | User email (checked first) | ||
| api_key | No | Cred API key (optional if set via the x-api-key header) | |
| user_id | No | External user ID (fallback) | |
| project_id | No | Cred project ID (optional; the API key already identifies the project) | |
| x402_payment | No | Base64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD | |
| credit_type_id | No | Only this credit type |