/v1/billing/summaryReturns your usage and charges for the current billing cycle, across every workspace you own. Usage is brought up to date when you call this, so the totals include charges up to now.
breakdowngroups this cycle's charges by resource type and metric, with each resource's share inresources, including resources removed earlier in the cycle.current_resourceslists what is billable right now, grouped by resource type and plan, with the hourly and monthly rate of each.free_allowancesshows how much of each free tier you have used, including the AI inference token allowance.
Requires a verified email address.
Authentication
Send your API key as Authorization: Bearer <token>.
Response
Your billing summary for the current cycle.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
currencystringRequiredBase currency of all amounts. USD.
display_currencystringRequiredCurrency to show amounts in. NGN when your billing country is Nigeria, otherwise USD.
One ofUSDNGN
exchange_ratenumberRequiredMultiply US cents by this to get display_currency minor units. 1 for USD.
current_cycleobjectRequiredThe billing cycle the summary covers.
Show attributesHide attributes
modestringRequiredHow billing cycles are defined. Normally calendar_month.
One ofcalendar_monthrolling_intervalmanual
starts_atstring (date-time)RequiredStart of the cycle.
ends_atstring (date-time)RequiredEnd of the cycle.
total_amount_microsintegerRequiredCharges so far this cycle, in micros.
total_amount_centsintegerRequiredtotal_amount_micros rounded up to whole cents.
current_hourly_amount_microsintegerRequiredCombined hourly rate of everything billable right now, in micros.
current_monthly_amount_centsintegerRequiredCombined monthly rate of everything billable right now, in cents.
current_resource_countintegerRequiredNumber of resources billable right now.
usage_quantitynumberRequiredSum of quantity across all breakdown groups. Mixes units, so mainly useful as a non-zero check.
usage_record_countintegerRequiredNumber of usage records this cycle.
resource_countintegerRequiredNumber of distinct resources with usage this cycle.
breakdownarray of objectsRequiredThis cycle's charges grouped by resource type, metric and unit.
Show item attributesHide item attributes
resource_typestringRequiredType of resource, e.g. vm, database, deployment, k8s_node, volume, snapshot, object_storage or inference.
metricstringRequiredWhat was measured, e.g. runtime, storage or tokens.
unitstringRequiredUnit of quantity, e.g. hour, gb_month or token.
currencystringRequiredCurrency of the amounts. USD.
quantitynumberRequiredTotal quantity used this cycle, in unit.
amount_microsintegerRequiredCharge for this group, in micros.
amount_centsintegerRequiredamount_micros rounded up to whole cents.
usage_record_countintegerRequiredNumber of usage records in this group.
resource_countintegerRequiredNumber of distinct resources in this group.
resourcesarray of objectsEach resource's share of the group, including resources removed earlier in the cycle. Omitted when empty.
Show item attributesHide item attributes
resource_uidstringRequiredUID of the resource.
resource_namestringRequiredName of the resource.
plan_slugstringRequiredPlan the resource was billed on.
quantitynumberRequiredQuantity this resource used, in the group's unit.
amount_microsintegerRequiredThis resource's charge, in micros.
still_activebooleanRequiredfalse when the resource was deleted or stopped billing earlier in the cycle.
last_period_endstring (date-time)RequiredEnd of the latest period charged for this resource.
free_allowancesarray of objectsRequiredUsage of each free tier.
Show item attributesHide item attributes
resource_typestringRequiredResource type the allowance applies to, e.g. deployment or inference.
plan_slugstringRequiredPlan the allowance applies to. inference-tokens for the AI token allowance.
plan_namestringRequiredDisplay name of the plan or allowance.
includedintegerRequiredHow much is free. A count of resources, or tokens per cycle for inference.
usedintegerRequiredHow much of the allowance is used.
remainingintegerRequiredWhat is left. Never below 0.
current_resourcesarray of objectsRequiredResources billable right now, grouped by resource type and plan.
Show item attributesHide item attributes
resource_typestringRequiredType of resource.
plan_slugstringRequiredPlan slug.
plan_namestringRequiredPlan display name.
currencystringRequiredCurrency of the amounts. USD.
resource_countintegerRequiredNumber of billable resources on this plan.
hourly_amount_microsintegerRequiredCombined hourly rate of these resources, in micros.
monthly_amount_centsintegerRequiredCombined monthly rate of these resources, in cents.
cycle_runtime_hoursnumberRequiredCombined hours these resources have run this cycle.
resourcesarray of objects | nullRequiredThe individual resources in this group.
Show item attributesHide item attributes
resource_uidstringRequiredUID of the resource.
resource_namestringRequiredName of the resource.
statusstringRequiredThe resource's last observed status, e.g. running.
billing_started_atstring (date-time)RequiredWhen billing for the resource started.
hourly_amount_microsintegerRequiredThe resource's hourly rate, in micros.
monthly_amount_centsintegerRequiredThe resource's monthly rate, in cents.
free_allowancebooleanRequiredtrue when the resource is free under its plan's free tier.
cycle_runtime_hoursnumberRequiredHours the resource has run this cycle.
cycle_amount_microsintegerRequiredThe resource's charges this cycle, in micros.
storage_bytesintegerBillable size for storage resources, in bytes. Omitted for compute.
Errors
| Status | Meaning |
|---|---|
401 | The API key is missing, invalid, expired or revoked. |
403 | Your email address is not verified (action: verify_email), or your account is suspended for abuse (action: account_suspended). |
Errors use the standard error format.