GET/organization/usage/images

List organization image usage

Lists image usage for the organization in time buckets. Use start_time to set the inclusive start of the range, and filter by sources, image sizes, projects, users, API keys, or models as needed. Use the next_page value to retrieve the next page of results.

12 parameters
start_timeintegerrequired
Inclusive start of the query time range, in Unix seconds.
end_timeintegeroptional
Exclusive end of the query time range, in Unix seconds.
bucket_widthstringoptional
Width of each time bucket: `1m`, `1h`, or `1d`. Defaults to `1d` when omitted.
Allowed:1m1h1dDefault:1d
sourcesarray<string>optional
Filter usage by one or more sources: `image.generation`, `image.edit`, or `image.variation`.
sizesarray<string>optional
Filter usage by one or more image sizes: `256x256`, `512x512`, `1024x1024`, `1792x1024`, or `1024x1792`.
project_idsarray<string>optional
Filter usage to the specified project IDs.
user_idsarray<string>optional
Filter usage to the specified user IDs.
api_key_idsarray<string>optional
Filter usage to the specified API key IDs.
modelsarray<string>optional
Filter usage to the specified model names.
group_byarray<string>optional
Group results by one or more fields: `project_id`, `user_id`, `api_key_id`, `model`, `size`, or `source`.
limitintegeroptional
Number of time buckets to return. Defaults to 7 for `1d`, 24 for `1h`, or 60 for `1m`; maximums are 31, 168, and 1440 respectively.
pagestringoptional
Pagination cursor from the previous response's `next_page` field. Omit it to start from the first page.

4 status codes
200Returns a page of image usage buckets with each bucket's start and end times and usage results, along with pagination metadata including `has_more` and `next_page`.
objectstringrequired
Allowed:page
dataarray<object>required
has_morebooleanrequired
next_pagestringrequired
400Returned when the request parameters are invalid or the requested operation cannot be performed.
errorobjectrequired
403Returned when the caller does not have permission to perform this operation.
errorobjectrequired
Details about the permission error.
429Returned when the request is rejected because a rate limit was exceeded.
errorobjectrequired

Error handling

start_time is required, and bucket_width must be one of 1m, 1h, or 1d; invalid parameters return a 400. A 403 is returned when the authenticated user does not have permission to view organization usage. A 429 is returned when the request rate limit is exceeded.