Skip to content

REST API

All endpoints are prefixed with /api/ unless noted otherwise. Authenticated endpoints require a session cookie or token.

POST /api/auth/login
{ "password": "your-password" }

Returns a Set-Cookie header with the session token.

POST /api/auth/logout

Destroys the current session.

GET /api/health

Public endpoint. Returns 200 OK when the server is running.

MethodPathDescription
GET/api/conversationsList all conversations
POST/api/conversationsCreate a conversation
GET/api/conversations/:idGet conversation with messages
{
"title": "Project planning",
"model": "balanced",
"systemPrompt": "You are a project manager"
}

All fields are optional.

POST /api/conversations/:id/messages
{
"content": "What files are in the current directory?",
"model": "fast"
}

The model field is optional and overrides the conversation default.

MethodPathDescription
GET/api/settingsGet all settings
PUT/api/settingsUpdate settings

defaultModel, onboardingComplete, anthropicApiKey, openaiApiKey, googleAiApiKey, ollamaHost, systemPrompt, budget, theme, llm.defaultProvider, llm.defaultModel, app.port, app.host

MethodPathDescription
GET/api/settings/budgetGet budget limits
PUT/api/settings/budgetSet budget
{
"daily": 5.00,
"monthly": 100.00,
"alertThresholds": [0.5, 0.8, 0.95]
}
MethodPathDescription
GET/api/skillsList all skills
POST/api/skills/:id/toggleToggle skill on/off
MethodPathDescription
GET/api/channelsList all channels
PUT/api/channels/:idUpdate channel config
MethodPathDescription
GET/api/channel-pluginsList installed plugins
POST/api/channel-plugins/installInstall plugin
DELETE/api/channel-plugins/:idRemove plugin
{ "packageName": "@openmotoko/channel-rocketchat" }
GET /api/activity?limit=20&offset=0&channel=telegram&type=tool:called
ParameterDescription
limitItems per page (default 20)
offsetPagination offset
channelFilter by channel
skillIdFilter by skill
typeFilter by event type
MethodPathDescription
GET/api/costs/todayToday’s cost breakdown
GET/api/costs/history?days=30Historical costs
GET/api/costs/breakdown?period=weekProvider/model breakdown
MethodPathDescription
GET/api/scheduler/tasks?limit=20&offset=0List tasks
POST/api/scheduler/tasksCreate task
PUT/api/scheduler/tasks/:idUpdate task
DELETE/api/scheduler/tasks/:idDelete task
POST/api/scheduler/tasks/:id/toggleToggle task
POST/api/scheduler/tasks/:id/runRun task manually
GET/api/scheduler/tasks/:id/runsTask run history
{
"name": "Daily backup",
"description": "Back up the database",
"cron": "0 2 * * *",
"handler": "backup",
"payload": {},
"maxRetries": 3
}
MethodPathDescription
GET/api/artifacts?conversationId=...List artifacts
GET/api/artifacts/:idGet artifact
POST/api/artifactsCreate artifact
PATCH/api/artifacts/:idUpdate artifact
DELETE/api/artifacts/:idDelete artifact
GET/api/artifacts/:id/versionsList versions
GET/api/artifacts/:id/versions/:versionGet version
MethodPathDescription
GET/api/agentsList all agents
GET/api/agents/:idGet agent
DELETE/api/agents/:idKill running agent
GET /api/models

Returns all available LLM providers and their models.

MethodPathDescription
GET/api/webhooksList webhooks
POST/api/webhooksCreate webhook
DELETE/api/webhooks/:idDelete webhook
POST/api/webhooks/:id/toggleToggle webhook
POST/api/webhooks/:id/triggerTrigger webhook
POST/api/webhooks/gmailGmail Pub/Sub push

Trigger requests require the x-webhook-secret header.

MethodPathDescription
GET/api/registry/search?q=...&tags=...&verified=trueSearch skills
GET/api/registry/entriesList all entries
POST/api/registry/installInstall skill
DELETE/api/registry/uninstall/:idUninstall skill
POST/api/registry/refreshRefresh cache
GET/api/registry/:idSkill detail
POST/api/registry/rateRate a skill
{
"skillId": "skill_abc",
"userId": "user_123",
"stars": 5,
"comment": "Works great"
}
MethodPathDescription
GET/api/tailscale/statusTailscale + serve status
GET/api/tailscale/nodesList tailnet peers
POST/api/tailscale/serve/startStart Tailscale Serve
POST/api/tailscale/serve/stopStop Tailscale Serve

All errors follow this structure:

{
"error": "Human-readable message",
"code": "ERROR_CODE",
"details": {}
}