Back to Blog
Engineering

James Liu5 min
Del

You want a computer use agent that can click menus, fill forms, and scroll through pages just like a human. But every time you add a new action, you wonder about costs. The Coasty computer use API exposes every price point clearly so you can budget per call, per session, or per run. No hidden tiers, no surprise invoices. You see the exact cost for each prediction, grounding, and step in a task run.

Vision and action endpoints

  • POST /v1/predict costs $0.05 per call. You send a base64 screenshot, an instruction, and cua_version. The model returns actions and a status. Loop capture, predict, act until status is done.
  • POST /v1/sessions costs $0.10 per creation. Each session maintains a stateful trajectory memory. Subsequent predictions on that session are $0.04 each.
  • POST /v1/ground costs $0.03. It maps a screenshot plus an element description to x, y coordinates, useful for precise targeting.
  • POST /v1/parse is free. It turns pyautogui code into structured actions you can feed back into the agent.
python
import os
import base64
import requests

def predict_action(api_key, screenshot_b64, instruction, cua_version="v3"):
    url = "https://coasty.ai/v1/predict"
    headers = {
        "X-API-Key": api_key,
        "Content-Type": "application/json"
    }
    payload = {
        "screenshot": screenshot_b64,
        "instruction": instruction,
        "cua_version": cua_version
    }
    resp = requests.post(url, json=payload, headers=headers)
    resp.raise_for_status()
    return resp.json()

# Example usage:
# Read a base64 screenshot from disk
with open("screenshot.png", "rb") as f:
    screenshot_b64 = base64.b64encode(f.read()).decode()

api_key = os.environ["COASTY_API_KEY"]
result = predict_action(api_key, screenshot_b64, "Click the sign-in button")
print(result)  # Contains actions and status

Stateful sessions

  • Create a session with POST /v1/sessions. Response includes an id and initial memory.
  • Use POST /v1/sessions/{id}/predict to continue. Each of these costs $0.04.
  • Sessions keep a trajectory of past actions, which improves performance for multi-step workflows.

POST /v1/predict is $0.05 per call.

Task runs and agent steps

  • POST /v1/runs kicks off a server-driven agent that completes a task. You specify machine_id, task, cua_version (default v3, v4 is autonomous with pass/fail verifier), instructions (appended to the base prompt), system_prompt, max_steps, deadline_seconds, on_awaiting_human (pause/fail/cancel), and webhook_url.
  • Each agent step in a run is billed $0.05.
  • GET /v1/runs, GET /v1/runs/{id}, POST /v1/runs/{id}/cancel, POST /v1/runs/{id}/resume let you inspect and control running tasks.
  • GET /v1/runs/{id}/events streams Server-Sent Events with reconnect by Last-Event-ID. States are queued, running, awaiting_human, succeeded, failed, cancelled, timed_out.

Where this beats brittle automation

Traditional tools depend on fragile selectors like CSS classes, XPath, or IDs that drift when pages change. The Coasty computer use API treats your UI as a visual surface. The model sees what you see, understands context from the screenshot, and generates human-like clicks and keystrokes. This means fewer maintenance cycles and higher resilience to UI changes.

With clear, per-call prices and per-step billing, you can model costs precisely before you ship. Build reliable browser and desktop agents that see and act like humans. Get your API key at https://coasty.ai/developers.

© 2026 Coasty

Backed byYCombinator