GET /v1/usage

Query token usage and cost data for a project.

Endpoint

GET https://api.gatectr.com/v1/usage

Headers

Header
Value

Authorization

Bearer <your-api-key>

Query parameters

Parameter
Type
Required
Description

project_id

string

No

Filter by project

from

string

No

Start date (ISO 8601: 2025-01-01)

to

string

No

End date (ISO 8601: 2025-01-31)

group_by

string

No

model | day | project

Example

curl https://api.gatectr.com/v1/usage \
  -H "Authorization: Bearer $GATECTR_API_KEY" \
  -G \
  --data-urlencode "project_id=proj_123" \
  --data-urlencode "from=2025-01-01" \
  --data-urlencode "to=2025-01-31" \
  --data-urlencode "group_by=model"

Response

Last updated

Was this helpful?