Get AI Studio credit utilization

Returns one row per AI Studio run (rule execution) for the workspace, in ascending order (oldest first) so that incremental consumers can poll forward. Each row describes what ran, who it is attributed to, the model used, and the credits consumed.

Credit data is available from January 8th, 2025 onward, and is queryable for the full history since then (there is no limit on how far back you can query). A start_at earlier than January 8th, 2025 is silently clamped; it is not an error.

The list is always paginated. When more results exist, the response includes a next_page with an offset that can be used to retrieve the next set of rows. The row gid is stable and can be used to de-duplicate rows across incremental loads.

This endpoint is restricted to service accounts in organizations licensed for AI Studio.

Path Params
string
required

Globally unique identifier for the workspace or organization.

Query Params
date-time

Inclusive lower bound. Runs are ordered and filtered by when their usage was recorded (the monotonic timestamp used for incremental polling), not by run_started_at. Omitted ⇒ the 2025-01-08 floor — no credit data exists before then, and there is no limit on how far back you can query. A value earlier than 2025-01-08 is treated as 2025-01-08 (not rejected), matching the audit log.

date-time

Filter to runs whose usage was recorded before this time (exclusive) — by when the run's credit usage was recorded, not by run_started_at. Defaults to the time of the request.

string

Scope results to a single division (its gid). Omitted ⇒ the org's first licensed division. Use this to retrieve only one division's slice (e.g. for a division-level admin or billing owner) rather than the whole organization.

integer
1 to 100

Results per page.
The number of objects to return per page. The value must be between 1 and 100.

string

Offset token.
An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results.
Note: You can only pass in an offset that was returned to you via a previously paginated request.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json