Skip to main content
cURL

Authorizations

Authorization
string
header
required

An API key: Authorization: Bearer alura_sk_....

Query Parameters

from
string<date>

First UTC day, YYYY-MM-DD; default 29 days before to. Days before the last 90 are left out.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
to
string<date>

Last UTC day, YYYY-MM-DD, inclusive; default today.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
fields
string

Comma-separated dotted paths to return; id, object and as_of always come back.

Response

OK

object
string
required
Allowed value: "usage_by_day"
from
string
required
to
string
required
data
object[]
required

One row per UTC day and operation with any calls or API credits, oldest first. Days without either are left out.