Groundfloor Docs

Billing API

Read an organization's or workspace's usage this month so far, its bill estimate, its monthly billing statements, and the plan catalogue.

GET /v1/accounts/{account_id}/billing/summary

Returns the organization's compute-unit (CU) usage for a period, each step of the bill calculation, and the resulting amount in USD. The path uses accounts because organizations used to be called accounts; use the organization's ID.

Permission: view_billing on the organization. Organization Owners, Admins and Billing admins have it; Writers, Members and Partners don't.

Query parameterDefaultDescription
since_seconds2592000 (30 days)Look-back window ending now. Minimum 3600 (1 hour), maximum 34560000 (400 days)
curl -s -H "Authorization: Bearer $TOKEN" \
  "https://platform.groundfloor.cloud/v1/accounts/$ORGANIZATION_ID/billing/summary?since_seconds=604800" | jq .

The summary is an estimate, not an invoice. While status is estimate, the per-CU price is a placeholder (pricing_final is false) and storage and network usage are reported as 0 in the summary. Don't present these amounts to your own customers as a final bill.

Response

FieldDescription
account_idThe organization ID
period_start, period_endThe window the figures cover
billing_tierlow, mid, high, or strategic. Sets the multiplier applied to usage
statusestimate or final. Expect estimate until billing is generally available
is_estimatetrue while status is estimate
pricing_finalfalse while the per-CU rates and tier multipliers aren't locked
ai_usage_onlytrue when compute, storage and network are all 0, so the figures cover AI usage only
ai_usage_truncatedtrue when the look-back window is longer than a day. AI usage is read from a capped request log, so for longer windows the AI figure can be understated
breakdownCU by source: compute, storage, network, ai
raw_cuSum of the breakdown, before the multiplier
multiplierThe billing_tier multiplier
adjusted_curaw_cu times multiplier
sell_price_per_cu_usdPrice of one CU
base_bill_usdadjusted_cu times the price
discountFractional discount applied, from 0 up to but not including 1
final_bill_usdbase_bill_usd after the discount
noteA caveat in plain text. While status is estimate it begins with "ESTIMATE — NOT A FINAL BILL."

What the sources currently measure:

  • Compute: the time each Coderunner instance actually ran, as measured by Coderunner, times its CPU and memory size (a service at the size it had at the time; functions, jobs and schedules at their current size). This covers services, functions, jobs and schedules alike; a service that has scaled to zero adds nothing. See How compute is billed.
  • Storage and network: always 0 in the summary. Network isn't metered. Storage is charged on billing statements instead: files, managed database storage and Coderunner persistent disks, per GB-month.
  • AI: not available yet; always 0. The LLM gateway is coming soon; once it is, token usage through it is planned to be converted to CU.

Responses can be cached for a few minutes, so the AI figure may lag slightly behind recent requests.

Usage this month so far

GET /v1/accounts/{account_id}/billing/current-period
GET /v1/workspaces/{workspace_id}/billing/current-period

What the organization, or one workspace, has used in the open billing month, priced the way a statement is priced (same rates, included usage, base fee and rounding). It is what the month's statement would show if usage stopped now, so it is always an estimate. The Client Portal's Billing page and a workspace's Usage tab read these. Usage is computed when you ask, so the call can take a moment.

Permission: view_billing on the organization, for both routes. For a workspace this means the organization's Owners, Admins and Billing admins, not every member of the workspace. A caller without it, a workspace that doesn't exist and an M2M or workload token all get 403, so the response doesn't reveal whether a workspace exists.

Rate limit: 10 requests per minute for each organization or workspace, whoever calls. Over it, the call returns 429.

curl -s -H "Authorization: Bearer $TOKEN" \
  "https://platform.groundfloor.cloud/v1/accounts/$ORGANIZATION_ID/billing/current-period" | jq .totals
FieldDescription
organization_idThe organization ID
scope, workspace_idorganization or workspace. workspace_id is set for a workspace, and then every figure is that workspace's alone
period_start, period_endThe billing month, a calendar month in UTC (shorter for a part month). period_end is exclusive
prorationFor a part month: factor, billed_days, days_in_month, part_month, full_base_fee_usd and full_included_usd, as on statements. null otherwise
as_ofWhen the figures were computed
currencyUSD
plantier (free, indie, business or enterprise), label, base_fee_usd and included_usd
totalsusage_usd: the priced lines before included usage. included_credit_usd, base_fee_usd and total_usd: the credit, the plan's base fee and the total as a statement works it out; all null for a workspace, because they belong to the organization. is_estimate: always true
workspacesworkspace_id, workspace_slug, workspace_name and usage_usd for each workspace that used something, including deleted ones
metersOne entry per meter: meter, billable_quantity, billable_unit (vcpu_month or gb_month), unit_price_usd and usage_usd
linesOne priced line per workspace, meter and resource, in the same shape and order as a statement's lines, including flags
free_capThe Free plan's usage allowance, as GET /v1/accounts/{account_id}/billing/usage-cap returns it
compute_incompletetrue when Coderunner usage couldn't be read just now. The figures are then lower bounds, never higher
compute_incomplete_reasonWhy, when compute_incomplete is true: live_usage_unavailable, pod_usage_unavailable, run_usage_unavailable or usage_unavailable. Otherwise null
warningsPlan notes, the same codes as on statements

Amounts and quantities are decimal strings.

Billing statements

