All endpoints require authentication via Authorization: Bearer <token> header.
GET /api/backends
Response:
[
{"id": "opencode", "name": "OpenCode"},
{"id": "claudecode", "name": "Claude Code"},
{"id": "codex", "name": "Codex"},
{"id": "antigravity", "name": "Antigravity CLI"},
{"id": "grok", "name": "Grok Build"}
]GET /api/backends/:id
Response:
{"id": "opencode", "name": "OpenCode"}GET /api/backends/:id/agents
Response:
[{"id": "build", "name": "build"}, {"id": "plan", "name": "plan"}]GET /api/backends/:id/config
Response:
{
"id": "opencode",
"name": "OpenCode",
"enabled": true,
"settings": {
"base_url": "http://127.0.0.1:4096",
"default_agent": "build",
"permissive": true
}
}For claudecode, settings includes api_key_configured and optional fields
like default_model. Grok and Antigravity settings include an optional cli_path
to select their native CLI binary. Antigravity uses this override for both model
discovery and mission execution; the path must exist in the target execution
environment.
PUT /api/backends/:id/config
Body:
{
"enabled": true,
"settings": {
"base_url": "http://127.0.0.1:4096",
"default_agent": "build",
"permissive": true
}
}Claude Code accepts api_key in settings to store it securely in the secrets
vault. Grok and Antigravity accept cli_path to override the CLI binary path
(for example, {"cli_path": "/opt/antigravity/bin/agy"} for Antigravity).
Response:
{
"ok": true,
"message": "Backend configuration updated."
}