> ## 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.

# API reference overview

> Choose the modal-computer-use v1.1.0 Python SDK or daemon API surface.

Version 1.1.0 provides a typed Python SDK over the daemon HTTP API. Choose an entry point based on who owns the desktop lifecycle.

## Choose an entry point

| Need | Entry point | Lifecycle behavior |
| - | - | - |
| Create or attach to a Modal desktop from synchronous Python | `ComputerSandbox` | Created desktops are owned. Attached desktops are not. |
| Create or attach without blocking an event loop | `AsyncComputerSandbox` | Async contexts apply the same ownership rules. |
| Connect to an existing daemon | `DaemonClient` or `AsyncDaemonClient` | Closing the client closes connections only. |
| Borrow an owned desktop inside a deployed Modal Function | `ComputerSessionHandle.borrow_async()` | The original owner keeps the Sandbox. |
| Manage several Modal desktops | `ComputerSandboxManager` | Lifecycle actions remain explicit. |

```python theme={"system"}
from modal_computer_use import ComputerConfig, ComputerSandbox

with ComputerSandbox.create(config=ComputerConfig()) as computer:
    computer.mouse.move(100, 120)
    screenshot = computer.screenshots.full()
```

Use the async surface when your application already uses `asyncio`:

```python theme={"system"}
from modal_computer_use import AsyncComputerSandbox, ComputerConfig

async with AsyncComputerSandbox.create(config=ComputerConfig()) as computer:
    await computer.mouse.move(100, 120)
    screenshot = await computer.screenshots.full()
```

The sync and async entry points expose parallel namespace methods. Async methods add `await` but keep the same operation names and result models.

## Reference map

<CardGroup cols={2}>
  <Card title="Configuration" href="/v1/reference/configuration" icon="sliders">
    Review public SDK models, defaults, and environment ownership.
  </Card>

  <Card title="Namespaces" href="/v1/reference/namespaces" icon="table-list">
    Find each desktop operation by namespace.
  </Card>

  <Card title="Errors and models" href="/v1/reference/errors-and-models" icon="shapes">
    Identify stable result models and failure types.
  </Card>

  <Card title="OpenAPI" href="/v1/reference/openapi" icon="brackets-curly">
    Inspect the checked-in daemon schema and route groups.
  </Card>
</CardGroup>

## Import boundary

Import stable top-level SDK types from `modal_computer_use`.

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

Core imports do not require Modal, OpenAI, Anthropic, or provider credentials. Install the `modal` extra before you enter a Modal provisioning or attachment context.

## Daemon boundary

The daemon exposes health, readiness, version, capability, and `/v1/*` primitive routes. The Python clients own connection pooling and typed serialization. They do not add a provider-owned model loop.

Use [OpenAPI](/v1/reference/openapi) when you need the HTTP contract. Use [Namespaces](/v1/reference/namespaces) when you write Python.

The [v1.1.0 API guide](https://github.com/ashtonchew/modal-computer-use/blob/4425402dbc681133252dbc54d971ea4c95bc0ffc/docs/api.md) records lifecycle, handoff, action, and provider-adapter contracts.


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