PlatformXeDocs
Get API Key

Usage

SDK methods for retrieving usage metrics and billing summaries.

The client.usage namespace provides a method for retrieving usage metrics for a billing period. Available in TypeScript, Python, and Go SDKs.

SDKInstallNamespace
TypeScriptnpm install @caldera/platformxe-sdkclient.usage
Pythonpip install platformxeclient.usage
Gogo get github.com/calderaxe/platformxe-goclient.Usage

Get usage summary

Retrieve aggregated usage metrics for a specific billing month. The month parameter uses YYYY-MM format.

const summary = await client.usage.summary({ month: '2026-04' });

for (const s of summary.services) {
  console.log(s.service, s.used, s.limit, s.percentUsed);
}
console.log(summary.totalBillableEvents);
summary = client.usage.summary(month="2026-04")

for s in summary["services"]:
    print(s["service"], s["used"], s["limit"])
print(summary["totalBillableEvents"])
summary, err := client.Usage.Summary("2026-04")

Response fields

FieldTypeDescription
monthstringThe month reported, YYYY-MM (UTC)
organizationstringThe key's organisation id
servicesarrayOne entry per service with usage in the month: service, used, limit (null without a plan limit; for storage, your organisation's storage allowance: its contract limit when set, else the plan's, or null when not capped), percentUsed (null without a limit)
services[].usednumberA count in the service's unit; for storage, the bytes the organisation stores now in media files and fixed documents (never negative), set against the storage capacity
totalBillableEventsnumberUsage events in the month across every service (an upload counts once; bytes are never added)

See Usage Summary for an example response.

Scopes required

MethodScope
usage.summary()none (any valid key but an MCP key; its own organisation only)