Skip to main content
POST
Get Workspace Usage

Headers

x-api-key
string | null

Your API key for programmatic access. Send it in the x-api-key header; you can create and manage keys from the Developers page.

Body

application/json
start_time
integer
required

Start of the time range as a Unix timestamp in milliseconds. Must be at least 2020-01-01.

Required range: x >= 1577836800000
end_time
integer
required

End of the time range as a Unix timestamp in milliseconds. Must be at least 2020-01-01.

Required range: x >= 1577836800000
interval_seconds
integer
default:60

Bucket size in seconds. Each row in the response covers this many seconds of the selected time range. For example, pass 3600 for hourly buckets or 86400 for daily buckets. Whether time_zone shifts bucket boundaries depends on this value: whole-day multiples (e.g. 86400) align to local midnight; whole-hour multiples up to 24 hours (e.g. 3600, 14400) align to local hour boundaries from midnight; sub-hour values and other sizes remain UTC-anchored regardless of time_zone.

Required range: x >= 1
group_by
enum<string>[] | null
Available options:
product_type,
model,
voice_id,
user_id,
fiat_currency,
fiat_charge_type,
region,
reporting_workspace_id,
request_source,
resource_id,
subresource_id,
request_queue_type,
voice_multiplier,
hashed_xi_api_key,
billing_group_id,
surface,
actor
filters
ColumnFilter · object[] | null
time_zone
string
default:UTC

IANA time zone identifier (e.g. 'America/New_York', 'Europe/London', 'UTC') used to align bucket boundaries for eligible interval_seconds values. Whole-day multiples start at local midnight; whole-hour multiples up to 24 hours align to local hour boundaries from midnight. Sub-hour intervals and other bucket sizes remain UTC-anchored regardless of this setting. Defaults to UTC.

Response

Successful Response

columns
string[]
required
column_types
enum<string>[]
required
Available options:
String,
Float,
DateTime,
Int,
Bool,
JSON,
Map,
Array
rows
((string | integer | number | boolean | string<date-time> | null)[])[]
required
column_units
(enum<string> | null)[]
required
Available options:
ms,
s,
min,
duration,
credits,
usd,
eur,
inr,
pln,
gbp,
ratio,
rating