Skip to main content
BoxLite Cloud runs your boxes on BoxLite’s own resource pool, so the machine that calls the API needs nothing but a URL and an API key. Untrusted code still lands inside a microVM with hardware-level isolation — you just stop paying for the hypervisor underneath it.

Prerequisites

1

Create an API key

In the console, open API Keys and click Create Key. Give it a name such as sdk-quickstart and leave Expires at its default of No expiration while you are exploring.The key looks like blk_live_... and is shown in full exactly once, at creation. Copy it then — the list view only ever shows a masked form afterwards. A key grants access to the Boxes API: it can create and manage boxes, and shared Linux base images are available to it automatically.For key rotation, per-environment keys, and the CLI credential store, see API keys and authentication.
2

Install the SDK or CLI

Then export your credentials. Read the key interactively so it never lands in your shell history:
3

Create a box and run code in it

What just happened

The five calls in that script are the whole Cloud lifecycle. Every language binding and the REST API expose the same five, in the same order:
  1. Authenticate. Boxlite.rest(...) wraps your key in an ApiKeyCredential and points every later call at https://app.boxlite.ai/api. Nothing is sent at construction time — the object is just a configured client.
  2. Create. rt.create(BoxOptions(image=...), name=...) allocates a box from a shared Linux base image and returns a handle. The box exists but is not running.
  3. Start. box.start() boots the microVM. Only now is there a kernel and a filesystem to run against.
  4. Exec. box.exec("echo", args=[...]) launches one process inside the VM and hands you an execution handle. execution.wait() blocks until that process exits and returns its exit code.
  5. Remove. rt.remove(box.id, force=True) destroys the box and its disk. Removal is a runtime method, not a box method — the box handle you hold is a pointer, and the runtime owns the fleet.
Step 5 is the one to internalize. A box you forget to remove keeps running, and a running box is what BoxLite Cloud charges for — see Plans, wallet, and usage. Putting teardown in a finally block, as the script above does, is the difference between an exception costing you a stack trace and an exception costing you a box.

Expected output

The Exit code line comes from execution.wait() and is the authoritative success signal. The Hello from BoxLite SDK line is what the box wrote to stdout, collected by iterating execution.stdout().

Troubleshooting

Next steps

Boxes

Pick an image and a size, and learn the three lifecycle controls Cloud applies while a box runs.

Volumes

Storage that outlives a box, so the next box can mount it and read the data back.

Plans, wallet, and usage

What a running box costs against your included quota and wallet, plus the per-box ceilings.

Cloud vs open source

Every difference between a self-hosted box and a Cloud box, in one table.