Standard UI automation often relies on brittle selectors and APIs that miss the big picture. Coasty’s computer use API lets you run agents that see the screen and click, type, and scroll like a human. Two model versions are available: v3 for explicit control and v4 for autonomous runs with a built‑in verifier. This guide compares them, shows the request fields, and helps you pick the right version for your project.
What v3 and v4 are
- Both are set via the cua_version parameter when you start a run.
- v3 (default) gives you a step‑by‑step agent. You start a run, then receive actions for each step.
- v4 adds an autonomous verifier. The agent runs to completion with a pass/fail check.
- The base endpoint for both is POST /v1/runs.
- Billed at $0.05 per agent step for v3. v4 is billed the same per step but includes verification logic.
How it works
- POST /v1/runs creates a new task run. The required body fields are machine_id, task, and cua_version.
- cua_version can be set to "v3" or "v4".
- Optional fields like instructions, system_prompt, max_steps, deadline_seconds, on_awaiting_human, and webhook_url let you tailor behavior.
- The run enters the queued state, then runs, then reaches succeeded, failed, cancelled, or timed_out.
- Use GET /v1/runs and GET /v1/runs/{id} to inspect status and events.
- For v4, the verifier runs after the final step and reports pass or fail.
# Example: start a v3 run with explicit control
API_KEY=$(cat /dev/stdin <<< "$COASTY_API_KEY")
curl -s https://coasty.ai/v1/runs \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"machine_id": "my-cloud-desktop",
"task": "Open Chrome, navigate to https://coasty.ai, find the link with text "developers", and click it.",
"cua_version": "v3",
"max_steps": 20,
"deadline_seconds": 300
}' | jq .import os
import requests
import json
API_KEY = os.getenv("COASTY_API_KEY")
url = "https://coasty.ai/v1/runs"
headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
body = {
"machine_id": "my-cloud-desktop",
"task": "Open Chrome, navigate to https://coasty.ai, find the link with text "developers", and click it.",
"cua_version": "v4",
"max_steps": 30,
"deadline_seconds": 300
}
resp = requests.post(url, headers=headers, json=body)
print(json.dumps(resp.json(), indent=2))Use cua_version: "v3" when you want to inspect each step, and "v4" when you want an autonomous verifier.
When to pick v3
- You need per‑step visibility and debugging.
- You want to pause or cancel a run based on intermediate events.
- You can handle edge cases or failures manually in your orchestration layer.
- v3 is ideal for workflows where each step matters, such as multi‑stage onboarding flows.
When to pick v4
- You want a fully autonomous run with a built‑in pass/fail check.
- You are building high‑level workflows where the verifier handles final validation.
- You prefer less orchestration overhead after the initial configuration.
- v4 works well for end‑to‑end tasks like file conversions or report generation that have clear success criteria.
Where this beats brittle automation
- Computer use agents see the screen, not just selectors, so they adapt to UI changes.
- v3 lets you log and retry specific steps without re‑running the whole flow.
- v4’s verifier reduces false positives by confirming the task meets the expected outcome.
- Both versions run on real desktops and browsers, not just simulated environments.
Pick v3 for fine‑grained control and v4 for autonomous verification. Build agents that see, click, and verify like a human. Get your API key at https://coasty.ai/developers and start your next computer use agent.
Want to see this in action?
View Case Studies