Every endpoint, documented.
Every endpoint exposed by the orchestrator backend, gateway, and voice agent.
Orchestrator API
http://localhost:8400/api
https://api.frontal.codes/api
Model Gateway
http://localhost:8400/gw/v1
Voice Agent
http://localhost:8500
Authentication
| Context | Method | Example |
|---|---|---|
| Self-hosted (localhost) | No auth | Trust loopback |
| Cloud API | Bearer | Authorization: Bearer <token> |
| Gateway (project-scoped) | Header | x-frontal-project: <project-id> |
Health
/api/health
Backend health check
{"status": "ok", "version": "0.1.0"}
/api/reconcile-report
Returns last reconciliation report
Workspaces & Projects
/api/workspaces
List workspaces
/api/workspaces
Create workspace
| Param | Type | Description |
|---|---|---|
| name | string | Workspace name |
| description | string | Optional description |
/api/projects
?workspace_id=
List projects
/api/projects
Create project
| Param | Type | Description |
|---|---|---|
| name | string | Project name |
| workspace_id | string | Parent workspace ID |
| root_path | string | Absolute path to project root |
| trunk_branch | string | Main branch (e.g. main) |
| toolchain | string | Language/framework (python, node, rust, etc.) |
/api/projects/{id}
Get project details
/api/projects/{id}
Delete project (drops DB, preserves event log)
/api/projects/{id}/events
Stream project events (SSE)
Intake & Planning
/api/projects/{id}/intake
Submit goal for a project
| Param | Type | Description |
|---|---|---|
| goal | string | Natural language goal description |
| locale | string | User locale (e.g. tr, en) |
/api/intakes/{id}/answers
Submit clarifying answers
| Param | Type | Description |
|---|---|---|
| answers | array | Array of {question_id, answer} objects |
/api/intakes/{id}/plan
Generate plan from completed intake
/api/plans/{id}
Get plan with task cards
/api/plans/{id}/decision
Approve or reject plan
| Param | Type | Description |
|---|---|---|
| decision | string | "approve" or "reject" |
/api/plans/{id}/tasks/{tid}
Edit task card before approval
/api/plans/{id}/tasks/{tid}
Remove task card
Sessions & Tasks
/api/sessions
Start session for task
| Param | Type | Description |
|---|---|---|
| task_id | string | Task to execute |
| engine | string | Optional engine override |
/api/sessions
List active sessions
/api/sessions/{id}/prompt
Send prompt to running session
/api/sessions/{id}/abort
Abort session
/api/sessions/{id}
End session cleanly
/api/sessions/{id}/events
Stream session events (SSE)
/api/sessions/{id}/retry-from-point
Retry from snapshot
/api/sessions/{id}/rollback-from-point
Rollback to snapshot
/api/projects/{id}/tasks
Create task manually
/api/tasks/{id}
Get task status
/api/tasks/{id}
Update task (e.g., move column)
/api/tasks/{id}/run
Start task execution
/api/tasks/{id}/trash
Move to trash + cleanup worktree
/api/tasks/{id}/rollback
Rollback a merged task
/api/tasks/{id}/diff
Get worktree diff
Files & Git
/api/projects/{id}/files
?path=
List files
/api/projects/{id}/files/content
?path=
Read file content
/api/projects/{id}/files/content
Write file content
/api/projects/{id}/files/diff
Get uncommitted diff
/api/projects/{id}/git
Git status
/api/projects/{id}/git/stage
Stage files
/api/projects/{id}/git/unstage
Unstage files
/api/projects/{id}/git/commit
Commit changes
| Param | Type | Description |
|---|---|---|
| message | string | Commit message |
Memory & Context
/api/projects/{id}/memory/rebuild
Rebuild ArangoDB from event log
/api/projects/{id}/memory/context-pack
Generate context pack for task
/api/projects/{id}/memory/search
?q=
BM25 search
/api/projects/{id}/memory/contracts
Register Contract node
Discovery & Vault
/api/discovery/search
?intent=
Search MCP servers
/api/discovery/provision
Provision MCP server into sandbox
/api/attention
List Needs-Attention items
/api/vault/secrets
Store secret
| Param | Type | Description |
|---|---|---|
| key | string | Secret key name |
| value | string | Secret value (encrypted at rest) |
/api/vault/secrets
List secret keys (values never returned)
Stats
/api/stats/presence
Heartbeat
/api/stats/overview
Project stats overview
/api/stats/daily
?days=30
Per-day stats
/api/stats/agents
Per-agent stats
/api/stats/today
Today's activity
Gateway OpenAI-compatible · port 8400
/gw/v1/chat/completions
Chat completion (OpenAI format)
| Note | Value |
|---|---|
| Model parameter | frontal/heavy | frontal/standard | frontal/utility |
| Project header | x-frontal-project: <id> |
/gw/v1/audio/transcriptions
Whisper transcription (multipart/form-data)
/gw/v1/models
List available models
/api/gateway/health
Gateway health + provider circuit states
/api/gateway/metering/summary
Token usage summary
/api/gateway/metering/by-tier
Usage broken down by tier
/api/gateway/metering/by-agent
Usage broken down by agent
Voice Agent port 8500
/health
Voice service health
/transcribe
Audio transcription
/chat
WebSocket voice chat loop (STT → LLM → TTS)
/sessions
List voice sessions
Example Request
Create a new project — the most common starting point:
curl -X POST http://localhost:8400/api/projects \
-H "Content-Type: application/json" \
-d '{
"name": "my-backend",
"workspace_id": "ws_default",
"root_path": "/code/my-backend",
"trunk_branch": "main",
"toolchain": "python"
}'
Full request/response schemas are available in the OpenAPI spec at
http://localhost:8400/docs
(self-hosted) when the backend is running.