Docs · Cost monitoring
Knowing what you're spending.
Driftstack pricing is metered. Compute, storage, egress, email, and bundled LLM each have a per-unit rate. This page explains how the rates are applied, what counts as "this billing cycle", and how to read the live spend endpoint from your dashboard or the SDK.
Cost components
Each component is metered separately and shows up as a line on
your monthly invoice. The breakdown returned by
/v1/account/cost mirrors the
same five components.
- Compute (session-minutes)
- Wall-clock time a session occupies a Mac mini slot. Charged per minute. A 15-minute session counts as 15 session-minutes regardless of how active you are within it — the slot is reserved for you.
- Storage (R2 GB-months)
- Captures (screenshots, DOM dumps, PDFs, recordings) and profile state live in Cloudflare R2. We charge per GB-month, prorated to the second. Retention defaults are 30 days for screenshots / DOM, 90 days for recordings; shorter retention reduces this line.
- Egress (TURN GB)
- WebRTC stream bandwidth that traverses our TURN relay. Sessions where the customer's network can do direct peer-to-peer don't accumulate this line.
- Email (Postmark sends)
- Transactional emails fired against your account (signup verification, billing receipts, incident notifications). Capped at the volume implied by your tier; one cent per send at the metering layer.
- LLM tokens
- When the bundled-LLM agent feature is enabled and you're on the pass-through pricing model, this line is the input + output tokens consumed × the sub-processor's rate with our small operational markup. BYOK customers see 0 here.
Threshold state
Every cost response includes a
thresholdState field with one
of three values:
- under-soft
Spend is below the soft warning threshold for your tier. The dashboard shows an "on track" indicator. No email-based alerts fire.
- between-soft-and-hard
Spend is above the soft warning and below the hard cap. You receive an "approaching limit" email the first time this transition happens in a cycle. The dashboard shows an amber indicator.
- over-hard
Spend has crossed the hard cap configured for your tier (or the per-account override your account-team set). The dashboard surfaces a red indicator + an "over limit" email fires once per crossing.
Threshold numeric values are not part of the customer response (they're operator-tuned configuration). What you see in the response is your spend and the categorical state — the admin team contacts you if you need higher caps.
Reading the endpoint
Endpoint:
GET /v1/account/cost?billing_cycle=YYYY-MM.
Omit the parameter for the current cycle. Returns 200 with a
synthesised zero-breakdown for fresh accounts that haven't
accrued usage yet (no 404).
// Example response
{
"account_id": "01HF...",
"billing_cycle": "2026-05",
"tier": "api_builder",
"breakdown": {
"computeCents": 12_000,
"storageCents": 200,
"egressCents": 50,
"emailCents": 5,
"llmCents": 1_800,
"totalCents": 14_055,
"thresholdState": "under-soft"
}
}
All amounts are integer cents. Format with your locale of
choice (the GUI client defaults to EUR; see
cost-panel.ts for the
formatter).
FAQs
Is the response real-time?
Within a few seconds of the underlying usage event. Snapshots aren't persisted yet, so the endpoint recomputes every request. This will move to nightly snapshots when traffic justifies caching — your integration won't notice the change.
Why are LLM tokens 0 even though I'm using the agent?
BYOK accounts (Bring Your Own Anthropic Key) settle LLM cost directly with the LLM vendor; we don't meter what we don't pay for. If you're on pass-through pricing, you should see a non-zero line — open a support ticket if not.
What happens if I cross the hard cap?
Nothing is automatically blocked. The platform alerts our ops team and emails you. We reach out to discuss raising the cap or moving you to a higher tier; we never silently kill running sessions to enforce a soft cap.