{"service": "jarvis_stt_manager", "version": "0.5.0", "auth": {"scheme": "bearer", "header": "Authorization", "format": "Bearer <token>", "required_when": "MGR_TOKEN is set on the manager process", "applies_to": "/api/* (the GET / HTML UI is not authenticated)"}, "base_url_default": "http://<laptop-ip>:8788", "endpoints": [{"method": "GET", "path": "/", "summary": "Single-file web UI (HTML, no CDN)", "auth": false, "request": {}, "response": "text/html"}, {"method": "GET", "path": "/api/status", "summary": "Manager + STT subprocess snapshot", "auth": true, "request": {}, "response": {"manager": {"uptime_s": "float (seconds since manager started)", "bind": "string (e.g. 0.0.0.0)", "port": "int", "auth_enabled": "bool", "stt_port": "int", "stt_config": "string (path)", "log_path": "string (path)"}, "stt": {"running": "bool", "pid": "int|null", "started_at": "float|null (unix epoch)", "stopped_at": "float|null", "exit_code": "int|null", "log_path": "string", "config_path": "string"}}}, {"method": "GET", "path": "/api/system", "summary": "Hostname, Python version, uptime, uname", "auth": true, "request": {}, "response": {"hostname": "string", "python": "string (path to interpreter)", "platform": "string (platform.platform())", "uname": "string (full uname -a output)", "uptime_s": "float|null (from /proc/uptime)"}}, {"method": "GET", "path": "/api/gpu", "summary": "Per-card AMD sysfs info (VRAM used / total)", "auth": true, "request": {}, "response": {"cards": [{"card": "string (e.g. card1)", "pci_device_id": "string (e.g. 0x73df)", "vram_used_bytes": "int", "vram_total_bytes": "int", "vram_used_gb": "float", "vram_total_gb": "float"}], "python": "string", "platform": "string", "ctranslate2_version": "string (optional)", "cuda_device_count": "int (optional)"}}, {"method": "POST", "path": "/api/stt/start", "summary": "Spawn the STT server subprocess (idempotent)", "auth": true, "request": {}, "response": {"ok": "bool", "pid": "int (if ok)", "error": "string ('already_running' if 409)"}, "errors": {"409": "STT server is already running"}}, {"method": "POST", "path": "/api/stt/stop", "summary": "SIGTERM the STT subprocess (SIGKILL after MGR_STOP_TIMEOUT_S)", "auth": true, "request": {"query": {"force": "bool (default false). If true, skip SIGTERM and SIGKILL immediately."}}, "response": {"ok": "bool", "pid": "int", "exit_code": "int", "forced": "bool", "already_exited": "bool (true if the proc had already exited)"}}, {"method": "POST", "path": "/api/stt/restart", "summary": "Stop + start the STT server", "auth": true, "request": {}, "response": {"ok": "bool", "pid": "int (if ok)", "error": "string (if stop failed)"}}, {"method": "GET", "path": "/api/stt/health", "summary": "Proxy to STT /healthz (200/502/503)", "auth": true, "request": {}, "response": {"200": "STT health JSON (model_loaded, gpu, queue_depth, ...)", "502": "STT subprocess is running but /healthz unreachable", "503": "STT subprocess is not running"}}, {"method": "GET", "path": "/api/stt/metrics", "summary": "Proxy to STT /metrics (Prometheus text)", "auth": true, "request": {}, "response": {"200": "text/plain Prometheus exposition", "502": "STT subprocess is running but /metrics unreachable", "503": "STT subprocess is not running"}}, {"method": "GET", "path": "/api/stt/log", "summary": "Last N lines of runtime/stt.log", "auth": true, "request": {"query": {"tail": "int (1..5000, default 200)"}}, "response": {"path": "string (resolved log file path)", "tail": "int (echoed back)", "lines": ["string (one per line)"]}}, {"method": "GET", "path": "/api/api-reference", "summary": "This document (machine-readable)", "auth": true, "request": {}, "response": "(self-documenting)"}], "manager": {"bind": "0.0.0.0", "port": 8788, "auth_enabled": false, "stt_port": 8787, "stt_config": "/home/aisan/Documents/laptop-stt-service/config.yaml", "log_path": "/home/aisan/Documents/laptop-stt-service/runtime/stt.log", "base_url": "http://0.0.0.0:8788"}}