Provisioning Key RequiredAccount management endpoints require authentication with a provisioning key, not a regular API key. This ensures secure administrative access to your account.You can obtain your provisioning key from the NagaAI Dashboard.
Quick Navigation
Balance Monitoring
Check your current account balance and available credits in real-time
Activity Tracking
View detailed usage statistics, costs, and spending patterns
API Key Management
Create, configure, and control multiple API keys with limits
Overview
Account management includes three main areas that work together to give you complete control over your NagaAI account:- Balance Monitoring: Check your current account balance and available credits with real-time spending visibility, automated alerts, and billing workflow integration.
- Activity Tracking: View detailed usage statistics, costs, and patterns including cost optimization insights, usage trend analysis, and model performance tracking.
- API Key Management: Create, configure, and control multiple API keys with environment separation, budget control through per-key limits, and enhanced security.
What You Can Do
- Monitor spending in real-time
- Set up budget alerts and usage tracking
- Organize API keys for different environments
- Control access with per-key credit limits
- Analyze usage patterns by model and time period
- Track costs per project or team
Balance Monitoring
Check your account balance at any time to see available credits. This is useful for:- Monitoring remaining funds before large batch operations
- Setting up automated low-balance alerts
- Integrating balance checks into billing workflows
Response Format The balance is returned as a string representing USD
amount (e.g.,
"125.50").Activity Tracking
View comprehensive usage statistics for your account, including daily breakdowns, model usage, and per-key analytics. This powerful feature helps you:- Understand spending patterns over time
- Identify which models are most used
- Track usage per API key for cost allocation
- Analyze daily trends and optimize usage
Usage Statistics Include
- Total Stats: Overall requests, costs, and tokens for the period to monitor aggregate spending and track token consumption.
- Daily Breakdown: Day-by-day analysis of usage to identify usage spikes, trends, and compare day-over-day performance.
- Top Models: Most frequently used models with associated costs to help optimize model selection and understand cost per model.
- API Key Usage: Per-key statistics for cost attribution, allowing you to allocate costs by project or team and track usage by environment.
Timeframe & Caching - Query statistics for 1-30 days (default: 30
days) - Results are cached for 5 minutes for optimal performance
API Key Management
Organize and control access to your account with multiple API keys. Each key can have its own configuration, making it easy to:- Separate production and development environments
- Set individual spending limits per project
- Enable or disable keys without affecting others
- Track usage separately for different applications
Create API Keys
You can create new API keys programmatically with custom names and optional credit limits. Here’s an example:List, Update & Delete Keys
- List All Keys
- Update Keys
- Delete Keys
View all API keys and their configurations:
Common Use Cases
- Budget Management
- Multi-Environment Setup
- Cost Analysis
Set up automated monitoring to prevent overspending: