codai docs
Projects & Environments

Billing

Managed environments are charged per second of runtime from your wallet, fail-closed; your own servers are free.

Managed (openstack, hetzner)Bring your own (byo)
PriceHourly rate of the size, charged per second of runtimeFree
While stopped / archivedNothing—
Paid fromYour wallet (the environment owner's)—
When money runs outThe machine is stoppedNothing happens

Inference used by an agent working in an environment is billed like any other request on your key; this page is only about compute.

How a charge is computed

The rate is fixed when the environment is created — small €0.03/h, medium €0.06/h, large €0.12/h (see sizes). The worker charges 10-minute buckets aligned to the clock while the environment is running:

charge (micro-EUR) = floor((hourly_rate × seconds_in_bucket + 1800) / 3600)
  • The first bucket is partial, counted from startedAt; on stop or archive the last partial bucket is charged too.
  • Amounts are integer micro-EUR (1 € = 1 000 000), debited from your wallet with the soonest-expiring credits first. Each bucket has a unique key (compute:<environment>:<bucket start>), so a retry can never charge twice.
  • Ledger rows appear in the hub wallet history as Cloud environment compute.

Fail-closed

A VM that keeps running on an unpaid balance is not allowed. Unlike LLM requests (which never block on a billing hiccup), compute is fail-closed:

SituationWhat the worker doesstateReason
Balance lower than the bucketStops the environment immediatelyinsufficient_funds
Three consecutive failed chargesStops the environmentbilling_error
This month's charged compute reaches the environment's budgetStops the environmentbudget_exceeded

Stopped means stop on the provider (shelve on OpenStack, snapshot on Hetzner) — your disk is kept. Top up the wallet and Start the environment again.

Budget cap

budget_micro_eur (set at creation; in the hub: Monthly budget cap (€)) is a per-environment ceiling on compute charged since the 1st of the month (UTC). Change it later on the environment page under Budget cap; leave it empty for no cap.

Where to see usage

  • Environment page → Cost this month: compute charged since the 1st (UTC), billed hours, and a warning when buckets could not be charged.
  • Billing → wallet history: every Cloud environment compute debit.
  • API: each environment carries hourlyRateMicroEur; GET /v1/environments/{id} returns the last events, including state changes with their reason.

Coming soon

Included hours per plan (the environment tracks includedHoursUsedSeconds, currently always charged in full), disk storage for stopped machines, and a fiscal invoice for compute issued through brivio are not live yet.

On this page