{"openapi":"3.1.0","info":{"title":"Walvey AI Gateway","description":"Authenticated AI gateway with persistent conversations, server web tools, RBAC, plans, queues, monitoring, and model policy.","version":"3.0.0"},"paths":{"/health":{"get":{"tags":["system"],"summary":"Health","description":"Liveness check for the API process and PostgreSQL.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}},"/ready":{"get":{"tags":["system"],"summary":"Ready","description":"Dependency readiness. Checks llama.cpp process availability only; it never scans or validates configured model IDs.","operationId":"ready_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadyStatus"}}}}}}},"/auth/register":{"post":{"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Auth Register Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Login Auth Login Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me":{"get":{"summary":"Me","operationId":"me_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Me Me Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/auth/verify/start":{"post":{"summary":"Verify Start","operationId":"verify_start_auth_verify_start_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Verify Start Auth Verify Start Post"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/auth/verify/confirm":{"post":{"summary":"Verify Confirm","operationId":"verify_confirm_auth_verify_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCodeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Verify Confirm Auth Verify Confirm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/auth/password/reset/start":{"post":{"summary":"Password Reset Start","operationId":"password_reset_start_auth_password_reset_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetStartIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Password Reset Start Auth Password Reset Start Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/password/reset/confirm":{"post":{"summary":"Password Reset Confirm","operationId":"password_reset_confirm_auth_password_reset_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetConfirmIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Password Reset Confirm Auth Password Reset Confirm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/access/request":{"post":{"summary":"Request Upgrade","operationId":"request_upgrade_access_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessReqIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Request Upgrade Access Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/v1/agent/tasks":{"post":{"tags":["coding-agent"],"summary":"Create Agent Task","operationId":"create_agent_task_v1_agent_tasks_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTaskCreateIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTaskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["coding-agent"],"summary":"List Agent Tasks","operationId":"list_agent_tasks_v1_agent_tasks_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTaskListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/tasks/{task_id}":{"get":{"tags":["coding-agent"],"summary":"Get Agent Task","operationId":"get_agent_task_v1_agent_tasks__task_id__get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTaskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["coding-agent"],"summary":"Delete Agent Task","operationId":"delete_agent_task_v1_agent_tasks__task_id__delete","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"client_id","in":"query","required":true,"schema":{"type":"string","minLength":8,"maxLength":100,"title":"Client Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/tasks/{task_id}/claim":{"post":{"tags":["coding-agent"],"summary":"Claim Agent Task","description":"Move one of the user's tasks to a new Orbit desktop installation.","operationId":"claim_agent_task_v1_agent_tasks__task_id__claim_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentClientIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTaskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/tasks/{task_id}/follow-up":{"post":{"tags":["coding-agent"],"summary":"Follow Up Agent Task","description":"Reopen a finished task with a new instruction in the same workspace.","operationId":"follow_up_agent_task_v1_agent_tasks__task_id__follow_up_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTaskFollowUpIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTaskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/tasks/{task_id}/continue":{"post":{"tags":["coding-agent"],"summary":"Continue Agent Task","operationId":"continue_agent_task_v1_agent_tasks__task_id__continue_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentClientIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentContinueOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/tasks/{task_id}/actions/next":{"get":{"tags":["coding-agent"],"summary":"Next Agent Action","operationId":"next_agent_action_v1_agent_tasks__task_id__actions_next_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"client_id","in":"query","required":true,"schema":{"type":"string","minLength":8,"maxLength":100,"title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentActionNextOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/tasks/{task_id}/actions/{action_id}/result":{"post":{"tags":["coding-agent"],"summary":"Submit Agent Action Result","operationId":"submit_agent_action_result_v1_agent_tasks__task_id__actions__action_id__result_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"action_id","in":"path","required":true,"schema":{"type":"string","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentActionResultIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentContinueOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/tasks/{task_id}/cancel":{"post":{"tags":["coding-agent"],"summary":"Cancel Agent Task","operationId":"cancel_agent_task_v1_agent_tasks__task_id__cancel_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentClientIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTaskOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/tasks/{task_id}/events":{"get":{"tags":["coding-agent"],"summary":"List Agent Events","operationId":"list_agent_events_v1_agent_tasks__task_id__events_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentEventsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agent/tasks/{task_id}/events/stream":{"get":{"tags":["coding-agent"],"summary":"Stream Agent Events","operationId":"stream_agent_events_v1_agent_tasks__task_id__events_stream_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"after","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After"}}],"responses":{"200":{"description":"Agent task events as Server-Sent Events.","content":{"text/event-stream":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/stats":{"get":{"tags":["admin"],"summary":"Admin Stats","operationId":"admin_stats_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"integer"},"type":"object","title":"Response Admin Stats Admin Stats Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/admin/runtime":{"get":{"tags":["admin"],"summary":"Privacy-safe runtime activity and event journal","description":"Expose operational metadata without prompts, responses, or secrets.","operationId":"admin_runtime_admin_runtime_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"event_limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Event Limit"}},{"name":"job_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Job Limit"}},{"name":"after_event_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"After Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeStatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/audit":{"get":{"tags":["admin"],"summary":"Admin Audit Log","operationId":"admin_audit_log_admin_audit_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Action"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Audit Log Admin Audit Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/model-journal":{"get":{"tags":["admin"],"summary":"Admin Model Exchange Journal","operationId":"admin_model_exchange_journal_admin_model_journal_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"enum":["chat","agent"],"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"api_key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Api Key Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"User Id"}},{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Conversation Id"}},{"name":"request_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"title":"Request Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Model Exchange Journal Admin Model Journal Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/model-journal/{entry_id}":{"get":{"tags":["admin"],"summary":"Admin Model Exchange Journal Entry","operationId":"admin_model_exchange_journal_entry_admin_model_journal__entry_id__get","security":[{"BearerAuth":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Entry Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Model Exchange Journal Entry Admin Model Journal  Entry Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/notifications":{"get":{"tags":["admin"],"summary":"Admin Notifications","operationId":"admin_notifications_admin_notifications_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Notifications Admin Notifications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/notifications/read":{"post":{"tags":["admin"],"summary":"Admin Mark Notifications Read","operationId":"admin_mark_notifications_read_admin_notifications_read_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationReadIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"boolean"}]},"type":"object","title":"Response Admin Mark Notifications Read Admin Notifications Read Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/admin/model-stats":{"get":{"tags":["admin"],"summary":"Admin Model Stats","operationId":"admin_model_stats_admin_model_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Model Stats Admin Model Stats Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/admin/queue/{job_id}/cancel":{"post":{"tags":["admin"],"summary":"Admin Cancel Job","operationId":"admin_cancel_job_admin_queue__job_id__cancel_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Cancel Job Admin Queue  Job Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/queue/clear":{"post":{"tags":["admin"],"summary":"Admin Clear Queue","operationId":"admin_clear_queue_admin_queue_clear_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Clear Queue Admin Queue Clear Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/admin/maintenance":{"post":{"tags":["admin"],"summary":"Admin Set Maintenance","operationId":"admin_set_maintenance_admin_maintenance_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Set Maintenance Admin Maintenance Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/admin/users":{"get":{"tags":["admin"],"summary":"Admin Users","operationId":"admin_users_admin_users_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Users Admin Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/password":{"post":{"tags":["admin"],"summary":"Admin Set Password","operationId":"admin_set_password_admin_users__user_id__password_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSetPasswordIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Admin Set Password Admin Users  User Id  Password Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/ban":{"post":{"tags":["admin"],"summary":"Admin Set Ban","operationId":"admin_set_ban_admin_users__user_id__ban_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSetBanIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Set Ban Admin Users  User Id  Ban Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/plan":{"post":{"tags":["admin"],"summary":"Admin Set Plan","operationId":"admin_set_plan_admin_users__user_id__plan_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPlanIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Set Plan Admin Users  User Id  Plan Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/role":{"post":{"tags":["admin"],"summary":"Admin Set Role","operationId":"admin_set_role_admin_users__user_id__role_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRoleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Set Role Admin Users  User Id  Role Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/requests":{"get":{"tags":["admin"],"summary":"Admin Requests","operationId":"admin_requests_admin_requests_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Requests Admin Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/requests/{req_id}":{"post":{"tags":["admin"],"summary":"Admin Decide","operationId":"admin_decide_admin_requests__req_id__post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"req_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Req Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideReqIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Decide Admin Requests  Req Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/plans":{"get":{"tags":["admin"],"summary":"Admin Plans","operationId":"admin_plans_admin_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Plans Admin Plans Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]},"post":{"tags":["admin"],"summary":"Admin Create Plan","operationId":"admin_create_plan_admin_plans_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlanIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Create Plan Admin Plans Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/admin/plans/{plan_name}":{"patch":{"tags":["admin"],"summary":"Admin Patch Plan","operationId":"admin_patch_plan_admin_plans__plan_name__patch","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"plan_name","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"title":"Plan Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPlanIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Patch Plan Admin Plans  Plan Name  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/roles":{"get":{"tags":["admin"],"summary":"Admin Roles","operationId":"admin_roles_admin_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Roles Admin Roles Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]},"post":{"tags":["admin"],"summary":"Admin Create Role","operationId":"admin_create_role_admin_roles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Create Role Admin Roles Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/admin/roles/{role_id}":{"patch":{"tags":["admin"],"summary":"Admin Patch Role","operationId":"admin_patch_role_admin_roles__role_id__patch","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchRoleIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Patch Role Admin Roles  Role Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Admin Delete Role","operationId":"admin_delete_role_admin_roles__role_id__delete","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Role Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Admin Delete Role Admin Roles  Role Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/models":{"get":{"tags":["admin"],"summary":"Admin Models","operationId":"admin_models_admin_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Models Admin Models Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]},"post":{"tags":["admin"],"summary":"Admin Create Model","operationId":"admin_create_model_admin_models_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModelIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Create Model Admin Models Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/admin/backend":{"get":{"tags":["admin"],"summary":"Admin Backend Status","description":"Passively inspect llama.cpp availability and router inventory. This read-only operation never reloads models.","operationId":"admin_backend_status_admin_backend_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackendStatusOut"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/admin/backend/models/sync":{"post":{"tags":["admin"],"summary":"Admin Sync Backend Models","description":"Refresh llama.cpp router inventory and import unknown IDs as disabled policy records. It never downloads or deletes GGUF files.","operationId":"admin_sync_backend_models_admin_backend_models_sync_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Ask the remote llama.cpp router to rescan its sources. Primary administrator only because this may unload a model.","default":false,"title":"Refresh"},"description":"Ask the remote llama.cpp router to rescan its sources. Primary administrator only because this may unload a model."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackendSyncOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/models/{model_id}":{"patch":{"tags":["admin"],"summary":"Admin Patch Model","operationId":"admin_patch_model_admin_models__model_id__patch","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchModelIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Patch Model Admin Models  Model Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Admin Delete Model","operationId":"admin_delete_model_admin_models__model_id__delete","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Admin Delete Model Admin Models  Model Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/models/{model_id}/probe":{"post":{"tags":["admin"],"summary":"Admin Probe Model","operationId":"admin_probe_model_admin_models__model_id__probe_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Probe Model Admin Models  Model Id  Probe Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/models/{model_id}/circuit/reset":{"post":{"tags":["admin"],"summary":"Admin Reset Model Circuit","operationId":"admin_reset_model_circuit_admin_models__model_id__circuit_reset_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReasonIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Reset Model Circuit Admin Models  Model Id  Circuit Reset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/backend/models/{model_id}/unload":{"post":{"tags":["admin"],"summary":"Admin Unload Backend Model","description":"Ask llama.cpp to unload a model from memory.","operationId":"admin_unload_backend_model_admin_backend_models__model_id__unload_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Unload Backend Model Admin Backend Models  Model Id  Unload Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/backend/models/{model_id}/load":{"post":{"tags":["admin"],"summary":"Admin Load Backend Model","description":"Ask llama.cpp to load a model slot.","operationId":"admin_load_backend_model_admin_backend_models__model_id__load_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Load Backend Model Admin Backend Models  Model Id  Load Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api-keys":{"get":{"tags":["admin","api-keys"],"summary":"List Api Keys","operationId":"list_api_keys_admin_api_keys_get","security":[{"BearerAuth":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyListOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin","api-keys"],"summary":"Create Api Key","operationId":"create_api_key_admin_api_keys_post","security":[{"BearerAuth":[]}],"parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeySecretOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api-keys/{key_id}":{"patch":{"tags":["admin","api-keys"],"summary":"Patch Api Key","operationId":"patch_api_key_admin_api_keys__key_id__patch","security":[{"BearerAuth":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Key Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchApiKeyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api-keys/{key_id}/rotate":{"post":{"tags":["admin","api-keys"],"summary":"Rotate Api Key","operationId":"rotate_api_key_admin_api_keys__key_id__rotate_post","security":[{"BearerAuth":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Key Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeySecretOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api-keys/{key_id}/revoke":{"post":{"tags":["admin","api-keys"],"summary":"Revoke Api Key","operationId":"revoke_api_key_admin_api_keys__key_id__revoke_post","security":[{"BearerAuth":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Key Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/api-keys/{key_id}/usage/reset":{"post":{"tags":["admin","api-keys"],"summary":"Reset Api Key Usage","operationId":"reset_api_key_usage_admin_api_keys__key_id__usage_reset_post","security":[{"BearerAuth":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Key Id"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations":{"post":{"tags":["conversations"],"summary":"Create Conversation","operationId":"create_conversation_v1_conversations_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversationIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Conversation V1 Conversations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["conversations"],"summary":"List Conversations","operationId":"list_conversations_v1_conversations_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":true}},"title":"Response List Conversations V1 Conversations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conv_id}":{"get":{"tags":["conversations"],"summary":"Get Conversation","operationId":"get_conversation_v1_conversations__conv_id__get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"integer","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Conversation V1 Conversations  Conv Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["conversations"],"summary":"Delete Conversation","operationId":"delete_conversation_v1_conversations__conv_id__delete","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"integer","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Delete Conversation V1 Conversations  Conv Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conv_id}/cancel":{"post":{"tags":["conversations"],"summary":"Cancel Conversation Generation","operationId":"cancel_conversation_generation_v1_conversations__conv_id__cancel_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"integer","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Conversation Generation V1 Conversations  Conv Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages/{message_id}/feedback":{"post":{"tags":["conversations"],"summary":"Set Message Feedback","operationId":"set_message_feedback_v1_messages__message_id__feedback_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Set Message Feedback V1 Messages  Message Id  Feedback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages/{message_id}":{"patch":{"tags":["conversations"],"summary":"Edit Message","description":"Edit an owned message and optionally discard the now-stale tail.","operationId":"edit_message_v1_messages__message_id__patch","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageEditIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Edit Message V1 Messages  Message Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["conversations"],"summary":"Delete Message","description":"Delete one owned message without leaving stale summary context behind.","operationId":"delete_message_v1_messages__message_id__delete","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Message V1 Messages  Message Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/conversations/{conv_id}/clear":{"post":{"tags":["conversations"],"summary":"Clear Conversation","operationId":"clear_conversation_v1_conversations__conv_id__clear_post","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"conv_id","in":"path","required":true,"schema":{"type":"integer","title":"Conv Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Clear Conversation V1 Conversations  Conv Id  Clear Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/memory":{"get":{"tags":["conversations"],"summary":"List My Memory","operationId":"list_my_memory_me_memory_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"object","title":"Response List My Memory Me Memory Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]},"delete":{"tags":["conversations"],"summary":"Clear My Memory","operationId":"clear_my_memory_me_memory_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Clear My Memory Me Memory Delete"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/v1/models":{"get":{"tags":["chat"],"summary":"List Models","operationId":"list_models_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Models V1 Models Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/v1/chat/upload":{"post":{"tags":["chat"],"summary":"Upload Chat Files","operationId":"upload_chat_files_v1_chat_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"anyOf":[{"required":["files"]},{"required":["file"]}],"properties":{"conversation_id":{"type":"string"},"files":{"items":{"type":"string","format":"binary"},"type":"array"},"file":{"type":"string","format":"binary","description":"Legacy single-file field."},"attachments":{"items":{"type":"string","format":"binary"},"type":"array","description":"Legacy alias for files."},"attachment":{"type":"string","format":"binary","description":"Legacy alias for file."}},"type":"object"}}},"required":true},"responses":{"200":{"description":"Files uploaded successfully.","content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean"},"conversation_id":{"type":"integer"},"attachments":{"items":{"properties":{"id":{"type":"string"},"filename":{"type":"string"},"mime_type":{"type":"string"},"kind":{"type":"string"},"size_bytes":{"type":"integer","minimum":0.0}},"additionalProperties":false,"type":"object","required":["id","filename","mime_type","kind","size_bytes"]},"type":"array"}},"additionalProperties":false,"type":"object","required":["ok","conversation_id","attachments"],"title":"Response Upload Chat Files V1 Chat Upload Post"}}}},"400":{"description":"Invalid upload request."},"401":{"description":"Authentication required."},"403":{"description":"Access denied."},"404":{"description":"Conversation not found."},"409":{"description":"Conversation changed during upload."},"413":{"description":"Uploaded content is too large."},"415":{"description":"Unsupported media type."},"429":{"description":"Rate limit exceeded."},"503":{"description":"Upload processing is unavailable."}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/v1/chat/files":{"post":{"tags":["chat"],"summary":"Chat","operationId":"chat_v1_chat_files_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"conversation_id":{"oneOf":[{"type":"integer"},{"type":"string"}],"description":"Existing conversation identifier; omit to create one."},"input":{"type":"string","description":"Only the first 200000 characters are used."},"model":{"type":"string"},"mode":{"type":"string","enum":["chat","codex"],"default":"chat"},"stream":{"type":"boolean","default":true},"web_search":{"type":"boolean","description":"Enable all safe server-side web tools.","default":false},"server_tools":{"oneOf":[{"type":"boolean"},{"items":{"type":"string","enum":["web_search","web_fetch","repository_read","get_current_time","get_weather"]},"type":"array"}],"description":"Enable all tools or select an exact subset."},"options":{"properties":{"temperature":{"type":"number","maximum":2.0,"minimum":0.0},"num_predict":{"type":"integer","minimum":1.0},"max_tokens":{"type":"integer","minimum":1.0},"top_p":{"type":"number","maximum":1.0,"minimum":0.0},"top_k":{"type":"integer","maximum":200.0,"minimum":0.0},"min_p":{"type":"number","maximum":1.0,"minimum":0.0},"repeat_penalty":{"type":"number","maximum":2.0,"minimum":0.0},"seed":{"type":"integer","maximum":2147483647.0,"minimum":-1.0},"stop":{"oneOf":[{"type":"string"},{"items":{"type":"string","maxLength":200},"type":"array","maxItems":8}]}},"additionalProperties":true,"type":"object","description":"Sampling controls. Unknown fields are ignored. num_predict and max_tokens are equivalent."},"messages":{"items":{"properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string","maxLength":16777216,"minLength":1}},"type":"object","required":["role","content"]},"type":"array","maxItems":500,"minItems":1,"description":"The final item must have role=user."},"attachment_ids":{"items":{"type":"string"},"type":"array","maxItems":20}},"type":"object","description":"Provide input, messages, attachment_ids, or a combination."}},"multipart/form-data":{"schema":{"properties":{"conversation_id":{"type":"string"},"input":{"type":"string","description":"Only the first 200000 characters are used."},"model":{"type":"string"},"mode":{"type":"string","enum":["chat","codex"],"default":"chat"},"stream":{"type":"string","description":"Boolean form value such as true or false."},"web_search":{"type":"string","description":"Boolean form value such as true or false."},"server_tools":{"type":"string","description":"JSON boolean or array of server tool names."},"options":{"type":"string","description":"JSON object encoded as a form field."},"messages":{"type":"string","description":"JSON array of role/content messages."},"attachment_ids":{"type":"string","description":"JSON array of attachment identifiers."},"files":{"items":{"type":"string","format":"binary"},"type":"array"},"file":{"type":"string","format":"binary","description":"Legacy single-file field."},"attachments":{"items":{"type":"string","format":"binary"},"type":"array","description":"Legacy alias for files."},"attachment":{"type":"string","format":"binary","description":"Legacy alias for file."}},"type":"object"}}},"required":true},"responses":{"200":{"description":"Chat result or server-sent event stream.","content":{"application/json":{"schema":{"properties":{"conversation_id":{"type":"integer"},"user_message_id":{"type":"integer","description":"Persisted user message identifier."},"model":{"type":"string"},"mode":{"type":"string","enum":["chat","codex"]},"used_vision_model":{"type":"boolean"},"attachments":{"items":{"properties":{"id":{"type":"string"},"filename":{"type":"string"},"mime_type":{"type":"string"},"kind":{"type":"string"},"size_bytes":{"type":"integer","minimum":0.0}},"additionalProperties":false,"type":"object","required":["id","filename","mime_type","kind","size_bytes"]},"type":"array"},"context_compaction":{"additionalProperties":true,"type":"object","description":"Old prompt history removed before inference."},"result":{"properties":{"model":{"type":"string"},"created_at":{"type":"string"},"message":{"properties":{"role":{"type":"string"},"content":{"type":"string"},"reasoning_content":{"type":"string","description":"Parsed reasoning when the model exposes it."},"tool_calls":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Parsed tool-call metadata from llama.cpp. External client tools are returned unchanged. The optional Server tools are executed only when explicitly enabled."}},"additionalProperties":true,"type":"object","required":["role","content"]},"done":{"type":"boolean"},"done_reason":{"type":"string"},"provider":{"type":"string","enum":["llama.cpp"]},"upstream_id":{"type":"string"},"prompt_eval_count":{"type":"integer","minimum":0.0},"eval_count":{"type":"integer","minimum":0.0},"usage":{"properties":{"prompt_tokens":{"type":"integer","minimum":0.0},"completion_tokens":{"type":"integer","minimum":0.0},"total_tokens":{"type":"integer","minimum":0.0}},"additionalProperties":true,"type":"object"},"timings":{"additionalProperties":true,"type":"object","description":"Performance metrics returned by llama.cpp."}},"additionalProperties":true,"type":"object","description":"Stable chat response envelope; llama.cpp metrics are preserved."}},"additionalProperties":false,"type":"object","required":["conversation_id","model","mode","used_vision_model","attachments","result"]}},"text/event-stream":{"schema":{"type":"string","description":"SSE status and compatible chat events, heartbeat comments, then `data: [DONE]`.","example":"data: {\"type\":\"status\",\"state\":\"running\",\"conversation_id\":1,\"attachments\":[],\"mode\":\"chat\"}\n\ndata: [DONE]\n\n"}}}},"400":{"description":"Invalid chat request."},"401":{"description":"Authentication required."},"403":{"description":"Access denied."},"404":{"description":"Conversation not found."},"409":{"description":"Conversation changed or already has an active turn."},"413":{"description":"Uploaded content is too large."},"415":{"description":"Unsupported media type."},"429":{"description":"Rate limit exceeded."},"499":{"description":"Client disconnected."},"502":{"description":"Model request failed."},"503":{"description":"Chat or upload queue is unavailable."},"504":{"description":"Queue or model request timed out."}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/v1/chat":{"post":{"tags":["chat"],"summary":"Chat","operationId":"chat_v1_chat_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"conversation_id":{"oneOf":[{"type":"integer"},{"type":"string"}],"description":"Existing conversation identifier; omit to create one."},"input":{"type":"string","description":"Only the first 200000 characters are used."},"model":{"type":"string"},"mode":{"type":"string","enum":["chat","codex"],"default":"chat"},"stream":{"type":"boolean","default":true},"web_search":{"type":"boolean","description":"Enable all safe server-side web tools.","default":false},"server_tools":{"oneOf":[{"type":"boolean"},{"items":{"type":"string","enum":["web_search","web_fetch","repository_read","get_current_time","get_weather"]},"type":"array"}],"description":"Enable all tools or select an exact subset."},"options":{"properties":{"temperature":{"type":"number","maximum":2.0,"minimum":0.0},"num_predict":{"type":"integer","minimum":1.0},"max_tokens":{"type":"integer","minimum":1.0},"top_p":{"type":"number","maximum":1.0,"minimum":0.0},"top_k":{"type":"integer","maximum":200.0,"minimum":0.0},"min_p":{"type":"number","maximum":1.0,"minimum":0.0},"repeat_penalty":{"type":"number","maximum":2.0,"minimum":0.0},"seed":{"type":"integer","maximum":2147483647.0,"minimum":-1.0},"stop":{"oneOf":[{"type":"string"},{"items":{"type":"string","maxLength":200},"type":"array","maxItems":8}]}},"additionalProperties":true,"type":"object","description":"Sampling controls. Unknown fields are ignored. num_predict and max_tokens are equivalent."},"messages":{"items":{"properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string","maxLength":16777216,"minLength":1}},"type":"object","required":["role","content"]},"type":"array","maxItems":500,"minItems":1,"description":"The final item must have role=user."},"attachment_ids":{"items":{"type":"string"},"type":"array","maxItems":20}},"type":"object","description":"Provide input, messages, attachment_ids, or a combination."}},"multipart/form-data":{"schema":{"properties":{"conversation_id":{"type":"string"},"input":{"type":"string","description":"Only the first 200000 characters are used."},"model":{"type":"string"},"mode":{"type":"string","enum":["chat","codex"],"default":"chat"},"stream":{"type":"string","description":"Boolean form value such as true or false."},"web_search":{"type":"string","description":"Boolean form value such as true or false."},"server_tools":{"type":"string","description":"JSON boolean or array of server tool names."},"options":{"type":"string","description":"JSON object encoded as a form field."},"messages":{"type":"string","description":"JSON array of role/content messages."},"attachment_ids":{"type":"string","description":"JSON array of attachment identifiers."},"files":{"items":{"type":"string","format":"binary"},"type":"array"},"file":{"type":"string","format":"binary","description":"Legacy single-file field."},"attachments":{"items":{"type":"string","format":"binary"},"type":"array","description":"Legacy alias for files."},"attachment":{"type":"string","format":"binary","description":"Legacy alias for file."}},"type":"object"}}},"required":true},"responses":{"200":{"description":"Chat result or server-sent event stream.","content":{"application/json":{"schema":{"properties":{"conversation_id":{"type":"integer"},"user_message_id":{"type":"integer","description":"Persisted user message identifier."},"model":{"type":"string"},"mode":{"type":"string","enum":["chat","codex"]},"used_vision_model":{"type":"boolean"},"attachments":{"items":{"properties":{"id":{"type":"string"},"filename":{"type":"string"},"mime_type":{"type":"string"},"kind":{"type":"string"},"size_bytes":{"type":"integer","minimum":0.0}},"additionalProperties":false,"type":"object","required":["id","filename","mime_type","kind","size_bytes"]},"type":"array"},"context_compaction":{"additionalProperties":true,"type":"object","description":"Old prompt history removed before inference."},"result":{"properties":{"model":{"type":"string"},"created_at":{"type":"string"},"message":{"properties":{"role":{"type":"string"},"content":{"type":"string"},"reasoning_content":{"type":"string","description":"Parsed reasoning when the model exposes it."},"tool_calls":{"items":{"additionalProperties":true,"type":"object"},"type":"array","description":"Parsed tool-call metadata from llama.cpp. External client tools are returned unchanged. The optional Server tools are executed only when explicitly enabled."}},"additionalProperties":true,"type":"object","required":["role","content"]},"done":{"type":"boolean"},"done_reason":{"type":"string"},"provider":{"type":"string","enum":["llama.cpp"]},"upstream_id":{"type":"string"},"prompt_eval_count":{"type":"integer","minimum":0.0},"eval_count":{"type":"integer","minimum":0.0},"usage":{"properties":{"prompt_tokens":{"type":"integer","minimum":0.0},"completion_tokens":{"type":"integer","minimum":0.0},"total_tokens":{"type":"integer","minimum":0.0}},"additionalProperties":true,"type":"object"},"timings":{"additionalProperties":true,"type":"object","description":"Performance metrics returned by llama.cpp."}},"additionalProperties":true,"type":"object","description":"Stable chat response envelope; llama.cpp metrics are preserved."}},"additionalProperties":false,"type":"object","required":["conversation_id","model","mode","used_vision_model","attachments","result"]}},"text/event-stream":{"schema":{"type":"string","description":"SSE status and compatible chat events, heartbeat comments, then `data: [DONE]`.","example":"data: {\"type\":\"status\",\"state\":\"running\",\"conversation_id\":1,\"attachments\":[],\"mode\":\"chat\"}\n\ndata: [DONE]\n\n"}}}},"400":{"description":"Invalid chat request."},"401":{"description":"Authentication required."},"403":{"description":"Access denied."},"404":{"description":"Conversation not found."},"409":{"description":"Conversation changed or already has an active turn."},"413":{"description":"Uploaded content is too large."},"415":{"description":"Unsupported media type."},"429":{"description":"Rate limit exceeded."},"499":{"description":"Client disconnected."},"502":{"description":"Model request failed."},"503":{"description":"Chat or upload queue is unavailable."},"504":{"description":"Queue or model request timed out."}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/openai/v1/models":{"get":{"tags":["OpenAI compatibility"],"summary":"Openai Models","operationId":"openai_models_openai_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Openai Models Openai V1 Models Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/openai/v1/chat/completions":{"post":{"tags":["OpenAI compatibility"],"summary":"Chat Completions","operationId":"chat_completions_openai_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"model":{"type":"string"},"messages":{"items":{"type":"object"},"type":"array","maxItems":500,"minItems":1},"stream":{"type":"boolean","default":false},"tools":{"type":"array"},"tool_choice":{},"temperature":{"type":"number"},"top_p":{"type":"number"},"max_tokens":{"type":"integer"},"max_completion_tokens":{"type":"integer"},"stop":{},"response_format":{"type":"object"},"web_search":{"type":"boolean","description":"Enable all safe server-side internet tools."},"server_tools":{"oneOf":[{"type":"boolean"},{"items":{"type":"string"},"type":"array"}],"description":"Boolean or list of web_search, web_fetch, repository_read, get_current_time, get_weather."}},"additionalProperties":true,"type":"object","required":["messages"]}}},"required":true},"responses":{"200":{"description":"OpenAI-compatible completion or SSE stream.","content":{"application/json":{"schema":{"type":"object"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request."},"401":{"description":"Invalid or missing API key."},"403":{"description":"Model or account policy denied the request."},"429":{"description":"Rate or API-key quota exceeded."},"502":{"description":"Inference provider failed."},"503":{"description":"Queue or provider unavailable."},"504":{"description":"Queue or inference timeout."}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/v1/chat/completions":{"post":{"tags":["OpenAI compatibility"],"summary":"Chat Completions","operationId":"chat_completions_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"model":{"type":"string"},"messages":{"items":{"type":"object"},"type":"array","maxItems":500,"minItems":1},"stream":{"type":"boolean","default":false},"tools":{"type":"array"},"tool_choice":{},"temperature":{"type":"number"},"top_p":{"type":"number"},"max_tokens":{"type":"integer"},"max_completion_tokens":{"type":"integer"},"stop":{},"response_format":{"type":"object"},"web_search":{"type":"boolean","description":"Enable all safe server-side internet tools."},"server_tools":{"oneOf":[{"type":"boolean"},{"items":{"type":"string"},"type":"array"}],"description":"Boolean or list of web_search, web_fetch, repository_read, get_current_time, get_weather."}},"additionalProperties":true,"type":"object","required":["messages"]}}},"required":true},"responses":{"200":{"description":"OpenAI-compatible completion or SSE stream.","content":{"application/json":{"schema":{"type":"object"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request."},"401":{"description":"Invalid or missing API key."},"403":{"description":"Model or account policy denied the request."},"429":{"description":"Rate or API-key quota exceeded."},"502":{"description":"Inference provider failed."},"503":{"description":"Queue or provider unavailable."},"504":{"description":"Queue or inference timeout."}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/openai/v1/tools/capabilities":{"get":{"tags":["Server web tools"],"summary":"Tool Capabilities","operationId":"tool_capabilities_openai_v1_tools_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Tool Capabilities Openai V1 Tools Capabilities Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/v1/tools/capabilities":{"get":{"tags":["Server web tools"],"summary":"Tool Capabilities","operationId":"tool_capabilities_v1_tools_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Tool Capabilities V1 Tools Capabilities Get"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/openai/v1/tools/web-search":{"post":{"tags":["Server web tools"],"summary":"Web Search","operationId":"web_search_openai_v1_tools_web_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Web Search Openai V1 Tools Web Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/v1/tools/web-search":{"post":{"tags":["Server web tools"],"summary":"Web Search","operationId":"web_search_v1_tools_web_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Web Search V1 Tools Web Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/openai/v1/tools/web-fetch":{"post":{"tags":["Server web tools"],"summary":"Web Fetch","operationId":"web_fetch_openai_v1_tools_web_fetch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Web Fetch Openai V1 Tools Web Fetch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/v1/tools/web-fetch":{"post":{"tags":["Server web tools"],"summary":"Web Fetch","operationId":"web_fetch_v1_tools_web_fetch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Web Fetch V1 Tools Web Fetch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/openai/v1/tools/repository":{"post":{"tags":["Server web tools"],"summary":"Repository Read","operationId":"repository_read_openai_v1_tools_repository_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Repository Read Openai V1 Tools Repository Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/v1/tools/repository":{"post":{"tags":["Server web tools"],"summary":"Repository Read","operationId":"repository_read_v1_tools_repository_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Repository Read V1 Tools Repository Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}},"/openai/v1/tools/time":{"get":{"tags":["Server web tools"],"summary":"Current Time","operationId":"current_time_openai_v1_tools_time_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"City"}},{"name":"timezone","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Timezone"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Current Time Openai V1 Tools Time Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/time":{"get":{"tags":["Server web tools"],"summary":"Current Time","operationId":"current_time_v1_tools_time_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"City"}},{"name":"timezone","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Timezone"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Current Time V1 Tools Time Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/openai/v1/tools/weather":{"get":{"tags":["Server web tools"],"summary":"Weather","operationId":"weather_openai_v1_tools_weather_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"city","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":200,"title":"City"}},{"name":"forecast_days","in":"query","required":false,"schema":{"type":"integer","maximum":7,"minimum":1,"default":3,"title":"Forecast Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Weather Openai V1 Tools Weather Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tools/weather":{"get":{"tags":["Server web tools"],"summary":"Weather","operationId":"weather_v1_tools_weather_get","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"city","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":200,"title":"City"}},{"name":"forecast_days","in":"query","required":false,"schema":{"type":"integer","maximum":7,"minimum":1,"default":3,"title":"Forecast Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Weather V1 Tools Weather Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics":{"get":{"tags":["system"],"summary":"Prometheus metrics without chat content or user labels","operationId":"prometheus_metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}]}}},"components":{"schemas":{"AccessReqIn":{"properties":{"reason":{"type":"string","maxLength":2000,"title":"Reason","default":""}},"additionalProperties":false,"type":"object","title":"AccessReqIn"},"AdminSetBanIn":{"properties":{"banned":{"type":"boolean","title":"Banned"}},"additionalProperties":false,"type":"object","required":["banned"],"title":"AdminSetBanIn"},"AdminSetPasswordIn":{"properties":{"new_password":{"type":"string","maxLength":200,"minLength":8,"title":"New Password"}},"additionalProperties":false,"type":"object","required":["new_password"],"title":"AdminSetPasswordIn"},"AgentActionNextOut":{"properties":{"action":{"anyOf":[{"$ref":"#/components/schemas/AgentActionOut"},{"type":"null"}]}},"type":"object","title":"AgentActionNextOut"},"AgentActionOut":{"properties":{"id":{"type":"string","title":"Id"},"sequence":{"type":"integer","title":"Sequence"},"tool":{"type":"string","title":"Tool"},"arguments":{"additionalProperties":true,"type":"object","title":"Arguments"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","sequence","tool","arguments","status","created_at"],"title":"AgentActionOut"},"AgentActionResultIn":{"properties":{"client_id":{"type":"string","maxLength":100,"minLength":8,"title":"Client Id"},"ok":{"type":"boolean","title":"Ok"},"output":{"type":"string","maxLength":60000,"title":"Output","default":""},"error":{"type":"string","maxLength":500,"title":"Error","default":""},"truncated":{"type":"boolean","title":"Truncated","default":false},"duration_ms":{"anyOf":[{"type":"integer","maximum":86400000.0,"minimum":0.0},{"type":"null"}],"title":"Duration Ms"},"exit_code":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":-2147483648.0},{"type":"null"}],"title":"Exit Code"}},"additionalProperties":false,"type":"object","required":["client_id","ok"],"title":"AgentActionResultIn"},"AgentClientIn":{"properties":{"client_id":{"type":"string","maxLength":100,"minLength":8,"title":"Client Id"}},"additionalProperties":false,"type":"object","required":["client_id"],"title":"AgentClientIn"},"AgentContinueOut":{"properties":{"task":{"$ref":"#/components/schemas/AgentTaskOut"},"pending_action":{"anyOf":[{"$ref":"#/components/schemas/AgentActionOut"},{"type":"null"}]}},"type":"object","required":["task"],"title":"AgentContinueOut"},"AgentEventOut":{"properties":{"id":{"type":"integer","title":"Id"},"event_type":{"type":"string","title":"Event Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","event_type","data","created_at"],"title":"AgentEventOut"},"AgentEventsOut":{"properties":{"events":{"items":{"$ref":"#/components/schemas/AgentEventOut"},"type":"array","title":"Events"},"next_after":{"type":"integer","title":"Next After"}},"type":"object","required":["events","next_after"],"title":"AgentEventsOut"},"AgentTaskCreateIn":{"properties":{"client_id":{"type":"string","maxLength":100,"minLength":8,"title":"Client Id"},"prompt":{"type":"string","maxLength":100000,"minLength":1,"title":"Prompt"},"workspace_label":{"type":"string","maxLength":120,"minLength":1,"title":"Workspace Label"},"model":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Model"},"max_steps":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Steps"},"timeout_seconds":{"anyOf":[{"type":"integer","minimum":60.0},{"type":"null"}],"title":"Timeout Seconds"}},"additionalProperties":false,"type":"object","required":["client_id","prompt","workspace_label"],"title":"AgentTaskCreateIn"},"AgentTaskFollowUpIn":{"properties":{"client_id":{"type":"string","maxLength":100,"minLength":8,"title":"Client Id"},"prompt":{"type":"string","maxLength":100000,"minLength":1,"title":"Prompt"}},"additionalProperties":false,"type":"object","required":["client_id","prompt"],"title":"AgentTaskFollowUpIn"},"AgentTaskListOut":{"properties":{"tasks":{"items":{"$ref":"#/components/schemas/AgentTaskOut"},"type":"array","title":"Tasks"}},"type":"object","required":["tasks"],"title":"AgentTaskListOut"},"AgentTaskOut":{"properties":{"id":{"type":"string","title":"Id"},"client_id":{"type":"string","title":"Client Id"},"workspace_label":{"type":"string","title":"Workspace Label"},"prompt":{"type":"string","title":"Prompt"},"model":{"type":"string","title":"Model"},"status":{"type":"string","title":"Status"},"max_steps":{"type":"integer","title":"Max Steps"},"steps_completed":{"type":"integer","title":"Steps Completed"},"timeout_seconds":{"type":"integer","title":"Timeout Seconds"},"deadline_at":{"type":"string","format":"date-time","title":"Deadline At"},"cancel_requested":{"type":"boolean","title":"Cancel Requested"},"result_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Summary"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"pending_action":{"anyOf":[{"$ref":"#/components/schemas/AgentActionOut"},{"type":"null"}]}},"type":"object","required":["id","client_id","workspace_label","prompt","model","status","max_steps","steps_completed","timeout_seconds","deadline_at","cancel_requested","created_at","updated_at"],"title":"AgentTaskOut"},"ApiKeyListOut":{"properties":{"api_keys":{"items":{"$ref":"#/components/schemas/ApiKeyOut"},"type":"array","title":"Api Keys"}},"type":"object","required":["api_keys"],"title":"ApiKeyListOut"},"ApiKeyOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"prefix":{"type":"string","title":"Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"enabled":{"type":"boolean","title":"Enabled"},"disable_thinking":{"type":"boolean","title":"Disable Thinking"},"server_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Server Tools"},"effective_server_tools":{"items":{"type":"string"},"type":"array","title":"Effective Server Tools"},"quota_requests":{"type":"integer","title":"Quota Requests"},"quota_tokens":{"type":"integer","title":"Quota Tokens"},"quota_period_seconds":{"type":"integer","title":"Quota Period Seconds"},"usage_requests":{"type":"integer","title":"Usage Requests"},"usage_tokens":{"type":"integer","title":"Usage Tokens"},"quota_reset_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quota Reset At"},"status":{"type":"string","title":"Status"},"owner":{"$ref":"#/components/schemas/ApiKeyOwnerOut"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"revoked_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked By Email"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"rotated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rotated At"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","name","description","prefix","scopes","enabled","disable_thinking","server_tools","effective_server_tools","quota_requests","quota_tokens","quota_period_seconds","usage_requests","usage_tokens","quota_reset_at","status","owner","created_by_email","revoked_by_email","created_at","updated_at","expires_at","last_used_at","rotated_at","revoked_at"],"title":"ApiKeyOut"},"ApiKeyOwnerOut":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"role_name":{"type":"string","title":"Role Name"},"plan_name":{"type":"string","title":"Plan Name"},"is_banned":{"type":"boolean","title":"Is Banned"}},"type":"object","required":["id","email","role_name","plan_name","is_banned"],"title":"ApiKeyOwnerOut"},"ApiKeySecretOut":{"properties":{"api_key":{"$ref":"#/components/schemas/ApiKeyOut"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["api_key","secret"],"title":"ApiKeySecretOut"},"BackendModelOut":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"input_modalities":{"items":{"type":"string"},"type":"array","title":"Input Modalities"},"output_modalities":{"items":{"type":"string"},"type":"array","title":"Output Modalities"},"parameter_count":{"type":"integer","title":"Parameter Count","default":0},"size_bytes":{"type":"integer","title":"Size Bytes","default":0},"context_train":{"type":"integer","title":"Context Train","default":0},"importable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Importable"}},"type":"object","required":["id","status"],"title":"BackendModelOut"},"BackendStatusOut":{"properties":{"provider":{"type":"string","title":"Provider"},"available":{"type":"boolean","title":"Available"},"state":{"type":"string","title":"State"},"inventory_supported":{"type":"boolean","title":"Inventory Supported"},"inventory_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inventory Error"},"models":{"items":{"$ref":"#/components/schemas/BackendModelOut"},"type":"array","title":"Models"}},"type":"object","required":["provider","available","state","inventory_supported"],"title":"BackendStatusOut"},"BackendSyncOut":{"properties":{"ok":{"type":"boolean","title":"Ok"},"created":{"items":{"type":"string"},"type":"array","title":"Created"},"created_count":{"type":"integer","title":"Created Count"},"existing_count":{"type":"integer","title":"Existing Count"},"unprocessed_count":{"type":"integer","title":"Unprocessed Count"},"skipped":{"items":{"type":"string"},"type":"array","title":"Skipped"},"models_seen":{"type":"integer","title":"Models Seen"},"backend":{"$ref":"#/components/schemas/BackendStatusOut"}},"type":"object","required":["ok","created","created_count","existing_count","unprocessed_count","skipped","models_seen","backend"],"title":"BackendSyncOut"},"CreateApiKeyIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"description":{"type":"string","maxLength":2000,"title":"Description","default":""},"user_id":{"type":"integer","minimum":1.0,"title":"User Id"},"scopes":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":100,"title":"Scopes"},"enabled":{"type":"boolean","title":"Enabled","default":true},"disable_thinking":{"type":"boolean","title":"Disable Thinking","default":false},"server_tools":{"anyOf":[{"items":{"type":"string","enum":["web_search","web_fetch","repository_read","get_current_time","get_weather"]},"type":"array","maxItems":5},{"type":"null"}],"title":"Server Tools"},"quota_requests":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Quota Requests","default":0},"quota_tokens":{"type":"integer","maximum":10000000000.0,"minimum":0.0,"title":"Quota Tokens","default":0},"quota_period_seconds":{"type":"integer","maximum":31536000.0,"minimum":60.0,"title":"Quota Period Seconds","default":2592000},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","required":["name","user_id"],"title":"CreateApiKeyIn"},"CreateConversationIn":{"properties":{"title":{"type":"string","maxLength":200,"title":"Title","default":"New chat"}},"additionalProperties":false,"type":"object","title":"CreateConversationIn"},"CreateModelIn":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"display_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Display Name"},"description":{"type":"string","maxLength":4000,"title":"Description","default":""},"enabled":{"type":"boolean","title":"Enabled","default":true},"is_default":{"type":"boolean","title":"Is Default","default":false},"is_vision":{"type":"boolean","title":"Is Vision","default":false},"is_memory":{"type":"boolean","title":"Is Memory","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"CreateModelIn"},"CreatePlanIn":{"properties":{"rpm":{"type":"integer","maximum":100000.0,"minimum":0.0,"title":"Rpm"},"concurrency":{"type":"integer","maximum":128.0,"minimum":1.0,"title":"Concurrency"},"priority":{"type":"integer","maximum":10000.0,"minimum":-10000.0,"title":"Priority"},"max_num_predict":{"type":"integer","minimum":0.0,"title":"Max Num Predict"},"ctx_max_messages":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Ctx Max Messages"},"ctx_max_chars":{"type":"integer","maximum":500000.0,"minimum":1000.0,"title":"Ctx Max Chars"},"mem_max_items":{"type":"integer","maximum":500.0,"minimum":0.0,"title":"Mem Max Items"},"can_switch_model":{"type":"boolean","title":"Can Switch Model"},"can_use_orbit":{"type":"boolean","title":"Can Use Orbit"},"can_use_sandbox":{"type":"boolean","title":"Can Use Sandbox"},"allowed_models":{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":100,"minItems":1,"title":"Allowed Models"},"allowed_server_tools":{"items":{"type":"string","enum":["web_search","web_fetch","repository_read","get_current_time","get_weather"]},"type":"array","maxItems":5,"title":"Allowed Server Tools"},"name":{"type":"string","maxLength":50,"minLength":1,"title":"Name"}},"additionalProperties":false,"type":"object","required":["rpm","concurrency","priority","max_num_predict","ctx_max_messages","ctx_max_chars","mem_max_items","can_switch_model","can_use_orbit","can_use_sandbox","allowed_models","name"],"title":"CreatePlanIn"},"CreateRoleIn":{"properties":{"name":{"type":"string","maxLength":50,"minLength":2,"pattern":"^[a-z][a-z0-9_]*$","title":"Name"},"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"description":{"type":"string","maxLength":4000,"title":"Description","default":""},"permissions":{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":100,"title":"Permissions"}},"additionalProperties":false,"type":"object","required":["name"],"title":"CreateRoleIn"},"DecideReqIn":{"properties":{"action":{"type":"string","enum":["approve","reject"],"title":"Action"},"note":{"type":"string","maxLength":2000,"title":"Note","default":""}},"additionalProperties":false,"type":"object","required":["action"],"title":"DecideReqIn"},"FeedbackIn":{"properties":{"rating":{"anyOf":[{"type":"string","enum":["up","down"]},{"type":"null"}],"title":"Rating"}},"additionalProperties":false,"type":"object","required":["rating"],"title":"FeedbackIn"},"FetchIn":{"properties":{"url":{"type":"string","maxLength":2000,"minLength":8,"title":"Url"},"max_chars":{"type":"integer","maximum":30000.0,"minimum":1000.0,"title":"Max Chars","default":12000}},"additionalProperties":false,"type":"object","required":["url"],"title":"FetchIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthStatus":{"properties":{"ok":{"type":"boolean","title":"Ok"},"queue":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue"},"workers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workers"}},"type":"object","required":["ok"],"title":"HealthStatus"},"LoginIn":{"properties":{"email":{"type":"string","maxLength":255,"format":"email","title":"Email"},"password":{"type":"string","maxLength":200,"minLength":1,"title":"Password"}},"additionalProperties":false,"type":"object","required":["email","password"],"title":"LoginIn"},"MaintenanceIn":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"},"enabled":{"type":"boolean","title":"Enabled"}},"additionalProperties":false,"type":"object","required":["reason","enabled"],"title":"MaintenanceIn"},"MessageEditIn":{"properties":{"content":{"type":"string","maxLength":200000,"minLength":1,"title":"Content"},"delete_later":{"type":"boolean","title":"Delete Later","default":true}},"additionalProperties":false,"type":"object","required":["content"],"title":"MessageEditIn"},"NotificationReadIn":{"properties":{"notification_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Notification Id"}},"additionalProperties":false,"type":"object","title":"NotificationReadIn"},"OperationEventOut":{"properties":{"id":{"type":"integer","title":"Id"},"timestamp":{"type":"string","title":"Timestamp"},"level":{"type":"string","enum":["info","warning","error"],"title":"Level"},"event":{"type":"string","title":"Event"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"queue_depth":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Depth"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"worker":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Worker"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"}},"type":"object","required":["id","timestamp","level","event"],"title":"OperationEventOut"},"PatchApiKeyIn":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":2},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"scopes":{"anyOf":[{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":100},{"type":"null"}],"title":"Scopes"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"disable_thinking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Thinking"},"server_tools":{"anyOf":[{"items":{"type":"string","enum":["web_search","web_fetch","repository_read","get_current_time","get_weather"]},"type":"array","maxItems":5},{"type":"null"}],"title":"Server Tools"},"quota_requests":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Quota Requests"},"quota_tokens":{"anyOf":[{"type":"integer","maximum":10000000000.0,"minimum":0.0},{"type":"null"}],"title":"Quota Tokens"},"quota_period_seconds":{"anyOf":[{"type":"integer","maximum":31536000.0,"minimum":60.0},{"type":"null"}],"title":"Quota Period Seconds"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","title":"PatchApiKeyIn"},"PatchModelIn":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Description"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"is_vision":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Vision"},"is_memory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Memory"}},"additionalProperties":false,"type":"object","title":"PatchModelIn"},"PatchPlanIn":{"properties":{"rpm":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Rpm"},"concurrency":{"anyOf":[{"type":"integer","maximum":128.0,"minimum":1.0},{"type":"null"}],"title":"Concurrency"},"priority":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":-10000.0},{"type":"null"}],"title":"Priority"},"max_num_predict":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Num Predict"},"ctx_max_messages":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":1.0},{"type":"null"}],"title":"Ctx Max Messages"},"ctx_max_chars":{"anyOf":[{"type":"integer","maximum":500000.0,"minimum":1000.0},{"type":"null"}],"title":"Ctx Max Chars"},"mem_max_items":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":0.0},{"type":"null"}],"title":"Mem Max Items"},"can_switch_model":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Switch Model"},"can_use_orbit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Use Orbit"},"can_use_sandbox":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Can Use Sandbox"},"allowed_models":{"anyOf":[{"items":{"type":"string","maxLength":200,"minLength":1},"type":"array","maxItems":100,"minItems":1},{"type":"null"}],"title":"Allowed Models"},"allowed_server_tools":{"anyOf":[{"items":{"type":"string","enum":["web_search","web_fetch","repository_read","get_current_time","get_weather"]},"type":"array","maxItems":5},{"type":"null"}],"title":"Allowed Server Tools"}},"additionalProperties":false,"type":"object","title":"PatchPlanIn"},"PatchRoleIn":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Description"},"permissions":{"anyOf":[{"items":{"type":"string","maxLength":100,"minLength":1},"type":"array","maxItems":100},{"type":"null"}],"title":"Permissions"}},"additionalProperties":false,"type":"object","title":"PatchRoleIn"},"ProbeIn":{"properties":{"reason":{"type":"string","maxLength":500,"title":"Reason","default":"Ручная проверка модели"}},"additionalProperties":false,"type":"object","title":"ProbeIn"},"ReadyStatus":{"properties":{"ok":{"type":"boolean","title":"Ok"},"queue":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue"},"workers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workers"},"database":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Database"},"redis":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Redis"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"llama_cpp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Llama Cpp"},"llama_cpp_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llama Cpp State"},"ollama":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ollama","description":"Deprecated compatibility alias for llama_cpp.","deprecated":true},"default_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Model"},"vision_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vision Model"},"memory_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Model"},"scheduler":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Scheduler"},"web_search_configured":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Web Search Configured"},"server_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Server Tools"}},"type":"object","required":["ok"],"title":"ReadyStatus"},"ReasonIn":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"ReasonIn"},"RegisterIn":{"properties":{"email":{"type":"string","maxLength":255,"format":"email","title":"Email"},"password":{"type":"string","maxLength":200,"minLength":8,"title":"Password"}},"additionalProperties":false,"type":"object","required":["email","password"],"title":"RegisterIn"},"RepositoryIn":{"properties":{"repository":{"type":"string","maxLength":1000,"minLength":3,"title":"Repository"},"path":{"type":"string","maxLength":1000,"title":"Path","default":""},"ref":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Ref"}},"additionalProperties":false,"type":"object","required":["repository"],"title":"RepositoryIn"},"ResetConfirmIn":{"properties":{"email":{"type":"string","maxLength":255,"format":"email","title":"Email"},"code":{"type":"string","maxLength":20,"minLength":4,"pattern":"^[0-9]+$","title":"Code"},"new_password":{"type":"string","maxLength":200,"minLength":8,"title":"New Password"}},"additionalProperties":false,"type":"object","required":["email","code","new_password"],"title":"ResetConfirmIn"},"ResetStartIn":{"properties":{"email":{"type":"string","maxLength":255,"format":"email","title":"Email"}},"additionalProperties":false,"type":"object","required":["email"],"title":"ResetStartIn"},"RuntimeJobOut":{"properties":{"id":{"type":"string","title":"Id"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"kind":{"type":"string","title":"Kind"},"stream":{"type":"boolean","title":"Stream"},"priority":{"type":"integer","title":"Priority"},"state":{"type":"string","title":"State"},"age_seconds":{"type":"number","title":"Age Seconds"},"running_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Running Seconds"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["id","kind","stream","priority","state","age_seconds"],"title":"RuntimeJobOut"},"RuntimeStatusOut":{"properties":{"generated_at":{"type":"string","title":"Generated At"},"provider":{"type":"string","title":"Provider"},"scheduler":{"$ref":"#/components/schemas/SchedulerRuntimeOut"},"events":{"items":{"$ref":"#/components/schemas/OperationEventOut"},"type":"array","title":"Events"},"infrastructure":{"additionalProperties":true,"type":"object","title":"Infrastructure"},"unread_notifications":{"type":"integer","title":"Unread Notifications"},"privacy":{"type":"string","title":"Privacy"}},"type":"object","required":["generated_at","provider","scheduler","events","infrastructure","unread_notifications","privacy"],"title":"RuntimeStatusOut"},"SchedulerRuntimeOut":{"properties":{"healthy":{"type":"boolean","title":"Healthy"},"stopping":{"type":"boolean","title":"Stopping"},"workers_total":{"type":"integer","title":"Workers Total"},"workers_alive":{"type":"integer","title":"Workers Alive"},"queue_depth":{"type":"integer","title":"Queue Depth"},"queue_capacity":{"type":"integer","title":"Queue Capacity"},"running_count":{"type":"integer","title":"Running Count"},"active_models":{"additionalProperties":{"type":"integer"},"type":"object","title":"Active Models"},"queued_models":{"additionalProperties":{"type":"integer"},"type":"object","title":"Queued Models"},"active_jobs":{"items":{"$ref":"#/components/schemas/RuntimeJobOut"},"type":"array","title":"Active Jobs"},"queued_jobs":{"items":{"$ref":"#/components/schemas/RuntimeJobOut"},"type":"array","title":"Queued Jobs"},"maintenance":{"type":"boolean","title":"Maintenance"},"maintenance_reason":{"type":"string","title":"Maintenance Reason"}},"type":"object","required":["healthy","stopping","workers_total","workers_alive","queue_depth","queue_capacity","running_count","active_models","queued_models","active_jobs","queued_jobs","maintenance","maintenance_reason"],"title":"SchedulerRuntimeOut"},"SearchIn":{"properties":{"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query"},"max_results":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Results","default":5}},"additionalProperties":false,"type":"object","required":["query"],"title":"SearchIn"},"SetPlanIn":{"properties":{"plan_name":{"type":"string","maxLength":50,"minLength":1,"title":"Plan Name"}},"additionalProperties":false,"type":"object","required":["plan_name"],"title":"SetPlanIn"},"SetRoleIn":{"properties":{"role_name":{"type":"string","maxLength":50,"minLength":2,"pattern":"^[a-z][a-z0-9_]*$","title":"Role Name"}},"additionalProperties":false,"type":"object","required":["role_name"],"title":"SetRoleIn"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyCodeIn":{"properties":{"code":{"type":"string","maxLength":20,"minLength":4,"pattern":"^[0-9]+$","title":"Code"}},"additionalProperties":false,"type":"object","required":["code"],"title":"VerifyCodeIn"}},"securitySchemes":{"BearerAuth":{"type":"http","description":"JWT returned by POST /auth/login, or a managed API key for OpenAI-compatible and regular user API routes.","scheme":"bearer"},"ApiKeyAuth":{"type":"apiKey","description":"Managed user API key or configured primary-admin/history-service key.","in":"header","name":"X-API-Key"}}}}