Skip to main content
GET
Retrieve project statistics

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is an access key.

Example: Authorization: Bearer sk-proj-XXXXXXXXX

Query Parameters

projectGid
string
required

The project to report on. When you authenticate with an access key, this must be the project that key belongs to.

startDate
string
required

First day to include, as YYYY-MM-DD (UTC). Inclusive.

endDate
string
required

Last day to include, as YYYY-MM-DD (UTC). Inclusive.

groupBy
enum<string>
default:DAILY

Size of each bucket in rows: one row per day, or one row per calendar month.

Available options:
DAILY,
MONTHLY

Response

200 - */*

OK

Usage and cost for a project over the requested range, split into buckets plus a grand total.

Every amount is in your account currency, as a decimal string so no precision is lost when you parse it.

rows
object[]
required

One entry per bucket that recorded activity, most recent first. Buckets with no activity at all are omitted.

total
object
required

The same metrics summed over every returned bucket, so you don't have to add up rows yourself.