---
title: "Browser convenience sub-API"
method: POST
path: "/v1/machines/{machine_id}/browser/{op}"
tags: ["machines"]
---

# Browser convenience sub-API

`POST /v1/machines/{machine_id}/browser/{op}`

## Request

- Base URL: `https://coasty.ai`
- URL: `https://coasty.ai/v1/machines/{machine_id}/browser/{op}`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/coasty/apis/coasty-public-api/docs/v1/machines/:machine_id/browser/:op/post.ts> (a function with typed inputs; its response is checked against the schema)

Convenience mapping to the strict browser_* action commands. A mutating operation on an external machine requires precondition_frame_id; read-only state/DOM/screenshot operations may omit it.

## Headers

- `Idempotency-Key` string

## Request body

- BrowserOpRequest
  - `parameters` object
  - `timeout_ms` integer, nullable
  - `precondition_frame_id` string, uuid, nullable: Required when this convenience operation mutates an external machine.

## Response `200`

Browser action result.

- ActionResultResponse
  - `machine_id` string, required
  - `command` string, required
  - `success` boolean, required
  - `result` object, nullable
  - `error` string, nullable
  - `duration_ms` integer, required
  - `screenshot` string, nullable: Typed post-action screenshot when the transport returns one. External-machine mutations commit this observation atomically with their result. Data URI or raw base64; never duplicated inside result. Screenshot pixels are not persisted in idempotency replay records.
  - `frame_id` string, uuid, nullable: Accepted post-action external observation identity. Use it as the next action's precondition_frame_id.
  - `observation_available` boolean, nullable: Whether screenshot pixels are present in this response. An idempotent replay may retain frame_id while returning screenshot=null and observation_available=false.
  - `request_id` string, required

## Other responses

- `400`: Invalid request body or parameters.
- `401`: Missing, invalid, or revoked API key. Pass `X-API-Key: sk-coasty-live-...` (or test).
- `402`: Insufficient balance for this operation. Direct metered API calls and managed-machine runtime use the prepaid Developer API wallet; scheduled execution is the documented consumer subscription-credit exception. Follow the operation's billing fields and top up the matching balance in the dashboard.
- `403`: API key lacks the required scope or tier-feature is unavailable on the caller's plan.
- `404`: Resource not found in this key's namespace.
- `409`: The resource state conflicts with this operation.
- `413`: The request body exceeds the endpoint limit.
- `422`: The JSON shape is valid but one or more values violate the endpoint contract.
- `429`: Rate or concurrency limit exceeded.
- `500`: Unexpected server error. Retry with exponential backoff.
- `502`: An upstream dependency returned an invalid response.
- `503`: A required service is temporarily unavailable.
- `504`: An upstream dependency timed out.

---

[API](https://skmtc.dev/coasty/apis/coasty-public-api.md) - [All operations](https://skmtc.dev/coasty/apis/coasty-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/coasty/apis/coasty-public-api/revisions/f50d93b0d8a1?raw)
