Checkout flows are the hardest part of web automation. They sit behind dynamic forms, CAPTCHAs, and ever-changing layouts. Your selectors break, your selectors keep breaking, and you end up writing fragile regex or maintaining a separate UI test suite. The Coasty computer use API turns that around. It drives a real desktop to see the screen and act like a human. You send an instruction and a screenshot, it clicks, types, scrolls, and repeats until the form is done. No brittle selectors, no separate UI tests, and no manual screenshots.
How the API works
The core of form automation is the predict endpoint. You POST a base64 screenshot and an instruction to https://coasty.ai/v1/predict. The request body must include the cua_version field, which you set to v3 or v4. The response returns actions like click, type, scroll, and a status field. When status is done, the form task is complete. For higher-level workflows like checkout, use POST /v1/runs with a task description. The server provisions a cloud VM, launches a browser, and drives it through the whole flow. Each agent step costs $0.05.
#!/bin/bash
# Replace this with your actual API key
export COASTY_API_KEY="your-api-key-here"
# Example: Fill a form and click checkout
# First capture the page as a base64 image
IMAGE=$(base64 -w 0 screenshot.png)
# POST to the predict endpoint
curl -X POST https://coasty.ai/v1/predict \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d "{
"image": "$IMAGE",
"instruction": "Find the email input field, type your email, find the password field, type your password, then click the checkout button and complete the flow",
"cua_version": "v3"
}"Checkout with a task run
- Use POST /v1/runs to let the server drive a browser instance on a cloud VM.
- Include max_steps and deadline_seconds to cap runtime and costs.
- Set on_awaiting_human to pause, fail, or cancel when a CAPTCHA or human approval is required.
- Each agent step is billed $0.05, so keep steps minimal and efficient.
For checkout flows, POST /v1/runs with a single clear task and let the agent see the screen and act like a human.
Where this beats brittle automation
Traditional browsers and headless drivers rely on CSS selectors, XPath, and hard-coded coordinates. When a site reorders fields, changes IDs, or injects dynamic classes, your automation breaks. The computer use API sees the actual screen content. It can read labels, spot CAPTCHAs, and adapt to layout changes without you writing new selectors. It also works in contexts where API endpoints are hidden behind forms, such as legacy apps or custom CRMs, not just public web shops. You get a single agent that can type, scroll, click, and wait for dynamic elements to appear.
Next, build a checkout workflow using POST /v1/runs, set up webhooks to track success or failure, and integrate it into your CI/CD pipeline. Get your API key at https://coasty.ai/developers and start automating checkout flows with the computer use API today.
Want to see this in action?
View Case Studies