Ghost.AI

API reference

13 endpoints, all JSON

Create projects, watch tasks and git logs, inspect agents and export results. Copy any snippet or press Try it to call the endpoint right from this page.

Before you start

Conventions

Format

Requests and responses are JSON. Inputs are validated with Zod; invalid input returns 400 with an error list.

Auth

The hosted app uses Clerk sessions. In demo mode all routes are open and backed by mock data.

Static demo

The GitHub Pages build has no API, so Try it shows a friendly message there. Run locally for live responses.

error shape
{ "error": "Validation failed", "issues": [{ "path": ["name"], "message": "Too short" }] }

Reference

Endpoints

GET/api/projects

List all projects.

curl
curl "https://YOUR_HOST/api/projects"
example response
[{ "id": "p_1", "name": "Acme CRM", "status": "building", "stack": ["Next.js","Clerk"], "createdAt": "2026-10-01T09:00:00Z" }]
POST/api/projects

Create a project. Body is validated with Zod (name 2-60, brief 10-2000, stack 1-20).

curl
curl -X POST "https://YOUR_HOST/api/projects" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme CRM","brief":"A CRM for small agencies with pipelines","stack":["Next.js","Drizzle"]}'
example response
{ "id": "p_2", "name": "Acme CRM", "status": "planning", "createdAt": "2026-11-01T10:00:00Z" }

Try it is available for GET endpoints only.

GET/api/projects/:id

Project detail with tasks, git log and agent states.

curl
curl "https://YOUR_HOST/api/projects/demo"
example response
{ "id": "p_1", "name": "Acme CRM", "tasks": [...], "gitlog": [...], "agents": [...] }
GET/api/projects/:id/tasks

Tasks for a project.

curl
curl "https://YOUR_HOST/api/projects/demo/tasks"
example response
[{ "id": "t_1", "title": "Create schema", "module": "Data", "agent": "Backend", "status": "running", "progress": 60 }]
GET/api/projects/:id/gitlog

Commit stream written by agents.

curl
curl "https://YOUR_HOST/api/projects/demo/gitlog"
example response
[{ "hash": "a1f3c9d", "message": "feat(api): projects routes", "agent": "Backend", "files": 4 }]
GET/api/projects/:id/export?format=json|md

Export a project as JSON or Markdown.

curl
curl "https://YOUR_HOST/api/projects/demo/export?format=json"
example response
{ "project": {...}, "tasks": [...], "gitlog": [...] }
POST/api/projects/:id/run

Start or advance the agent run for a project.

curl
curl -X POST "https://YOUR_HOST/api/projects/:id/run" \
  -H "Content-Type: application/json" \
  -d '{}'
example response
{ "ok": true, "status": "building" }

Try it is available for GET endpoints only.

GET/api/agents

All eight agents with their live status.

curl
curl "https://YOUR_HOST/api/agents"
example response
[{ "name": "Architect", "status": "done", "currentTask": null }]
GET/api/agents/:name

One agent: codename, tools, sub-agents and state.

curl
curl "https://YOUR_HOST/api/agents/Architect"
example response
{ "name": "Architect", "codename": "ATLAS", "tools": ["Mermaid","ADR","OpenAPI"] }
GET/api/stats

Counts of projects, tasks, commits and agents.

curl
curl "https://YOUR_HOST/api/stats"
example response
{ "projects": 3, "tasks": 24, "commits": 57, "agentsWorking": 2 }
GET/api/stack

Supported stack options.

curl
curl "https://YOUR_HOST/api/stack"
example response
{ "frontend": ["Next.js"], "database": ["libSQL"], "auth": ["Clerk"] }
GET/api/openapi

OpenAPI 3 document describing this API.

curl
curl "https://YOUR_HOST/api/openapi"
example response
{ "openapi": "3.0.3", "info": { "title": "Ghost AI" }, "paths": {...} }
GET/api/health

Liveness probe.

curl
curl "https://YOUR_HOST/api/health"
example response
{ "ok": true }

Next

Related

New here? Start with the Quick start, learn the agents, or read security practices.

See the crew work on your own brief

Open the live dashboard, describe a SaaS idea and watch eight agents build it.