Skip to content

Get billing summary

GET/v1/billing/summary

Returns 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.

  • breakdown groups this cycle's charges by resource type and metric, with each resource's share in resources, including resources removed earlier in the cycle.
  • current_resources lists what is billable right now, grouped by resource type and plan, with the hourly and monthly rate of each.
  • free_allowances shows 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

200

Your billing summary for the current cycle.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
currencystringRequired

Base currency of all amounts. USD.

display_currencystringRequired

Currency to show amounts in. NGN when your billing country is Nigeria, otherwise USD.

One ofUSDNGN

exchange_ratenumberRequired

Multiply US cents by this to get display_currency minor units. 1 for USD.

current_cycleobjectRequired

The billing cycle the summary covers.

Show attributes
modestringRequired

How billing cycles are defined. Normally calendar_month.

One ofcalendar_monthrolling_intervalmanual

starts_atstring (date-time)Required

Start of the cycle.

ends_atstring (date-time)Required

End of the cycle.

total_amount_microsintegerRequired

Charges so far this cycle, in micros.

total_amount_centsintegerRequired

total_amount_micros rounded up to whole cents.

current_hourly_amount_microsintegerRequired

Combined hourly rate of everything billable right now, in micros.

current_monthly_amount_centsintegerRequired

Combined monthly rate of everything billable right now, in cents.

current_resource_countintegerRequired

Number of resources billable right now.

usage_quantitynumberRequired

Sum of quantity across all breakdown groups. Mixes units, so mainly useful as a non-zero check.

usage_record_countintegerRequired

Number of usage records this cycle.

resource_countintegerRequired

Number of distinct resources with usage this cycle.

breakdownarray of objectsRequired

This cycle's charges grouped by resource type, metric and unit.

Show item attributes
resource_typestringRequired

Type of resource, e.g. vm, database, deployment, k8s_node, volume, snapshot, object_storage or inference.

metricstringRequired

What was measured, e.g. runtime, storage or tokens.

unitstringRequired

Unit of quantity, e.g. hour, gb_month or token.

currencystringRequired

Currency of the amounts. USD.

quantitynumberRequired

Total quantity used this cycle, in unit.

amount_microsintegerRequired

Charge for this group, in micros.

amount_centsintegerRequired

amount_micros rounded up to whole cents.

usage_record_countintegerRequired

Number of usage records in this group.

resource_countintegerRequired

Number of distinct resources in this group.

resourcesarray of objects

Each resource's share of the group, including resources removed earlier in the cycle. Omitted when empty.

Show item attributes
resource_uidstringRequired

UID of the resource.

resource_namestringRequired

Name of the resource.

plan_slugstringRequired

Plan the resource was billed on.

quantitynumberRequired

Quantity this resource used, in the group's unit.

amount_microsintegerRequired

This resource's charge, in micros.

still_activebooleanRequired

false when the resource was deleted or stopped billing earlier in the cycle.

last_period_endstring (date-time)Required

End of the latest period charged for this resource.

free_allowancesarray of objectsRequired

Usage of each free tier.

Show item attributes
resource_typestringRequired

Resource type the allowance applies to, e.g. deployment or inference.

plan_slugstringRequired

Plan the allowance applies to. inference-tokens for the AI token allowance.

plan_namestringRequired

Display name of the plan or allowance.

includedintegerRequired

How much is free. A count of resources, or tokens per cycle for inference.

usedintegerRequired

How much of the allowance is used.

remainingintegerRequired

What is left. Never below 0.

current_resourcesarray of objectsRequired

Resources billable right now, grouped by resource type and plan.

Show item attributes
resource_typestringRequired

Type of resource.

plan_slugstringRequired

Plan slug.

plan_namestringRequired

Plan display name.

currencystringRequired

Currency of the amounts. USD.

resource_countintegerRequired

Number of billable resources on this plan.

hourly_amount_microsintegerRequired

Combined hourly rate of these resources, in micros.

monthly_amount_centsintegerRequired

Combined monthly rate of these resources, in cents.

cycle_runtime_hoursnumberRequired

Combined hours these resources have run this cycle.

resourcesarray of objects | nullRequired

The individual resources in this group.

Show item attributes
resource_uidstringRequired

UID of the resource.

resource_namestringRequired

Name of the resource.

statusstringRequired

The resource's last observed status, e.g. running.

billing_started_atstring (date-time)Required

When billing for the resource started.

hourly_amount_microsintegerRequired

The resource's hourly rate, in micros.

monthly_amount_centsintegerRequired

The resource's monthly rate, in cents.

free_allowancebooleanRequired

true when the resource is free under its plan's free tier.

cycle_runtime_hoursnumberRequired

Hours the resource has run this cycle.

cycle_amount_microsintegerRequired

The resource's charges this cycle, in micros.

storage_bytesinteger

Billable size for storage resources, in bytes. Omitted for compute.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403Your email address is not verified (action: verify_email), or your account is suspended for abuse (action: account_suspended).

Errors use the standard error format.