Routescope APIRoutescope API
RouteScope Self-Service

Get my date-aggregated data

🔑 Requires token authentication (TokenAuth)

Aggregates consumption by day × model for the user that owns the current token within a time range. Commonly used to draw trend line charts and per-model usage distribution charts.

GET
/api/token/self/data
curl -X GET "https://webapi.routescope.ai/api/token/self/data"
{
  "success": true,
  "message": "",
  "data": [
    {
      "id": 1,
      "user_id": 123,
      "username": "alice",
      "model_name": "gpt-4o",
      "created_at": 1710000000,
      "token_used": 3800,
      "cache_token_used": 700,
      "count": 12,
      "quota": 0.24
    }
  ]
}

Authorization

BearerAuth

AuthorizationBearer <token>

Use Bearer Token for authentication. Format: Authorization: Bearer sk-xxxxxx

In: header

Query Parameters

start_timestamp?integer

Start time (Unix timestamp in seconds)

end_timestamp?integer

End time (Unix timestamp in seconds)

Response Body

application/json

How is this guide?

Last updated on