Engineering

Coasty Computer Use API Pricing: Every Endpoint, Every Cent

Emily Watson||5 min
Cmd+V

If you build computer use agents, you need to know exactly what you pay for every request. The Coasty computer use API exposes five core pricing buckets. Vision, stateful sessions, task runs, workflows, and machines. Each endpoint has a fixed price per call. This guide lists every endpoint, its price, and the fields you send and receive. You can budget your agent runs before you start.

Vision and element mapping

  • POST /v1/predict $0.05: takes a base64 screenshot, instruction, and cua_version. Returns actions and a status. Loop capture → predict → act until status is done.
  • POST /v1/sessions $0.10: creates a stateful trajectory memory session with an id. Use this for long-running tasks that need memory between steps.
  • POST /v1/sessions/{id}/predict $0.04: runs a prediction on an existing session. Returns actions and a status. Separate from the initial session call.
  • POST /v1/ground $0.03: maps a screenshot plus element description to x,y coordinates. Great for precise clicks, especially when selectors are unstable.
bash
# Example: vision endpoint (predict) using curl
API_KEY="$(COASTY_API_KEY)"
BASE_URL="https://coasty.ai/v1"

# Base64 screenshot of a desktop (placeholder)
SCREENSHOT="$(echo 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==' | base64 -d | base64 -w0)"

curl "$BASE_URL/predict" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "screenshot": "'$SCREENSHOT'",
    "instruction": "click the button labeled Submit",
    "cua_version": "v3"
  }'

Task runs that drive an agent to completion

  • POST /v1/runs $0.05 per agent step: starts a server-driven agent with machine_id, task, cua_version, and optional instructions, system_prompt, max_steps, deadline_seconds, on_awaiting_human, webhook_url. Returns an id and initial state (queued, running, etc.).
  • GET /v1/runs: lists all runs for the account.
  • GET /v1/runs/{id}: fetches a specific run’s details.
  • POST /v1/runs/{id}/cancel: cancels an active run.
  • POST /v1/runs/{id}/resume: resumes a run that paused or failed (for supported states).
  • GET /v1/runs/{id}/events: streams Server-Sent Events with run events. Reconnect using Last-Event-ID header.
python
# Example: start a task run (POST /v1/runs)
import requests
import os

API_KEY = os.getenv("COASTY_API_KEY")
BASE_URL = "https://coasty.ai/v1"

resp = requests.post(
    f"{BASE_URL}/runs",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "machine_id": "cloud-vm-1",
        "task": "open https://coasty.ai/docs and screenshot the main heading",
        "cua_version": "v3",
        "max_steps": 20,
        "deadline_seconds": 600
    }
)
resp.raise_for_status()
run = resp.json()
print(run["id"], run["state"])  # queued, running, etc.

Task runs bill $0.05 per agent step, not per API call. You control max_steps and deadline_seconds to cap spend.

Workflows (versioned JSON DSL)

  • POST /v1/workflows: creates a versioned workflow DSL (task, assert, if, loop, parallel, human_approval, retry, succeed, fail). Variables use double-brace syntax like {{inputs.x}} and stepId.field. Includes budget_cents, max_iterations, deadline_seconds guards.
  • POST /v1/workflows/{id}/runs: executes an existing workflow by id.
  • POST /v1/workflows/runs: ad-hoc inline workflow execution.
  • Each task step inside a workflow is billed $0.05 per agent step.

Where this beats brittle automation

Traditional automation relies on CSS selectors, XPath, or fixed API paths. When UI changes or elements move, these selectors break. The Coasty computer use API lets an agent see the screen, understand context, and act like a human. It uses vision + ground + predict to navigate dynamic interfaces reliably. This reduces flaky tests and maintenance overhead.

You now know every endpoint and its price under the Coasty computer use API. Plan your budget by counting vision calls, session steps, task steps, ground calls, and workflow task steps. The next step is to build a reliable agent that can drive real browsers and desktops. Get your API key and start experimenting at https://coasty.ai/developers .

Want to see this in action?

View Case Studies
Try Coasty Free