You need a real environment to test your computer use agent, actual browser tabs, desktop windows, terminal prompts. You cannot rely on emulated environments or brittle selectors. The Coasty /v1/machines API provisions a cloud VM (desktop, browser, or terminal) on demand, returns a machine_id, and lets you start, stop, and snapshot it. Your agent can then take over that real desktop and complete tasks like installation, navigation, and data entry.
How the /v1/machines API works
The API follows a simple request-response flow. You POST to POST /v1/machines with a required machine_type. Optional fields include display_name, os_type, and workspace_id. The server creates the VM and returns a machine object with a machine_id among other fields. You can then use that machine_id to start the session and run a computer use agent against it.
curl -X POST https://coasty.ai/v1/machines \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"machine_type": "desktop",
"display_name": "my-test-desktop",
"os_type": "linux"
}'Key fields and options
- machine_type: required enum (desktop, browser, terminal).
- display_name: optional string for logging.
- os_type: optional string (e.g. linux).
- response includes machine_id, status (pending, running, stopped), and other metadata.
- You must start the machine before running any agent.
POST /v1/machines returns a machine_id. Use that ID in subsequent runs or workflows.
Where this beats brittle automation
Traditional automation relies on static selectors or web APIs that change without notice. A computer use agent sees the actual screen, reads UI text, and acts like a human, clicking buttons, typing in fields, navigating menus. When your target application updates its layout, the agent adapts instead of breaking. This makes it ideal for UI testing, installation workflows, or any task that lives outside a stable API surface.
Next steps
Once you have a machine_id, you can start a task run against that machine using POST /v1/runs with your task description and optional instructions. You can also build workflows that provision machines, run tasks, and clean up. Check the docs for more examples, including how to use the MCP server from Cursor or Claude Desktop. Get a key at https://coasty.ai/developers to start provisioning machines and building agents.
Want to see this in action?
View Case Studies