Skip to content

Get workspace member usage

Viewing v1, superseded by v2

GET
/v1/workspaces/{workspace_id}/members/{principal_id}/usage
curl --request GET \
--url https://api.app.layer.ai/api/v1/workspaces/:workspace_id/members/:principal_id/usage \
--header 'Authorization: Bearer <token>'

v1 is superseded. v1 was superseded by v2 on 2026-08-26. A sunset date has not been announced yet; v1 will be deprecated as a whole before removal. Migrate with the v2 migration guide.

Creative Units one member spent in the workspace between two UTC dates, in total and per day or per calendar month, with the usage caps they meter against now. By day it defaults to the last 30 days and spans at most 365; by month it defaults to the last 12 months and spans at most 731 days. Reading your own usage requires workspace billing access, another member’s requires billing admin.

workspace_id
required
Workspace ID

ID of the workspace that owns the resource.

string format: uuid

ID of the workspace that owns the resource.

principal_id
required
Principal ID

ID of the member: a user, service account or API key.

string format: uuid

ID of the member: a user, service account or API key.

start_date
Start Date

First day to report (UTC), inclusive. Defaults to 29 days before end_date by day, or the first of the month 11 months before end_date by month.

string format: date
nullable

First day to report (UTC), inclusive. Defaults to 29 days before end_date by day, or the first of the month 11 months before end_date by month.

end_date
End Date

Last day to report (UTC), inclusive. Defaults to today.

string format: date
nullable

Last day to report (UTC), inclusive. Defaults to today.

granularity
UsageGranularity

The size of each bucket: day or month (UTC).

string
default: day
Allowed values: day month

The size of each bucket: day or month (UTC).

Successful Response

Media typeapplication/json
MemberUsageOutput
object
principal_id
required
Principal ID

The member whose usage this is.

string format: uuid
start_date
required
Start Date

First day of the reported window (UTC), inclusive.

string format: date
end_date
required
End Date

Last day of the reported window (UTC), inclusive.

string format: date
granularity
required
UsageGranularity

The size of each bucket: a UTC day or a UTC calendar month.

string
Allowed values: day month
total_creative_units
required
Total Creative Units

Creative Units the member spent in the workspace over the window.

number
buckets
required
Buckets

Creative Units the member spent per bucket, oldest first. A bucket with no spend is left out. By month, the first and last months count only the days inside the window.

Array<object>
MemberUsageBucket
object
start_date
required
Start Date

First day of the bucket (UTC): the day itself, or the first of the month.

string format: date
creative_units
required
Creative Units

Creative Units the member spent in the bucket, inside the window.

number
limits
required
Limits

The usage caps the member meters against now, outside any project, each with their spend in its current period rather than in the reported window. Empty when no cap applies, and below Enterprise.

Array<object>
MemberUsageLimit
object
source
required
UsageLimitSource

Where the cap is set: the workspace (or one above it), a group, or the membership itself.

string
Allowed values: workspace project group membership
group_id
Group ID

The group that sets the cap, for a group cap.

string format: uuid
nullable
group_name
Group Name

The name of that group, for a group cap.

string
nullable
period
required
UsageLimitPeriod

How often the cap resets: daily, weekly or monthly (UTC).

string
Allowed values: daily weekly monthly
mode
required
UsageLimitMode

Warn tells the member they are past the cap; block also stops anything that charges Creative Units.

string
Allowed values: warn block
cu_limit
required
CU Limit

Creative Units the member may spend in each period.

number
warn_threshold_pct
required
Warn Threshold Percent

Percent of the cap at which the member is warned.

integer
cu_used
required
CU Used

Creative Units the member has spent in the current period.

number
state
required
UsageLimitState

Where the member stands against the cap: ok, warning or blocked.

string
Allowed values: ok warning blocked
period_resets_at
required
Period Resets At

When the current period ends and the cap resets.

string format: date-time
Example
{
"granularity": "day",
"limits": [
{
"source": "workspace",
"period": "daily",
"mode": "warn",
"state": "ok"
}
]
}

Unauthenticated — missing or invalid Bearer token.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Forbidden — insufficient permissions, or the access token lacks the scope the operation requires.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Resource not found.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

The outcome of the request with this Idempotency-Key is not known yet: it is still running, or it failed without a stored response. Retry after the number of seconds in Retry-After.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Invalid input parameters, or an Idempotency-Key reused for a different request.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Rate limited — retry after the number of seconds in Retry-After.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Internal server error.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}