Dokumentation
ReferenzCredits

Read the sums of a period.

GET
/credits/summary

The consumption of one period as sums: the period the service worked out, the trend against earlier periods, the average per day, the total, the split by type and the consumption over time. Single actions are read with GET /credits/usage.

The caller names the period with period and anchor, or with period=custom, from and to; the answer carries the first and last day the service used. To walk backwards, send an anchor inside the period before, down to firstBookingDay.

Every key reads the consumption of its own user. Only a tenant manager or an administrator reads a period other than the running month, gets trend, and reads the organization with scope=organization.

Authorization

apiKey
headerX-API-Key<token>

API key issued in the Galilea settings.

Query Parameters

scope?string

Whose consumption is read. personal, the default, is the consumption of the key's user; organization is the whole tenant and is open to a tenant manager or an administrator only, otherwise the request is refused with 403. Titles of actions never appear with organization.

Default"personal"
Value in"personal""organization"
period?string

The kind of period to read. The service works out its first and last day from anchor in Europe/Berlin; a caller never sends timestamps. custom reads the days from from to to. A key of any role other than tenant manager or administrator reads the running month only: any other value, or month with an anchor outside the running month, is refused with 403.

Default"month"
Value in"week""month""quarter""year""custom"
anchor?string

Any day inside the period to read; defaults to today in Europe/Berlin. To read the period before, send a day inside it, for example the day before period.from of the last answer. Refused with 400 before 2026-10-01 or after today. Ignored with period=custom. Nothing booked before 2026-10-01 is readable, for any caller: a period that begins before it is read from that day on.

Formatdate
from?string

First day of a custom period in Europe/Berlin. Required with period=custom and refused with 400 for every other period. Not before 2026-10-01; a custom period spans at most 366 days.

Formatdate
to?string

Last day of a custom period in Europe/Berlin, inclusive. Required with period=custom and refused with 400 for every other period. Not after today; at most 365 days after from.

Formatdate
type?CreditUsageType

Reads only actions of this type. Without the parameter every type is read.

Value in"chat""import""search""audit""skillScan""llmGateway""apiKey""workflow"
userId?string

Reads only the consumption of this person. Valid only with scope=organization; with scope=personal the request is refused with 400. A person who is not a member of the key's tenant is answered with 404.

Formatuuid

Response Body

The sums of the period.

application/json
  1. response

The consumption of one period as sums.

period*

The period the service worked out from the parameters.

trend?

How consumption developed against earlier periods. Present only for a key of a tenant manager or an administrator.

perDay*integer

Average credits per day in the read period, over the days passed.

Range0 <= value
total*integer

Credits consumed in the read period.

Range0 <= value
byType*array<>

Credits per type in the read period, largest first. Types without consumption are missing.

series*

Consumption over time, one point per step from the first day of the period up to today.

curl -X GET "https://example.com/credits/summary?anchor=2026-10-23&from=2026-10-01&to=2026-10-31"
{  "period": {    "kind": "week",    "from": "2019-08-24",    "to": "2019-08-24",    "daysPassed": 23,    "daysLeft": 8,    "firstBookingDay": "2026-10-01"  },  "trend": {    "change": 0.3,    "points": [      {        "from": "2019-08-24",        "perDay": 0      }    ]  },  "perDay": 49,  "total": 1130,  "byType": [    {      "type": "chat",      "credits": 0,      "share": 0.945    }  ],  "series": {    "step": "day",    "points": [      {        "date": "2019-08-24",        "byType": {          "chat": 812,          "import": 30        }      }    ]  }}