> ## Documentation Index
> Fetch the complete documentation index at: https://modal-computer-use.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create your first desktop

> Create a browser desktop, open a page, and save a screenshot.

This guide creates one Modal Sandbox. The SDK terminates it when the Python context ends.

## Install and authenticate

```bash theme={"system"}
uv add "modal-computer-use[modal]"
uv run modal setup
```

## Create the script

Save this file as `quickstart.py`:

```python theme={"system"}
from modal_computer_use import (
    BrowserConfig,
    ComputerConfig,
    ComputerSandbox,
    ResourceConfig,
)

config = ComputerConfig(
    resources=ResourceConfig(profile="browser"),
    browser=BrowserConfig(kind="chromium"),
)

with ComputerSandbox.create(config=config) as computer:
    computer.browser.open_url("https://example.com")
    computer.mouse.move(320, 240)
    screenshot = computer.screenshots.full(show_cursor=True)
    screenshot.save("screenshot.png")
    print(
        {
            "width": screenshot.width,
            "height": screenshot.height,
            "sha256": screenshot.sha256,
        }
    )
```

## Run the script

```bash theme={"system"}
uv run python quickstart.py
```

The script writes `screenshot.png` in the current directory. The printed SHA-256 digest identifies the captured bytes.

## Understand ownership

`ComputerSandbox.create()` owns the Sandbox that it creates. The context terminates that Sandbox on exit.

`ComputerSandbox.attach()` does not take ownership. Its context closes the local connection and keeps the existing Sandbox running.

Read [Create and attach](/v1/build/create-and-attach) before you keep a desktop between processes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.