Developers
API reference
Zero's local API runs at http://localhost:7878. All requests are unauthenticated on localhost. All endpoints return JSON. Use standard HTTP clients.
Authentication
Zero's local API at localhost:7878 is designed for local machine use only. It is not exposed to the internet by default. No API key is required for local access — the server only accepts connections from localhost.
- Scripts on the same machine: no authentication required. Use the API directly.
- Remote access: not supported in current releases. API key support is planned for secure remote access via the console.
API key authentication is in development. Current releases do not require an API key for localhost access.
Recommended integration flow. The primary operator path is Work-centered, not state-transition-centered:
- Create a Work item —
POST /cases - Create a session —
POST /cases/:id/sessions - Poll or stream until
plan_ready—GET /cases/:id/sessions/:sid/stream - Approve the plan —
POST /cases/:id/sessions/:sid/approve(Work mode begins) - Stream execution events until complete
- Attach proof —
POST /cases/:id/proof - Verify proof —
PUT /cases/:id/proof/:pid/verify
PUT /cases/:id/state are a compatibility path. Prefer session-based flow.Cases
| Method | Path | Description |
|---|---|---|
GET | /cases | List all Work items. Supports ?state=RESOLVED&outcome=ConfirmedCodeBug. |
POST | /cases | Create Work item. Body: { "title": "string", "type": "bug" }. |
GET | /cases/:id | Get Work item by ID. |
PUT | /cases/:id | Update title or description. Body: { "title": "string" }. |
DELETE | /cases/:id | Delete Work item and all memory (irreversible). |
PUT | /cases/:id/state | Transition state directly. Compatibility path — prefer session-based flow for Work execution. Body: { "state": "IMPLEMENTING" }. |
curl -s http://localhost:7878/cases?state=RESOLVEDSessions
| Method | Path | Description |
|---|---|---|
GET | /cases/:id/sessions | List all sessions for a Work item. |
POST | /cases/:id/sessions | Create a new session. Body: { "type": "implementing" }. |
GET | /cases/:id/sessions/:sid | Get a single session by ID. |
POST | /cases/:id/sessions/:sid/approve | Approve session plan. Unlocks Work mode — agent begins executing the approved plan. |
GET | /cases/:id/sessions/:sid/stream | SSE stream of execution events. |
# Stream session execution events
curl -N http://localhost:7878/cases/:id/sessions/:sid/streamMemory
| Method | Path | Description |
|---|---|---|
GET | /cases/:id/memory/:filename | Read a memory file (markdown). Returns raw text. |
PUT | /cases/:id/memory/:filename | Write a memory file. Body: raw markdown text. |
Proof
| Method | Path | Description |
|---|---|---|
GET | /cases/:id/proof | List all proof artifacts for a Work item. |
POST | /cases/:id/proof | Attach proof. Body: { "type": "test-log", "content": "..." }. |
PUT | /cases/:id/proof/:pid/verify | Mark a proof artifact as verified. |
POST | /cases/:id/proof/checklist | Add a proof checklist item. Body: { "description": "...", "type": "test-log", "required": true }. |
# Attach test log proof
curl -s -X POST http://localhost:7878/cases/:id/proof \
-H "Content-Type: application/json" \
-d '{"type": "test-log", "content": "test result: 47 passed, 0 failed"}'Providers
Dev-only boundary. Provider transport via API is in development. Current releases use the local CLI-based runner. The endpoints below reflect the planned API; they are not available in production builds.
| Method | Path | Description |
|---|---|---|
GET | /providers | List available providers and availability status. Dev builds only. |
POST | /providers/:id/run | Run a provider with a prompt. Body: { "prompt": "string" }. Dev builds only. |
System
| Method | Path | Description |
|---|---|---|
GET | /health | Health check. Returns { "status": "ok" }. |
GET | /version | Returns current Zero version and build info. |
Error codes
422— Proof gate blocked (missing verified proof), or requested operation not valid for current run state.404— Work item or resource not found.400— Bad request (missing required fields).409— Conflict — e.g. Work mode already active for this session.
Related: Case model, Session model.