Skip to main content
GET
/
api
/
user
/
balance
Query User Balance
curl --request GET \
  --url https://api.vidgo.ai/api/user/balance \
  --header 'Authorization: Bearer <token>'
{
  "code": 200,
  "data": {
    "email": "[email protected]",
    "credits_amount": 17276
  }
}

Query User Balance

Query the current credit balance of your user account in real-time.

Use Cases

Dashboard Display

Show real-time account balance in your application dashboard

Balance Alerts

Set up notifications when credits fall below a threshold

Recharge Reminders

Prompt users to top up credits before running out

Usage Tracking

Monitor credit consumption and track spending patterns

Important Notes

Real-time Balance: The balance returned reflects your current credit amount at the time of the request.
Rate Limiting: Avoid excessive polling. Cache the balance and refresh only when necessary (e.g., after completing a generation task).
Credit Deduction: Credits are deducted only when generation tasks complete successfully. Failed tasks do not consume credits.

Authorizations

Authorization
string
header
required

All API endpoints require Bearer Token authentication

Get your API Key:

Visit the API Key Management Page to get your API Key

Add it to the request header:

Authorization: Bearer YOUR_API_KEY

Response

Balance retrieved successfully

code
integer
required

HTTP status code

Example:

200

data
object
required