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

# OpenAPI reference

> Use and verify the checked-in OpenAPI 3.1 schema.

The daemon publishes an OpenAPI 3.1 contract. The checked-in schema reports package version `2.0.2`.

## Verify the schema

```bash theme={"system"}
uv run python scripts/export_openapi.py --check
```

The command fails when [`docs/openapi.json`](https://github.com/ashtonchew/modal-computer-use/blob/v2.0.2/docs/openapi.json) differs from the daemon application.

## Main route groups

| Group | Routes |
| - | - |
| Health and protocol | `/healthz`, `/readyz`, `/v1/version`, `/v1/capabilities` |
| Stable Step | `/v1/steps` |
| Actions | `/v1/actions/run`, `/v1/actions/validate`, compatibility action-and-frame routes |
| Screenshots | `/v1/screenshots/full`, `/v1/screenshots/region`, `/v1/screenshots/zoom`, and raw variants |
| Input | `/v1/mouse/*`, `/v1/keyboard/*`, `/v1/input/release-all` |
| Desktop state | `/v1/windows*`, `/v1/display/info`, `/v1/browser/*`, `/v1/apps/*` |
| Commands and clipboard | `/v1/commands/run`, `/v1/clipboard/text` |
| Storage | `/v1/artifacts*`, `/v1/recordings*` |
| Lifecycle | `/v1/computer/*`, `/v1/processes/{name}/*` |
| Session handoff | `/v1/session/*`, `/v1/run-gateway/*` |

`/v1/steps` returns the bounded versioned Computer Step binary envelope. It contains the ordered action result, nested image outputs, the final semantic screenshot, and timing. Clients validate its media type, bounds, segment digests, and screenshot metadata.

## Authentication

Health and readiness probes are unauthenticated. Protected routes use the daemon authentication policy selected at startup. Python clients can use a local bearer token, Modal Connect identity, or the SDK-managed attested tunnel.

Keep credentials in headers. Never put credentials in URL queries.

## Mutation rules

* Validate a complete action batch before mutation.
* Serialize input and Step mutations under one lock.
* Do not retry after possible dispatch.
* Use operation receipts to resolve ambiguous responses.
* Treat the immediate Step frame as an observation. Define readiness in the application.

JSON and REST routes remain available for direct integrations and compatibility. The optimized SDK path uses one pooled client for the leased trajectory.

## Check compatibility

Read `/v1/version` and `/v1/capabilities` before lease acquisition. The protocol and required
capabilities determine compatibility.

Use [Namespaces](/reference/namespaces) for Python applications. Use the schema for direct HTTP clients and generated tooling.


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