You need an API that can see the screen and act like a human. Coasty offers two computer use models. v3 gives you low‑level control over each step. v4 handles end‑to‑end workflows with a built‑in pass/fail verifier. Pick the model that matches your automation needs.
CUA versions on the API
- v3: the default mode for the /v1/runs endpoint. It runs an agent step‑by‑step. You get a status after each step.
- v4: autonomous mode with a pass/fail verifier. It runs until the verifier signals success or failure. It is still a task run, but the agent decides when to stop.
- Both use the cua_version field in the request. Pass "v3" or "v4" to select the model.
- Task runs are billed $0.05 per agent step. The verifier in v4 does not change the price per step.
#!/bin/bash
# Example: start a v3 task run
COASTY_API_KEY=$(cat "$HOME/.coasty_key")
curl -X POST https://coasty.ai/v1/runs \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"machine_id": "your-vm-id",
"task": "Open Chrome, go to https://example.com, and take a screenshot.",
"cua_version": "v3",
"max_steps": 30,
"deadline_seconds": 300,
"on_awaiting_human": "pause"
}'
v3: fine‑grained control
- You receive a status after each agent step.
- You can inspect events via GET /v1/runs/{id}/events to see what the agent did.
- You can cancel or resume a v3 run at any time.
- v3 is ideal when you want to build custom retry logic or integrate with your own orchestration.
Use v3 when you need per‑step control and custom orchestration.
v4: autonomous workflows
- v4 runs until the built‑in verifier reports success or failure.
- The verifier is part of the v4 computer use model, not an extra service.
- You still specify the task and machine_id. The agent decides when to stop.
- v4 reduces boilerplate because the verifier handles the final check.
from os import environ
import requests
COASTY_API_KEY = environ.get("COASTY_API_KEY")
url = "https://coasty.ai/v1/runs"
payload = {
"machine_id": "your-vm-id",
"task": "Open Chrome and navigate to https://example.com",
"cua_version": "v4",
"max_steps": 50,
"deadline_seconds": 600,
"on_awaiting_human": "pause"
}
resp = requests.post(
url,
headers={
"X-API-Key": COASTY_API_KEY,
"Content-Type": "application/json"
},
json=payload
)
resp.raise_for_status()
run_id = resp.json()["id"]
print(f"Started run {run_id}. Check /v1/runs/{run_id}")
Where this beats brittle automation
Traditional automation relies on exact selectors, IDs, or API endpoints that change. A computer use agent sees the screen and follows human instructions. It adapts when elements move or labels change. This makes your automation more robust and easier to maintain.
Use v3 when you need fine‑grained control. Use v4 when you want an autonomous workflow with a built‑in verifier. Start with a free key at https://coasty.ai/developers.
Want to see this in action?
View Case Studies