Back to Blog
Engineering

David Park6 min
Pg Up

When you POST /v1/runs, you choose a computer use agent model by setting cua_version. v3 is a step-by-step, human-like controller that you manage. v4 is an autonomous version that drives itself and uses a built-in pass/fail verifier to decide success or failure. The version you pick changes how your workflow behaves and what you can offload to the API.

How it works

You POST /v1/runs with machine_id, task, and cua_version. The API launches a cloud VM and starts a task. The agent captures screenshots, reads the screen, and performs actions like clicks, keystrokes, and typing. It loops predict → capture → act until a status is returned. For v4, the agent also runs a verifier that checks the final state and returns a pass/fail result. For v3, you get a running run and can stream events to see progress.

bash
# Example: create a run with v4 (autonomous, with verifier)

export COASTY_API_KEY=$COASTY_API_KEY

# POST /v1/runs
curl -X POST https://coasty.ai/v1/runs \
  -H "Authorization: Bearer $COASTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "machine_id": "cloud-vm-12345",
    "task": "Open Chrome and navigate to https://coasty.ai/docs",
    "cua_version": "v4",
    "max_steps": 30,
    "deadline_seconds": 120,
    "on_awaiting_human": "pause"
  }'

# If you want v3 instead, just change cua_version to "v3".
# You can stream events with GET /v1/runs/{id}/events.

Key differences between v3 and v4

  • v3 requires you to monitor and manually resume the run if the agent enters awaiting_human state.
  • v4 includes an autonomous pass/fail verifier that evaluates the final state after the task completes.
  • Both versions are billed $0.05 per agent step when you POST /v1/runs.
  • You can still use machine_id to provision a cloud VM that the agent drives.
  • Both support max_steps and deadline_seconds to limit execution time.
  • Both support on_awaiting_human to decide behavior when the agent needs human input (pause, fail, cancel).

Use v3 when you want full control and can manage pauses and resumption. Use v4 when you want an autonomous agent that can drive a workflow to completion with an automatic pass/fail check.

Where this beats brittle automation

Traditional automation relies on brittle selectors like XPath or CSS that break when UI changes. A computer use agent such as v3 or v4 sees the screen, reads text, and clicks elements naturally. This makes it resilient to layout shifts, dynamic classes, and occasional redesigns. You focus on defining the task, not maintaining selectors. If the UI shifts, the agent finds the nearest button or menu item and continues. This is why the OSWorld benchmark shows high scores for computer use models that can handle arbitrary desktop workflows.

Pick the right model for your use case. v3 gives you step-by-step control, v4 adds autonomous completion with a pass/fail verifier. Start building with the computer use API and get a key at https://coasty.ai/developers.

© 2026 Coasty

Backed byYCombinator