python sdk
Install & auth
Everything the CLI does, as calls — plus RL environment pools, which have no CLI equivalent. One package, one API key, one origin.
install
pip install boltzlabsthe key
It comes from the environment, or from a .env file found by searching upwards from where you run the script. Nothing is shared with the CLI's login
— the SDK stands on its own.
BOLTZLABS_API_KEY=ak_your_key_herefirst call
There is no client to build and no session to open. Make a machine, use it, destroy it:
from boltzlabs import Sandbox
sb = Sandbox() # small / base / internet off — name only what you change
print(sb.run("print(sum(range(101)))")) # 5050
sb.delete()Those three lines are the whole lifecycle. Every argument has a default — leave them all out, or name only what you are changing:
machine
small
environment
base
name
the assigned id
internet
False
idle_timeout
the platform's
max_lifetime
the platform's
A sandbox bills for as long as it exists, so delete() is the one you should not forget — see sandboxes for the shorthand that runs it for you even when something raises.