Credits live on the organization
Every billable resource, a serverless run, a VM hour, an inference replica hour, is billed against an organization. New accounts get an org created automatically at signup; credits granted to your account live on that org. If you belong to several orgs, each one has its own balance and history. The org a request bills against is resolved by:- The
org_idcarried by an API key created under/orgs/{slug}/api-keys. - The
X-Org-Slugheader on a JWT request. - Otherwise, your default org.
X-Org-Slug automatically based on the org switcher.
How charging works
Every billable action generates an entry in the org’s history with the credit cost attached. Charges are pulled against the org’s balance in real time, so you can watch your spend during long jobs and abort if needed. Two convenience views layer on top of the org ledger:- Activities, Combined timeline of debits and credit top-ups for the active org.
- History, Per-execution breakdown for runs that have been billed.
Topping up
POST /billing/checkout creates a Stripe Checkout session for the active org. The session metadata captures the org id at creation time, so the webhook routes the credits to the right org even if you switch the active org before the payment completes.
In the dashboard, the Billing page has both preset packages and a custom-amount input.
REST API
Top-level billing endpoints (active-org aware):
Org-scoped reads, the underlying ledger pulled straight from the credit system:
See Organizations, Billing for the category and
group_by reference.
