Summarize cost per metric and hour or day
GET /v1/costs/summary · SDK getCostSummary · CLI deployments cost summary
Requires spend:read.
platformBearerAuthorizationBearer <token>Platform bearer credential accepted as an opaque API key or JWT.
since*stringInclusive canonical UTC timestamp on an interval boundary.
date-timeuntil*stringExclusive canonical UTC timestamp on an interval boundary.
date-timeinterval?stringBucket width (default hour). A summary holds at most 744 hourly or 366 daily buckets.
"hour""day"agentDefinitionId?stringRestrict the summary to usage of runs that executed this agent definition. Agent series come from the agent's own hourly counters; usage outside runs (inbox traffic, Brain operations) belongs to no agent. Not combinable with workspaceId.
^[0-7][0-9A-HJKMNP-TV-Z]{25}$workspaceId?stringRestrict the summary to usage that names this workspace. Workspace series come from the workspace's own hourly counters, with token splits; usage without a workspace belongs to none. Not combinable with agentDefinitionId.
^[0-7][0-9A-HJKMNP-TV-Z]{25}$x-deployments-environment*string^[0-7][0-9A-HJKMNP-TV-Z]{25}$UsageSummaryResponse
application/json- response
buckets*array<>interval*string"hour""day"series*array<>since*string^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$date-timeuntil*string^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$date-timecurl -X GET "https://example.com/v1/costs/summary?since=2019-08-24T14%3A15%3A22Z&until=2019-08-24T14%3A15%3A22Z" \ -H "x-deployments-environment: string"{ "buckets": [ "2019-08-24T14:15:22Z" ], "interval": "hour", "series": [ { "kind": "cost", "metric": "string", "part": "input", "total": 0, "unit": "string", "values": [ 0 ] } ], "since": "2019-08-24T14:15:22Z", "until": "2019-08-24T14:15:22Z"}