Tutorial

Provision Cloud Machines on Demand with the /v1/machines API

Priya Patel||6 min
F12

Most UI automation tools rely on brittle selectors and fixed APIs that break when layouts change. The Coasty /v1/machines API lets you provision real cloud desktops, browsers, and terminals on demand. Your computer use agent can then interact with those live environments like a human, clicking, typing, and navigating without hardcoded selectors.

How it works

The /v1/machines endpoint provisions a cloud VM with a running desktop environment. You send a POST request with at least machine_id and task. The API returns a JSON object that includes a status field. When status is 'running', the machine is ready for the computer use agent to start interacting with it. This machine is not a sandboxed browser; it is a live desktop where the agent can open applications, type in terminals, and use native UI controls.

bash
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-machine",
    "task": "Provision a cloud desktop for computer use"
  }'

Request and response details

  • POST https://coasty.ai/v1/machines
  • Authorization header uses X-API-Key or Authorization: Bearer <key>
  • JSON body requires machine_id (string) and task (string)
  • Response includes status, machine_id, and any error details
  • Use machine_id to reference this instance in later runs or workflows

POST https://coasty.ai/v1/machines with machine_id and task returns a ready desktop where your computer use agent can interact like a human.

Where this beats brittle automation

Traditional automation tools rely on stable element IDs, XPath patterns, or fixed API endpoints. When a UI changes, those selectors break and require constant maintenance. With the /v1/machines API, you provision a live desktop and let your computer use agent see the screen and act accordingly. The agent can recognize new layouts, handle dynamic classes, and recover from failures by re-scanning the environment. This self-healing behavior reduces maintenance and keeps your automation resilient to change.

Start building agents that drive real cloud machines with the Coasty computer use API. Provision desktops, browsers, and terminals on demand, then let your agent interact naturally. Get your API key at https://coasty.ai/developers and begin automating with live environments.

Want to see this in action?

View Case Studies
Try Coasty Free