Skip to main content
GET
Get workspace usage over time

Authorizations

X-API-Key
string
header
required

API key authentication. Generate an API key from your account settings at https://platform.comfy.org/profile/api-keys. Pass the key in the X-API-Key header.

Query Parameters

group_by
enum<string>
default:model

How to group spend within each time bucket.

Available options:
model,
endpoint,
product
granularity
enum<string>
default:month

Width of each time bucket.

Available options:
hour,
day,
month
starting_on
string<date-time>

Start of the range, inclusive (RFC 3339). Overrides months when set.

ending_before
string<date-time>

End of the range, exclusive (RFC 3339). Defaults to the current hour.

months
integer
default:6

How many months back to report, counted from ending_before. Ignored when starting_on is set.

Required range: 1 <= x <= 24

Response

Success - Usage returned

Billed usage for one workspace over a time range.

group_by
enum<string>
required

How spend was grouped, echoing the request.

Available options:
model,
endpoint,
product
granularity
enum<string>
required

Width of each bucket, echoing the request.

Available options:
hour,
day,
month
starting_on
string<date-time>
required

Start of the reported range, inclusive.

ending_before
string<date-time>
required

End of the reported range, exclusive.

groups
string[]
required

Every group key present in the range, ordered by total spend, highest first. Use it to keep series in a stable order across buckets.

buckets
object[]
required

One entry per group per time bucket, oldest bucket first. A group with no spend in a bucket is omitted rather than reported as zero.

breakdown
object[]
required

Total spend per group across the whole range.

summary
object
required