Billing & Usage
Check a project's tier and remaining headroom, cap monthly spend, read the tier catalog, and open checkout or the billing portal — pricing as an API your agent can reason about.
Billing is part of the API. A project sits on a tier with included quotas; beyond those quotas, usage either accrues overage or is throttled at a ceiling you set. You can read live usage and headroom, set or remove the spend ceiling, and start an upgrade — all programmatically, so an agent can self-throttle or escalate to a human before running a data-heavy workload.
Billing routes mount under /v1/admin/projects/:projectId/billing/* and
require developer credentials (a PAT or console session). Server keys
(amb_*_sk_*) are rejected with 403 BILLING_REQUIRES_DEVELOPER_AUTH —
billing is an owner action, not a runtime one.
Status
GET .../billing/status returns the current tier, per-meter usage and cost,
the billing period and when it resets, projected overage, the spend ceiling
and how much of it is consumed, the live enforcement state, and —
importantly for agents — human_action_required, a single field telling
you whether it's safe to proceed unattended.
enforcement is the live verdict the API itself acts on: when read_only
is true, metered write operations return 402 until the period
resets or the ceiling changes (see Spend ceiling);
over_quota_meters lists meters whose included quota is already consumed —
writes on those meters are refused on throttle mode (402 TIER_QUOTA_EXCEEDED, except mau, where new-user signups keep their
long-standing 429 MAU_CAP_REACHED shape).
Three overage figures, deliberately distinct so the status never overstates what you owe:
| Field | Meaning |
|---|---|
projected_overage_usd_this_month | Live estimate of overage from current usage vs. your included quotas. |
recorded_overage_usd_this_period | Overage tallied into your usage ledger for the current billing period. |
billed_overage_usd_this_period | Overage actually added to your Stripe invoice so far this period. |
metered_billing_live | Whether metered overage is being charged yet (see How overage is collected). |
human_action_required is one of:
| Value | Meaning |
|---|---|
none | Safe to proceed unattended. |
verify_email | The project owner hasn't verified their email; nothing unlocks first. |
approve_checkout | Free tier is near a quota cap — a human should approve an upgrade. |
set_ceiling | Paid tier is projecting significant overage with no ceiling set. |
An agent should call this before provisioning new features or pushing large workloads.
Spend ceiling
Cap the monthly bill with PUT .../billing/ceiling. When the current
period's overage cost reaches the ceiling, the project degrades to
read-only mode: metered write operations — tracking events, inserting
or updating collection rows, media uploads, push sends, new user signups —
return 402 SPEND_CEILING_REACHED with a machine-readable payload, while
reads (and deletes, which shrink usage) keep working. Pass
ceiling_usd: null to remove the cap (linear overage, no limit).
The same contract applies to tier quotas on throttle mode (the default):
once a meter's included quota is consumed, writes on that meter return
402 TIER_QUOTA_EXCEEDED with the identical payload shape (reason: "quota"). New-user signups keep their long-standing 429 MAU_CAP_REACHED
shape at the MAU quota. Enforcement takes effect within seconds of a
ceiling change and resets automatically when the billing period rolls.
So you're never surprised by either the bill or the read-only flip, two
control-plane webhook events fire as the ceiling fills — subscribe with
amba_control_webhooks_create (or billing.*):
| Event | Fires |
|---|---|
billing.ceiling_warning | At 80% of the ceiling, once per billing period. |
billing.ceiling_reached | At 100% — the project is now read-only, once per period. |
ceiling_usd must be a finite number between 0 and 100000, or null.
Tiers
The tier catalog (names, prices, included quotas, overage rates) is
available offline through the amba_billing_tiers MCP tool, so an agent
can reason about upgrades without a network call. It mirrors the pricing
page at amba.dev. The shipped tiers are
free, pro, scale, and enterprise.
Every tier includes every capability. Tiers differ by quota, not by which features you can use — collections, functions, push, gamification, economy, social, AI, and the rest are all available on every tier, including free. The only feature gates are the quotas in the table below and a couple of free-tier operational limits.
| Capability | Free | Pro | Scale | Enterprise |
|---|---|---|---|---|
| Price (monthly) | $0 | $20 | $200 | Custom |
| Price (annual, per month) | $0 | $16 | $160 | Custom |
| Monthly active users (MAU) | 1,000 | 25,000 | 250,000 | Custom |
| Engagement events / mo | 10,000 | 250,000 | 2,500,000 | Custom |
| Push notifications / mo | 1,000 | 50,000 | 500,000 | Custom |
| Database storage | 100 MB | 1 GB | 5 GB | Custom |
| Media storage | 100 MB | 1 GB | 25 GB | Custom |
| All feature categories | Yes | Yes | Yes | Yes |
| Projects per account | 2 | Unlimited | Unlimited | Custom |
| Sleeps after inactivity | 14 days | Never | Never | Never |
Beyond the included quotas, usage on a paid tier accrues linear overage (unless you set a spend ceiling):
| Metered axis | Overage rate |
|---|---|
| MAU | $0.50 per 1,000 MAU |
| Engagement events | $0.50 per 10,000 events |
| Push | $0.50 per 10,000 push |
| Database storage | $1.50 per GB-month |
| Media storage | $0.10 per GB-month |
| Telemetry events | $0.10 per 1,000,000 |
| Agent tool calls | $0.50 per 10,000 calls |
Telemetry events — emitted via Amba.track(name, props, { telemetry: true }) —
are billed separately and far cheaper than engagement events because they
don't fan out to segments, workflows, or push. Use them for high-volume
analytics signals you don't need to drive engagement off.
Agent tool calls — tools/call requests against your project's own
app MCP — are priced like engagement events. Like
telemetry, they have no included quota; every successful call meters.
How overage is collected
When a project's spend mode is overage_bill (rather than throttle),
requests past your included quotas are allowed through and the overage is
tallied into a per-period usage ledger. A daily reconciliation totals each
metered axis for the current billing period and adds the billable amount to
your upcoming invoice — so overage rolls into your next invoice rather
than being charged per-request.
Metered overage billing is rolling out behind a flag. While it's being enabled, usage is still
tracked and shown in GET .../billing/status (recorded_overage_usd_this_period), but nothing is
charged — metered_billing_live is false and billed_overage_usd_this_period stays 0. Once
enabled, the recorded overage is added to your invoice and metered_billing_live flips to true.
Set a spend ceiling if you want hard read-only enforcement (402) instead of
accruing charges.
These numbers come straight from the live tier catalog and are reproduced here for reference. If
they ever appear to differ from the amba_billing_tiers MCP tool or
amba.dev/#pricing, treat those as authoritative — they read the same
source.
Upgrade & manage
Two routes return hosted URLs you redirect the human to — these flows need a browser, so they're surfaced to a person rather than driven by an agent:
| Method | Path | Returns |
|---|---|---|
| GET | /admin/projects/:projectId/billing/status | Live billing state (above). |
| PUT | /admin/projects/:projectId/billing/ceiling | Set / clear the spend ceiling. |
| POST | /admin/projects/:projectId/billing/checkout | { url } — checkout for an upgrade. |
| POST | /admin/projects/:projectId/billing/portal | { url } — manage card, plan, invoices. |
POST .../checkout takes { tier: "pro" | "scale", interval: "month" | "year" }
and returns a checkout url. If the project already has an active
subscription, it returns 409 SUBSCRIPTION_EXISTS — use the portal to
change plan instead. POST .../portal opens the billing portal so the
owner can update their card, change plan, or download invoices.
MCP tools
| Tool | Does |
|---|---|
amba_billing_status | Live tier, headroom, overage, and required action. |
amba_billing_tiers | The full tier catalog (offline, no API call). |
amba_billing_set_ceiling | Set or remove the monthly spend ceiling. |