Retrieve account usage

Returns the current credit balance, a per-product spend breakdown (model and API usage, Compose, GPU Cloud, and Hosted Agents), plus recent usage events for the account attached to the API key. Each event has a `source` (`api`, `playground`, `compose`, `gpu_cloud`, `hosted_agents`, or `template`) plus usage counters, request costs, status, model, endpoint, latency, request ID, and generated media URLs. Token-billed rows report token counts. GPU Cloud runtime rows keep the stable `tokens` object with zero counts and put runtime details such as `seconds`, `price_hourly`, and `gpu_display` in `metadata`. For an event made by a Hosted Agent, the `metadata` object also identifies the agent (`agent_type`, `agent_name`, `agent_instance_id`). Models that bill per-tool surcharges surface a per-event `tool_breakdown` array. The `summary` object aggregates requests, tokens, cost, errors, latency, and `cache_hit_rate` across the whole query window (the same `from`, `to`, `model`, `status`, and `source` filters as the events), not just the returned page, so its counts are true totals rather than the page size. The `spend` totals honor the `from` and `to` window, or are all-time when neither is set.

Authentication

AuthorizationBearer

Pass your EmpirioLabs API key as a bearer token. The Anthropic-style x-api-key header is also accepted on every endpoint.

Query parameters

limitintegerOptional1-200Defaults to 100
Number of usage events to return.
beforedatetimeOptional

Return events created before this timestamp. Use next_cursor for pagination.

fromdatetimeOptional
Include events created at or after this timestamp.
todatetimeOptional
Include events created at or before this timestamp.
sourceenumOptional

Filter events by source: api (direct API requests), playground, compose (Compose video productions), gpu_cloud (GPU Cloud rentals), or hosted_agents (calls made by a Hosted Agent).

Allowed values:
modelstringOptional
Filter to one model ID.
statusenumOptional
Filter by request status.
Allowed values:

Response

Account balance, summary, and usage events.
objectstringOptional
balanceobjectOptional
planobjectOptional

Current subscription state. Present for an account with a current active or past-due subscription. A past-due plan grants no plan access. Allowance limits are intentionally shown on the Billing and pricing pages rather than frozen into this API schema.

summaryobjectOptional
spendobjectOptional

Account-level spend split by product over the requested window (from / to), or all-time when neither is set. This is distinct from summary, which only covers the returned page of usage events.

datalist of objectsOptional
has_morebooleanOptional
next_cursordatetime or nullOptional

Errors

401
Unauthorized Error