Usage & Analytics¶
Track your API consumption, costs and request patterns from the dashboard.
Dashboard Overview¶
Overview and Dashboard in the sidebar show:
- Total requests over a selected period
- Token consumption (prompt + completion tokens)
- Cost breakdown by model
- Request timeline — usage over time
Logs¶
Usage Logs gives a per-request history (Task Logs covers asynchronous jobs such as image, music and video generation):
| Field | Description |
|---|---|
| Time | Request timestamp |
| Key | Which API key was used |
| Model | Model called |
| Prompt Tokens | Input token count |
| Completion Tokens | Output token count |
| Cost | Credits charged |
| Status | Success / Error |
| Duration | Request processing time |
Filtering Logs¶
Filter by date range, key name, model and status.
API Access to Logs¶
Your API key can read its own request history:
The response is {"success": true, "data": [...]} — one entry per request made with that key, including model, token counts and the credits charged.
Session-only endpoints
/api/log/self and the other /api/log/… routes back the dashboard UI and require a login session; they do not accept API keys. Use /api/log/token from code. It is rate limited more tightly than the model endpoints, so poll it sparingly rather than after every request.
Cost Optimization Tips¶
- Choose the right model — smaller models are significantly cheaper for simple tasks
- Set
max_tokens— prevent unnecessarily long responses - Use streaming — doesn't save cost, but improves perceived latency
- Cache common queries — avoid redundant API calls for identical inputs
- Give each key its own quota — catch runaway usage early