v3 vs v4: Choosing a Computer Use Model on the API
Most computer use APIs force you to pick a single model for every task. Coasty lets you choose the CUA version per run, so you can script precise steps with v3 and let the system drive a full workflow with v4. This choice changes how you structure your request, what state Coasty tracks, and what you pay per step.
What CUA v3 and v4 mean
- ●Both versions use POST /v1/runs to start a task run.
- ●cua_version is a string field. v3 is the default and uses a scripted agent.
- ●v4 is an autonomous agent with a pass/fail verifier and a higher-level goal orientation.
- ●You can mix versions across runs in the same project.
How to choose based on your goal
- ●Use cua_version: "v3" when you want tight control over each step and can handle state yourself. Good for CI pipelines and scripted workflows.
- ●Use cua_version: "v4" when you want the server to explore and decide actions without you writing a loop. Good for complex, multi-step tasks where you only care about success.
- ●v4 can pause on human approval via on_awaiting_human. v3 requires you to handle waiting manually.
- ●Both support optional instructions, system_prompt, max_steps, deadline_seconds, and webhook_url.
Request structure for both versions
The POST /v1/runs payload is identical for v3 and v4. You only change the cua_version field. Below is the full object with the fields that matter for the decision.
curl https://coasty.ai/v1/runs \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"machine_id": "vm-12345",
"task": "Open browser and navigate to https://coasty.ai",
"cua_version": "v4",
"instructions": "Make sure you use Chrome",
"system_prompt": "You are an autonomous desktop assistant",
"max_steps": 50,
"deadline_seconds": 300,
"on_awaiting_human": "pause",
"webhook_url": "https://your-server.com/webhook"
}'Stateful trajectory with sessions (optional)
If you need to preserve context across runs, you can use stateful sessions. POST /v1/sessions creates an ID, then POST /v1/sessions/{id}/predict uses the same cua_version and returns actions plus a status. Loop capture, predict, act until status is done. Sessions cost more per call than a run but let you build long-running workflows without manual state management.
Pick cua_version: "v4" for autonomy and pass/fail verification. Pick cua_version: "v3" for scripted control and lower complexity.
Where computer use beats brittle automation
API-first automation relies on stable selectors and versioned endpoints. When a UI changes, your scripts break. Computer use agents read the screen, recognize buttons, and use natural language instructions to act like a human. You give a high-level goal and let the model decide the steps. This is especially powerful with v4, which can explore and adapt without you writing each interaction.
Start your first run with cua_version: "v4" to see autonomous navigation, or switch to v3 for scripted control. Either way, you can manage tasks, handle pausing, and stream events from /v1/runs/{id}/events. Grab your API key at https://coasty.ai/developers and build smarter desktop agents.