Coasty/

Developer API

Get started

Start an autonomous task run and follow it to completion

Run your first task

Run your first task, at a glance

Start an autonomous task run and follow it to completion

POST /v1/runs
Create one task run, follow its event stream, and treat the terminal result as complete only after checking the expected screen.

Your first autonomous task needs only an API key and an observable goal. Grab a test key from the API keys page (it never bills), then set it in your shell:

Shell
export COASTY_API_KEY="sk-coasty-test-your_key_here"

Start with POST /v1/tasks. Describe the result in task and send an Idempotency-Key so a retried create cannot start a duplicate run. Coasty chooses and provisions the machine, executes the task, verifies success or failure, and cleans up:

import os, requests

run = requests.post(
    "https://coasty.ai/v1/tasks",
    headers={
        "X-API-Key": os.environ["COASTY_API_KEY"],
        "Idempotency-Key": "invoice-download-4821",
    },
    json={
        "task": "Open the billing portal, download the newest invoice, and verify the PDF exists.",
        "max_steps": 50,
    },
    timeout=30,
).json()

print(run["id"], run["status"])  # queued

The create response begins at queued. Coasty then drives the machine, records each step, and finishes as succeeded, failed, cancelled, or timed_out. Your application can poll, subscribe to the event stream, or receive signed webhooks; it does not need to execute each prediction itself.

NextGo to
Understand task fields, lifecycle, and resultsSubmit & forget
Bring a specific managed or external machineTask runs
Follow progress without pollingStreaming events
Turn the task into repeatable multi-step automationWorkflows
Own every screenshot and action yourselfPrediction primitives
Submit & forget is the default for autonomous work. Use Task runs when you need to select a specific machine, and prediction primitives only when your application needs direct control over the loop.
API reference — Coasty Computer Use API | Coasty - AI Computer-Use Agent