Provision Cloud Machines on Demand with the Coasty /v1/machines API
Most automation stacks rely on static machines and brittle selectors. You spin up a Linux box and run Python scripts to drive Selenium or Playwright. If the UI changes, your tests break. The Coasty /v1/machines API lets you provision cloud machines on demand. Each machine is a real desktop, browser, or terminal that your computer use agent can see and control. You can start, stop, and snapshot VMs from code. This removes the guesswork from browser and desktop automation.
How it works
Use POST /v1/machines to create a new cloud machine. The request requires a machine_id, a task (the prompt you want the agent to follow), and cua_version (the computer use agent version). You can also pass optional instructions that get appended to the base prompt. The response contains a status, a machine identifier, and metadata that lets you track the VM lifecycle. Once provisioned, the agent uses the same computer use API to see the screen, predict actions, and drive the machine to completion.
curl https://coasty.ai/v1/machines \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"machine_id": "my-browser-vm",
"task": "Open https://example.com and take a screenshot",
"cua_version": "v3",
"instructions": "Use the browser to navigate the web"
}'Machine lifecycle
- ●POST /v1/machines creates a new VM from the request body.
- ●GET /v1/machines returns a list of provisioned machines and their states.
- ●GET /v1/machines/{id} fetches details for a specific machine.
- ●POST /v1/machines/{id}/stop shuts down a running machine.
- ●POST /v1/machines/{id}/start boots a stopped machine back online.
- ●POST /v1/machines/{id}/snapshot saves a machine state for later restore.
Spin up a cloud VM from code, then let the computer use agent see the screen and act like a human.
Where this beats brittle automation
Browser tests that rely on XPath or CSS selectors break when layout changes. Desktop tools that use UI libraries can become stale after a single release. The computer use agent works with the actual screen. It sees buttons, inputs, and menus as a human does, making it robust to UI changes. By provisioning machines on demand, you can spin fresh VMs for each test run, ensuring no state leaks between scenarios. This approach also lets you automate real browsers and desktop apps without maintaining a pool of static machines.
With the /v1/machines endpoint you can provision cloud machines from your code and drive them with the Coasty computer use agent. Build self-healing browser tests, desktop workflows, or terminal-based pipelines that see and act like a human. Sign up at https://coasty.ai/developers to get your API key and start provisioning machines today.