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- 01Taskone observable goal
- 02Provisionephemeral desktop + TTL
- 03Executeobserve, act, verify
- 04Finishpass/fail + cleanup
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.
{
"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"]) # queuedtask 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.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.
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.
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.