You need a machine to run your autonomous agent. Most automation stacks rely on static environments or fragile selectors. The Coasty Computer Use API lets you provision cloud machines on demand through the /v1/machines endpoint. Your agent can then navigate real UIs, complete multi-step workflows, and recover from visual changes. This endpoint is the foundation for building robust computer use agents.
How it works
POST /v1/machines creates a cloud VM and returns a machine_id and status. The request body accepts machine_type, os_image, workspace_size_gb, and workspace_path (optional). Once provisioned, the agent can interact with that machine through predict and run endpoints. The machine is yours until you stop or delete it. The API does not manage execution; it only provides the environment for your agent to act in.
curl -X POST https://coasty.ai/v1/machines \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"machine_type": "small",
"os_image": "ubuntu-22.04",
"workspace_size_gb": 20,
"workspace_path": "/opt/agent"
}' | jq .Key request fields
- machine_type: identifies the VM size (e.g., small).
- os_image: OS to provision (e.g., ubuntu-22.04).
- workspace_size_gb: disk size in gigabytes.
- workspace_path: optional working directory for the agent.
- Auth header X-API-Key reads from COASTY_API_KEY environment variable.
POST /v1/machines returns machine_id and status to start your agent's session.
Where this beats brittle automation
Traditional automation relies on static selectors or hard-coded API calls. If a UI changes, your scripts break. With a provisioned machine, your computer use agent sees the screen the same way a human does. It can click, type, scroll, and adapt to layout shifts. This makes it ideal for multi-step workflows, browser tests, and terminal tasks where the environment is dynamic.
Next steps
- Use the machine_id from /v1/machines in a /v1/runs request to start an autonomous task.
- Stream events with GET /v1/runs/{id}/events to monitor progress.
- Cancel or resume runs using POST /v1/runs/{id}/cancel and POST /v1/runs/{id}/resume.
- Explore workflows and MCP server options in the Coasty developer docs.
Provisioning cloud machines with /v1/machines gives you a real desktop for your computer use agent. Build agents that see UIs, handle dynamic workflows, and survive visual changes. Get your API key and start building at https://coasty.ai/developers.
Want to see this in action?
View Case Studies