Skip to content

Credits

Credits are the platform’s unit of usage measurement. In SaaS mode, your organization uses credits as sandboxes run. Credits are shared across all members of the organization.

Only Pro and Enterprise tiers are available. New organizations start on the Pro tier with 25,000 free credits.

Credits are consumed in real time while sandboxes are active. Usage is recorded automatically so you can track spend and remaining balance.

EventWhat happens
Sandbox keepaliveExtends sandbox timeout based on remaining balance
Metering loopCredits are deducted from running sandboxes
Sandbox pause/stopA final deduction is recorded
Balance reaches zeroAll running sandboxes are terminated

Organizations receive an initial credit allocation at signup and can purchase additional credits through Stripe. Each purchase increases the shared org balance. The checkout endpoint accepts a quantity (1-10) to buy multiple bundles in a single session.

Auto-refill keeps your organization’s credits topped up automatically. When your balance drops below the configured threshold during a deduction, the platform charges your saved payment method in the background and adds credits without interrupting the running workload.

Enable auto-refill from Settings → Billing. Only organization owners can configure it. When enabled, you can choose:

  • Threshold — the balance level that triggers a refill.
  • Refill amount — the number of bundles to purchase per refill (1-10).
  • Monthly cap — the maximum number of auto-refills allowed per month.

The monthly cap is a safety rail to prevent runaway spend. The billing page also shows the saved payment method (brand, last 4 digits, and expiry) and a status line for auto-refills used this month.

Auto-refill uses the same Stripe price as manual credit purchases and charges off-session using the payment method saved during a prior purchase.

If a payment fails (card declined or expired), auto-refill is automatically disabled. You can update the payment method in billing settings and re-enable auto-refill, or disable it any time from the same page.

TypeDescription
signup_allocationInitial credits granted at org creation
purchaseStripe-backed credit purchase
auto_refillCredits added automatically when balance drops below threshold
usageRuntime deductions from sandbox activity
refundCredits returned after a purchase reversal
admin_adjustmentManual credit changes by platform operators

The credits balance API returns the current balance and warning state.

FieldMeaning
balanceCurrent credit balance.
is_low_balancetrue when the balance is below the warning threshold.
auto_refill_enabledtrue when auto-refill is active.

In Enterprise mode, credit endpoints are unavailable and sandboxes are not limited by credit balance.

  • GET /api/v1/org/{org}/credits
  • GET /api/v1/org/{org}/credits/transactions
  • GET /api/v1/org/{org}/credits/price
  • POST /api/v1/org/{org}/credits/checkout
  • GET /api/v1/org/{org}/credits/auto-refill
  • PUT /api/v1/org/{org}/credits/auto-refill
  • DELETE /api/v1/org/{org}/credits/auto-refill
  • GET /api/v1/org/{org}/credits/payment-method
  • GET /api/v1/org/{org}/credits/member-limits
  • PUT /api/v1/org/{org}/credits/member-limits/{user_id}
  • DELETE /api/v1/org/{org}/credits/member-limits/{user_id}

LiteLLM can report inference spend to the platform via an internal callback. The callback uses a shared bearer token (LITELLM_CALLBACK_SECRET) and the endpoint is configured with LITELLM_CALLBACK_ENDPOINT for service-to-service usage only.

  • POST /api/v1/internal/litellm/usage

Organization owners can set per-member monthly credit limits to prevent a single user from consuming the entire org balance. When a member exceeds their limit, any running sandboxes for that member are paused with pause_reason="member_limit_exceeded". Other members continue running normally.