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

# Configure placement, cost, and limits

> Set explicit placement, resources, Image policy, input limits, and warm capacity.

Use `ComputerConfig` when the SDK creates a Sandbox. A directly launched daemon reads its process
environment.

## Build one inspectable configuration

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

config = ComputerConfig(
    ingress="attested-tunnel",
    runtime={
        "modal_environment": "main",
        "modal_region": "us-west-2",
        "timeout_seconds": 900,
        "readiness_timeout_seconds": 120,
    },
    resources={"profile": "browser", "cpu": 1.0, "memory_mib": 2048},
    image={"source": "inline"},
    browser={"kind": "chromium", "prewarm": False},
    actions={
        "input_rate_limit_per_sec": 100,
        "input_rate_limit_burst": 400,
        "screenshot_capture_source": "mss",
    },
)

print(config.resolved_cost_and_placement())
```

The example region and resources are application choices. Measure your workload before changing
them.

## Keep cost-bearing choices explicit

| Choice | Default policy |
| - | - |
| Region | No universal SDK region |
| CPU and memory | No universal SDK values |
| Image | Inline recipe |
| Function minimum containers | Application setting, zero in the primary example |
| Sandbox warm pool | Off |
| Browser prewarm | Explicit application choice |

## Configure screenshot capture

| SDK value | Daemon value | Behavior |
| - | - | - |
| `mss` | `COMPUTER_USE_SCREENSHOT_CAPTURE_SOURCE=mss` | Production default |
| `auto` | `...=auto` | Probe X11-SHM, then allow ordinary MSS fallback |
| `x11-shm` | `...=x11-shm` | Require the optional native source |

Explicit X11-SHM requires a managed Image containing the extension. A display reply timeout fails
closed. See [screenshots and recordings](/build/screenshots-recordings).

## Configure weighted input admission

The defaults use 100 normalized input-work tokens per second and a 400-token burst. The daemon
reserves a complete recursive batch before mutation.

Run the same-runtime capacity gate before you raise both values. CPU and memory alone cannot select
a reliable limit.

## Protect secrets

Treat bearer tokens, noVNC URLs and passwords, browser startup URLs, typed text, clipboard text,
screenshot bytes, and artifact bytes as secrets. Configuration validation hides rejected values.

Read the [configuration reference](/reference/configuration) for every field and environment
variable.


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