GET
/v1/usage/summary

Query Parameters

days?integer

Number of days to look back

Default30
Range1 <= value <= 365
user_id?|

Team admins: filter usage to one member

Response Body

application/json

application/json

curl -X GET "https://api.sference.com/v1/usage/summary"
{
  "summary": {
    "total_prompt_tokens": 0,
    "total_completion_tokens": 0,
    "total_tokens": 0,
    "total_cached_prompt_tokens": 0,
    "total_requests": 0,
    "total_cost_micros": 0
  },
  "by_model": [
    {
      "model": "string",
      "service_tier": "default",
      "total_prompt_tokens": 0,
      "total_completion_tokens": 0,
      "total_tokens": 0,
      "total_cached_prompt_tokens": 0,
      "total_requests": 0,
      "total_cost_micros": 0
    }
  ],
  "by_user": []
}
{
  "detail": {
    "type": "about:blank",
    "title": "string",
    "status": 0,
    "detail": "string"
  }
}