Start a sandbox, run a command in it and stop it, using curl.

Quickstart

This takes about five minutes. You need curl and an API key.

1. Get a key

Request a key on the sign-up form. The key is shown once, on the confirmation page, so copy it straight away. Then export it together with the API base, which is the agents. subdomain of this site:

export QUERNBOX_KEY="qbx_test_..."
export QUERNBOX_API="https://agents.gentlenickel.shop"

2. Start a sandbox

Pick a template and a size. template and size are both required.

curl -s -X POST "$QUERNBOX_API/v1/sandboxes" \
  -H "Authorization: Bearer $QUERNBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"template": "python-3.12", "size": "small"}'

The response holds the sandbox id and its state:

{"id": "sbx_7f3a9c21", "status": "running", "template": "python-3.12", "size": "small"}

3. Run a command

curl -s -X POST "$QUERNBOX_API/v1/sandboxes/sbx_7f3a9c21/exec" \
  -H "Authorization: Bearer $QUERNBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command": "python -c \"print(2 + 2)\""}'

Commands run as an unprivileged user in /workspace. The response carries the exit code, standard output and standard error.

4. Stop it

curl -s -X POST "$QUERNBOX_API/v1/sandboxes/sbx_7f3a9c21/stop" \
  -H "Authorization: Bearer $QUERNBOX_KEY"

Billing stops when the sandbox stops. If you forget, the plan's time limit stops it for you: one hour on Starter.

Next

Read about templates and sizes, or go straight to the API reference.