Get started

Install the SDK, authenticate, and run your first workload in a couple of minutes.

Run on your cloud

Set up with your AI agent

Prefer to let your coding agent do the work? Pick your agent and paste the setup prompt.

Add credits

Workloads draw from your credit balance and pause at $0. Add credits to unlock your workspace, then turn on auto top-up so they never pause.

Install the Beam SDK

Install our Python SDK to start running code in the cloud.
$ uv tool install beam-client

Configure your API key

Authenticate the CLI with your account using your API key.
$ beam configure default --token undefined

Write your first sandbox

Create a Python file called app.py and paste in this code.

This example creates a sandbox, runs a simple Python command, and spins down after.

You can use any editor (e.g., VS Code, nano) to create and save app.py.
from beam import PythonVersion, Image, Sandbox

sandbox = Sandbox(
    name="quickstart",
    image=Image(python_version=PythonVersion.Python311),
)

sb = sandbox.create()

result = sb.process.run_code("print('hello from the sandbox!')").result

print(result)

sb.terminate()

Run the sandbox

The container spins up, runs your code, and shuts itself down.
$ python app.py

What's Next?

Let's try something more interesting! You can upload files, run web servers, and pause and resume sessions.