Credits API
Balance
Check your credit balance
GET
https://www.orthogonal.com/v1/credits/balance
Returns the current credit balance for the authenticated API key.
Authentication
Requires a valid API key via Authorization: Bearer YOUR_API_KEY.
- User API keys return the user’s credit balance.
- Organization API keys return the organization’s credit balance.
Response
{
"balance": "$5.00"
}
Response Fields
| Field | Type | Description |
|---|---|---|
balance | string | Formatted dollar balance |
Example
curl 'https://api.orthogonal.com/v1/credits/balance' \
-H 'Authorization: Bearer YOUR_API_KEY'
Check Sufficiency
Use POST /v1/credits/check to verify you have enough balance before making an API call:
curl -X POST 'https://api.orthogonal.com/v1/credits/check' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"amountCents": 100}'
{
"sufficient": true,
"balanceCents": 500000,
"requiredCents": 100,
"shortfallCents": 0
}