Back to Blog
Guide

Rachel Kim7 min
Ctrl+C

You want an AI agent that can click, type, scroll, and interact with real desktops and browsers. Coasty's computer use API gives you a single API surface to drive any application like a human. Every endpoint has a clear price, and you can prepay in USD credits. 1 credit equals $0.01. This guide breaks down every endpoint, its cost, and how to use it in code.

Pricing Overview

  • Prepaid wallet: deposit USD, 1 credit = $0.01
  • No hidden fees, no per-minute pricing
  • Task Runs bill $0.05 per agent step
  • Vision endpoints: $0.05 (predict), $0.03 (ground), free (parse)
  • Sessions API: $0.10 per new session, $0.04 per predict call
  • Workflows: $0.05 per task step, plus $0.05 per agent step
  • Machines: provision cloud VMs, billed by the cloud provider
  • Idempotency-Key protects only the 18 documented reserve-and-replay operations
  • Webhooks include HMAC signature header Coasty-Signature: t=unix,v1=hex

Vision Endpoints

  • POST /v1/predict: base64 screenshot + instruction + cua_version → actions + status. Cost $0.05 per call. Loop capture, predict, act until status is done.
  • POST /v1/ground: base64 screenshot + element description → x, y coordinates. Cost $0.03 per call. Useful for clicking UI elements by natural language.
  • POST /v1/parse: free. Turns pyautogui code into structured actions. No charge.
bash
curl -X POST https://coasty.ai/v1/predict \
  -H "X-API-Key: $COASTY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "screenshot": "$(base64 -i screenshot.png | tr -d '\n')",
    "instruction": "Click the button labeled Submit",
    "cua_version": "v3"
  }'

Vision endpoints: $0.05 for predict, $0.03 for ground, free for parse.

Session-Based Computer Use

  • POST /v1/sessions: create a stateful trajectory. Cost $0.10 per new session.
  • POST /v1/sessions/{id}/predict: continue the session with capture and actions. Cost $0.04 per call.
  • Use sessions when you need long-running tasks, memory between steps, and finer control over the trajectory.
python
import os, base64, requests

url = "https://coasty.ai/v1/sessions"
headers = {"X-API-Key": os.getenv("COASTY_API_KEY")}
payload = {"cua_version": "v3"}
resp = requests.post(url, headers=headers, json=payload)
session_id = resp.json()["id"]
print("Session created.", session_id)

# Continue with a stateful predict call
predict_url = f"https://coasty.ai/v1/sessions/{session_id}/predict"
with open("screenshot.png", "rb") as f:
    b64 = base64.b64encode(f.read()).decode()
payload = {
    "screenshot": b64,
    "instruction": "Type 'hello' and press Enter",
    "cua_version": "v3"
}
resp = requests.post(predict_url, headers=headers, json=payload)
print(resp.json())

Where This Beats Brittle Automation

  • No need to maintain fragile XPath or CSS selectors that break with UI changes.
  • Agents see the screen like a human and reason about context.
  • Grounding lets you describe elements in natural language and get precise coordinates.
  • Parse turns pyautogui code into structured actions you can embed in workflows.
  • Task Runs and Workflows orchestrate multi-step workflows with retries, asserts, and loops.

You now know every endpoint and price for Coasty's computer use API. Start with a simple predict call for one action, then move to sessions for long-running tasks, and finally workflows for complex pipelines. Get a key at https://coasty.ai/developers and build your first computer use agent today.

© 2026 Coasty

Backed byYCombinator