Back to Blog
Engineering

Michael Rodriguez6 min
Del

Most automation stacks start from a static host or container. You write scripts, set up credentials, and hope the UI hasn't changed. With the /v1/machines endpoint you can provision a fresh cloud VM with a graphical desktop, a browser, and a terminal in a single API call. The computer use agent can then drive that environment to completion, handling dynamic layouts, popups, and UI state changes that brittle selectors cannot. This is the foundation for robust, human-like automation at scale.

How it works

You send a POST request to /v1/machines with a JSON body containing machine_id, os, region, and optionally labels. The response includes an id that you use to start, stop, and snapshot the machine. Once started, the agent can use the /v1/sessions API to capture the desktop and drive it with computer use actions. All steps are billed $0.05 per agent step. The machine itself is a real cloud VM, not a headless container, so you get full GUI access.

bash
# Provision a cloud machine
# Set your key in COASTY_API_KEY, then run:

export COASTY_API_KEY=$YOUR_API_KEY
curl -X POST https://coasty.ai/v1/machines \
  -H "Authorization: Bearer $COASTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "machine_id": "my-prod-box",
    "os": "linux",
    "region": "us-east-1",
    "labels": {
      "env": "production",
      "purpose": "e2e"
    }
  }'

Machine lifecycle

  • POST /v1/machines creates a machine record and returns an id.
  • Use GET /v1/machines/{id} to check status.
  • POST /v1/machines/{id}/start boots the VM.
  • POST /v1/machines/{id}/stop shuts it down.
  • POST /v1/machines/{id}/snapshot creates a snapshot for reuse.

The machine id is the only thing you need to start, stop, and snapshot the environment.

Where this beats brittle automation

When you build against a fixed UI you must keep selectors in sync with every change. Browser automation frameworks require explicit element locators and often break on layout shifts or hidden elements. The computer use agent receives a screenshot and an instruction, then produces actions that mimic human clicks, scrolls, and text entry. It can navigate dynamic menus, handle unexpected popups, and adapt to changing layouts without you rewriting selectors. By provisioning a fresh machine for each run you eliminate state pollution between tests and guarantee a clean desktop each time.

Combine /v1/machines with the computer use API to build end-to-end workflows that start from a clean environment, drive real UIs, and complete reliably. Get your key at https://coasty.ai/developers and start provisioning machines on demand.

© 2026 Coasty

Backed byYCombinator