Every API here is available over the APIs.io API and to AI agents over MCP.
{"definitions":{},"host":"web.aaaai.me","info":{"description":"REST API for the AAAAI system: health, auth, user, chats, messages, attachments, query/stream, experts, settings, video sessions, cognitive scaling, and dynamic experts.","title":"AAAAI API","version":"1.1.0"},"paths":{"/api/approvals":{"get":{"parameters":[{"enum":["pending","approved","rejected"],"in":"query","name":"status","type":"string"}],"responses":{"200":{"description":"List of approvals"}},"summary":"List exec approvals (pending destructive commands)","tags":["Approvals"]},"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"agent_id":{"type":"string"},"command":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"approval_id"}},"summary":"Create approval (agent when destructive + no TTY). Header: X-Agent-Token.","tags":["Approvals"]}},"/api/approvals/{approval_id}":{"get":{"parameters":[{"in":"path","name":"approval_id","required":true,"type":"string"}],"responses":{"200":{"description":"Approval"}},"summary":"Get approval status (agent polling)","tags":["Approvals"]}},"/api/approvals/{approval_id}/resolve":{"post":{"parameters":[{"in":"path","name":"approval_id","required":true,"type":"string"},{"in":"body","name":"body","schema":{"properties":{"approved":{"type":"boolean"}},"type":"object"}}],"responses":{"200":{"description":"Resolved approval"}},"summary":"Resolve approval (approve/reject)","tags":["Approvals"]}},"/api/ask":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"query":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Answer"}},"summary":"Simple ask (single question)","tags":["Chat"]}},"/api/audio/speech":{"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"model":{"type":"string"},"provider":{"type":"string"},"speed":{"type":"number"},"text":{"type":"string"},"voice":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Audio stream"}},"security":[{"ApiKeyAuth":[]}],"summary":"Generate speech audio from text","tags":["Chat"]}},"/api/audio/transcribe":{"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"audio_base64":{"type":"string"},"language":{"type":"string"},"mime":{"type":"string"},"model":{"type":"string"},"provider":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Transcript"}},"security":[{"ApiKeyAuth":[]}],"summary":"Transcribe audio (speech-to-text)","tags":["Chat"]}},"/api/audio/voices":{"get":{"responses":{"200":{"description":"Voice list"}},"security":[{"ApiKeyAuth":[]}],"summary":"List available TTS voices","tags":["Chat"]}},"/api/auth/apple":{"post":{"description":"Sign in with Apple (Guideline 4.8). Body: identity_token (required), optional: authorization_code, email, name.","parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"authorization_code":{"type":"string"},"email":{"type":"string"},"identity_token":{"type":"string"},"name":{"type":"string"}},"required":["identity_token"],"type":"object"}}],"responses":{"200":{"description":"Logged in with Apple"},"400":{"description":"identity_token required"},"401":{"description":"Invalid token or not configured"}},"summary":"Sign in with Apple","tags":["Auth"]}},"/api/auth/delete-account":{"post":{"description":"Permanently delete the current user account and all associated data. Requires authentication. Optional body: { \"password\": \"...\" } for confirmation.","parameters":[{"in":"body","name":"body","required":false,"schema":{"properties":{"password":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Account deleted"},"400":{"description":"Validation error"},"401":{"description":"Not authenticated"}},"summary":"Delete account","tags":["Auth"]}},"/api/auth/login":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"login":{"type":"string"},"password":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Login success"},"401":{"description":"Invalid credentials"}},"summary":"Login","tags":["Auth"]}},"/api/auth/logout":{"post":{"responses":{"200":{"description":"Logged out"}},"summary":"Logout","tags":["Auth"]}},"/api/auth/register":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"login":{"type":"string"},"password":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Registration success"},"400":{"description":"Validation error"}},"summary":"Register new user","tags":["Auth"]}},"/api/chats":{"get":{"responses":{"200":{"description":"List of chats"}},"summary":"List chats","tags":["Chat"]},"post":{"responses":{"200":{"description":"Created chat"}},"summary":"Create chat","tags":["Chat"]}},"/api/chats/{chat_id}":{"delete":{"parameters":[{"in":"path","name":"chat_id","required":true,"type":"integer"}],"responses":{"200":{"description":"Deleted"}},"summary":"Delete chat","tags":["Chat"]},"get":{"parameters":[{"in":"path","name":"chat_id","required":true,"type":"integer"}],"responses":{"200":{"description":"Chat"}},"summary":"Get chat by ID","tags":["Chat"]},"put":{"parameters":[{"in":"path","name":"chat_id","required":true,"type":"integer"},{"in":"body","name":"body","schema":{"properties":{"title":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Updated"}},"summary":"Update chat (e.g. title)","tags":["Chat"]}},"/api/chats/{chat_id}/attachments":{"delete":{"parameters":[{"in":"path","name":"chat_id","required":true,"type":"integer"}],"responses":{"200":{"description":"Cleared"}},"summary":"Clear attachments for chat","tags":["Chat"]},"get":{"parameters":[{"in":"path","name":"chat_id","required":true,"type":"integer"}],"responses":{"200":{"description":"List of attachments"}},"summary":"List attachments for chat","tags":["Chat"]},"post":{"parameters":[{"in":"path","name":"chat_id","required":true,"type":"integer"},{"in":"body","name":"body","schema":{"properties":{"file":{"type":"string"},"filename":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Attachment created"}},"summary":"Upload attachment","tags":["Chat"]}},"/api/chats/{chat_id}/attachments/{attachment_id}":{"delete":{"parameters":[{"in":"path","name":"chat_id","required":true,"type":"integer"},{"in":"path","name":"attachment_id","required":true,"type":"integer"}],"responses":{"200":{"description":"Deleted"}},"summary":"Delete single attachment","tags":["Chat"]}},"/api/chats/{chat_id}/messages":{"post":{"parameters":[{"in":"path","name":"chat_id","required":true,"type":"integer"},{"in":"body","name":"body","required":true,"schema":{"properties":{"conversation_history":{"type":"array"},"human_like":{"type":"boolean"},"image":{"type":"string"},"query":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Query response"}},"summary":"Post message to chat (query with optional attachments)","tags":["Chat"]}},"/api/code":{"post":{"description":"Uses coding experts (Ollama etc.) and returns only the generated code. No auth by default.","parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"chat_id":{"description":"If set, requires auth; prompt and code are stored in this chat (e.g. CLI chat)","type":"integer"},"is_completion":{"default":false,"description":"Completion mode","type":"boolean"},"max_tokens":{"default":8192,"description":"Max tokens (256-32768)","type":"integer"},"prompt":{"description":"What to generate (e.g. 'bash script to backup /var/log')","type":"string"},"query":{"description":"Alias for prompt","type":"string"}},"required":["prompt"],"type":"object"}}],"responses":{"200":{"description":"JSON with status, code"},"400":{"description":"Missing prompt"},"500":{"description":"Server error"}},"summary":"Generate code only (Cursor / CLI / IDE integration)","tags":["Code"]}},"/api/coding-feedback":{"post":{"parameters":[{"in":"body","name":"body","schema":{"type":"object"}}],"responses":{"200":{"description":"Feedback recorded"}},"summary":"Submit coding feedback","tags":["Chat"]}},"/api/coding-memory/bootstrap":{"post":{"parameters":[{"in":"body","name":"body","schema":{"type":"object"}}],"responses":{"200":{"description":"Bootstrap result"}},"summary":"Bootstrap coding memory","tags":["Chat"]}},"/api/cognitive-scaling/memory":{"get":{"parameters":[{"in":"query","name":"limit","type":"integer"}],"responses":{"200":{"description":"Decisions"}},"summary":"Get recent cognitive scaling decisions","tags":["Cognitive Scaling"]}},"/api/cognitive-scaling/status":{"get":{"responses":{"200":{"description":"Status"}},"summary":"Get cognitive scaling status","tags":["Cognitive Scaling"]}},"/api/cognitive-scaling/toggle":{"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"enabled":{"type":"boolean"}},"type":"object"}}],"responses":{"200":{"description":"Toggled"}},"summary":"Toggle cognitive scaling","tags":["Cognitive Scaling"]}},"/api/cron/jobs":{"get":{"responses":{"200":{"description":"List of jobs"}},"summary":"List scheduled cron jobs (OpenClaw-style)","tags":["Cron"]},"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"enabled":{"type":"boolean"},"label":{"type":"string"},"request":{"type":"string"},"schedule":{"description":"Cron expression (e.g. 0 9 * * *)","type":"string"},"work_until_goal":{"description":"Continue with tools and recovery until verified completion","type":"boolean"}},"type":"object"}}],"responses":{"200":{"description":"Created job"}},"summary":"Create cron job","tags":["Cron"]}},"/api/cron/jobs/{job_id}":{"delete":{"parameters":[{"in":"path","name":"job_id","required":true,"type":"string"}],"responses":{"200":{"description":"Deleted"}},"summary":"Delete cron job","tags":["Cron"]},"get":{"parameters":[{"in":"path","name":"job_id","required":true,"type":"string"}],"responses":{"200":{"description":"Job"}},"summary":"Get cron job","tags":["Cron"]}},"/api/cron/jobs/{job_id}/trigger":{"post":{"parameters":[{"in":"path","name":"job_id","required":true,"type":"string"}],"responses":{"200":{"description":"Run result"}},"summary":"Run cron job now","tags":["Cron"]}},"/api/debug/search":{"get":{"parameters":[{"in":"query","name":"q","type":"string"}],"responses":{"200":{"description":"Search result"}},"summary":"Debug search","tags":["Debug"]}},"/api/deep-agent/chat":{"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"message":{"description":"User message","type":"string"},"model":{"default":"","type":"string"},"provider":{"default":"ollama","type":"string"},"session_id":{"description":"Session ID for persistent conversation","type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Agent response"}},"summary":"Chat with the Deep Agent (multi-turn, session-based).","tags":["Deep Agent"]}},"/api/deep-agent/run":{"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"auto_approve":{"default":false,"type":"boolean"},"model":{"default":"","type":"string"},"provider":{"default":"ollama","type":"string"},"query":{"description":"Task for the agent","type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Agent result"}},"summary":"Run a task through the Deep Agent (one-shot).","tags":["Deep Agent"]}},"/api/deep-agent/status":{"get":{"responses":{"200":{"description":"Agent capabilities and status"}},"summary":"Get Deep Agent status.","tags":["Deep Agent"]}},"/api/dev-preview/sessions":{"get":{"responses":{"200":{"description":"Preview sessions"}},"security":[{"ApiKeyAuth":[]}],"summary":"List remote preview sessions for the authenticated user","tags":["Chat"]}},"/api/dev-preview/start":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"command":{"type":"string"},"host":{"type":"string"},"label":{"type":"string"},"preferred_port":{"type":"integer"},"preferred_url":{"type":"string"},"startup_timeout_sec":{"type":"integer"},"workdir":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Preview metadata"}},"security":[{"ApiKeyAuth":[]}],"summary":"Start a remote preview/dev server on the authenticated user's linked agent","tags":["Chat"]}},"/api/dev-preview/stop":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"session_id":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Stopped preview session"}},"security":[{"ApiKeyAuth":[]}],"summary":"Stop a remote preview session","tags":["Chat"]}},"/api/dev-preview/test":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"screenshot":{"type":"boolean"},"url":{"type":"string"},"urls":{"items":{"type":"string"},"type":"array"},"wait_for_network_idle":{"type":"boolean"},"wait_until":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Playwright test result"}},"security":[{"ApiKeyAuth":[]}],"summary":"Run Playwright checks against a remote preview URL","tags":["Chat"]}},"/api/dynamic-experts/create":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"expert_id":{"type":"string"},"focus_areas":{"items":{"type":"string"},"type":"array"},"specialty":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Created"},"400":{"description":"Bad request"}},"summary":"Create custom expert","tags":["Dynamic Experts"]}},"/api/dynamic-experts/list":{"get":{"responses":{"200":{"description":"List"}},"summary":"List dynamically created experts","tags":["Dynamic Experts"]}},"/api/dynamic-experts/status":{"get":{"responses":{"200":{"description":"Status"}},"summary":"Get dynamic experts status","tags":["Dynamic Experts"]}},"/api/dynamic-experts/toggle":{"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"enabled":{"type":"boolean"}},"type":"object"}}],"responses":{"200":{"description":"Toggled"}},"summary":"Toggle dynamic expert creation","tags":["Dynamic Experts"]}},"/api/dynamic-experts/{expert_id}":{"delete":{"parameters":[{"in":"path","name":"expert_id","required":true,"type":"string"}],"responses":{"200":{"description":"Deleted"}},"summary":"Delete dynamic expert","tags":["Dynamic Experts"]},"patch":{"parameters":[{"in":"path","name":"expert_id","required":true,"type":"string"},{"in":"body","name":"body","schema":{"properties":{"focus_areas":{"items":{"type":"string"},"type":"array"},"specialty":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Updated"}},"summary":"Update dynamic expert","tags":["Dynamic Experts"]}},"/api/experts/add":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"expert_type":{"description":"Existing type (e.g. math, social) or new id for custom expert","type":"string"},"focus_areas":{"description":"Optional focus areas for custom expert","items":{"type":"string"},"type":"array"},"model":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"specialty":{"description":"Required for custom expert: specialty description","type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Expert added"},"400":{"description":"Bad request"}},"summary":"Add expert to pool (existing type or custom)","tags":["Experts"]}},"/api/experts/auto-scale":{"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"enabled":{"type":"boolean"}},"type":"object"}}],"responses":{"200":{"description":"Auto-scale toggled"}},"summary":"Toggle auto-scaling","tags":["Experts"]}},"/api/experts/edit":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"expert_type":{"type":"string"},"model":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Updated"},"400":{"description":"Bad request"}},"summary":"Edit expert (name/provider/model)","tags":["Experts"]}},"/api/experts/remove":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"expert_type":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Removed"},"400":{"description":"Bad request"}},"summary":"Remove expert from pool","tags":["Experts"]}},"/api/experts/scale-down":{"post":{"responses":{"200":{"description":"Scaled down"}},"summary":"Scale down (remove optional experts)","tags":["Experts"]}},"/api/experts/scale-up":{"post":{"responses":{"200":{"description":"Scaled up"}},"summary":"Scale up (add all missing experts)","tags":["Experts"]}},"/api/experts/settings":{"get":{"responses":{"200":{"description":"Expert settings"}},"summary":"Get expert model settings","tags":["Experts"]},"post":{"responses":{"200":{"description":"Applied"}},"summary":"Apply expert model settings","tags":["Experts"]},"put":{"responses":{"200":{"description":"Updated"}},"summary":"Update expert model settings","tags":["Experts"]}},"/api/experts/status":{"get":{"responses":{"200":{"description":"Expert status"}},"summary":"Get expert system status","tags":["Experts"]}},"/api/goal-jobs":{"get":{"responses":{"200":{"description":"Owner-scoped job statuses"}},"summary":"List background goal jobs for the current user","tags":["Agents"]}},"/api/goal-jobs/{job_id}":{"get":{"responses":{"200":{"description":"Progress, result, and completion evidence"}},"summary":"Get background goal job status","tags":["Agents"]}},"/api/goal-jobs/{job_id}/stop":{"post":{"responses":{"200":{"description":"Stop requested"}},"summary":"Stop a background goal job","tags":["Agents"]}},"/api/health":{"get":{"responses":{"200":{"description":"System health status"}},"summary":"Health check","tags":["Health"]}},"/api/initialize":{"post":{"responses":{"200":{"description":"Initialization success"}},"summary":"Initialize AAAAI system","tags":["Chat"]}},"/api/live":{"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"image":{"type":"string"},"transcript":{"type":"string"},"voice_only":{"type":"boolean"}},"type":"object"}}],"responses":{"200":{"description":"Response with TTS text"}},"security":[{"ApiKeyAuth":[]}],"summary":"Live mode (voice + camera, or voice-only)","tags":["Chat"]}},"/api/media/endpoints":{"get":{"responses":{"200":{"description":"Media endpoints and effective provider/model info"}},"security":[{"ApiKeyAuth":[]}],"summary":"List authenticated audio/video API endpoints and effective models","tags":["Settings"]}},"/api/memories":{"get":{"parameters":[{"in":"query","name":"limit","type":"integer"}],"responses":{"200":{"description":"List of memories"}},"summary":"Get recent memories","tags":["Chat"]}},"/api/nodes":{"get":{"responses":{"200":{"description":"List of nodes"}},"summary":"List connected nodes (agents/devices)","tags":["Nodes"]}},"/api/nodes/{node_id}":{"delete":{"parameters":[{"in":"path","name":"node_id","required":true,"type":"integer"}],"responses":{"200":{"description":"Unpaired"}},"summary":"Unpair node","tags":["Nodes"]}},"/api/query":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"chat_id":{"description":"Optional chat ID for attachments","type":"integer"},"conversation_history":{"items":{"type":"object"},"type":"array"},"human_like":{"default":false,"description":"Turing Test mode","type":"boolean"},"image":{"description":"Optional base64 image","type":"string"},"query":{"description":"User message","type":"string"},"run_system_agent":{"description":"When true and message contains the word 'run', system agent runs commands on host and appends output to response","type":"boolean"}},"required":["query"],"type":"object"}}],"responses":{"200":{"description":"Query response with experts and decision"}},"summary":"Process a query","tags":["Chat"]}},"/api/query/stream":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"chat_id":{"type":"integer"},"human_like":{"type":"boolean"},"image":{"type":"string"},"query":{"type":"string"}},"required":["query"],"type":"object"}}],"responses":{"200":{"description":"Server-sent events stream"}},"summary":"Process query with streaming response","tags":["Chat"]}},"/api/reset":{"post":{"responses":{"200":{"description":"Reset complete"}},"summary":"Reset system (clear memories and state)","tags":["Chat"]}},"/api/settings/all":{"get":{"responses":{"200":{"description":"All settings"}},"summary":"Get all settings (expert model, platform, video agent)","tags":["Settings"]}},"/api/settings/mcp-platforms":{"get":{"responses":{"200":{"description":"mcp_platforms, platforms_meta"}},"summary":"Get MCP settings per platform (default, chatgpt, claude)","tags":["Settings"]},"put":{"responses":{"200":{"description":"Updated"}},"summary":"Update MCP platform settings","tags":["Settings"]}},"/api/settings/platform":{"get":{"responses":{"200":{"description":"Settings"}},"summary":"Get platform settings","tags":["Settings"]},"post":{"responses":{"200":{"description":"Applied"}},"summary":"Apply platform settings","tags":["Settings"]},"put":{"responses":{"200":{"description":"Updated"}},"summary":"Update platform settings","tags":["Settings"]}},"/api/settings/system-agent":{"get":{"responses":{"200":{"description":"System agent settings"}},"summary":"Get system agent settings","tags":["Settings"]},"put":{"responses":{"200":{"description":"Updated"}},"summary":"Update system agent settings","tags":["Settings"]}},"/api/settings/video-agent":{"get":{"responses":{"200":{"description":"Video agent settings"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get video agent settings","tags":["Settings"]},"post":{"responses":{"200":{"description":"Applied"}},"security":[{"ApiKeyAuth":[]}],"summary":"Apply video agent settings","tags":["Settings"]},"put":{"responses":{"200":{"description":"Updated"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update video agent settings","tags":["Settings"]}},"/api/settings/voice":{"get":{"responses":{"200":{"description":"Voice settings"}},"security":[{"ApiKeyAuth":[]}],"summary":"Get voice / TTS settings","tags":["Settings"]},"post":{"responses":{"200":{"description":"Applied"}},"security":[{"ApiKeyAuth":[]}],"summary":"Apply voice / TTS settings","tags":["Settings"]},"put":{"responses":{"200":{"description":"Updated"}},"security":[{"ApiKeyAuth":[]}],"summary":"Update voice / TTS settings","tags":["Settings"]}},"/api/status":{"get":{"responses":{"200":{"description":"Current system status"}},"summary":"Get system status","tags":["Health"]}},"/api/system-agent/run":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"dry_run":{"default":false,"type":"boolean"},"request":{"type":"string"},"work_until_goal":{"description":"Continue with tools and recovery until verified completion","type":"boolean"}},"type":"object"}}],"responses":{"200":{"description":"Explanation, commands, results"},"202":{"description":"Background goal job; poll /api/goal-jobs/{job_id}"}},"summary":"Run system agent (turn natural language into commands and execute)","tags":["Chat"]}},"/api/system-agent/status":{"get":{"responses":{"200":{"description":"Connected, LLM, message"}},"summary":"Get system agent connection status","tags":["Settings"]}},"/api/tools/invoke":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"command":{"type":"string"},"params":{"type":"object"},"path":{"type":"string"},"script":{"type":"string"},"timeout":{"default":60,"type":"integer"},"tool":{"enum":["run_shell_command","run_dev_server","stop_dev_server","list_dev_servers","web_ui_test","read_file","write_file","list_dir","amazon_checkout","browser"],"type":"string"},"url":{"type":"string"},"urls":{"items":{"type":"string"},"type":"array"}},"type":"object"}}],"responses":{"200":{"description":"Tool result (stdout, stderr, returncode)"}},"summary":"Invoke a single agent tool. Preview/test tools run on the user's linked/remote agent.","tags":["Chat"]}},"/api/user/avatar":{"delete":{"responses":{"200":{"description":"Avatar removed"}},"summary":"Delete avatar","tags":["User"]},"get":{"responses":{"200":{"description":"Avatar info"}},"summary":"Get avatar URL or metadata","tags":["User"]},"post":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"avatar":{"description":"Base64 image","type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Avatar updated"}},"summary":"Upload avatar","tags":["User"]}},"/api/user/avatar/raw":{"get":{"responses":{"200":{"description":"Avatar image"}},"summary":"Get raw avatar image","tags":["User"]}},"/api/user/current":{"get":{"responses":{"200":{"description":"Current user or anonymous"}},"summary":"Get current user","tags":["User"]}},"/api/user/ui-preferences":{"get":{"responses":{"200":{"description":"language: en|ru|null"}},"summary":"Get UI preferences (e.g. language)","tags":["User"]},"put":{"parameters":[{"in":"body","name":"body","schema":{"properties":{"appearance":{"enum":["light","dark"],"type":"string"},"language":{"enum":["en","ru"],"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Saved"}},"summary":"Save UI preferences","tags":["User"]}},"/api/video-sessions":{"get":{"responses":{"200":{"description":"List of video sessions"}},"summary":"List video sessions","tags":["Video"]}},"/api/video-sessions/{session_id}":{"delete":{"parameters":[{"in":"path","name":"session_id","required":true,"type":"integer"}],"responses":{"200":{"description":"Deleted"}},"summary":"Delete video session","tags":["Video"]},"get":{"parameters":[{"in":"path","name":"session_id","required":true,"type":"integer"}],"responses":{"200":{"description":"Session"}},"summary":"Get video session","tags":["Video"]}},"/api/web-search/sources":{"get":{"responses":{"200":{"description":"Sources by category"}},"summary":"List web search sources (ChatGPT-style, incl. RU segment)","tags":["Chat"]}},"/v1/chat/completions":{"post":{"parameters":[{"in":"body","name":"body","required":true,"schema":{"properties":{"max_tokens":{"type":"integer"},"messages":{"type":"array"},"model":{"type":"string"}},"type":"object"}}],"responses":{"200":{"description":"Chat completion response"}},"summary":"Chat completions (OpenAI-compatible)","tags":["Chat"]}},"/v1/models":{"get":{"responses":{"200":{"description":"Model list"}},"summary":"List models (OpenAI-compatible)","tags":["Chat"]}}},"schemes":["https"],"securityDefinitions":{"ApiKeyAuth":{"in":"header","name":"X-User-Login","type":"apiKey"}},"swagger":"2.0","tags":[{"description":"Health and status","name":"Health"},{"description":"Code-only generation (Cursor / CLI / IDE)","name":"Code"},{"description":"Authentication","name":"Auth"},{"description":"Current user and avatar","name":"User"},{"description":"Chat and queries","name":"Chat"},{"description":"Expert system management","name":"Experts"},{"description":"Platform and expert settings","name":"Settings"},{"description":"Video sessions","name":"Video"},{"description":"Cognitive scaling status and control","name":"Cognitive Scaling"},{"description":"Dynamic expert creation and management","name":"Dynamic Experts"},{"description":"Debug and development","name":"Debug"}]}