Skip to content

Usage report

GET
/org/usage
curl --request GET \
--url 'https://api.asklucy.eu/v1/org/usage?from=2026-04-15&to=2026-04-15&group_by=day' \
--header 'Authorization: Bearer <token>'

Totals for a period, by day or by user. Dates are inclusive, in UTC.

from
required
string format: date
to
required
string format: date
group_by
string
default: day
Allowed values: day user group

group follows the groups from the identity provider. Someone in several groups counts in each, so the rows can add up to more than the totals; members in no group are in a row with group: null.

OK

Media typeapplication/json
object
from
required
string format: date
to
required
string format: date
group_by
required
string
Allowed values: day user group
rows
required
Array
object
day

When grouped by day.

string format: date
user
object
id
required

Zitadel user ID.

string
name
required
string
email
string | null format: email
kind

service is a customer system’s Zitadel service user; agent is a service agent (its ID is the agt_ ID), the author of its runs’ messages.

string
Allowed values: person service agent
group
One of:
object
id
required
string
name
required
string
source
required

Where the group and its members come from.

string
Allowed values: identity_provider
member_count
integer | null
cost
required
object
amount
required

Decimal amount, e.g. “12.50” (up to 6 decimals for small usage).

string
/^-?[0-9]+(\.[0-9]{1,6})?$/
currency
required
string
Allowed values: EUR
messages
required

Messages sent by people.

integer
answers
required

Answers Lucy wrote (any final status).

integer
input_tokens
required
integer
output_tokens
required
integer
sandbox_seconds
required

Time code ran in sandboxes.

integer
web_searches
required

Web searches Lucy ran (each is billed per call and counts in cost).

integer
storage_bytes
required

Files stored at the end of the period (or day).

integer
sandbox_storage_bytes
required

What Lucy’s sandbox stores for the conversations counted here (paused workspaces and published pages), as last sampled by the end of the period (or on that day). A snapshot of the stock, not a total over time; sampled hourly.

integer
totals
required
object
cost
required
object
amount
required

Decimal amount, e.g. “12.50” (up to 6 decimals for small usage).

string
/^-?[0-9]+(\.[0-9]{1,6})?$/
currency
required
string
Allowed values: EUR
messages
required

Messages sent by people.

integer
answers
required

Answers Lucy wrote (any final status).

integer
input_tokens
required
integer
output_tokens
required
integer
sandbox_seconds
required

Time code ran in sandboxes.

integer
web_searches
required

Web searches Lucy ran (each is billed per call and counts in cost).

integer
storage_bytes
required

Files stored at the end of the period (or day).

integer
sandbox_storage_bytes
required

What Lucy’s sandbox stores for the conversations counted here (paused workspaces and published pages), as last sampled by the end of the period (or on that day). A snapshot of the stock, not a total over time; sampled hourly.

integer

Example

{
"group_by": "day",
"rows": [
{
"user": {
"kind": "person"
},
"group": {
"source": "identity_provider"
},
"cost": {
"amount": "50.00",
"currency": "EUR"
}
}
],
"totals": {
"cost": {
"amount": "50.00",
"currency": "EUR"
}
}
}

The request is invalid; errors lists what’s wrong.

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
quota

For quota-exceeded, the window that is used up.

object
window
required
string
Allowed values: five_hours week month
percent_used
required
number
<= 100
resets_at
required

Null for a rolling window that hasn’t started.

string | null format: date-time
limited_by
required

organization when the organization’s budget is closer to running out than the member’s own limit.

string
Allowed values: personal organization
request
One of:

A request as its member sees it, where they asked.

object
id
required
string
status
required
string
Allowed values: pending approved declined withdrawn
created_at
required
string format: date-time
decided_at
required
string | null format: date-time
note
required

What the admin who decided wrote back.

string | null
errors

Field-level problems (400 only).

Array<object>
object
field
required

JSON pointer into the request body.

string
message
required
string

Example

{
"type": "https://docs.asklucy.eu/errors/answer-in-progress",
"quota": {
"window": "five_hours",
"limited_by": "personal",
"request": {
"status": "pending"
}
}
}
X-Request-Id
string

Unique per request; quote it to support.

Missing, expired or invalid token.

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
quota

For quota-exceeded, the window that is used up.

object
window
required
string
Allowed values: five_hours week month
percent_used
required
number
<= 100
resets_at
required

Null for a rolling window that hasn’t started.

string | null format: date-time
limited_by
required

organization when the organization’s budget is closer to running out than the member’s own limit.

string
Allowed values: personal organization
request
One of:

A request as its member sees it, where they asked.

object
id
required
string
status
required
string
Allowed values: pending approved declined withdrawn
created_at
required
string format: date-time
decided_at
required
string | null format: date-time
note
required

What the admin who decided wrote back.

string | null
errors

Field-level problems (400 only).

Array<object>
object
field
required

JSON pointer into the request body.

string
message
required
string

Example

{
"type": "https://docs.asklucy.eu/errors/answer-in-progress",
"quota": {
"window": "five_hours",
"limited_by": "personal",
"request": {
"status": "pending"
}
}
}
X-Request-Id
string

Unique per request; quote it to support.

The token is valid but lacks the role this needs.

Media typeapplication/problem+json

RFC 9457 problem details.

object
type
required
string format: uri-reference
title
required
string
status
required
integer
detail
string
instance
string
request_id
string
quota

For quota-exceeded, the window that is used up.

object
window
required
string
Allowed values: five_hours week month
percent_used
required
number
<= 100
resets_at
required

Null for a rolling window that hasn’t started.

string | null format: date-time
limited_by
required

organization when the organization’s budget is closer to running out than the member’s own limit.

string
Allowed values: personal organization
request
One of:

A request as its member sees it, where they asked.

object
id
required
string
status
required
string
Allowed values: pending approved declined withdrawn
created_at
required
string format: date-time
decided_at
required
string | null format: date-time
note
required

What the admin who decided wrote back.

string | null
errors

Field-level problems (400 only).

Array<object>
object
field
required

JSON pointer into the request body.

string
message
required
string

Example

{
"type": "https://docs.asklucy.eu/errors/answer-in-progress",
"quota": {
"window": "five_hours",
"limited_by": "personal",
"request": {
"status": "pending"
}
}
}
X-Request-Id
string

Unique per request; quote it to support.