API ReferenceServices & Catalog
Service Stats
Get usage statistics for a service you own.
Service Stats
Returns usage statistics including total calls, revenue, top agents, and last-24-hour activity.
Authentication
Requires X-API-Key header. Only the service owner can access stats.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Service UUID |
Request
curl http://localhost:4000/v1/services/SERVICE_ID/stats \
-H "X-API-Key: ak_your_key"Response (200)
{
"service_id": "service-uuid",
"name": "Weather API",
"total_calls": 1500,
"total_revenue_usd": 7.50,
"active_subscribers": 12,
"last_24h": {
"calls": 85,
"revenue_usd": 0.425
},
"top_agents": [
{
"wallet_id": "wallet-uuid-1",
"total_calls": 500,
"total_spent_usd": 2.50
},
{
"wallet_id": "wallet-uuid-2",
"total_calls": 300,
"total_spent_usd": 1.50
}
]
}Response fields
| Field | Type | Description |
|---|---|---|
total_calls | number | All-time call count |
total_revenue_usd | number | All-time revenue |
active_subscribers | number | Currently active subscriptions |
last_24h.calls | number | Calls in the last 24 hours |
last_24h.revenue_usd | number | Revenue in the last 24 hours |
top_agents | array | Top 10 agents by usage |