Coasty/

Developer API

Tasks

Send one goal; machine, execution, verification, and cleanup are automatic

Submit & forget

Submit & forget, at a glance

Send one goal; machine, execution, verification, and cleanup are automatic

POST /v1/tasks
One request owns provisioning, the agent loop, verification, terminal status, cleanup, and optional notification.

POST /v1/tasks is the highest-level Computer Use API. Send one observable goal and Coasty queues it immediately, provisions an ephemeral desktop, runs the full observe → act → verify loop, records a terminal pass or fail, destroys the machine, and sends your optional signed webhook. You never choose a provider machine, manage a TTL, or implement a human-takeover path.

JSON
{
  "task": "Open the billing portal, download the newest invoice, and verify the PDF exists.",
  "max_steps": 150,
  "deadline_seconds": 1800,
  "webhook_url": "https://example.com/hooks/coasty"
}
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
Only task is required. Always add a stable Idempotency-Key for the logical job. Store the returned run id and one-time webhook_secret. With a webhook, no polling is required; the ordinary run GET, SSE, and cancel endpoints remain available when you need observability or an emergency stop.
FieldDefaultWhat it controls
taskrequiredThe complete, externally observable goal.
cua_versionv5Computer Use engine version.
max_steps150Hard action/verification step budget.
deadline_secondsserver defaultEnd-to-end wall-clock budget, including provisioning.
action_policynoneEnforced post-model restrictions and cumulative action limits.
webhook_urlnoneHTTPS terminal callback; private and unsafe targets are rejected.
llmmanagedOptional Anthropic/OpenAI BYOK selection; the key stays in X-LLM-Api-Key.
machineLinux desktopOptional backend (provider), OS, desktop, CPU, memory, storage, snapshot, and proxy preferences.

The returned object is an ordinary durable agent.run. While provisioning, machine_id is null and machine.status is provisioning. Coasty assigns a fail-safe TTL longer than the task deadline and performs immediate, idempotent termination after success, failure, timeout, or cancellation.

machine.status has six values, not three. Treat everything before ready as one not-yet-usable state and everything after it as cleanup bookkeeping.

machine.statusMeaning
provisioningThe provider has been asked for a machine and no id is bound yet.
startingThe provider handle and billing record are durable and machine_id is bound, but the desktop may still be booting. Execution readiness is verified separately before the agent is allowed to start.
reconcilingA recoverable provisioning fault is being reconciled against the provider journal automatically. The run stays running and keeps its lease; no client action is required.
readyThe desktop is bound and verified. The agent is driving it.
terminatedCleanup finished and the provider machine is gone.
cleanup_failedTermination did not confirm and is being retried (cleanup_status is retrying). The work is finished and billing is settled; the TTL remains the final backstop. Do not treat this as a task failure.

Because starting, reconciling, and cleanup_failed exist, never write a client that branches on an exhaustive set of these strings. Branch on the run status, which is the durable contract, and read machine.status for diagnostics only.

Human takeover is deliberately impossible on this endpoint, and the executor never enters awaiting_human. When the model asks for a person, the runtime suppresses the request and tells the agent to carry on with a fresh screen. There is no retry budget and no challenge-specific terminal error: a verification screen, a CAPTCHA, or an email confirmation is treated as part of the task. max_steps, deadline_seconds, and your credit balance are the only things that stop a task. Anything you put in the task is the agent’s to use — if you supply a password or an inbox it can reach, fetching a confirmation code from that inbox is ordinary work, not an escalation. Coasty does not provide or integrate a third-party CAPTCHA solver, proxy/stealth evasion, or an access-control bypass, and the agent is explicitly prohibited from using those or from inventing a credential, one-time code, payment, or approval it was not given. succeeded means the completion verifier passed; clients should still check result.passed and the evidence required by their application.

Terminal notification and machine cleanup are independently durable. A webhook can report cleanup_status as terminating or retrying; the TTL remains the final backstop, and clients must not equate task completion with already-finished provider termination.

Managed execution charges normal completed Task Run steps plus actual machine runtime. BYOK makes LLM steps zero Coasty platform credits, but your model provider charges your key directly and ephemeral machine runtime remains billable. Omitted sizing fields remain omitted so current machine defaults apply cleanly.

API reference — Coasty Computer Use API | Coasty - AI Computer-Use Agent