# Browser Use — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> AI-powered browser automation — run tasks in a cloud browser with LLM agents.

**Category:** Browser Automation | **Website:** [browser-use.com](https://browser-use.com) | **Docs:** [docs.cloud.browser-use.com](https://docs.cloud.browser-use.com)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/browser-use/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

> Also available via public x402 on Base (no account needed): [x402/browser-use.md](https://paywithlocus.com/x402/browser-use.md)

## Endpoints

### Run Task

Start an automated browser task with an AI agent.

**Estimated cost:** $0.01+

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `task` | string | Yes | Natural language description of the task |
| `llm` | string | No | Model to use (default: browser-use-2.0). Current external options include claude-sonnet-4.6, claude-sonnet-4-5, o3, gemini-flash-latest, and gemini-flash-lite-latest. |
| `maxSteps` | number | No | Max steps (default 100, max 200) |
| `startUrl` | string | No | Merchant or product URL where the browser task should start |
| `secrets` | object | No | Domain-scoped secret values injected without exposing them to the browser model. Requires matching allowedDomains, vision=false, and recording disabled. |
| `allowedDomains` | string[] | No | Domains the task may visit; required for secret-backed checkout |
| `vision` | boolean | No | Set false for tasks that inject payment or other sensitive data |
| `sessionSettings` | object | No | Browser session options. Set enableRecording=false for tasks that inject payment data. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/browser-use/run-task \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"task":"Read the title of https://example.com and return the title. Do not submit forms.","maxSteps":3}'
```

### Get Task

Retrieve the full details and output of a task.

**Estimated cost:** $0.003

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `taskId` | string | Yes | Task ID |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/browser-use/get-task \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"taskId":"task_00000001"}'
```

### Get Task Status

Check the current status of a running task.

**Estimated cost:** $0.003

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `taskId` | string | Yes | Task ID |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/browser-use/get-task-status \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"taskId":"task_00000001"}'
```

### Get Task Output File

Get the secure download URL for a file generated by your purchased browser task. Locus Pro only; upstream free plus $0.003 platform fee.

**Estimated cost:** $0.003

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `purchase_call_id` | string | Yes | Locus call ID of your completed browser-use/run-task purchase. |
| `fileId` | string | Yes | File UUID from the purchased task outputFiles array. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/browser-use/get-task-output-file \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"purchase_call_id":"00000000-0000-4000-8000-000000000001","fileId":"00000000-0000-4000-8000-000000000002"}'
```

### Stop Task

Stop a running browser task.

**Estimated cost:** $0.003

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `taskId` | string | Yes | Task ID to stop |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/browser-use/stop-task \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"taskId":"task_00000001"}'
```
