API reference

Budget

Your spend and limits for the session and the day, the policy that applies and who you are.

GET/v1/ci/budget

Get your budget

Budget, policy and principal.

Permission: ci:budget.read

Parameters

NameTypeRequiredDescription
sessionquerystringOptional

Response200 OK

actorstringRequired
budgetobjectRequired
Budget: returned in every job response and tool result
budget.concurrentobjectRequired
budget.concurrent.limitintegerRequired
budget.concurrent.usedintegerRequired
budget.dayobjectRequired
Spend
budget.day.jobsintegerRequired
budget.day.jobs_limitinteger or null
budget.day.limit_unitsinteger or null
budget.day.remaining_unitsinteger or null
budget.day.spent_unitsintegerRequired
budget.monthobject or null
the tenant's monthly budget, when one is set on platform or in the policy
budget.month.currencystring or null
budget.month.hard_limitbooleanRequired
budget.month.limit_amountinteger or null
budget.month.limit_unitsintegerRequired
budget.month.percent_usedintegerRequired
whole percent of the limit spent; past 100 when exceeded
budget.month.period_endstring (date-time)Required
the first instant of the next month (UTC), when the spend resets
budget.month.remaining_unitsintegerRequired
budget.month.sourcestringRequired
who set the monthly budgetOne of platform, tenant
budget.month.spent_amountinteger or null
budget.month.spent_unitsintegerRequired
budget.month.statestringRequired
where the month stands against its budgetOne of ok, warning, exceeded
budget.month.unit_price_microsinteger or null
micro units of currency per cost unit (1 EUR = 1,000,000), so a client prices any count of units exactly; absent without a platform price
budget.month.warn_at_percentintegerRequired
budget.rate_tablestringRequired
version of the cost-unit table
budget.resets_atstring (date-time)Required
budget.sessionobjectRequired
Spend
budget.session.jobsintegerRequired
budget.session.jobs_limitinteger or null
budget.session.limit_unitsinteger or null
budget.session.remaining_unitsinteger or null
budget.session.spent_unitsintegerRequired
policyobjectRequired
Policy: the client-facing subset of
policy.allow_full_buildbooleanRequired
policy.default_kindstringRequired
check, test, build, lint or a manifest task id
policy.limitsobject or null
the tree caps of the tenant policy, served to every principal so the cli pre-checks a tree against the numbers the cell enforces instead of constants of its own; absent from an older cell, in which case the cli checks nothing locally and the cell answers 413
policy.limits.max_blob_bytesintegerRequired
policy.limits.max_tree_bytesintegerRequired
policy.limits.max_tree_entriesintegerRequired
policy.max_concurrent_per_actorintegerRequired
policy.truststringRequired
tiers, with no order on purpose (amendment 2026-10-27): trusted_ci is protected-branch automation and the cache writer every tier reads, trusted_interactive a person's own work, and neither is "below" the other, so every rule over tiers names the tiers it meansOne of untrusted, trusted_ci, trusted_interactive
policy.untrusted_refsarray of stringsRequired
principalobjectRequired
Principal: what the cli shows; never the token
principal.credentialstringRequired
prefix only, for example csk_live_eu_abcd
principal.jurisdictionstringRequired
the cell a tenant is pinned to. mirrors ciresk_std_api::Region so the api converts a principal's jurisdiction without a second vocabulary.One of eu, us
principal.kindstringRequired
One of user, api_key, service
principal.org_idstringRequired
principal.scopesarray of stringsRequired
curl "$CIRESK_API/v1/ci/budget" \
  -H "Authorization: Bearer $CIRESK_KEY"