Engineering

Coasty Computer Use API Pricing: Every Endpoint. Every Cent.

Priya Patel||7 min
+K

Writing reliable bots with only APIs means brittle selectors, constant maintenance, and fragile integrations. The Coasty computer use API flips that by giving agents eyes and hands on real desktops, browsers, and terminals. You define a task and the API steps through the UI just like a human would. This post lists every endpoint, its billing, and a working example.

Core computer use endpoints and costs

  • Base URL: https://coasty.ai/v1
  • Auth header: X-API-Key or Authorization: Bearer
  • POST /v1/predict costs $0.05 per call and processes a base64 screenshot + instruction + cua_version
  • POST /v1/sessions ($0.10) creates a stateful trajectory memory
  • POST /v1/sessions/{id}/predict ($0.04) uses trajectory memory
  • POST /v1/ground ($0.03) maps screenshot + element description to x,y
  • POST /v1/parse is free and converts pyautogui code into structured actions

Task Runs API

  • POST /v1/runs bills $0.05 per agent step
  • Supports cua_version: 'v3' (default) or 'v4' (autonomous with pass/fail verifier)
  • Fields: machine_id, task, cua_version, instructions (appended), system_prompt, max_steps, deadline_seconds, on_awaiting_human, webhook_url
  • States: queued, running, awaiting_human, succeeded, failed, cancelled, timed_out

Workflows API

  • POST /v1/workflows defines a versioned JSON DSL of runs
  • POST /v1/workflows/{id}/runs and POST /v1/workflows/runs start workflows
  • Step types: task, assert, if, loop, parallel, human_approval, retry, succeed, fail
  • Variables: double-brace inputs.x and stepId.field
  • Hard guards: budget_cents, max_iterations, deadline_seconds
  • Task steps bill $0.05 each

Machines and billing

  • POST /v1/machines provisions a cloud VM you can start, stop, and snapshot
  • Coasty uses a prepaid USD wallet where 1 credit = $0.01
  • Webhooks are HMAC signed with header Coasty-Signature: t=unix,v1=hex
  • Idempotency-Key header makes writes safe to retry
  • Scopes gate keys
  • MCP server lets you drive Coasty from Cursor, Claude Desktop, or other MCP clients

POST /v1/runs bills $0.05 per agent step. POST /v1/sessions/{id}/predict bills $0.04 per prediction with stateful memory.

Where this beats brittle automation

Traditional automation relies on selectors, IDs, and CSS classes that break when layouts shift or frameworks update. The Coasty computer use agent sees the actual screen, understands context, and clicks or types exactly where a human would. This is especially powerful for browser tasks, desktop apps, and workflows that require judgment and adaptation.

python
import os
import base64
import requests

API_KEY = os.getenv('COASTY_API_KEY')
BASE = 'https://coasty.ai/v1'

def predict_action(screenshot_b64, instruction):
    # POST /v1/predict $0.05
    resp = requests.post(
        f'{BASE}/predict',
        headers={'X-API-Key': API_KEY},
        json={
            'screenshot': screenshot_b64,
            'instruction': instruction,
            'cua_version': 'v3'
        }
    )
    resp.raise_for_status()
    return resp.json()

if __name__ == '__main__':
    # Load a screenshot as base64
    with open('screen.png', 'rb') as f:
        screenshot_b64 = base64.b64encode(f.read()).decode('utf-8')
    result = predict_action(screenshot_b64, 'Find the save button and click')
    print(result)

Start using the Coasty computer use API today. Get a key at https://coasty.ai/developers and build agents that see and act like humans.

Want to see this in action?

View Case Studies
Try Coasty Free