curl -X GET "https://rivin.ai/api/user/credits" \
-H "Content-Type: application/json" \
-H "x-api-key: (YOUR_API_KEY_HERE)"
{
"user_email": "user@example.com",
"credits": {
"total": 300000,
"used_this_month": 114500,
"remaining": 185500,
"usage_percentage": 38
},
"billing_period": {
"current_period_start": "2024-01-01T00:00:00Z",
"next_refresh_date": "2024-02-01T00:00:00Z",
"days_until_refresh": 12
},
"account_info": {
"created_at": "2023-12-15T10:30:00Z",
"last_updated": "2024-01-15T14:22:00Z"
}
}
User Endpoints
Get User Credit Information
This endpoint allows users to query their remaining credits and billing period information. It requires a valid API key and returns comprehensive credit usage information.
GET
/
user
/
credits
curl -X GET "https://rivin.ai/api/user/credits" \
-H "Content-Type: application/json" \
-H "x-api-key: (YOUR_API_KEY_HERE)"
{
"user_email": "user@example.com",
"credits": {
"total": 300000,
"used_this_month": 114500,
"remaining": 185500,
"usage_percentage": 38
},
"billing_period": {
"current_period_start": "2024-01-01T00:00:00Z",
"next_refresh_date": "2024-02-01T00:00:00Z",
"days_until_refresh": 12
},
"account_info": {
"created_at": "2023-12-15T10:30:00Z",
"last_updated": "2024-01-15T14:22:00Z"
}
}
🚧 Coming Soon: This endpoint is currently in development and will be available soon. Stay tuned for updates!
Credit Cost: This endpoint costs 0 credits to query your credit information. It’s free to check your remaining credits and billing status.
Rate Limit: This endpoint has a default rate limit of 10 requests/second per account. Need higher limits? Contact our support team - we can accommodate any rate limit requirements on request.
curl -X GET "https://rivin.ai/api/user/credits" \
-H "Content-Type: application/json" \
-H "x-api-key: (YOUR_API_KEY_HERE)"
{
"user_email": "user@example.com",
"credits": {
"total": 300000,
"used_this_month": 114500,
"remaining": 185500,
"usage_percentage": 38
},
"billing_period": {
"current_period_start": "2024-01-01T00:00:00Z",
"next_refresh_date": "2024-02-01T00:00:00Z",
"days_until_refresh": 12
},
"account_info": {
"created_at": "2023-12-15T10:30:00Z",
"last_updated": "2024-01-15T14:22:00Z"
}
}
Credit Refresh: Credits refresh monthly based on your billing cycle. The exact refresh date depends on when your account was created or when you last upgraded your plan.