Skip to main content
GET
Aggregate settled account usage and customer charges

TypeScript

Authorizations

Authorization
string
header
required

Revise API key from https://revise.io/console/api-keys. Send Authorization: Bearer .

Query Parameters

start
string<date-time>

Inclusive completion time. Defaults to 30 days before end. RFC3339 timezone required.

end
string<date-time>

Exclusive completion time. Defaults to now. Range must be positive and at most 366 days; hourly ranges at most 31 days.

bucket
enum<string>
default:day

UTC calendar buckets, or no time bucketing. Empty time buckets are omitted.

Available options:
hour,
day,
month,
none
group_by
string

Comma-separated distinct dimensions, maximum three: api_key_id, provider, model, status, document_access, pricing_version, metadata.KEY (KEY 1–64 bytes). Missing values form null groups. Example: api_key_id,metadata.customer.

status
enum<string>
Available options:
succeeded,
failed,
cancelled
conversation_id
string

Exact conv_ ID.

api_key_id
string

Exact key_ ID of the submitting key. Older unattributed prompts do not match.

metadata
object

Exact AND matches, e.g. metadata[customer]=Acme. Keys up to 64 bytes; values up to 512 bytes.

provider
enum<string>

Exact requested provider. Gemini uses the public name gemini.

Available options:
openai,
anthropic,
xai,
gemini
model
string

Exact requested model ID; use with provider to disambiguate.

Maximum string length: 256
document_access
enum<string>

Exact admitted document permission; not inferred from tool behavior.

Available options:
read,
comment,
edit
pricing_version
string

Exact pricing version pinned at admission.

Maximum string length: 256

Response

Complete filtered usage report

start
string<date-time>
required
Example:

"2026-09-06T00:00:00Z"

end
string<date-time>
required
Example:

"2026-09-08T00:00:00Z"

time_basis
any
required
Example:

"completed_at"

bucket
enum<string>
required
Available options:
hour,
day,
month,
none
Example:

"day"

group_by
string[]
required
Maximum array length: 3
Example:
totals
object
required
Example:
data
object[]
required
Maximum array length: 1000
Example: