Get comprehensive statistics for a specific gatewayThis endpoint provides usage statistics for a gateway (e.g., openrouter, portkey, groq, deepinfra). This fixes the "Top Provider: N/A" issue in your UI!Args: gateway: Gateway name ('openrouter', 'portkey', 'featherless', 'deepinfra', 'chutes', 'groq') time_range: Time range for statisticsReturns: Gateway statistics including:
Total requests, tokens, and cost
Unique users, models, and providers
Top provider used through this gateway
Provider breakdown
Performance metrics
Example: GET /catalog/gateway/openrouter/stats?time_range=24h GET /catalog/gateway/deepinfra/stats?time_range=7d
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
Query Params
Responses
🟢200OK
application/json
Successful Response
Body
🟠422Unprocessable Entity
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request GET 'https://api.gatewayz.ai/v1/gateway//stats?time_range' \
--header'Authorization: Bearer <token>'