examples/cloud/README.md
Run one browser task through the current Cloud API. The example creates a run, polls the lightweight status endpoint, and fetches the result once the run is terminal. It cancels a run that exceeds the configurable 15-minute wait limit.
From the repository root:
uv sync
cp examples/cloud/env.example .env
# Add your API key to .env
uv run python examples/cloud/01_basic_task.py
Create an API key at cloud.browser-use.com/new-api-key.
The example uses the three endpoints needed for a basic run:
POST /api/v4/runsGET /api/v4/runs/{run_id}/status until the run is completed, failed, or cancelledGET /api/v4/runs/{run_id} for the result, error, and costAuthentication uses the X-Browser-Use-API-Key header. See the live V4 OpenAPI specification for optional models, browser settings, sessions, files, secrets, and judge settings.
Review usage and credits in Cloud billing.