Traditional QA bots break when layouts change or when you rely on CSS selectors that no longer match. A computer use agent sees the screen like a human, reads text, finds buttons by description, and clicks or types exactly where it should. Use the Coasty Computer Use API to spin up a self-running QA bot that opens your app, performs test steps, checks results, and reports success or failure. You pay $0.05 per agent step and the server handles vision, action generation, and error recovery.
How it works
You create a task run with POST /v1/runs, providing a machine_id, the task to complete, and a cua_version. The server provisions a cloud VM and launches an agent that captures screenshots, predicts actions with /v1/predict or /v1/sessions/{id}/predict, and executes them in the browser or desktop. The request body for /v1/runs looks like this. The cua_version defaults to v3, but v4 adds a pass/fail verifier. The agent runs until success, failure, cancellation, or timeout. You can stream events with GET /v1/runs/{id}/events to follow progress in real time.
curl -X POST https://coasty.ai/v1/runs \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"machine_id": "machine-123",
"task": "Open https://example.com, click the login button, type a username and password, click submit, and assert the dashboard title contains "Welcome"",
"cua_version": "v4",
"system_prompt": "You are a QA tester. If you are unsure, ask for clarification or pause.",
"max_steps": 50,
"deadline_seconds": 300,
"on_awaiting_human": "pause"
}'
Key parameters and billing
- machine_id: provision a cloud VM via POST /v1/machines
- task: natural language description of the test steps
- cua_version: v3 for basic computer use, v4 for autonomous pass/fail verification
- system_prompt: optional instructions appended to the base prompt
- max_steps: maximum agent steps before giving up (default 50)
- deadline_seconds: server kills the run after this many seconds
- on_awaiting_human: pause, fail, or cancel when the agent needs human input
- Webhook_url: receive final status as an HTTP POST (HMAC signed)
- Billing: $0.05 per agent step, charged against your prepaid wallet (1 credit = $0.01)
Create a task run with POST /v1/runs, pass the machine and task, and stream events with GET /v1/runs/{id}/events to follow progress.
Where this beats brittle automation
Most UI tests pick elements by ID, class, or XPath, which break when classes change or the DOM layout shifts. A computer use agent looks at the actual screen, reads button text, fills inputs by label, and navigates by visual cues. It can handle multi-step flows, browser prompts, and unexpected layouts without you writing a new selector each time. For API-only tools, you still need a UI layer to trigger behavior. With the computer use API, one agent replaces dozens of brittle scripts and works across browsers, desktop apps, and terminals on a real machine.
Next steps
- Provision a machine with POST /v1/machines and note its machine_id
- Write a task that runs a full QA workflow, including assertions
- Subscribe to /v1/runs/{id}/events to stream progress and capture screenshots
- Use the returned status to run additional machines or trigger a CI job
- Explore workflows with POST /v1/workflows to reuse task sequences across projects
A self-running QA bot with the Computer Use API gives you an agent that can watch your UI and act like a human tester. Create runs, stream events, and pay per step. Get a key and start automating at https://coasty.ai/developers.
Want to see this in action?
View Case Studies