-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
Your Name edited this page Feb 4, 2026
·
3 revisions
Complete reference for the Luna Chat backend API. All requests except Authentication require a Bearer token.
Authorization: Bearer <access_token>POST /api/auth/login
-
Body:
{ "email": "...", "password": "..." } -
Response:
{ "accessToken": "...", "refreshToken": "...", "user": { ... } }
POST /api/chat/sessions
-
Body:
{ "mode": "assistant" | "companion" | "voice" }
POST /api/chat/sessions/:id/send
-
Body:
{ "message": "..." } -
Response (SSE): Includes
router_metadata(Nano/Pro/Tools).
WS /ws/voice
- Protocol: Binary (PCM Audio) or JSON.
-
Handshake: Requires JWT in
Authorizationheader or query string. - Features: Streaming STT (Whisper) and TTS (ElevenLabs/OpenAI).
GET /api/abilities/facts
-
Params:
category,limit,offset.
GET /api/graph/nodes
-
Params:
type,origin,minTrust.
GET /api/graph/edges
-
Params:
sourceNodeId,targetNodeId.
GET /api/autonomous/deliberations/live
- Response (SSE): Live feed of Council deliberations and actions.
POST /api/abilities/agents/execute
-
Body:
{ "agent": "coder" | "researcher", "task": "...", "useSanhedrin": true }
GET /api/trading/portfolio
- Response: Current balances across Binance and Crypto.com.
POST /api/trading/order
-
Body:
{ "symbol": "BTCUSDT", "side": "BUY", "type": "MARKET", "quantity": 0.001 }
POST /api/mcp/execute
-
Body:
{ "serverId": "...", "toolName": "...", "arguments": { ... } }
POST /api/triggers/telegram/link
-
Response:
{ "code": "123-456" }(Valid for 10 minutes).
GET /api/activity/stream
- Response (SSE): Real-time system activity logs (Tools used, API calls, Agent status).
GET /api/settings/metrics
- Response: CPU, Memory, Disk, and LLM usage statistics.