WBX Sandbox
Sandboxes

Compute classes

A compute class is the service level for your sandboxes and jobs: which servers the work runs on and what it costs. Most people never change it – the default economy is fine for Python, scripts and light AI tasks. It is a declared level of service, not a guaranteed speed.

Classes

ClassRuns onGood for
economythe lowest-cost servers (default)Python, small jobs, light AI tasks
balancedbalance of price, load and performanceeveryday development, automation, browsers
performanceonly servers with the highest measured performancebuilds, tests, heavy computation
memoryservers with the most free memory; at least 2 vCPU and 8 GBdata processing that needs a lot of RAM
dedicatedonly servers reserved for your organizationenterprise workloads (on request)

Choose a class

compute_class in the request wins; without it your account's default class is used ( Settings → Compute Preferences ), and without a default economy. The SDKs and MCP send nothing when you don't set it – the server decides. Your request is never moved to another class.

from wbxsandbox import Sandbox, run_job, compute_preferences, set_default_compute_class

print(compute_preferences())                      # classes, prices, your default
set_default_compute_class("balanced")
Sandbox.create(template="base", compute_class="memory")
run_job(command="make -j4", compute_class="performance", optimize_for="price", timeout_seconds=600,
        max_cost="0.10")                          # for CZK use "2.50"
import { WBX } from "wbxsandbox";

const wbx = new WBX();
console.log(await wbx.compute.preferences());      // classes, prices, your default
await wbx.compute.setDefaultClass("balanced");
await wbx.sandboxes.create({ template: "base", computeClass: "memory" });
await wbx.jobs.create({ command: "make -j4", computeClass: "performance", optimizeFor: "price", timeoutSeconds: 600,
                        maxCost: "0.10" });   // for CZK use "2.50"
curl -s https://sandbox.wbx.cz/v1/compute/preferences -H "Authorization: Bearer $WBXSANDBOX_API_KEY"

curl -s -X PUT https://sandbox.wbx.cz/v1/compute/preferences -H "Authorization: Bearer $WBXSANDBOX_API_KEY" \
  -H "Content-Type: application/json" -d '{"default_compute_class": "balanced"}'

curl -s -X POST https://sandbox.wbx.cz/v1/jobs -H "Authorization: Bearer $WBXSANDBOX_API_KEY" -H "Content-Type: application/json" \
  -d '{"command": "make -j4", "compute_class": "performance", "optimize_for": "price", "timeout_s": 600, "max_cost": "0.10"}'   # for CZK use "2.50"

From an AI assistant: ask it to use a class – the MCP tools create_sandbox and run_job take compute_class, and get_compute_classes lists what you can use.

Price

Each class has its own price relative to your plan's rates (shown in Compute Preferences and on the pricing page). The price of a sandbox or job is fixed when it is created or accepted – later changes of the price list or of your default do not change running sandboxes or accepted jobs. The worst-case cost of a job (max_cost, budget) uses the class price.

Choosing a server inside the class

optimize_for (price, balanced or performance) picks the server inside the class; it never changes the class or its price. placement (auto – default, fast, spread) is an older way to choose the server; when both are sent, optimize_for wins. When no server of the class is free right now, creating a sandbox fails with 503 and a job waits in the queue. Responses include the resulting compute_class (jobs also class_price).

Errors

An unknown class answers 400 invalid_compute_class, a class your plan does not include 403 class_not_allowed, a class that is temporarily unavailable 409 class_disabled. All codes: Errors.

Next steps