Credit Balance
Query your current available credit balance to manage usage and prevent job failures.
GET
/api/v1/balanceQuick Implementation
curl -X GET https://api.srtgen.com/api/v1/balance \ -H "x-api-key: <YOUR_API_KEY>"
GEThttps://api.srtgen.com/api/v1/balance
This endpoint returns the total usable balance, which includes both your monthly subscription allowances and any extra top-up credits you have purchased.
Response Structure
| Field | Type | Description |
|---|---|---|
| Identity & Context | ||
user | Object | Basic information about the authenticated user. |
user.name | String | The display name of the user. |
user.email | String | The registered email address. |
| Credit Balance Breakdown | ||
credits | Object | Detailed credit balance breakdown. |
credits.totalBalance | Number | Sum of all usable credits (Allowances + Extra). |
credits.extraCredits | Number | Permanent top-up credits. |
credits.plans | Array | List of active subscription plans. |
plans[].name | String | Display name of the plan (e.g., 'Pro Plan'). |
plans[].status | String | Subscription status (active, past_due). |
plans[].balance | Number | Credits remaining in this specific cycle. |
| Cloud Storage Usage | ||
storage | Object | Cloud storage usage statistics. |
storage.usage | Number | Current storage usage in bytes. |
storage.limit | Number | Maximum storage limit in bytes based on your plan. |
storage.formattedUsage | String | Human-readable usage (e.g., '200 MB'). |
storage.formattedLimit | String | Human-readable limit (e.g., '10 GB'). |
Sample Response: 200 OK
{ "success": true, "user": { "name": "Alex Rivera", "email": "[email protected]" }, "credits": { "totalBalance": 1250, "totalMonthlyCredits": 1000, "extraCredits": 250, "plans": [ { "id": "starter", "name": "Starter Plan", "status": "active", "balance": 1000, "total": 1000, "resetTime": "2026-04-29T17:48:46.000Z" } ] }, "storage": { "usage": 209715200, "limit": 10737418240, "formattedUsage": "200 MB", "formattedLimit": "10 GB" }, "updatedAt": "2026-03-29T17:48:46.000Z" }
Errors
| Status | Code | Description |
|---|---|---|
| 401 | unauthorized | API key is missing or invalid. |
| 500 | server_error | An unexpected internal error occurred. |
Was this page helpful?