Legacy automation relies on brittle selectors, hardcoded IDs, and API calls that break when UIs change. The /v1/machines API solves that by letting you provision an actual cloud desktop, then hand it to a computer use agent that can see and act like a human. You don't manage VMs yourself. You just request a machine, start it, and drive it with the runs or tasks endpoints. This is how you build resilient, visual automation at scale.
How it works
The /v1/machines endpoint creates a cloud VM that you can start, stop, and snapshot. The request body accepts a machine_id, which is an optional identifier for your own tracking. The response includes the machine’s status (pending, running, stopped, or failed), a machine_id you can reuse, and a base_url you use to connect to the desktop for the runs endpoint. Once you start the machine, you submit a task or workflow to the runs endpoint with that machine_id. The agent runs inside the desktop, sees the screen, and executes actions just like a human would.
curl -X POST https://coasty.ai/v1/machines \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"machine_id": "my-test-desktop-001"
}'Machine states and lifecycle
- POST /v1/machines creates a new machine record (no cost on this call).
- GET /v1/machines returns the list of machines and their current status.
- GET /v1/machines/{id} returns the specific machine details.
- A machine can be in pending, running, stopped, or failed states.
- Use the machine_id from the response in subsequent task/run requests.
- The agent runs on the desktop via the runs endpoint, not directly on the machine itself.
- You can stop or snapshot the machine through control operations, if exposed in your integration.
Spin a real desktop once, reuse the machine_id, and run autonomous tasks against it forever.
Where this beats brittle automation
Traditional UI automation breaks when a class name, selector, or DOM attribute changes. A computer use agent sees the actual screen layout, understands natural language instructions, and clicks, types, and navigates like a human. When the UI shifts, the agent adapts because it’s reacting to visual cues, not brittle selectors. You also avoid the complexity of maintaining multiple API wrappers for every service you automate. One runs endpoint with a machine_id gives you a consistent target for any visual task.
Next steps
Now that you can provision machines on demand, try running a simple end‑to‑end workflow. Use the runs endpoint with your new machine_id to execute tasks that log in, fill forms, click buttons, and verify results. Build a self‑healing regression suite that spins up fresh machines between each run. Enable the autonomous verifier (cua_version "v4") to let the agent pass/fail the test automatically. Get your API key at https://coasty.ai/developers and start automating like a human.
Want to see this in action?
View Case Studies