Mycelos logo mycelos

API Reference

The Gateway exposes a RESTful HTTP API on port 9100. All endpoints return JSON unless noted otherwise.

Chat

MethodEndpointDescription
POST/api/chatSend a message and receive a streamed response via Server-Sent Events (SSE). Body: { "message": "...", "session_id": "..." }

Sessions

MethodEndpointDescription
GET/api/sessionsList all chat sessions.
GET/api/sessions/{id}/messagesRetrieve all messages for a specific session.

Knowledge

MethodEndpointDescription
GET/api/knowledge/notesList all notes in the knowledge base.
POST/api/knowledge/searchFull-text search across notes. Body: { "query": "..." }

Connectors

MethodEndpointDescription
GET/api/connectorsList all configured MCP connectors.
POST/api/connectorsAdd a new MCP connector. Body: { "name": "...", "command": "...", "secrets": [...] }
DELETE/api/connectors/{name}Remove a connector by name.

Agents

MethodEndpointDescription
GET/api/agentsList all registered agents.
GET/api/agents/{id}Get details for a specific agent.

Models

MethodEndpointDescription
GET/api/modelsList all available LLM models from configured providers.

Cost

MethodEndpointDescription
GET/api/cost?period=today|week|monthGet token usage and cost breakdown for the specified period.

Config

MethodEndpointDescription
GET/api/configGet the current active configuration.
GET/api/config/generationsList all config generations with timestamps.
POST/api/config/rollbackRoll back to a specific config generation. Body: { "generation": N }

Health

MethodEndpointDescription
GET/api/healthHealth check endpoint. Returns { "status": "ok" } when the Gateway is running.