{"openapi":"3.1.0","info":{"title":"LumiTranslate Distribution API","description":"官网、模型目录与 Android 版本分发。模型与配置接口需要 Bearer API Key；安装包版本与健康检查公开。云端翻译未启用。","version":"1.0.0"},"servers":[{"url":"https://lumitranslate.cocbc.com"}],"paths":{"/api/v1/health":{"get":{"tags":["Service"],"summary":"服务存活检查","operationId":"getHealth","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_Health_"}}}},"401":{"description":"Credential invalid or required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/config":{"get":{"tags":["Service"],"summary":"客户端配置与服务能力","operationId":"getConfig","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_Config_"}}}},"401":{"description":"Credential invalid or required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/models":{"get":{"tags":["Models"],"summary":"分页列出模型；文件未发布时 available=false","operationId":"listModels","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"minimum":1,"default":1,"title":"Page"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Pagesize"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelPage"}}}},"401":{"description":"Credential invalid or required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/models/{model_id}":{"get":{"tags":["Models"],"summary":"单个模型及其固定版本下载信息","operationId":"getModel","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_Model_"}}}},"401":{"description":"Credential invalid or required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/releases/latest":{"get":{"tags":["Releases"],"summary":"指定渠道最新 Android 版本；没有已发布版本时返回 404","operationId":"getLatestRelease","parameters":[{"name":"platform","in":"query","required":false,"schema":{"const":"android","type":"string","default":"android","title":"Platform"}},{"name":"channel","in":"query","required":false,"schema":{"enum":["stable","preview"],"type":"string","default":"stable","title":"Channel"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_Release_"}}}},"401":{"description":"Credential invalid or required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/device/challenges":{"post":{"tags":["App device authorization"],"summary":"App 请求一次性设备授权挑战","operationId":"challenge_api_v1_device_challenges_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChallengeBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_DeviceChallenge_"}}}},"401":{"description":"Credential invalid or required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/device/enrollments":{"post":{"tags":["App device authorization"],"summary":"校验硬件证明、APK 签名及持钥证明，自动注册官方 App","operationId":"enroll_api_v1_device_enrollments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Enrollment"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_Union_DeviceToken__DeviceWaiting__"}}}},"401":{"description":"Credential invalid or required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/device/tokens":{"post":{"tags":["App device authorization"],"summary":"设备对一次性挑战签名，换取一小时访问凭证","operationId":"token_api_v1_device_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_DeviceToken_"}}}},"401":{"description":"Credential invalid or required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Resource conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/admin/v1/session":{"get":{"tags":["Administration"],"summary":"当前管理员会话","operationId":"session_api_admin_v1_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_SessionInfo_"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}},"security":[{"APIKeyCookie":[]}]},"post":{"tags":["Administration"],"summary":"管理员登录","operationId":"login_api_admin_v1_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_SessionInfo_"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}}},"delete":{"tags":["Administration"],"summary":"退出并撤销会话","operationId":"logout_api_admin_v1_session_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_ActionResult_"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}},"security":[{"APIKeyCookie":[]}]}},"/api/admin/v1/password":{"put":{"tags":["Administration"],"summary":"修改密码并撤销所有会话","operationId":"password_api_admin_v1_password_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_ActionResult_"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}},"security":[{"APIKeyCookie":[]}]}},"/api/admin/v1/overview":{"get":{"tags":["Administration"],"summary":"模型、磁盘、最近更新与审计","operationId":"overview_api_admin_v1_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_Overview_"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}},"security":[{"APIKeyCookie":[]}]}},"/api/admin/v1/model-updates/check":{"post":{"tags":["Administration"],"summary":"检查固定上游的模型更新","operationId":"check_api_admin_v1_model_updates_check_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_UpdateInfo_"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}},"security":[{"APIKeyCookie":[]}]}},"/api/admin/v1/model-updates/{update_id}/publish":{"post":{"tags":["Administration"],"summary":"下载、校验并发布已检查的模型版本","operationId":"publish_api_admin_v1_model_updates__update_id__publish_post","security":[{"APIKeyCookie":[]}],"parameters":[{"name":"update_id","in":"path","required":true,"schema":{"type":"string","title":"Update Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_UpdateInfo_"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}}}},"/api/admin/v1/api-keys":{"get":{"tags":["Administration"],"summary":"列出分发密钥，不返回明文","operationId":"list_keys_api_admin_v1_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_list_ApiKeyInfo__"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}},"security":[{"APIKeyCookie":[]}]},"post":{"tags":["Administration"],"summary":"生成密钥，明文只返回一次","operationId":"create_key_api_admin_v1_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_CreatedApiKey_"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}},"security":[{"APIKeyCookie":[]}]}},"/api/admin/v1/api-keys/{key_id}":{"delete":{"tags":["Administration"],"summary":"撤销密钥与其已签发下载链接","operationId":"revoke_api_admin_v1_api_keys__key_id__delete","security":[{"APIKeyCookie":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_Acknowledgement_"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}}}},"/api/admin/v1/devices":{"get":{"tags":["Administration"],"summary":"查看自动授权与待审核设备","operationId":"devices_api_admin_v1_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_list_DeviceInfo__"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}},"security":[{"APIKeyCookie":[]}]}},"/api/admin/v1/devices/{device_id}":{"put":{"tags":["Administration"],"summary":"核对配对码后批准设备，或立即停用设备","operationId":"decide_api_admin_v1_devices__device_id__put","security":[{"APIKeyCookie":[]}],"parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope_Acknowledgement_"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid origin or CSRF token"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Update conflict"},"422":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded; see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Upstream unavailable"},"503":{"description":"Not configured"}}}}},"components":{"schemas":{"Acknowledgement":{"properties":{"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["ok"],"title":"Acknowledgement"},"ActionResult":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true}},"type":"object","title":"ActionResult"},"AdminModel":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"family":{"type":"string","title":"Family"},"revision":{"type":"string","title":"Revision"},"quantization":{"type":"string","title":"Quantization"},"format":{"type":"string","const":"gguf","title":"Format"},"fileName":{"type":"string","title":"Filename"},"sizeBytes":{"type":"integer","exclusiveMinimum":0.0,"title":"Sizebytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Sha256"},"recommended":{"type":"boolean","title":"Recommended"},"minRamMb":{"type":"integer","title":"Minrammb"},"description":{"type":"string","title":"Description"},"license":{"type":"string","title":"License"},"sourceUrl":{"type":"string","title":"Sourceurl"},"architectures":{"items":{"type":"string"},"type":"array","title":"Architectures"},"minAppVersionCode":{"type":"integer","title":"Minappversioncode"},"available":{"type":"boolean","title":"Available"}},"type":"object","required":["id","name","family","revision","quantization","format","fileName","sizeBytes","sha256","recommended","minRamMb","description","license","sourceUrl","architectures","minAppVersionCode","available"],"title":"AdminModel"},"ApiKeyInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"scopes":{"items":{"type":"string","enum":["config:read","models:read","models:download"]},"type":"array","title":"Scopes"},"createdAt":{"type":"string","title":"Createdat"},"expiresAt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiresat"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastusedat"},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revokedat"},"active":{"type":"boolean","title":"Active"}},"type":"object","required":["id","name","prefix","scopes","createdAt","expiresAt","lastUsedAt","revokedAt","active"],"title":"ApiKeyInfo"},"AuditEntry":{"properties":{"action":{"type":"string","title":"Action"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["action","created_at"],"title":"AuditEntry"},"Capabilities":{"properties":{"modelDistribution":{"type":"boolean","title":"Modeldistribution","default":true},"appReleases":{"type":"boolean","title":"Appreleases","default":true},"cloudTranslation":{"type":"boolean","title":"Cloudtranslation","default":false},"accounts":{"type":"boolean","title":"Accounts","default":false}},"type":"object","title":"Capabilities"},"ChallengeBody":{"properties":{"deviceId":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Deviceid"}},"type":"object","title":"ChallengeBody"},"Config":{"properties":{"apiVersion":{"type":"string","const":"v1","title":"Apiversion","default":"v1"},"minSupportedAppVersionCode":{"type":"integer","title":"Minsupportedappversioncode","default":3},"recommendedModelId":{"type":"string","title":"Recommendedmodelid","default":"q4_k_m"},"capabilities":{"$ref":"#/components/schemas/Capabilities","default":{"modelDistribution":true,"appReleases":true,"cloudTranslation":false,"accounts":false}},"websiteUrl":{"type":"string","title":"Websiteurl"},"docsUrl":{"type":"string","title":"Docsurl"},"privacyUrl":{"type":"string","title":"Privacyurl"},"catalogUrl":{"type":"string","title":"Catalogurl"}},"type":"object","required":["websiteUrl","docsUrl","privacyUrl","catalogUrl"],"title":"Config"},"CreatedApiKey":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"scopes":{"items":{"type":"string","enum":["config:read","models:read","models:download"]},"type":"array","title":"Scopes"},"createdAt":{"type":"string","title":"Createdat"},"expiresAt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expiresat"},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastusedat"},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revokedat"},"active":{"type":"boolean","title":"Active"},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","prefix","scopes","createdAt","expiresAt","lastUsedAt","revokedAt","active","key"],"title":"CreatedApiKey"},"Decision":{"properties":{"approved":{"type":"boolean","title":"Approved"},"pairingCode":{"type":"string","maxLength":8,"title":"Pairingcode","default":""}},"type":"object","required":["approved"],"title":"Decision"},"DeviceChallenge":{"properties":{"id":{"type":"string","title":"Id"},"nonce":{"type":"string","title":"Nonce"},"expiresAt":{"type":"integer","title":"Expiresat"}},"type":"object","required":["id","nonce","expiresAt"],"title":"DeviceChallenge"},"DeviceInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["ACTIVE","PENDING","DISABLED"],"title":"Status"},"created_at":{"type":"string","title":"Created At"},"last_seen":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen"},"reason":{"type":"string","title":"Reason"},"pairing_code":{"type":"string","title":"Pairing Code"}},"type":"object","required":["id","name","status","created_at","last_seen","reason","pairing_code"],"title":"DeviceInfo"},"DeviceToken":{"properties":{"deviceId":{"type":"string","title":"Deviceid"},"status":{"type":"string","const":"ACTIVE","title":"Status"},"accessToken":{"type":"string","title":"Accesstoken"},"expiresAt":{"type":"integer","title":"Expiresat"}},"type":"object","required":["deviceId","status","accessToken","expiresAt"],"title":"DeviceToken"},"DeviceWaiting":{"properties":{"deviceId":{"type":"string","title":"Deviceid"},"status":{"type":"string","enum":["PENDING","DISABLED"],"title":"Status"},"pairingCode":{"type":"string","title":"Pairingcode"},"message":{"type":"string","title":"Message"}},"type":"object","required":["deviceId","status","pairingCode","message"],"title":"DeviceWaiting"},"DiskInfo":{"properties":{"totalBytes":{"type":"integer","title":"Totalbytes"},"freeBytes":{"type":"integer","title":"Freebytes"}},"type":"object","required":["totalBytes","freeBytes"],"title":"DiskInfo"},"Enrollment":{"properties":{"challengeId":{"type":"string","maxLength":64,"title":"Challengeid"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"certificates":{"items":{"type":"string"},"type":"array","maxItems":6,"minItems":1,"title":"Certificates"},"signature":{"type":"string","maxLength":512,"title":"Signature"}},"type":"object","required":["challengeId","name","certificates","signature"],"title":"Enrollment"},"Envelope_Acknowledgement_":{"properties":{"data":{"$ref":"#/components/schemas/Acknowledgement"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[Acknowledgement]"},"Envelope_ActionResult_":{"properties":{"data":{"$ref":"#/components/schemas/ActionResult"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[ActionResult]"},"Envelope_Config_":{"properties":{"data":{"$ref":"#/components/schemas/Config"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[Config]"},"Envelope_CreatedApiKey_":{"properties":{"data":{"$ref":"#/components/schemas/CreatedApiKey"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[CreatedApiKey]"},"Envelope_DeviceChallenge_":{"properties":{"data":{"$ref":"#/components/schemas/DeviceChallenge"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[DeviceChallenge]"},"Envelope_DeviceToken_":{"properties":{"data":{"$ref":"#/components/schemas/DeviceToken"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[DeviceToken]"},"Envelope_Health_":{"properties":{"data":{"$ref":"#/components/schemas/Health"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[Health]"},"Envelope_Model_":{"properties":{"data":{"$ref":"#/components/schemas/Model"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[Model]"},"Envelope_Overview_":{"properties":{"data":{"$ref":"#/components/schemas/Overview"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[Overview]"},"Envelope_Release_":{"properties":{"data":{"$ref":"#/components/schemas/Release"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[Release]"},"Envelope_SessionInfo_":{"properties":{"data":{"$ref":"#/components/schemas/SessionInfo"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[SessionInfo]"},"Envelope_Union_DeviceToken__DeviceWaiting__":{"properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/DeviceToken"},{"$ref":"#/components/schemas/DeviceWaiting"}],"title":"Data"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[Union[DeviceToken, DeviceWaiting]]"},"Envelope_UpdateInfo_":{"properties":{"data":{"$ref":"#/components/schemas/UpdateInfo"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[UpdateInfo]"},"Envelope_list_ApiKeyInfo__":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ApiKeyInfo"},"type":"array","title":"Data"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[list[ApiKeyInfo]]"},"Envelope_list_DeviceInfo__":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DeviceInfo"},"type":"array","title":"Data"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["data","requestId"],"title":"Envelope[list[DeviceInfo]]"},"ErrorDetail":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"ErrorDetail"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"},"requestId":{"type":"string","title":"Requestid"}},"type":"object","required":["error","requestId"],"title":"ErrorResponse"},"Health":{"properties":{"status":{"type":"string","const":"ok","title":"Status","default":"ok"},"apiVersion":{"type":"string","const":"v1","title":"Apiversion","default":"v1"}},"type":"object","title":"Health"},"KeyCreate":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"validDays":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":1.0},{"type":"null"}],"title":"Validdays","default":90},"scopes":{"items":{"type":"string"},"type":"array","maxItems":3,"minItems":1,"title":"Scopes"}},"type":"object","required":["name"],"title":"KeyCreate"},"Login":{"properties":{"username":{"type":"string","maxLength":80,"minLength":1,"title":"Username"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"}},"type":"object","required":["username","password"],"title":"Login"},"Model":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"family":{"type":"string","title":"Family"},"revision":{"type":"string","title":"Revision"},"quantization":{"type":"string","title":"Quantization"},"format":{"type":"string","const":"gguf","title":"Format"},"fileName":{"type":"string","title":"Filename"},"sizeBytes":{"type":"integer","exclusiveMinimum":0.0,"title":"Sizebytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Sha256"},"recommended":{"type":"boolean","title":"Recommended"},"minRamMb":{"type":"integer","title":"Minrammb"},"description":{"type":"string","title":"Description"},"license":{"type":"string","title":"License"},"sourceUrl":{"type":"string","title":"Sourceurl"},"architectures":{"items":{"type":"string"},"type":"array","title":"Architectures"},"minAppVersionCode":{"type":"integer","title":"Minappversioncode"},"licenseUrl":{"type":"string","title":"Licenseurl"},"available":{"type":"boolean","title":"Available"},"downloadUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Downloadurl"}},"type":"object","required":["id","name","family","revision","quantization","format","fileName","sizeBytes","sha256","recommended","minRamMb","description","license","sourceUrl","architectures","minAppVersionCode","licenseUrl","available","downloadUrl"],"title":"Model"},"ModelPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Model"},"type":"array","title":"Data"},"requestId":{"type":"string","title":"Requestid"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["data","requestId","pagination"],"title":"ModelPage"},"Overview":{"properties":{"models":{"items":{"$ref":"#/components/schemas/AdminModel"},"type":"array","title":"Models"},"disk":{"$ref":"#/components/schemas/DiskInfo"},"latestUpdate":{"anyOf":[{"$ref":"#/components/schemas/UpdateInfo"},{"type":"null"}]},"downloadedBytes":{"additionalProperties":{"type":"integer"},"type":"object","title":"Downloadedbytes"},"audit":{"items":{"$ref":"#/components/schemas/AuditEntry"},"type":"array","title":"Audit"},"cloudTranslation":{"type":"boolean","const":false,"title":"Cloudtranslation","default":false}},"type":"object","required":["models","disk","latestUpdate","downloadedBytes","audit"],"title":"Overview"},"Pagination":{"properties":{"page":{"type":"integer","title":"Page"},"pageSize":{"type":"integer","title":"Pagesize"},"totalItems":{"type":"integer","title":"Totalitems"},"totalPages":{"type":"integer","title":"Totalpages"}},"type":"object","required":["page","pageSize","totalItems","totalPages"],"title":"Pagination"},"PasswordChange":{"properties":{"currentPassword":{"type":"string","maxLength":256,"minLength":1,"title":"Currentpassword"},"newPassword":{"type":"string","maxLength":256,"minLength":16,"title":"Newpassword"}},"type":"object","required":["currentPassword","newPassword"],"title":"PasswordChange"},"Release":{"properties":{"platform":{"type":"string","const":"android","title":"Platform"},"channel":{"type":"string","enum":["stable","preview"],"title":"Channel"},"versionName":{"type":"string","title":"Versionname"},"versionCode":{"type":"integer","exclusiveMinimum":0.0,"title":"Versioncode"},"minSdk":{"type":"integer","title":"Minsdk"},"architectures":{"items":{"type":"string"},"type":"array","title":"Architectures"},"publishedAt":{"type":"string","title":"Publishedat"},"sizeBytes":{"type":"integer","exclusiveMinimum":0.0,"title":"Sizebytes"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Sha256"},"signingCertificateSha256":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Signingcertificatesha256"},"downloadUrl":{"type":"string","title":"Downloadurl"},"releaseNotes":{"items":{"type":"string"},"type":"array","title":"Releasenotes"}},"type":"object","required":["platform","channel","versionName","versionCode","minSdk","architectures","publishedAt","sizeBytes","sha256","signingCertificateSha256","downloadUrl","releaseNotes"],"title":"Release"},"SessionInfo":{"properties":{"username":{"type":"string","title":"Username"},"csrfToken":{"type":"string","title":"Csrftoken"},"expiresAt":{"type":"integer","title":"Expiresat"}},"type":"object","required":["username","csrfToken","expiresAt"],"title":"SessionInfo"},"TokenBody":{"properties":{"challengeId":{"type":"string","maxLength":64,"title":"Challengeid"},"deviceId":{"type":"string","maxLength":64,"title":"Deviceid"},"signature":{"type":"string","maxLength":512,"title":"Signature"}},"type":"object","required":["challengeId","deviceId","signature"],"title":"TokenBody"},"UpdateArtifact":{"properties":{"id":{"type":"string","title":"Id"},"fileName":{"type":"string","title":"Filename"},"sizeBytes":{"type":"integer","title":"Sizebytes"},"sha256":{"type":"string","title":"Sha256"}},"type":"object","required":["id","fileName","sizeBytes","sha256"],"title":"UpdateArtifact"},"UpdateInfo":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","enum":["UNCHANGED","CHECKED","RUNNING","SUCCEEDED","FAILED","INTERRUPTED"],"title":"Status"},"message":{"type":"string","title":"Message"},"createdAt":{"type":"string","title":"Createdat"},"updatedAt":{"type":"string","title":"Updatedat"},"revision":{"type":"string","title":"Revision"},"models":{"items":{"$ref":"#/components/schemas/UpdateArtifact"},"type":"array","title":"Models"}},"type":"object","required":["id","status","message","createdAt","updatedAt","revision","models"],"title":"UpdateInfo"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"后台生成的 LumiTranslate 分发密钥，以 Bearer 方式发送。","scheme":"bearer"},"APIKeyCookie":{"type":"apiKey","in":"cookie","name":"__Host-lumi_session"}}}}