Skip to main content
GET
Account Balance

Overview

The /v1/account/balance endpoint retrieves your current credit balance and account information. Use this to check remaining credits before making API calls or to display balance in your application.
Authentication required - This endpoint requires a valid Stratus API key in the Authorization header.

Use Cases

Balance Monitoring

Check remaining credits before expensive operations

UI Display

Show real-time balance in your application dashboard

Budget Alerts

Trigger notifications when balance drops below threshold

Usage Tracking

Track credit consumption over time

Request

Headers

string
required
Your Stratus API key. Format: Bearer stratus_sk_live_... or just stratus_sk_live_...
No request body or query parameters required.

Response

Response Fields

number
Current credit balance (floating point). This is the number of credits remaining in your account.
string
Your unique account identifier
string
Email address associated with your account

Examples

Check Current Balance

Display Balance in UI

Balance Check Before Request

Low Balance Alert

Error Responses

401 Unauthorized

Missing or invalid API key:
Solution: Ensure you’re passing a valid Stratus API key in the Authorization header.

503 Service Unavailable

Billing service temporarily unavailable:
Solution: Retry after a short delay. If the issue persists, check the health endpoint for system status.

Performance

Balance updates are reflected immediately after API calls or credit purchases. For UI display, cache for 30-60 seconds to reduce API calls.

Best Practices

Cache Wisely

Cache balance for 30-60 seconds in your application to avoid excessive API calls

Check Before Large Operations

Verify sufficient credits before batching multiple requests

Set Alert Thresholds

Implement low-balance alerts to avoid service interruption

Display in Dashboard

Show balance prominently in your app’s UI for user awareness

Integration Patterns

Middleware for Balance Checking

Background Balance Monitoring

See Also

Pro Tip

Implement a balance cache with 30-60 second TTL in your application. This provides real-time balance visibility while minimizing API calls to the balance endpoint.