Tutorial

Coasty Computer Use API Pricing: Every Endpoint, Every Cent

Daniel Kim||8 min
Alt+Tab

You want to automate browsers and desktops by seeing the screen and acting like a human. That means a computer use API. But pricing is opaque. You need concrete numbers before you ship. This guide lists every Coasty endpoint, its cost, and exactly how credits and billing work.

How billing works

Coasty bills from a prepaid USD wallet. One credit equals $0.01. Every API call consumes credits at the rates below. If you run out, the server returns a 402 INSUFFICIENT_CREDITS error. Use an Idempotency-Key header to make writes safe to retry. Webhooks are HMAC signed with Coasty-Signature header.

Vision and action endpoints

The core stateless vision flow runs in a loop of capture, predict, act. POST /v1/predict ($0.05) takes a base64 screenshot, an instruction, and cua_version. It returns actions and a status. You continue until status is "done". POST /v1/ground ($0.03) maps a screenshot + element description to x,y coordinates. POST /v1/parse (free) turns pyautogui code into structured actions.

bash
curl -X POST https://coasty.ai/v1/predict \
  -H "X-API-Key: $COASTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "screenshot": "$(base64 -w 0 screenshot.png)",
    "instruction": "Click the login button.",
    "cua_version": "v3"
  }' | jq .

Stateful sessions

For long-running tasks, use sessions. POST /v1/sessions ($0.10) creates a session. Then POST /v1/sessions/{id}/predict ($0.04) uses the session ID and a screenshot to get actions. This keeps trajectory memory in the server between calls.

python
import os, requests, base64

api_key = os.getenv("COASTY_API_KEY")
url = "https://coasty.ai/v1/sessions"
headers = {"X-API-Key": api_key, "Content-Type": "application/json"}
body = {"instruction": "Open docs.coasty.ai in the browser"}
resp = requests.post(url, headers=headers, json=body).json()
session_id = resp["session_id"]
print("Session:", session_id)

# Predict with stateful trajectory
url = f"https://coasty.ai/v1/sessions/{session_id}/predict"
with open("screenshot.png", "rb") as f:
    screenshot = base64.b64encode(f.read()).decode()
body = {
    "screenshot": screenshot,
    "cua_version": "v3"
}
resp = requests.post(url, headers=headers, json=body).json()
print("Actions:", resp["actions"])

Task runs

The server drives an agent to completion. POST /v1/runs creates a run. Pass machine_id, task, cua_version (default "v3"), optional instructions, system_prompt, max_steps, deadline_seconds, on_awaiting_human ("pause", "fail", or "cancel"), and webhook_url. Billed $0.05 per agent step. States: queued, running, awaiting_human, succeeded, failed, cancelled, timed_out.

Workflows

Workflows are versioned JSON DSL of runs. POST /v1/workflows defines a workflow. POST /v1/workflows/{id}/runs and POST /v1/workflows/runs (ad-hoc inline) start it. Step types: task, assert, if, loop, parallel, human_approval, retry, succeed, fail. Variables use double-brace inputs.x or stepId.field. Hard guards include budget_cents, max_iterations, deadline_seconds. Task steps are billed $0.05 each.

Machines

POST /v1/machines provisions a cloud VM you can start, stop, and snapshot. The agent drives real desktops, browsers, and terminals, not just API calls.

Where this beats brittle automation

Most automation tools rely on brittle selectors and page-specific APIs. They break on layout changes, new elements, or dynamic content. A computer use agent sees the screen like a human. It clicks what it sees, not what a selector tool promises. This gives you a single, robust pipeline for browsers, desktops, and terminals. It also matches the OSWorld benchmark performance you can verify at osworld-v1.xlang.ai.

1 credit = $0.01. Track every cent with the endpoint list above.

You now know every Coasty endpoint, its price, and how credits work. Build reliable computer use agents without budget surprises. Get an API key at https://coasty.ai/developers.

Want to see this in action?

View Case Studies
Try Coasty Free