Balance API
Check your account credit balance using your API key.Endpoint
GET/api/v1/balance
Authentication
Send your API key in theAuthorization header:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Execute a workflow with custom input parameters and receive the full generated result.
/api/v1/balance
Authorization header:
Authorization: Bearer YOUR_API_KEY
curl -X GET "https://aitutor-api.vercel.app/api/v1/balance" \
-H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxx"
{
"success": true,
"credits": 1234
}
| Field | Type | Description |
|---|---|---|
| success | boolean | Always true on success |
| credits | number | Current credit balance |
{
"error": "Unauthorized. Please provide a valid secret key.",
"success": false
}
{
"error": "Rate limit exceeded",
"success": false
}
{
"error": "Failed to retrieve balance, please try again or contact support.",
"success": false,
"code": "internal_server_error"
}
| Header | Description |
|---|---|
| x-ratelimit-limit | Rate limit per window |
| x-ratelimit-remaining | Remaining requests in window |
