Dokumentation
ReferenzCredits

Export a period as a PDF report or a CSV table.

POST
/credits/exports

Builds the consumption of the period as a file, a report as PDF or a table as CSV, and answers with a presigned download, as GET /skill-libraries/{libraryId}/export does. The bytes do not travel through this API. The link is valid for expiresIn seconds, needs no API key, and downloads the file under filename; anyone holding it can download the file until then, so a caller fetches it right away and never stores or shares it. The answer comes once the file is ready; a report takes a few seconds.

The file is named galilea-usage_<tenant short name>_<from>_<to>.<pdf|csv>, for example galilea-usage_hansen-logistik_2026-10-01_2026-10-31.csv.

The table is built as the Galilea application builds it: UTF-8 with byte order mark, semicolon as separator, CRLF as line end, every text cell quoted and guarded against spreadsheet formulas, numbers without thousands separator, credits as whole numbers, the date as 2026-10-23 and the time as 14:05 in Europe/Berlin, the column names in the language of the key's user, one line per action whatever the scope. The columns depend on scope:

Columnpersonalorganization
Dateyesyes
Timeyesyes
Typeyesyes
Actiontitle of the actionno
Personnoname
E-mailnoe-mail address
Modelname of the model, empty without a modelyes
Creditswhole numberwhole number

Every key exports the consumption of its own user in the running month. Only a tenant manager or an administrator exports another period or the organization with scope=organization.

Authorization

apiKey
headerX-API-Key<token>

API key issued in the Galilea settings.

Request Body

application/json
  1. body

What to export: the format and the parameters of the other credit operations, with the same defaults and limits.

format*string

pdf for the report, csv for the table.

Value in"pdf""csv"
scope?string
Default"personal"
Value in"personal""organization"
period?string
Default"month"
Value in"week""month""quarter""year""custom"
anchor?string
Formatdate
from?string
Formatdate
to?string
Formatdate
type?CreditUsageType

The kind of action that consumed credits.

  • chat: an answer of the agent in a chat.
  • import: a file read into the workspace, a project or a library.
  • search: a search.
  • audit: an audit.
  • skillScan: the scan of an imported skill.
  • llmGateway: calls of the LLM operations made with an API key; one action is one day of one key.
  • apiKey: calls of the other operations made with an API key; one action is one day of one key.
  • workflow: a run of a workflow.
Value in"chat""import""search""audit""skillScan""llmGateway""apiKey""workflow"
userId?string
Formatuuid

Response Body

The presigned download.

application/json
  1. response

A presigned download of a credit report or table.

downloadUrl*string

Presigned download URL; fetch the file with a single HTTP GET and no API key.

expiresIn*integer

Seconds until the URL expires.

filename*string
curl -X POST "https://example.com/credits/exports" \  -H "Content-Type: application/json" \  -d '{    "format": "csv",    "scope": "organization",    "period": "month",    "anchor": "2026-10-23"  }'
{  "downloadUrl": "https://download.example.com/exports/3adb7c10/galilea-usage_hansen-logistik_2026-10-01_2026-10-31.csv?expires=600&signature=...",  "expiresIn": 600,  "filename": "galilea-usage_hansen-logistik_2026-10-01_2026-10-31.csv"}