The Cyberun API is the HTTP surface of the platform. Every client — Cloud, Studio, the CLI, partner integrations, the MCP server — calls these endpoints. The endpoint pages under Endpoints are auto-generated from the platform’s OpenAPI spec — only the public, user-facing surface.Documentation Index
Fetch the complete documentation index at: https://docs.cyberun.cloud/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
Authentication
Three credential families:| Type | Header | Team scoping |
|---|---|---|
| User JWT | Authorization: Bearer eyJ... | Send X-Team-ID: team_01HX... on team-scoped endpoints — a user may belong to several teams. |
Integration (sk-) | Authorization: Bearer sk-... | Team is bound to the credential at issue time. Do not send X-Team-ID — it’s ignored. |
Device (dk-) | Authorization: Bearer dk-... | Team is bound to the credential. Do not send X-Team-ID. |
X-Team-ID is only for JWTs. Sending it with a
sk- or dk- credential has no effect — the team is read from the
credential row.
See Generate an API key for the sk-
issuance flow; Credentials for the
full family reference.
Surfaces
The endpoint listing is grouped by OpenAPI tag (Auth, Team, Workflow, Task, Webhook, Container, etc.). Three logical surfaces span those tags:- Management — list and modify team resources. Requires either a
user JWT (with
X-Team-ID) or a device credentialdk-. Most of the endpoints under tags like Team, Member, Workflow, Webhook fall here. - Runtime (
/r/...) — submit and observe tasks. Accepts JWT,sk-, ordk-. The path you’ll hit most from scripts and CI. - MCP (
/api/v1/mcp) — Streamable HTTP MCP endpoint that wraps runtime operations as MCP tools. Acceptssk-only. Full reference: Cloud MCP.
Pagination
List endpoints takecurrent_page (default 1) and per_page
(default 20, max 100) query parameters. Responses include a
page_meta block with current_page, per_page, and
total_count.
Task lifecycle
Every task moves through these states:| State | Meaning |
|---|---|
pending | Accepted by the platform. Scheduler hasn’t picked it up yet. |
waiting | Scheduler has it but no eligible agent is available. |
provisioning | An agent is being prepared to take the task. |
queued | An agent has been chosen. Waiting for the agent to acknowledge. |
running | The agent is executing the workflow. |
completed | Finished cleanly. Outputs available via GET /r/tasks/{taskId}/result. |
failed | Errored, timed out, or the agent disconnected. |
cancelled | Cancelled before reaching a terminal state. |
completed, failed, and cancelled are terminal — the task won’t
move past them. See Stream task events (SSE)
for following state transitions in real time.
Status codes
Submitting a task returns202 Accepted with the task ID — the work
runs asynchronously, so poll or stream for the outcome. Other reads
and writes return 200 OK on success.
Errors are JSON with a single error_message field:
| Code | When you’ll see it |
|---|---|
400 | Bad request — malformed JSON, missing or invalid parameter values. |
401 | Credential is invalid, revoked, or expired. Don’t retry. |
403 | Credential is valid but lacks permission (or wrong team for the resource). |
404 | Resource not found in this team. |
409 | Conflict — e.g. slug already taken, resource in a state that disallows the operation. |
429 | Rate-limited. Back off and retry. |
500 | Unexpected server error. Safe to retry idempotent requests. |
502 / 503 | Container service gateway errors (only on /r/containers/* and /r/invoke/*). |
What to read next
Quickstart
Submit a task, stream events, fetch the output — three calls,
three languages.
Generate an API key
Issue an
sk- credential and call your first endpoint.Stream task events (SSE)
Event-type reference, fields, and polling fallback.
Upload input files
Three-step presigned upload flow for workflows that take files.
Call a container service
Reach long-running services hosted on your team’s agents.
Cloud MCP
Streamable HTTP endpoint with 15 tools that wrap the
runtime API.
Use the CLI
These endpoints are wrapped by the
cyberun CLI — drive the
runtime API from your shell instead of raw HTTP.