Appearance
API Reference
FreshSource: BIBLE.md (API Routes section, server.mjs route count 704)
Ghost Engine exposes 704 HTTP routes on port 4700.
Breakdown
| Group | Count |
|---|---|
| Core routes (server.mjs) | 71 |
| Plugin routes (auto-registered) | 630 |
| Event routes (SSE) | 3 |
| Total | 704 |
Authentication
All endpoints require:
x-api-key: ghost-engine-keyConfigure via GHOST_ENGINE_API_KEY env var.
Base URL
http://localhost:4700Discover all routes
bash
curl -s http://localhost:4700/routesReturns the full route list with method, path, and source plugin.
Most-used endpoints
| Method | Endpoint | What it does |
|---|---|---|
| GET | /health | Engine status |
| GET | /routes | All 704 routes |
| POST | /browser/launch | Launch browser with fingerprint |
| GET | /browser | List active browsers |
| POST | /ctr/run | Single CTR session |
| POST | /ctr/batch | Batch CTR sessions |
| POST | /schedules | Create scheduled job |
| GET | /schedules | List all schedules |
| POST | /ranks/check | Check keyword ranking |
| GET | /ranks/report | Historical rank trend |
| POST | /cascade/run | Deploy article across 9 platforms |
| GET | /accounts/army-status | Account health overview |
Sections
- Browser: launch, navigate, click, type, scroll, vision
- CTR: run, batch, campaigns
- Ranks: check, batch, report, history
- Schedules: CRUD plus autopilot
- Cascade: run, plan, status
- Accounts: list, lock, mark, phase, import
- Health: engine health checks
Response format
All routes return JSON with this shape:
json
{
"success": true,
"data": { ... },
"error": null
}On error:
json
{
"success": false,
"data": null,
"error": {
"code": "ROUTE_ERROR",
"message": "Description",
"details": { ... }
}
}SSE event stream
Real-time events at:
bash
curl http://localhost:4700/events/streamEmits browser launches, CTR fires, errors, phase advances. Replaces 10-second polling on the dashboard.