Overview
The Komos public API lets you launch saved browser tasks, observe their progress, stream execution logs, and cancel them programmatically. Each run executes asynchronously—enqueue a task, poll for status or subscribe via webhooks, and consume the outputs once the run reaches a terminal state.Base URLs
- Production:
https://api.komos.ai
/public/v1.
When previewing the docs locally, point the API tester to your tunnel (https://api-komos.ngrok.app) so browser requests reach your development stack.
Endpoints
POST /public/v1/tasks/{taskId}/runs— queue an asynchronous run for a saved task (idempotent withclientRequestId).GET /public/v1/tasks/{taskId}/runs— list the 50 most recent runs for a task, newest first.GET /public/v1/task-runs/{runId}— fetch the latest status for a single run.GET /public/v1/task-runs/{runId}/logs— retrieve ordered log entries captured while the run executed.POST /public/v1/task-runs/{runId}/cancel— request cancellation for a pending or running task.
Authentication
Authenticate using an organization-scoped API key issued from the Komos dashboard. Send the secret in theAuthorization header using the Bearer scheme:
401 Unauthorized.
Idempotency
POST /public/v1/tasks/{taskId}/runs supports idempotent retries via the optional clientRequestId field.
Repeat the call with the same value to receive 200 OK and the previously created run instead of
launching a duplicate.
Run resource
Successful responses return a run object shaped like the example below.statusvalues:PENDING,RUNNING,COMPLETED,FAILED,CANCELLED.triggerTypeis one ofmanual,schedule, orapi.logsUrlresolves toGET /public/v1/task-runs/{runId}/logswhenbackend_public_urlis configured for your organization.
Error handling
Errors follow the standard FastAPI structure:- Validation issues return
400 Bad Requestwith{"detail": "invalid_task_id"}. - Missing resources return
404 Not Found, e.g.,{"detail": "run_not_found"}. - Usage limits return
402 Payment Requiredwith additional details. - Transient queue issues respond with
503 Service Unavailable; retry with exponential backoff.
Webhooks
Need near-real-time notifications? Configure outbound webhooks from the dashboard to receive run status and log events. Delivery cadence, headers, and payload schemas are detailed inapi-reference/webhooks/overview.
Refer to the endpoint pages for full schemas and examples.