Skip to content

RSI Boxes

After installing the client and selecting a project, create a CPU sandbox:

box=$(rsi box create --cores 2 --memory-mb 4096 --disk-mb 20480 --life 10m)
rsi box exec --timeout 60 "$box" -- uname -s
rsi box get "$box"
rsi box ls

rsi box create waits until the box is running. Pass --idempotency-key to safely recover an interrupted create by reusing the same key with the identical request. rsi box exec also supports --idempotency-key, --cwd, repeatable --env NAME=VALUE, --user, and --json.

See the Python SDK guide for the same lifecycle in Python. CLI and SDK commands use compute API IDs; the console HTTP API below returns a separate billing ID.

To create a box directly through POST /v1/boxes:

curl -s https://rsibox.ai/v1/boxes \
-H "Authorization: Bearer $RSIBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "train-1", "vcpus": 8, "memory_mb": 32768, "disk_mb": 102400,
"gpu": {"model": "rtxpro5000", "count": 1}, "project": "default", "life": "6h"}'

Every field is optional. The console HTTP API uses these flat fields; Python create_sandbox uses nested cpu and accelerator fields instead (see Compute API).

New Boxes reserve dedicated host CPU cores by default and queue until those cores are available. Existing Boxes keep their CPU mode. The Compute API and Python SDK also accept cpu.exclusive: false to request shared CPUs explicitly.

Field Default Allowed
name none Letters, digits, _, ., and -; up to 63 characters
project default Slug of a project in your team
vcpus 2 1 to 64
memory_mb 4096 256 to 524288
disk_mb 20480 1024 to 1048576
gpu none {"model": "...", "count": 1}; count 1 to 8
network gateway gateway (outbound internet) or none
allowed_hosts none Up to 64 public DNS names; omit or pass ["*"] for unrestricted egress
life see below A number and unit (s, m, h, d), e.g. 90s, 30m, 2h, 7d

Request a GPU using its short catalog name (such as rtx5080)—the suffix of its gpu.* SKU in GET /v1/prices. Current availability (low, mid, or high) appears on the pricing page and in the prices API. See CLI and Python SDK GPU examples for syntax details.

Unlisted models are rejected, and priced models not in your project’s inventory return 409 gpu_unavailable. If matching GPUs are busy, the box queues until one is free; you are not billed while it waits.

gpu_box=$(rsi box create --accelerator rtx5080:1 --life 10m)
rsi box exec "$gpu_box" -- nvidia-smi
rsi box stop "$gpu_box"

Using the running CPU box from above:

printf 'hello from rsibox\n' > input.txt
rsi box upload --mode 600 "$box" ./input.txt tmp/input.txt
rsi box exec "$box" -- sh -c 'cp /tmp/input.txt /tmp/result.txt'
rsi box download "$box" tmp/result.txt ./result.txt

Guest paths for uploads and downloads are relative to / (tmp/input.txt maps to /tmp/input.txt), while executed commands use normal guest paths. The CLI verifies file size, SHA-256, and transfer completion before replacing a local file, preserving the existing file if a transfer fails. When downloading to -, check the exit status before consuming stdout, since bytes may be written before an error occurs.

rsi box network "$box" --mode none
rsi box network "$box" --mode gateway

The CLI waits for confirmation that the policy was applied; a timeout or 504 means the change is unconfirmed. In Python, pass wait_s=25 to set_sandbox_network to wait for confirmation (the default wait_s=0 only submits the request).

With gateway, omitting hosts allows public internet egress. To restrict egress, pass repeatable --allow-host flags with public DNS names. Do not pass hosts with none.

life starts when the box first becomes ready; queueing and startup do not count. Suspension continues to count, and resuming does not extend the deadline.

Your requested life must fit both your team’s maximum Box lifetime (if configured) and the time your current credits can pay for at the Box’s hourly rate. A longer request is rejected without creating a Box, never silently shortened:

  • Above the team limit: 400 life_limit_exceeded.
  • Above the affordable duration: 402 insufficient_credits.

The error message gives the maximum allowed duration. Use a shorter life, ask an administrator to raise the team limit, or add credits as appropriate. If you omit life, the shorter of the team limit and affordable duration is used automatically. The console API returns it as life_seconds.

Changing a team’s limit affects new Boxes only. Existing Boxes and retries of an already accepted request keep their original lifetime.

rsi box stop "$box"

Stopping is final: the disk is discarded and the box cannot be restarted. Download results first, and stop the box even if a command fails. A stop request may return terminating while resources finish releasing. You can also stop a box from its page in the console.

Teams can run up to 4 RSI Boxes at once by default. Requests over the limit return 429 sandbox_limit_reached. Contact us if you need a higher limit.

Use rsi code to create a VS Code development Box, or rsi code BOX_ID to connect to an existing one. New development Boxes default to 2 CPU cores, 4 GiB memory, 50 GiB disk, and a 24-hour lifetime; these defaults apply to rsi code, not to rsi box create or the console API. See Connect with VS Code for authorization, reconnecting, and cleanup.

See Logs to follow command output, Python SDK for code examples, or the Compute API reference for direct HTTP requests.