> ## Documentation Index
> Fetch the complete documentation index at: https://docs-preview.webcompute.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API authentication

> Authenticate Webcompute REST API requests with bearer API keys and environment variables.

All REST endpoints except `/health` require an API key.

## Header

```http theme={null}
Authorization: Bearer wc_key_your_key_here
```

## cURL

```bash theme={null}
curl https://api.webcompute.dev/v1/browsers \
  -H "Authorization: Bearer $WEBCOMPUTE_API_KEY"
```

## Key handling

* Store keys in environment variables or a secret manager.
* Do not place keys in prompts, browser pages, issue trackers, or source control.
* Do not expose keys to untrusted agents.

## CLI storage

`web login` stores the API key for CLI and MCP use:

```bash theme={null}
web login wc_key_your_key_here
```

SDK and REST code should use `WEBCOMPUTE_API_KEY` or an explicit secret source.
