Skip to main content
This guide shows how to run a Python function on Beam and deploy it as an API.

Install and Sign In

In your project directory:
Finish signing in through your browser. Run beam whoami to check your workspace.

Run a Function in the Cloud

Save this as app.py:
app.py
Run it from the same Python environment:
Beam runs the function in the cloud and returns {'result': 144}.

Deploy a Web Endpoint

Replace app.py with:
app.py
Deploy it and inspect its status:
The command prints a URL and deployment ID. Wait for it to be ready:

Call the API

Use the URL printed by the deploy command and an API token from Settings → API Keys:
The response is {"result":144}. Use beam logs quickstart --follow to stream logs, or beam deployment stop YOUR_DEPLOYMENT_ID to stop it.
Using a coding agent? Run beam setup agent to connect it to your workspace. See agent setup.

Next Steps