2:I[7012,["4765","static/chunks/4765-f5afdf8061f456f3.js","9856","static/chunks/9856-3b185291364d9bef.js","6687","static/chunks/app/docs/%5B...slug%5D/page-e07536548216bee4.js"],"MarkdownRenderer"] 4:I[9856,["4765","static/chunks/4765-f5afdf8061f456f3.js","9856","static/chunks/9856-3b185291364d9bef.js","6687","static/chunks/app/docs/%5B...slug%5D/page-e07536548216bee4.js"],""] 5:I[4126,[],""] 7:I[9630,[],""] 8:I[4278,["9856","static/chunks/9856-3b185291364d9bef.js","8172","static/chunks/8172-b3a2d6fe4ae10d40.js","3185","static/chunks/app/layout-2814fa5d15b84fe4.js"],"HeadingProvider"] 9:I[1476,["9856","static/chunks/9856-3b185291364d9bef.js","8172","static/chunks/8172-b3a2d6fe4ae10d40.js","3185","static/chunks/app/layout-2814fa5d15b84fe4.js"],"Header"] a:I[3167,["9856","static/chunks/9856-3b185291364d9bef.js","8172","static/chunks/8172-b3a2d6fe4ae10d40.js","3185","static/chunks/app/layout-2814fa5d15b84fe4.js"],"Sidebar"] b:I[7409,["9856","static/chunks/9856-3b185291364d9bef.js","8172","static/chunks/8172-b3a2d6fe4ae10d40.js","3185","static/chunks/app/layout-2814fa5d15b84fe4.js"],"PageFrame"] 3:T18f2, # API Reference **Last Updated:** 2025-12-02 The VoiceAssist API provides comprehensive REST endpoints for building medical AI assistant applications. ## Documentation - **[Complete REST API Reference](api-reference/rest-api.md)** - Full endpoint documentation with examples - **OpenAPI/Swagger UI** - Interactive docs at `http://localhost:8000/docs` - **ReDoc** - Alternative docs at `http://localhost:8000/redoc` ## Quick Reference ### Base URLs - **Production:** `https://assist.asimo.io` - **Development:** `http://localhost:8000` ### Authentication All authenticated endpoints require a Bearer token: ``` Authorization: Bearer ``` ### Core Endpoint Groups | Group | Prefix | Description | Module | | --------------- | -------------------------- | ---------------------------------- | ------------------------ | | Authentication | `/api/auth` | Login, register, token management | `auth.py` | | OAuth | `/api/auth/oauth` | OAuth2 provider integration | `auth_oauth.py` | | Users | `/api/users` | User profile and admin operations | `users.py` | | Conversations | `/conversations` | Chat sessions and branching | `conversations.py` | | Folders | `/api/folders` | Conversation organization | `folders.py` | | Attachments | `/api/attachments` | File attachments | `attachments.py` | | Export | `/api/export` | Conversation/data export | `export.py` | | Sharing | `/api/sharing` | Share conversations | `sharing.py` | | Voice | `/api/voice` | Voice session management | `voice.py` | | Voice Pipeline | `/api/voice/pipeline-ws` | Thinker-Talker WebSocket (Primary) | `voice.py` (T/T handler) | | Real-time | `/api/realtime` | WebSocket connections | `realtime.py` | | Medical AI | `/api/medical` | Medical queries and RAG | `medical_ai.py` | | External Med | `/api/external-medical` | External medical APIs | `external_medical.py` | | Clinical | `/api/clinical` | Clinical context | `clinical_context.py` | | Advanced Search | `/api/search` | Advanced search features | `advanced_search.py` | | Integrations | `/api/integrations` | Third-party integrations | `integrations.py` | | Admin Panel | `/api/admin/panel` | Dashboard, metrics, audit logs | `admin_panel.py` | | Knowledge Base | `/api/admin/kb` | Document management | `admin_kb.py` | | Cache | `/api/admin/cache` | Cache statistics and control | `admin_cache.py` | | Feature Flags | `/api/admin/feature-flags` | Feature toggle management | `admin_feature_flags.py` | | Health | `/health`, `/ready` | Service health checks | `health.py` | | Metrics | `/metrics` | Prometheus metrics | `metrics.py` | ### OpenAPI Specification - **Swagger UI:** `http://localhost:8000/docs` (interactive API explorer) - **ReDoc:** `http://localhost:8000/redoc` (alternative documentation) - **OpenAPI JSON:** `http://localhost:8000/openapi.json` (downloadable spec) For complete documentation with request/response examples, see [api-reference/rest-api.md](api-reference/rest-api.md). ### Documentation Coverage Status As of 2025-12-02, API documentation coverage: | Metric | Count | Notes | | --------------- | ----- | --------------------------------- | | Total Endpoints | 310 | Backend route definitions | | Documented | 39 | In rest-api.md with examples | | Undocumented | 271 | Exist in code, need documentation | **Priority endpoints to document:** 1. Core voice endpoints (`/api/voice/*`) - Most user-facing 2. Authentication 2FA (`/api/auth/2fa/*`) - Security-critical 3. Admin panel endpoints (`/api/admin/panel/*`) - Ops-critical 4. Integration endpoints (`/api/integrations/*`) - Feature expansion Run `pnpm validate:api-sync` in `apps/docs-site/` to regenerate coverage stats. --- ## Documentation API (For AI Agents) The docs site provides machine-readable JSON endpoints for AI agents: ### Static JSON Endpoints | Endpoint | Description | | ------------------------ | --------------------------------------- | | `GET /agent/index.json` | Documentation system metadata | | `GET /agent/docs.json` | Full document list with metadata | | `GET /agent/tasks.json` | Common agent tasks with commands | | `GET /agent/schema.json` | JSON Schema for API response types | | `GET /search-index.json` | Full-text search index (Fuse.js format) | **Base URL:** `https://assistdocs.asimo.io` **Note:** All endpoints are static JSON. Use search-index.json with client-side Fuse.js for full-text search. ### AI-Docs Semantic Search (Qdrant) For semantic/vector search, documentation is embedded into Qdrant: | Property | Value | | ------------------- | ---------------------- | | **Collection** | `platform_docs` | | **Embedding Model** | text-embedding-3-small | | **Dimensions** | 1536 | | **Distance Metric** | Cosine | **Tool Functions (for AI agents):** ```python # Semantic search across documentation docs_search(query: str, category: str = None, max_results: int = 5) # Retrieve full section content docs_get_section(doc_path: str, section: str = None) ``` **Re-indexing Documentation:** ```bash python scripts/embed-docs.py # Incremental update python scripts/embed-docs.py --force # Force re-index all ``` For full details, see: - [Agent API Reference](ai/AGENT_API_REFERENCE.md) - JSON endpoints - [Agent Onboarding](ai/AGENT_ONBOARDING.md) - AI-Docs integration - [Internal Docs System](INTERNAL_DOCS_SYSTEM.md) - Embedding workflow 6:["slug","API_REFERENCE","c"] 0:["X7oMT3VrOffzp0qvbeOas",[[["",{"children":["docs",{"children":[["slug","API_REFERENCE","c"],{"children":["__PAGE__?{\"slug\":[\"API_REFERENCE\"]}",{}]}]}]},"$undefined","$undefined",true],["",{"children":["docs",{"children":[["slug","API_REFERENCE","c"],{"children":["__PAGE__",{},[["$L1",["$","div",null,{"children":[["$","div",null,{"className":"mb-6 flex items-center justify-between gap-4","children":[["$","div",null,{"children":[["$","p",null,{"className":"text-sm text-gray-500 dark:text-gray-400","children":"Docs / Raw"}],["$","h1",null,{"className":"text-3xl font-bold text-gray-900 dark:text-white","children":"API Reference"}],["$","p",null,{"className":"text-sm text-gray-600 dark:text-gray-400","children":["Sourced from"," ",["$","code",null,{"className":"font-mono text-xs","children":["docs/","API_REFERENCE.md"]}]]}]]}],["$","a",null,{"href":"https://github.com/mohammednazmy/VoiceAssist/edit/main/docs/API_REFERENCE.md","target":"_blank","rel":"noreferrer","className":"inline-flex items-center gap-2 rounded-md border border-gray-200 dark:border-gray-700 px-3 py-1.5 text-sm text-gray-700 dark:text-gray-200 hover:border-primary-500 dark:hover:border-primary-400 hover:text-primary-700 dark:hover:text-primary-300","children":"Edit on GitHub"}]]}],["$","div",null,{"className":"rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 p-6","children":["$","$L2",null,{"content":"$3"}]}],["$","div",null,{"className":"mt-6 flex flex-wrap gap-2 text-sm","children":[["$","$L4",null,{"href":"/reference/all-docs","className":"inline-flex items-center gap-1 rounded-md bg-gray-100 px-3 py-1 text-gray-700 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700","children":"← All documentation"}],["$","$L4",null,{"href":"/","className":"inline-flex items-center gap-1 rounded-md bg-gray-100 px-3 py-1 text-gray-700 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700","children":"Home"}]]}]]}],null],null],null]},[null,["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children","$6","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7f586cdbbaa33ff7.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"h-full","children":["$","body",null,{"className":"__className_f367f3 h-full bg-white dark:bg-gray-900","children":[["$","a",null,{"href":"#main-content","className":"skip-to-content","children":"Skip to main content"}],["$","$L8",null,{"children":[["$","$L9",null,{}],["$","$La",null,{}],["$","main",null,{"id":"main-content","className":"lg:pl-64","role":"main","aria-label":"Documentation content","children":["$","$Lb",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]]}]]}]}]],null],null],["$Lc",null]]]] c:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"API Reference | Docs | VoiceAssist Docs"}],["$","meta","3",{"name":"description","content":"High-level API overview, endpoint groups, and quick reference for the VoiceAssist API."}],["$","meta","4",{"name":"keywords","content":"VoiceAssist,documentation,medical AI,voice assistant,healthcare,HIPAA,API"}],["$","meta","5",{"name":"robots","content":"index, follow"}],["$","meta","6",{"name":"googlebot","content":"index, follow"}],["$","link","7",{"rel":"canonical","href":"https://assistdocs.asimo.io"}],["$","meta","8",{"property":"og:title","content":"VoiceAssist Documentation"}],["$","meta","9",{"property":"og:description","content":"Comprehensive documentation for VoiceAssist - Enterprise Medical AI Assistant"}],["$","meta","10",{"property":"og:url","content":"https://assistdocs.asimo.io"}],["$","meta","11",{"property":"og:site_name","content":"VoiceAssist Docs"}],["$","meta","12",{"property":"og:type","content":"website"}],["$","meta","13",{"name":"twitter:card","content":"summary"}],["$","meta","14",{"name":"twitter:title","content":"VoiceAssist Documentation"}],["$","meta","15",{"name":"twitter:description","content":"Comprehensive documentation for VoiceAssist - Enterprise Medical AI Assistant"}],["$","meta","16",{"name":"next-size-adjust"}]] 1:null