Concepts
Billing & Credits
Workspace usage is metered and billed through the credits system. This page explains how usage converts to credits.
How billing works
Workspace Running ──► Usage Metrics Collected ──► Converted to Pricing Units ──► Credits Debited
(every few seconds) (cpu_time, memory, disk, net) (from your balance)- While a workspace is running, the platform collects usage metrics (CPU time, memory, disk I/O, network)
- Metrics are collected and converted to pricing units
- Credits are debited from your account balance
Pricing units
| Unit | Description | How measured |
|---|---|---|
cpu_time_minutes | CPU time consumed | Nanoseconds of CPU time → minutes |
memory_gb_minutes | Memory held over time | Allocated MB × uptime → GB-minutes |
disk_io_gb | Total disk I/O | Read + write bytes → GB |
network_gb | Total network transfer | Inbound + outbound bytes → GB |
Credit rates
Credit rates vary by plan and can be checked via the API:
// Check current pricing
const pricing = await client.credits.pricingInfo();Or from the Dashboard → Credits → Pricing page.
What costs credits
| Activity | Credits used |
|---|---|
| Workspace running | CPU time + memory duration |
| Disk I/O (reads/writes) | Billed per GB transferred |
| Network traffic | Billed per GB in/out |
| Workspace stopped | No credits consumed |
| Workspace paused | Minimal (memory preserved but no CPU) |
| API calls | Not billed separately |
Managing costs
Use temporary mode
Auto-expire workspaces to avoid forgetting to stop them:
await ws.create({
config: { ttl: '1h', ttl_action: 'stop' },
});Right-size resources
Don't over-provision. Start small and scale up:
// Start with minimum resources
await ws.create({
config: { cpus: 1, memory_mb: 256 },
});
// Scale up only when needed
await ws.resources.update(id, { cpus: 4, memory_mb: 4096, apply: true });Pause when idle
Paused workspaces consume far less than running ones:
await ws.pause(id); // Freeze - minimal cost
await ws.resume(id); // Resume when neededSet namespace quotas
Limit spending per namespace:
await client.credits.setNamespaceQuota('production', {
quotaLimit: 1000,
period: 'daily',
});Monitor usage
Track credit consumption in real-time:
// Credits chart for a workspace
const chart = await ws.usage.creditsChart(id);
console.log(`Total credits burned: ${chart.total}`);
// Account balance
const balance = await client.credits.balance();
console.log(`Available: ${balance.available} credits`);Plan allowances & credit packages
For current plan credit allowances, pricing, and available credit packages, see the Pricing page.