Writing an automation script is straightforward when you have a stable API or a fixed UI. The real world changes. Elements move, layouts shift, and you end up with brittle selectors and constant maintenance. The Coasty computer use API solves this by letting you describe what you want, not how to click it. You provide a screenshot and an instruction, and the API returns the actions needed to complete the task. This approach is ideal for building production agents that can navigate any interface.
How the Computer Use API Works
The core flow uses the vision endpoint. You capture a screenshot, send it with an instruction and the cua_version, and receive a list of actions and a status. You loop capture, predict, act until the status is "done". For more complex tasks that need state memory, you can start a session with POST /v1/sessions. Each prediction in a session costs $0.04. The vision endpoint itself costs $0.05 per request. The API maps element descriptions to coordinates with a ground endpoint that costs $0.03.
curl https://coasty.ai/v1/predict \
-H "X-API-Key: $COASTY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"screenshot": "$(base64 -i screenshot.png)",
"instruction": "Click the Add to Cart button",
"cua_version": "v3"
}'What to Build in Production
- Browser agents that complete checkout flows without hard selectors
- Desktop tools that install software and configure settings
- Terminal workflows that run commands and parse stdout
- Multi-step pipelines that delegate tasks to different agents
Use Task Runs to let the server drive the agent to completion, billed $0.05 per step.
Where This Beats Brittle Automation
Traditional automation relies on IDs, classes, and XPath. When a designer rearranges a layout, your script breaks. The computer use agent sees the screen like a human. It understands context, handles visual changes, and falls back to coordinate mapping when needed. This reduces maintenance and lets you ship features faster. You can also combine computer use with structured actions via the free parse endpoint to generate robust, reproducible flows.
Start with a prototype using the predict endpoint, then move to sessions and task runs for stateful workflows. When you need real machines, provision them with the machines endpoint. Explore the full documentation and get your key at https://coasty.ai/developers .
Want to see this in action?
View Case Studies