Automating Form Filling and Checkout Flows Over the Computer Use API
Forms trap automation in fragile selectors. ID and class names change. Layouts shift. A single missing attribute breaks a script. You can build a more robust solution with the Coasty Computer Use API. It runs a computer use agent that sees the screen, reads text, and clicks elements just like a human. That means your checkout flow works even when the site redesigns its HTML. The API drives real desktops, browsers, and terminals, not just API calls.
How it works
The Workflow DSL orchestrates multi-step actions. You define a versioned JSON workflow that includes task steps for each form field and checkout action. Each task step runs a computer use agent step billed at $0.05. The server drives an agent to completion, looping capture, predict, act until the task status is "done". You can also call the run endpoint directly with a single task to fill a form and submit a checkout in one request. The agent reads the screenshot, interprets the instruction, generates actions to click and type, and executes them on the real machine. You poll for completion or stream events with Server-Sent Events.
#!/bin/bash
# Example: submit a checkout task via the runs endpoint
# Set your API key from the environment
export COASTY_API_KEY="$(echo $COASTY_API_KEY)"
# Create a run with a checkout task
curl -X POST https://coasty.ai/v1/runs \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d ' {
"machine_id": "machine_abc123",
"task": "Fill the checkout form, enter shipping details, select payment, submit the order, and confirm success",
"cua_version": "v3",
"max_steps": 30,
"deadline_seconds": 600,
"on_awaiting_human": "pause"
}'What you can configure
- ●machine_id: The cloud VM ID for the target machine
- ●task: The natural language instruction for the agent
- ●cua_version: The computer use agent version (v3 or v4 for autonomous with pass/fail verifier)
- ●max_steps: Upper bound on agent steps (default 50)
- ●deadline_seconds: Timeout for the entire run
- ●on_awaiting_human: How to handle human approval (pause, fail, or cancel)
- ●webhook_url: Optional callback for run status changes
- ●Each task step costs $0.05 on the server
Every task step is billed at $0.05 on the server.
Where this beats brittle automation
Traditional automation relies on CSS selectors or XPath, which break when sites change classes or reorder elements. The Computer Use API bypasses that fragility by simulating human perception. The agent reads the actual screen, sees what you see, and clicks the element based on its visible label or context. It handles dynamic content, CAPTCHAs, and UI changes without breaking. You do not need to maintain a mapping of IDs and classes. The agent uses the visual world, not just the source code.
You can now build checkout flows that survive site redesigns and UI changes. Build more reliable form filling, checkout, and other multi-step tasks with the Computer Use API. Get a key at https://coasty.ai/developers and start automating with real agents.