Back to Blog
Engineering

Sarah Chen6 min
+L

Most automation struggles with UI changes and hidden elements. You spend weeks maintaining brittle selectors, or you build custom drivers for every app. The /v1/machines API gives you a real desktop that your computer use agent can drive just like a human. You provision a cloud machine once, then send complete tasks to a /v1/runs step that sees the screen, clicks, types, and navigates like a person. No more brittle XPath or CSS selectors. No more rewriting code when the UI shifts.

How it works

The /v1/machines endpoint provisions a cloud VM. It returns a machine_id and status. You can start, stop, and snapshot the machine. When you start the machine, the agent can connect via VNC-style display and interact with the desktop. For automation tasks, you create a run with POST /v1/runs, providing your machine_id as the machine_id field. The server launches the agent on that machine, runs your task, and streams events via Server-Sent Events. The agent bills $0.05 per step when used in a /v1/runs task step.

bash
# Provision a cloud machine

export COASTY_API_KEY="your_key_here"

curl -X POST https://coasty.ai/v1/machines \
  -H "X-API-Key: $COASTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "demo-machine",
    "platform": "win",
    "image": "windows-11",
    "size": "medium"
  }'

# Expected response
# {"machine_id": "mch_abc123", "status": "provisioning"}

# Start the machine
# curl -X POST https://coasty.ai/v1/machines/{machine_id}/start \
#   -H "X-API-Key: $COASTY_API_KEY"

# Stop the machine
# curl -X POST https://coasty.ai/v1/machines/{machine_id}/stop \
#   -H "X-API-Key: $COASTY_API_KEY"

# Snapshot the machine state
# curl -X POST https://coasty.ai/v1/machines/{machine_id}/snapshot \
#   -H "X-API-Key: $COASTY_API_KEY"

Key fields and actions

  • POST /v1/machines creates a cloud VM with fields: name, platform (win, mac, linux), image (windows-11, macos-sonoma, ubuntu-latest), size (small, medium, large). Returns machine_id and status.
  • POST /v1/machines/{machine_id}/start brings the machine online so the agent can drive it.
  • POST /v1/machines/{machine_id}/stop shuts down the machine to save credits.
  • POST /v1/machines/{machine_id}/snapshot creates a snapshot you can restore later.
  • When you run a task via POST /v1/runs, set machine_id to the ID from /v1/machines. The agent acts on that real desktop, not an emulated browser.
  • Task steps drawn from /v1/runs bill $0.05 per agent step when executed on a machine.

Set machine_id on your /v1/runs payload to attach a provisioned cloud machine.

Where this beats brittle automation

API-only tools force you to know the internal request paths and JSON shapes. When a SaaS app changes a field name or structure, your automation breaks. With a computer use agent running on a real machine, it sees the same UI you see. It clicks buttons by coordinates, types into inputs by position, and scrolls naturally. It adapts to layout shifts without selector updates. Combine /v1/machines with /v1/runs to build workflows that execute complex, multi-step tasks across browsers, desktop apps, and terminals with a single agent.

Provision cloud machines on demand with /v1/machines, then drive them with computer use agents via /v1/runs. Build automation that survives UI changes and works across real desktops and browsers. Get your API key at https://coasty.ai/developers.

© 2026 Coasty

Backed byYCombinator