Get usage statistics
Retrieve current API usage statistics including:
- Total requests (today, this month)
- Request breakdown by type (chat, code, RAG, grounding)
- Rate limit status (RPM, RPD, TPM)
- Credit usage and remaining balance
GET
/z1/usage
curl \
--request GET 'https://zenux-api.redglacier-fb4abe56.southafricanorth.azurecontainerapps.io/z1/usage' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"user_id": "user_123",
"tier": "startup",
"usage": {
"total_requests": 1203,
"chat_requests": 1000,
"code_executions": 50,
"rag_requests": 100,
"grounding_searches": 53
},
"limits": {
"rpm": 1000,
"rpd": 10000,
"monthly_total": 30000
},
"rate_limit_status": {
"rpm_remaining": 998,
"rpd_remaining": 9847,
"monthly_remaining": 28797,
"reset_time": "2025-11-14T03:00:00Z"
}
}
Response examples (401)
{
"code": "UNAUTHORIZED",
"status": "error",
"message": "Invalid API key"
}