From Prototype to Production With the Coasty Computer Use API
You have a working computer use prototype. It clicks buttons, fills forms, and navigates a browser. Now you need to ship it. You need reproducibility, cost control, and observability. The Coasty Computer Use API gives you the production primitives you need, not just a single prediction endpoint.
Prototype with the prediction endpoint
Start simple. The POST /v1/predict endpoint takes a base64 screenshot, an instruction, and a cua_version, then returns an action list and a status. You loop capture, predict, act until status is done. Each prediction costs $0.05. This is the perfect sandbox for a first task.
curl https://coasty.ai/v1/predict \ \
-H "Authorization: Bearer $COASTY_API_KEY" \ \
-H "Content-Type: application/json" \ \
-d '{
"image": "$(base64 -w0 screenshot.png)",
"instruction": "Click the sign-in button",
"cua_version": "v3"
}'Add state with sessions
For longer tasks, sessions give you trajectory memory. POST /v1/sessions creates a session. Then POST /v1/sessions/{id}/predict uses that history and still costs $0.04 per call. Sessions persist actions, making it possible to pause, resume, and reason across multiple steps.
Turn actions into coordinates with ground
Sometimes you need pixel-perfect clicks. POST /v1/ground takes a screenshot and an element description and returns x and y coordinates. That costs $0.03. Combine it with a prediction endpoint to map natural language to precise UI placement without brittle CSS selectors.
Production: task runs with billing
Scale to production by using task runs. POST /v1/runs takes machine_id, task, cua_version (v3 or v4), optional instructions, system_prompt, max_steps, deadline_seconds, and webhook_url. Each agent step bills $0.05. The server owns the loop. You get events streamed via GET /v1/runs/{id}/events (reconnect with Last-Event-ID). States are queued, running, awaiting_human, succeeded, failed, cancelled, timed_out.
Orchestrate complex flows with workflows
For multi-step logic, use workflows. POST /v1/workflows defines a versioned JSON DSL with steps like task, assert, if, loop, parallel, human_approval, retry, succeed, and fail. Variables look like {{inputs.x}} and stepId.field. You can attach budget_cents, max_iterations, and deadline_seconds as hard guards. Each task step still costs $0.05.
Think in tasks and workflows, not just prediction loops.
Why computer use beats brittle selectors
Traditional automation relies on stable selectors. UI changes, layout shifts, or complex dashboards break them. Computer use agents see the screen and act like a human. They read text, parse layouts, and decide which element to click based on context. With ground, you can map descriptions to coordinates. This makes your agents more resilient and easier to maintain as products evolve.
Start with prediction for rapid iteration. Add sessions for trajectory. Then move to task runs and workflows for production. Get your API key at https://coasty.ai/developers and ship your first production-ready computer use agent.