curl --silent --show-error --fail-with-body --request GET \
--url 'https://api.computer.stateset.app/api/v1/billing/projection' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"period_start": "string",
"period_end": "string",
"days_elapsed": 1.5,
"days_remaining": 1.5,
"period_cost_so_far": 1.5,
"daily_burn_rate": 7.5,
"projected_period_total": 49,
"projection_basis": "actual"
}
Get Billing Projection V1
Linear projection of end-of-period spend given current burn rate…
GET
/
api
/
v1
/
billing
/
projection
curl --silent --show-error --fail-with-body --request GET \
--url 'https://api.computer.stateset.app/api/v1/billing/projection' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"period_start": "string",
"period_end": "string",
"days_elapsed": 1.5,
"days_remaining": 1.5,
"period_cost_so_far": 1.5,
"daily_burn_rate": 7.5,
"projected_period_total": 49,
"projection_basis": "actual"
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
Response
BillingProjectionResponse
string,null
ISO 8601 of the billing period’s start. None when no subscription is on file.
string,null
ISO 8601 of the billing period’s end.
number
required
Decimal days from period_start to now, capped at the period length.
number
required
number
required
number
required
period_cost_so_far / max(days_elapsed, 1). USD/day.
number
required
Linear extrapolation: cost_so_far + (daily_burn_rate × days_remaining). Naive — does not model end-of-month spikes or weekend tapering.
string
required
actual when we have a real period and at least some elapsed time; no_subscription when no subscription row exists; no_window when a subscription exists but has no billing_period_start/end (yet to be set by Stripe sync). Allowed values: 'actual', 'no_subscription', 'no_window'.Status codes
| Code | Meaning |
|---|---|
200 | Successful Response |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request GET \
--url 'https://api.computer.stateset.app/api/v1/billing/projection' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"period_start": "string",
"period_end": "string",
"days_elapsed": 1.5,
"days_remaining": 1.5,
"period_cost_so_far": 1.5,
"daily_burn_rate": 7.5,
"projected_period_total": 49,
"projection_basis": "actual"
}
Last modified on September 21, 2026