Usage API

Usage statistics and logs

GET /v1/usage

Returns API usage logs.

Query Parameters

limit integer optional

The maximum number of records to return. Default: 50, Maximum: 100

offset integer optional

The number of records to skip (for pagination). Default: 0

Usage Summary

GET /v1/usage/summary

Returns aggregate usage statistics.

JSON Response
{
  "period": "30d",
  "total_requests": 1250,
  "successful_requests": 1230,
  "failed_requests": 20,
  "total_tokens": {
    "input": 312000,
    "output": 146000,
    "total": 458000
  },
  "total_cost": 45.800000,
  "average_response_time_ms": 1250.45,
  "currency": "USD"
}

Per-Model Usage

GET /v1/usage/models

Returns per-model usage statistics.

Want help finding the right model?