Analytics Overview
Track usage, cost, latency, and errors for your AI traffic — in the dashboard or through the Metrics API.
Where analytics live
Your project's analytics are on the AI Gateway overview. Open your project, go to AI Gateway → Overview, and pick a period: Last hour, 24 hours, 7 days, 30 days, or All time.
The overview shows:
- Requests and Success rate over time
- Spend over time
- Tokens, split into input and output
- Model usage — requests per model
- Cost by provider — spend per provider
- Latency — P50, P95, and P99 over time
- Errors — failed, filtered, and blocked requests, with the error rate
- The five most recent requests, with a link to the full Logs
See Usage & Logs for what each chart shows.
Key metrics
Common use cases
Performance debugging
Watch the Latency chart for P95/P99 spikes, then open AI Gateway → Logs and filter by model to find the slow requests.
Cost control
Use Cost by provider and Model usage to see where spend goes, and compare models before switching.
Capacity planning
Use request trends to forecast usage and make sure your organization has enough credits.
Accessing analytics via the API
Fetch metrics for your own dashboards with the Metrics API (https://api.cencori.com/v1/metrics). period accepts 1h, 24h (default), 7d, 30d, or mtd (month to date):
// fetch-analytics.ts
const response = await fetch(
'https://api.cencori.com/v1/metrics?period=24h',
{
headers: {
'Authorization': `Bearer ${CENCORI_API_KEY}`
}
}
);
const metrics = await response.json();
// metrics.requests, metrics.cost, metrics.tokens, metrics.latency,
// metrics.providers, and metrics.modelsSee the Metrics API reference for the full response.
Best practices
- Review weekly: check your cost and success rate trends.
- Track versions: use different API keys for different versions of your app, then filter Logs by API key to compare them.