GET /v1/accounts/{account_id}/billing-statements
GET /v1/accounts/{account_id}/billing-statements/{statement_id}
GET /v1/accounts/{account_id}/billing-statements/{statement_id}/export.csv

Your organization's monthly statements, newest period first. Only statements Groundfloor has issued, or later voided, are returned. Permission: view_billing on the organization.

The list takes status (issued or void), limit (1 to 200, default 50) and offset, and returns items and total_count. Amounts are decimal strings in currency (USD).

FieldDescription
period_start, period_endThe month covered. period_end is exclusive. Periods are calendar months, 1st to 1st in UTC; a period can be shorter (see proration)
plan_tierThe plan the statement was priced on
statusissued or void, with issued_at and voided_at
base_fee_usd, usage_subtotal_usd, included_credit_usd, total_usdThe plan's base fee, the usage charges, the usage included in the plan, and the total
prorationFor a part month: factor, billed_days, days_in_month, part_month, full_base_fee_usd and full_included_usd. The base fee and included usage are the full amounts times billed days ÷ days in the month, rounded half-up to cents. null on statements made before calendar months
contains_estimatestrue when some usage is estimated; those lines have estimated: true
warningsCodes for anything unusual about the statement, such as free_usage_over_included. Free is never invoiced: its total_usd is 0.00
linesDetail only. One line per workspace resource and meter: workspace_name, resource_label, meter, billable_quantity, billable_unit, unit_price_usd, amount_usd, estimated, flags and more

Line flags

lines[].flags is a list of short codes that qualify a line. An empty list means nothing to note. The codes are estimated, pod_unattributed, pod_size_from_manifest, pod_type_unknown, cpu_unparsed, memory_unparsed, cpu_clamped, memory_clamped, replicas_clamped, duration_clamped, quantity_invalid and quantity_clamped. What each means is in What the notes on a line mean. Lines of statements issued before flags existed carry only estimated. Don't fail on a code you don't know; more can be added.

export.csv returns the lines plus a summary as a CSV file. Its last column is flags: a line's flags separated by ;, empty when there are none. An unknown statement, or one that belongs to another organization, is 404.

Usage by month or day

GET /v1/accounts/{account_id}/billing/usage
GET /v1/workspaces/{workspace_id}/billing/usage

Usage cost over time, as the Client Portal's usage charts show it. Permission: view_billing on the organization; for a workspace this means the organization's Owners, Admins and Billing admins. Rate limit: 30 requests per minute for each organization or workspace; over it, 429.

Query parameterDefaultDescription
granularitymonthmonth for calendar months, or day for UTC days
from11 months back (month) or 30 days back (day)First UTC day, YYYY-MM-DD. Months that overlap the range are returned
toTodayLast UTC day, inclusive. At most 93 days for day and 36 months for month; beyond that is 422
workspace_idAllAccount route only: limit to one workspace. One that isn't in the organization is 404
curl -s -H "Authorization: Bearer $TOKEN" \
  "https://platform.groundfloor.cloud/v1/accounts/$ORGANIZATION_ID/billing/usage?granularity=day&from=2026-11-01" | jq '.entries[] | {day, usage_usd, status}'
FieldDescription
organization_id, scope, workspace_idscope is organization or workspace
granularity, range_start, range_endWhat was asked for, as UTC days
plan_tier, currencyThe organization's plan, and USD
invoicedfalse on Free: it's never invoiced, so amounts are usage cost, not a bill
daily_tracking_sinceThe first day with per-day data. Earlier months have monthly figures only, and day returns nothing before it. null when there is none yet
entriesThe months in order, or the UTC days that have usage

Each entry has start, end (exclusive), day (for days), period_start, period_end, usage_usd (gross usage, before included credit), lines, statement_id and compute_incomplete. status is final when the month's statement has been issued (the amounts are the statement's) or estimated: priced now, and may change until the statement is issued. A month entry for the whole organization also has totals: usage_subtotal_usd, included_credit_usd, base_fee_usd, total_usd and proration (set for a part month). totals is null for days and for workspaces.

Each line has workspace_id, workspace_name, meter, unit, resource_type, resource_id, resource_label, quantity, amount_usd, flags and kind (usage, or close_adjustment: written when a month closes, so the days add up to the month). Daily amounts keep six decimal places. Daily data is kept for 14 months, and monthly data for 7 years. Amounts are decimal strings.

Plan catalogue

GET /v1/billing/plans

The plans and unit rates. Any signed-in user can read it. Each plan has a key (free, indie, business or enterprise), a label, its monthly_fee_usd and included_usd (Indie: $20 and $20; Business: $200 and $200; null for Enterprise, which is agreed per organization), and its limits; rates holds the unit prices. The workspaces and file_storage_bytes limits are enforced for the organization. The Coderunner limits (coderunners_per_workspace, max_vcpu_per_workload, max_ram_gb_per_workload, max_replicas) and managed_databases are enforced per workspace, combined with the cell's own maximums; read a workspace's values with GET /v1/workspaces/{workspace_id}/limits. region_selection is listed for information. See Quotas and limits.

Errors

StatusMeaning
403Missing view_billing on the organization (for a workspace route, on its organization)
404Organization not found, or on billing/usage a workspace_id that isn't in it
422since_seconds outside the allowed range; on billing/usage, a range over 93 days (day) or 36 months (month)
429Too many current-period (10 a minute) or usage (30 a minute) requests for the organization or workspace; wait a minute