Skip to main content
Endpoints for account management and system information.

Current Balance

Check the remaining balance for your API key.

Endpoint

Headers

string
required
Bearer token for API authentication. Format: Bearer YOUR_API_KEY

Response

integer
HTTP status code.
string
Human-readable status message.
number
Remaining balance (in USD) for the current API key.
Check your balance programmatically before submitting large batches to avoid mid-run failures due to insufficient funds.

Examples

Error Responses

See Errors for possible 401, 403, or 429 responses.

Integration best practices

  • Pre-flight balance checks: Call /apikeys/current-balance during system initialization or before dispatching large batch generation workloads to prevent mid-pipeline failures.
  • Automated threshold monitoring: Set up routine health checks in your backend service to send internal alerts or trigger auto-recharge when your account balance falls below an operational threshold.
  • Cache considerations: Balance responses reflect real-time credit state; avoid caching balance results across multiple generation workers.