Skip to content

API Overview ​

Albiex Synth City exposes a RESTful API under /api/v1/. The frontend communicates with the backend entirely through this API.

Base URL ​

http://localhost:8000/api/v1

In development, the Vite dev server proxies /api requests from port 5173 to the backend at port 8000.

Authentication ​

Authentication is endpoint-specific. The five observational Factory GET routes have no operator or session credential dependency. Protected recovery, policy and mutation routes require their documented operator or authenticated Mail-session principal, with state and actor checks on the server. An action eligibility observation does not authenticate its viewer.

Request/Response Format ​

All request and response bodies use JSON. Set Content-Type: application/json for requests with bodies.

UTC timestamps ​

UTC means Coordinated Universal Time. Response datetimes identify UTC with Z or +00:00. A naive datetime has no timezone. JSON serialization treats a naive server datetime as UTC. Serialization converts an aware datetime to the same instant in UTC. Stored values and Python model values stay unchanged.

Declared legacy timestamp strings also identify UTC in JSON. User text and other strings stay unchanged. Backup archive manifests keep their storage serializer. The API formats a copy of a manifest. Stored progress snapshots also keep their serializer. The progress API formats a copied observation.

Use the response timestamp unchanged for confirmation. AgentTeamLeaderUpdateRequest.expected_updated_at and GithubWorkspaceForceReleaseRequest.expected_leased_at decode aware input into the existing naive UTC form. Naive input stays unchanged. Database predicates, lease token checks, and authority rules stay unchanged.

Common Query Parameters ​

ParameterTypeDescription
project_pathstringOptional. Project directory path for project-scoped resources.
scopestringuser, project, plugin, or managed — depends on the endpoint.

Error Handling ​

StatusMeaning
200Success
201Resource created
204Deleted (no content)
400Validation error
404Resource not found
500Server error

Error responses return JSON with a detail field:

json
{
  "detail": "Resource not found"
}

Provider-aware endpoints may also map failures into normalized states such as unsupported capability, missing binary, unavailable CLI command, CLI failure, parse failure, or validation failure. Sensitive CLI stdout/stderr and raw provider payloads should be redacted or omitted before they are returned.

Factory read errors ​

Factory reads return detail: {code, message} for invalid filters/cursors (422), absent selected resources (404) and projection failures (500). Preserve both fields. Existing protected routes retain their string or structured detail codes and 401/403/409 results; their endpoint-specific contracts still apply. See Factory API for codes and examples.

API Documentation ​

FastAPI generates interactive API docs at:

  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc

Route Modules ​

ModulePrefixDescription
Factory/factoryObservational work counts/details, watched-scope intake, poll and overlap reads, delivery metrics, protected audit events, protected review declarations and the protected setup preflight
Config/config and /codex-configConfiguration management
Providers/providersProvider metadata, status, diagnostics, and inventory
MCP Servers/mcpMCP server management
Commands/commandsSlash commands
Plugins/pluginsPlugin management
Hooks/hooksEvent hooks
Permissions/permissionsAccess control rules
Agents/agentsAgents and skills
Sessions/sessionsSession transcripts
Context/contextContext window analysis
Plans/plansImplementation plans
Output Styles/output-stylesResponse formatting
Status Line/statuslineTerminal status bar
Agent Bridge/agent-bridgeProvider-aware live terminal monitoring
Agent Mail/agent-mail and /external/agent-mailLocal agent mailbox coordination and external same-machine orchestration
Agent Teams/agent-teamsSaved agent rosters, launch planning, and team slot context
CC Bridge/cc-bridgeLegacy Claude Code terminal monitoring route
Usage/usageToken usage tracking
Memory/memoryMemory hierarchy
Backup/backupConfiguration backups

Released under the MIT License.