Skip to content

API Reference

All endpoints are prefixed with /api. Except for /api/login and /health, every request must carry an Authorization: Bearer <token> header. The /ws WebSocket also requires a token — passed as a ?token= query parameter on the handshake, since browsers cannot set headers on a WebSocket connection.

Permissions: write operations require the editor role or above; user management requires admin; viewer may only read and run.

Authentication

MethodPathDescription
POST/api/loginLog in (username/password, or static token)
POST/api/logoutRevoke the current session
GET/api/meCurrent user and role

Prompt

MethodPathDescription
GET/api/promptsList / search (q, env, category, tag, workspace)
POST/api/promptsCreate
GET / PUT / DELETE/api/prompts/:idGet / update / delete
GET/api/prompts/:id/versionsVersion history
POST/api/prompts/publishPublish (snapshot current content as a version)
POST/api/prompts/rollbackRoll back to a version
GET / PUT / DELETE/api/prompts/:id/rolloutGray-release (A/B) config
GET/api/sdk/prompts/:key?env=SDK runtime fetch by key

Playground / Agent / Workflow

MethodPathDescription
POST/api/playground/runRender a prompt and call a model provider
GET/api/playground/providersList available model providers
GET / POST / PUT / DELETE/api/agents /api/agents/:idAgent CRUD
POST/api/agents/:id/runRun an agent
GET / POST / PUT / DELETE/api/workflows /api/workflows/:idWorkflow CRUD
POST/api/workflows/:id/runRun a workflow, returning a per-step trace

Governance & Observability

MethodPathDescription
GET/api/auditAudit log (paged: ?limit= ?offset=)
GET/api/runsRun log (paged: ?limit= ?offset=)
GET/api/runs/statsAggregated run metrics
GET/api/clientsLive hot-reload connections (SDKs & browser)
GET / POST / PUT / DELETE/api/users /api/users/:idUser management (admin only)
GET / POST / DELETE/api/workspaces /api/workspaces/:idTeam workspaces

Realtime

MethodPathDescription
GET/wsWebSocket hot-reload event stream (auth via ?token=)

Open-source runtime platform for AI prompts, agents, and workflows.