Docs
BlogHomeStart building

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

GET/api/v1/credits/spending-analyticsFree

Get daily credit spending data for charts and reports. Returns data aggregated by day, category (development/infrastructure), and usage type.

Note

The path is /api/v1/credits/spending-analytics — it is NOT under /vcaas.

Query parameters

FieldTypeRequiredDescription
fromstringYesStart date (YYYY-MM-DD), max 90 days before to
tostringYesEnd date (YYYY-MM-DD)
projectIdstringNoFilter by project ID

Response fields

FieldTypeDescription
data.dailyarrayArray of daily spending objects
data.daily[].datestringDate (YYYY-MM-DD)
data.daily[].developmentnumberDevelopment credits spent that day
data.daily[].infrastructurenumberInfrastructure credits spent that day
data.daily[].byTypeobjectCredits by usage type (e.g. prompt, deploy, chatgpt)
data.totals.developmentnumberTotal development credits in range
data.totals.infrastructurenumberTotal infrastructure credits in range
data.totals.totalnumberTotal credits in range
data.totals.byTypeobjectTotal credits by usage type
data.projectsarrayList 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

bash
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:

bash
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"
Success · 200 OK
json
{
  "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"]
  }
}
Info

Analytics data is available for the last 90 days; older data is automatically cleaned up.