Tutorial

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

Sarah Chen||6 min
+W

Bottlenecked by a single local machine? Build workflows that spin up cloud desktops, browsers, or terminals on demand. The /v1/machines API provisions real VMs for your computer use agent, letting you scale test environments, long-running workflows, and parallel tasks without managing infrastructure.

How it works

Send a POST request to /v1/machines with a machine_id to provision a cloud VM. The agent runs on that VM, so you can drive real desktops, browsers, and terminals through the computer use API. You can start, stop, and snapshot machines to reuse environments across task runs and workflows. Each machine is a real compute resource that your agent interacts with via keyboard, mouse, and screen capture.

bash
# Provision a cloud machine on demand
CURL="curl -s -X POST https://coasty.ai/v1/machines \
  -H 'Authorization: Bearer $COASTY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "machine_id": "my-test-browser-01",
    "description": "Chrome browser for E2E tests"
  }'"
echo $CURL | bash

Key behaviors and lifecycle

  • POST /v1/machines creates a machine record and starts the VM. Pass machine_id to identify it.
  • GET /v1/machines returns the current state and details of provisioned machines.
  • STOP /v1/machines/{id} or start it again to save costs between task runs.
  • Snapshot the VM to reuse a consistent environment across multiple runs.
  • The agent drives real UI on the provisioned machine via the computer use API.

POST /v1/machines starts a cloud VM for your computer use agent, letting it drive real desktops, browsers, and terminals.

Where this beats brittle automation

Traditional selectors break when layouts shift or CSS changes. API-only tools can’t touch dynamic web apps or desktop apps with custom UI. With a provisioned cloud machine, your computer use agent sees the same screen as a human. It clicks, types, and navigates using vision and natural language instructions. This lets you build self-healing, long-running workflows that adapt to real UI flows instead of fragile selectors.

Combine /v1/machines with task runs and workflows to spin up environments, run tests, and verify results. Get your API key at https://coasty.ai/developers and start provisioning machines for your computer use agent today.

Want to see this in action?

View Case Studies
Try Coasty Free