Analytics
View detailed usage statistics and insights
Overview
Get comprehensive analytics for team usage including requests, costs, models, and performance metrics.
Authentication: OAuth token
Required Scopes: billing:read or teams:read
Get Team Analytics
View detailed usage analytics for a team.
Endpoint: GET /api/analytics/:slug
const response = await fetch(
`https://hypery.ai/api/analytics/${teamSlug}?timeRange=7d`,
{ headers: { 'Authorization': `Bearer ${oauthToken}` } }
)
const analytics = await response.json()response = requests.get(
f'https://hypery.ai/api/analytics/{team_slug}',
params={'timeRange': '7d'},
headers={'Authorization': f'Bearer {oauth_token}'}
)
analytics = response.json()curl "https://hypery.ai/api/analytics/TEAM_SLUG?timeRange=7d" \
-H "Authorization: Bearer OAUTH_TOKEN"Query Parameters
Response
{
"overview": {
"totalRequests": 5420,
"totalCredits": 234.50,
"avgResponseTime": 1250,
"successRate": 98.5
},
"dailyStats": [
{
"date": "2025-11-16",
"requests": 850,
"credits": 42.25,
"avgResponseTime": 1200,
"successRate": 99.0
}
],
"modelUsage": [
{
"model": "anthropic/claude-3.5-sonnet",
"requests": 3200,
"credits": 156.75,
"tokensUsed": 1250000
}
],
"serviceBreakdown": [
{
"service": "chat",
"requests": 4200,
"credits": 189.50
},
{
"service": "images",
"requests": 1220,
"credits": 45.00
}
],
"endpointBreakdown": [
{
"endpoint": "/api/v1/chat/completions",
"requests": 4200,
"credits": 189.50,
"avgResponseTime": 1150,
"successRate": 98.8
}
],
"recentRequests": [
{
"id": "...",
"endpoint": "/api/v1/chat/completions",
"model": "anthropic/claude-3.5-sonnet",
"status": "success",
"credits": 0.05,
"tokensUsed": 523,
"requestDuration": 1200,
"requestedAt": "2025-11-16T10:30:00Z"
}
]
}Output Fields
Export Analytics
Export analytics data as CSV.
Endpoint: GET /api/analytics/export
const response = await fetch(
'https://hypery.ai/api/analytics/export?timeRange=30d',
{ headers: { 'Authorization': `Bearer ${oauthToken}` } }
)
const csvData = await response.text()response = requests.get(
'https://hypery.ai/api/analytics/export',
params={'timeRange': '30d'},
headers={'Authorization': f'Bearer {oauth_token}'}
)
csv_data = response.textcurl "https://hypery.ai/api/analytics/export?timeRange=30d" \
-H "Authorization: Bearer OAUTH_TOKEN" \
> analytics.csv