Billing
Prepaid credit, charged per minute of sandbox runtime. No subscription, no seats, no minimum, and nothing to cancel.
How credit works
- Your account holds a balance in US dollars. Sandbox runtime draws it down; buying a credit pack tops it up.
- New accounts start with $5.00 of credit, no card required — about 56 hours of
smallruntime. - Credit does not expire.
- Balances are tracked in millionths of a dollar, so a 40-second sandbox is charged for 40 seconds, not rounded up to something bigger.
Check the balance at any time:
curl -sS https://sandbox-as-a-service.com/v1/account -H "Authorization: Bearer $AAS_API_KEY" | jq .balance_usd
What it costs
| Size | vCPU | Memory | Disk | Price |
|---|---|---|---|---|
small | 2 | 4 GB | 40 GB | $0.09/hour |
medium | 4 | 8 GB | 80 GB | $0.28/hour |
large | 8 | 16 GB | 160 GB | $0.55/hour |
The rate is per hour of wall-clock runtime, per sandbox, and depends only on size. A
small running for ten minutes costs $0.015; a
large running for the full 1440-minute maximum costs
$13.20.
What is billed
The meter starts when the sandbox becomes ready — the moment ready_at is stamped and the
create call returns — and stops when it is destroyed. Charges accrue continuously and are written to
your ledger about once a minute, with a final settlement at teardown, so the balance you see is never
more than a minute behind reality.
| Billed | Not billed |
|---|---|
Wall-clock time from ready_at to teardown, whether the sandbox is executing commands or sitting idle. | Provisioning time — everything before ready_at, including the boot on a cold start. |
| Each running sandbox separately, at its own size rate. | Sandboxes that failed to provision. They never become ready, so they never accrue anything. |
| API requests, executions, output bytes, network transfer and API keys — all free. | |
Anything after deleted_at. Once teardown settles, the sandbox stops costing. |
The practical consequence: an idle sandbox costs the same as a busy one. The single biggest thing you can do for your bill is destroy sandboxes as soon as the work is done rather than letting them idle until they expire.
Running out of credit
The balance never goes negative — you cannot end up owing money. Instead:
- Creating a sandbox requires a small minimum balance (roughly five minutes of
smallruntime). Below that,POST /v1/sandboxesreturns402witherror.type: "insufficient_credits". - Executing a command requires a balance above zero. At zero, exec returns the same
402. - When the balance reaches zero while sandboxes are running, they are destroyed automatically within about a minute. Work in progress is lost, along with anything in the filesystem. This is the platform's protection against unbounded spend, and it is not gentle.
Watch the balance from your own code and top up before it bites:
import os
import requests
API = "https://sandbox-as-a-service.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['AAS_API_KEY']}"}
def assert_enough_credit(minutes_needed, size="small"):
"""Fail fast instead of having a sandbox killed halfway through a job."""
account = requests.get(f"{API}/account", headers=HEADERS, timeout=30).json()
rate_per_hour = account["pricing_usd_per_hour"][size]
needed = rate_per_hour * (minutes_needed / 60) * 1.5 # 50% headroom
if account["balance_usd"] < needed:
raise RuntimeError(
f"balance ${account['balance_usd']:.4f} is below the ${needed:.4f} "
f"needed for {minutes_needed} min of {size} runtime"
)
assert_enough_credit(minutes_needed=45)# Spend and runtime over the last 30 days
curl -sS "https://sandbox-as-a-service.com/v1/usage?days=30" -H "Authorization: Bearer $AAS_API_KEY" | jq
# {
# "object": "usage",
# "period_days": 30,
# "balance_usd": 8.42,
# "spent_usd": 2.58,
# "added_usd": 10.00,
# "sandboxes_created": 61,
# "runtime_minutes": 3096
# }
Buying credit
Top up in Dashboard → Billing. Payment is handled by Stripe; card details never touch our servers. Credit lands on your balance as soon as the payment is confirmed, and each purchase is written to your ledger.
| Pack | Price | Approx. small runtime |
|---|---|---|
| $10 | $10.00 | 111 hours |
| $25 | $25.00 | 278 hours |
| $100 | $100.00 | 1111 hours |
Purchases are one-off. There is no recurring charge and no auto-top-up, so a runaway job can never bill your card repeatedly — it can only spend the credit you have already bought.
Invoices and receipts
- Stripe emails a receipt for every purchase to the address on your account.
- The billing portal, linked from Dashboard → Billing, holds your payment history and invoices.
- Your credit ledger — every top-up and every usage charge, with the sandbox id it belongs to — is in the dashboard and via
GET /v1/usagein summary form.
Cost control checklist
Destroy in a finally
Never rely on expiry as your cleanup mechanism. Expiry is the backstop; an explicit DELETE is the plan. See the examples.
Set a tight timeout_minutes
Size it to the job. A sandbox that leaks costs at most its remaining lifetime, so a 15-minute default caps the damage where 1440 would not.
Reuse a sandbox for related work
Many commands in one sandbox cost less than one sandbox per command, and skip the startup wait each time.
Pick the smallest size that works
large costs 6× small. Most agent workloads are I/O-bound, not CPU-bound.
Sweep for strays
List your sandboxes on a schedule and destroy anything your system has lost track of.
Deleting your account destroys every running sandbox and revokes every key. Remaining credit is forfeited, so spend it first.