@superserve/sdk and superserve), CLI 2.5.0+ and MCP 0.6.0+ (@superserve/mcp).
Build a template with a range
The range comes from the template. SetvcpuMax above vcpu for a CPU range, and memoryMaxMib above memoryMib for a memory range. See Growing CPU and Growing memory for the rules.
Choose a size
Passvcpu and memoryMib / memory_mib with fromTemplate / from_template. You can pass either one or both.
vcpu and memory_mib to sandbox_create.
vcpuis a whole number of vCPUs from the template’svcputo itsvcpuMax, both included.memoryMibis a size in MiB from the template’smemoryMibto itsmemoryMaxMib, both included, in 2 MiB steps from the minimum. For a 2048–8192 MiB template, 6144 works and 6145 doesn’t.- Both must also be within your plan’s limits, or the request fails with a
402. See Resource limits.
Fixed and growable
A size you choose is fixed for the life of the sandbox, including after pause and resume. The dimension you don’t choose keeps the template’s range, so it can still grow under load with live CPU resizing or live memory resizing. In the example above both are chosen, so the sandbox has a fixed 3 vCPU and 6144 MiB. Its info shows no ceiling for a fixed dimension:vcpu: 3, memory would still range from 2048 to 8192 MiB.
Snapshot copies
A sandbox created from a snapshot keeps the size of the sandbox it was taken from, including any range it could grow in. You can also passvcpu and memoryMib / memory_mib with fromSnapshot / from_snapshot, either or both:
vcpuworks when the original sandbox came from a template with a CPU range. The snapshot records that range, and the copy can take any count in it, above or below the original’s. For a snapshot of a 2 vCPU sandbox from a 1–4 vCPU template, 1, 3 and 4 all work.memoryMibworks when the original sandbox was created with a chosen memory size. The copy can take any size in the snapshot’s memory range, in 2 MiB steps from the minimum.
Errors
Choosing a size applies to sandboxes placed on GCP. For an AWS placement (
placement.cloud set to aws in POST /sandboxes), omit vcpu and memoryMib.