Tutorial

Provision Cloud Machines on Demand with the Coasty Computer Use API

Alex Thompson||8 min
Home

Most automation today relies on brittle selectors, hardcoded APIs, or fragile screenshots. If a UI changes, your script breaks. The Coasty computer use API flips the model. You provision a real cloud machine with /v1/machines, then a computer use agent drives that desktop like a human. The agent sees the screen, follows instructions, and completes tasks. You pay only for steps. No more brittle selectors, no more fragile APIs.

How it works

The /v1/machines endpoint provisions a cloud VM with a full desktop environment. You send a POST request to https://coasty.ai/v1/machines with your API key in X-API-Key (or Authorization: Bearer). The response includes a machine_id, status, and a cloud VM ID. You can then start the machine, stop it, or take snapshots. The agent later connects to this machine_id to perform computer use actions. This is the foundation for any real desktop automation.

bash
curl -X POST https://coasty.ai/v1/machines \ 
  -H 'X-API-Key: $COASTY_API_KEY' \ 
  -H 'Content-Type: application/json' \ 
  -d '{ 
    "cua_version": "v3", 
    "image": "ubuntu-22.04-desktop" 
  }'

Provision, start, and stop

  • POST /v1/machines: provisions a cloud VM with a full desktop environment.
  • Response contains machine_id, status, and a cloud VM ID.
  • The agent uses machine_id to connect later.
  • You can start, stop, or snapshot the VM as needed.
  • Each step your agent takes costs $0.05 per agent step for task runs.
  • Using /v1/machines is free; usage is billed on agent steps.

POST /v1/machines is free. Agent steps are billed $0.05 each.

Where this beats brittle automation

Traditional automation breaks when UI elements change. Computer use agents see the screen like a human. They can handle dynamic layouts, missing elements, and unexpected states. They can click, type, drag, and scroll. They operate in real browsers, terminals, and apps. You never need to maintain a library of fragile selectors. The agent adapts. This is why our in-house model achieves 85.6% on OSWorld benchmarks. The same principles apply to your custom agents.

Start by spinning up a cloud machine with /v1/machines. Then create a task run with POST /v1/runs to have an agent complete the work. Explore workflows, vision, and the MCP server for Cursor or Claude Desktop. Get your key at https://coasty.ai/developers and build agents that drive real desktops.

Want to see this in action?

View Case Studies
Try Coasty Free