Authentication
New Pixcode API keys start with `px_`. Older `ck_` keys remain accepted for compatibility, but new documentation and examples should use `px_`. Keys can carry least-privilege scopes such as `projects:read`, `tasks:write`, or `system:update`. The legacy `orchestration:read`/`orchestration:write` scope names are retained only for the maintained `/api/production-agent-loop/*` admin surface; the former `/api/orchestration/*` routes are retired.
curl http://localhost:3001/api/projects \
-H "Authorization: Bearer px_your_key_here"curl http://localhost:3001/api/projects \
-H "X-API-Key: px_your_key_here"
Browser EventSource/WebSocket clients should call POST /api/auth/stream-ticket and use the returned one-shot ?streamTicket=... value. Raw ?token= and ?apiKey= query credentials are disabled by default.
Run a one-shot agent task
`POST /api/nanoclaw/run` is the maintained non-interactive entry point for a multi-CLI agent run. The legacy `POST /api/agent` route remains available for compatibility with older CI integrations.
curl http://localhost:3001/api/nanoclaw/run \
-H "Authorization: Bearer px_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"agentType": "codex",
"projectId": "my-app",
"prompt": "Review the current diff and list release risks."
}'Task and production automation
NanoClaw exposes immediate runs, schedules, task lifecycle, channels, agents, conversations, and SSE events. The production agent loop is admin-only and covers review queues, CI repair plans, background jobs, workspace checkpoints, and desktop release policy.
POST /api/nanoclaw/run starts one multi-CLI task and returns structured status/log data.
POST /api/nanoclaw/tasks supports one-shot, interval, and cron schedules.
Pause, resume, update, cancel, or delete a task with the /api/nanoclaw/tasks/:id routes.
Use /api/production-agent-loop/* for admin review and CI automation.
The pre-1.55 /api/orchestration/* workflow family is retired. Use NanoClaw or the production agent loop for new integrations.
Common integration ideas
- Ask Codex or Claude Code to review a Git diff from a CI job before release.
- Trigger OpenCode or Gemini CLI from a custom internal dashboard.
- Build a Telegram command that starts a Pixcode agent run on an always-on server.
- Run multi-agent review on a branch before creating a tag or npm publish.
- Expose a safe internal tool that lists projects and starts approved workflows.
Full OpenAPI reference: openapi.yaml.