Back to Blog
Tutorial

Priya Patel9 min
F12

Most checkout flows start with login, then a series of inputs, dropdowns, and file uploads. Traditional automation tools rely on brittle selectors, API mocks, or fragile headless browsers. A computer use agent sees the UI, understands context, and clicks like a human. The Coasty Computer Use API gives you that behavior at scale.

How it works

You submit a task to POST /v1/runs with a machine_id and a description like "Log in to https://app.example.com with [email protected] and password, fill the shipping form, and complete checkout." The agent uses its vision model to capture the current screen, interpret the form fields, and generate actions such as click, type, select, and keyboard shortcuts. Each step costs $0.05. The endpoint returns a run object with id, status, and a stream of events that you can read for progress. When status is "succeeded" or "failed", the run is complete and you can inspect the final state or logs.

bash
curl -s -X POST https://coasty.ai/v1/runs \
  -H "Authorization: Bearer $COASTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "machine_id": "vm-prod-001",
    "task": "Log in to https://app.example.com with [email protected] and password, fill the shipping form, and complete checkout",
    "cua_version": "v4",
    "max_steps": 100,
    "on_awaiting_human": "pause"
  }' | jq .

Key fields and options

  • machine_id: the cloud VM the agent will use to drive the real UI.
  • task: natural language description of the workflow.
  • cua_version: use "v4" for an autonomous agent with a pass/fail verifier.
  • max_steps: hard limit on agent steps (default may apply).
  • deadline_seconds: optional timeout for the entire run.
  • on_awaiting_human: specify "pause", "fail", or "cancel" when the agent encounters human approval.
  • webhook_url: optional endpoint to receive completed runs via POST.

Each agent step is billed $0.05; set max_steps and deadline_seconds to control cost and duration.

Where this beats brittle automation

A computer use agent does not need stable CSS selectors or pre-built API mocks. It sees the form layout, understands labels and placeholders, and reacts to dynamic IDs. That means your automation survives UI changes, hidden fields, and multi-step wizards without rewrite. You can also handle file uploads, CAPTCHAs (if the human approves), and modal confirmations with the same agent. The API uses a cloud machine, so you can run production workloads without containerizing your own browser and driver stack.

Start by automating a simple login + checkout flow on a staging environment. Then extend it with workflows for multi-step onboarding, data entry, or periodic tasks. Get your API key at https://coasty.ai/developers and build the first agent in minutes.

© 2026 Coasty

Backed byYCombinator