Analytics
Monitor daily credit usage across development and infrastructure categories.
The analytics endpoint returns daily credit spending you can render in charts or reports. It requires the api-key header.
#Spending Analytics
/api/v1/credits/spending-analyticsFreeGet daily credit spending data for charts and reports. Returns data aggregated by day, category (development/infrastructure), and usage type.
The path is /api/v1/credits/spending-analytics — it is NOT under /vcaas.
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
from | string | Yes | Start date (YYYY-MM-DD), max 90 days before to |
to | string | Yes | End date (YYYY-MM-DD) |
projectId | string | No | Filter by project ID |
Response fields
| Field | Type | Description |
|---|---|---|
data.daily | array | Array of daily spending objects |
data.daily[].date | string | Date (YYYY-MM-DD) |
data.daily[].development | number | Development credits spent that day |
data.daily[].infrastructure | number | Infrastructure credits spent that day |
data.daily[].byType | object | Credits by usage type (e.g. prompt, deploy, chatgpt) |
data.totals.development | number | Total development credits in range |
data.totals.infrastructure | number | Total infrastructure credits in range |
data.totals.total | number | Total credits in range |
data.totals.byType | object | Total credits by usage type |
data.projects | array | List of project IDs with spending data |
Usage types in byType: prompt, deploy, start_server, get_source_code, recover_version, upload_file, add_custom_domain, chatgpt, image_generation, video_analysis, audio_transcription, email, pdf, document_scan, web_scraper, file_upload.
Example request
curl -H "api-key: tlm_sk_your_key" \
"https://api-accounts.totalum.app/api/v1/credits/spending-analytics?from=2026-04-01&to=2026-04-04"Add &projectId=my-app to filter by a single project:
curl -H "api-key: tlm_sk_your_key" \
"https://api-accounts.totalum.app/api/v1/credits/spending-analytics?from=2026-04-01&to=2026-04-04&projectId=my-app"{
"errors": null,
"data": {
"daily": [
{ "date": "2026-04-01", "development": 15, "infrastructure": 3, "byType": { "prompt": 10, "deploy": 5, "chatgpt": 2, "pdf": 1 } },
{ "date": "2026-04-02", "development": 20, "infrastructure": 5, "byType": { "prompt": 15, "deploy": 3, "start_server": 2, "email": 3 } }
],
"totals": { "development": 35, "infrastructure": 8, "total": 43, "byType": { "prompt": 25, "deploy": 8, "chatgpt": 2, "pdf": 1, "email": 3 } },
"projects": ["my-app", "other-project"]
}
}Analytics data is available for the last 90 days; older data is automatically cleaned up.
