{"openapi":"3.1.0","info":{"title":"ZugaApp","version":"3.0.0"},"paths":{"/api/health/live":{"get":{"tags":["health"],"summary":"Liveness","description":"Am I running? Simplest possible check.","operationId":"liveness_api_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Liveness Api Health Live Get"}}}}}}},"/api/health/ready":{"get":{"tags":["health"],"summary":"Readiness","description":"Am I ready to serve traffic? Checks critical dependencies.","operationId":"readiness_api_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Readiness Api Health Ready Get"}}}}}}},"/api/auth/config":{"get":{"tags":["auth"],"summary":"Auth Config","description":"Return auth configuration so the frontend knows which login to show.","operationId":"auth_config_api_auth_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthConfigResponse"}}}}}}},"/api/auth/register":{"post":{"tags":["auth"],"summary":"Register","description":"Create a new password-based account via SuperTokens.","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/password-login":{"post":{"tags":["auth"],"summary":"Password Login","description":"Login with email + password via SuperTokens.","operationId":"password_login_api_auth_password_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","description":"Consume a verification token and mark the email as verified.","operationId":"verify_email_api_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Send a password reset email. Always returns 200 to prevent email enumeration.","operationId":"forgot_password_api_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/admin/mint-reset-link":{"post":{"tags":["auth"],"summary":"Admin Mint Reset Link","description":"Admin-only: mint a password reset URL to DM to a user directly.\n\nBypasses email delivery entirely — useful when iCloud/Outlook filters\ndrop the standard reset email or when onboarding a user out-of-band.","operationId":"admin_mint_reset_link_api_auth_admin_mint_reset_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Mint Reset Link Api Auth Admin Mint Reset Link Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Consume a reset token and set a new password. Force-logs out all sessions.","operationId":"reset_password_api_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Email-only login — available in dev mode only.","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google":{"post":{"tags":["auth"],"summary":"Google Login","description":"Google OAuth login — verify Google ID token and create session.","operationId":"google_login_api_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/oauth":{"post":{"tags":["auth"],"summary":"Oauth Login","description":"Universal OAuth login for Microsoft, GitHub, Apple.","operationId":"oauth_login_api_auth_oauth_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/session/refresh":{"post":{"tags":["auth"],"summary":"Refresh Session Endpoint","description":"Rotate a SuperTokens session using a desktop-held refresh token.\n\nUsed by native clients (ZugaClaw, ZugaGamer) that have no cookie jar.\nWeb clients don't hit this — their refresh flows through SuperTokens'\ncookie-based endpoint.\n\nRefresh tokens ROTATE on every successful call: the returned\nrefresh_token REPLACES the one sent. Clients must persist the new pair.\nOn 401, the client should clear stored tokens and prompt re-login.","operationId":"refresh_session_endpoint_api_auth_session_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/session/for-desktop":{"post":{"tags":["auth"],"summary":"Mint Session For Desktop","description":"Mint a fresh SuperTokens session for a user already authed on the web.\n\nWhen ZugaClaw / ZugaGamer launch `zugabot.ai/login?redirect=<proto>://...`\nand the user is already signed in on the web, LoginView calls this with\nthe existing Bearer token. We issue a fresh {access, refresh} pair so the\ndesktop app has what it needs — no re-entering credentials.\n\nRequires a valid Bearer token; the minted pair is bound to the same user.","operationId":"mint_session_for_desktop_api_auth_session_for_desktop_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshResponse"}}}}}}},"/api/auth/session/for-desktop/code":{"post":{"tags":["auth"],"summary":"Mint Desktop Handoff Code","description":"Mint a desktop session, but hand back only a single-use code (D55).\n\nSame job as /session/for-desktop above, with the tokens kept server-side.\nLoginView puts this code in the protocol URL instead of the tokens, and the\ndesktop app exchanges it below. See the _desktop_codes note for why the deep\nlink is not a safe place for a credential.\n\n/session/for-desktop is deliberately KEPT: desktop builds already installed\ndo not know about this flow, and breaking their login to fix an exposure\nthey can also fix by updating would be the worse trade. New builds ask for\nthe code flow explicitly (`desktop_auth=code`).","operationId":"mint_desktop_handoff_code_api_auth_session_for_desktop_code_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopCodeResponse"}}}}}}},"/api/auth/session/for-desktop/exchange":{"post":{"tags":["auth"],"summary":"Exchange Desktop Handoff Code","description":"Redeem a one-time code for the token pair it stands for (D55).\n\nIntentionally UNauthenticated: the code is itself the credential, and the\ndesktop app has no session yet — that is the whole point of the handoff.\nSafe because the code is 256 bits of randomness, dies on first use, and\nexpires in two minutes.\n\nRate-limited per IP anyway. Not because guessing is plausible at this\nentropy, but because an unauthenticated endpoint that does a dict lookup is\nexactly the shape you do not want left un-throttled.","operationId":"exchange_desktop_handoff_code_api_auth_session_for_desktop_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Revoke the current session.","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Logout Api Auth Logout Post"}}}}}}},"/api/auth/me":{"get":{"tags":["auth"],"summary":"Me","description":"Return info about the currently authenticated user.","operationId":"me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}}},"/api/auth/change-password":{"post":{"tags":["auth"],"summary":"Change Password","description":"Change password for the currently authenticated user.","operationId":"change_password_api_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/onboarding":{"get":{"tags":["auth"],"summary":"Get Onboarding","description":"Check if the user has completed app-level onboarding.","operationId":"get_onboarding_api_auth_onboarding_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Onboarding Api Auth Onboarding Get"}}}}}}},"/api/auth/bg-theme-pref":{"get":{"tags":["auth"],"summary":"Get Bg Theme Pref Route","description":"Return the users account-scoped wallpaper theme id (None = unset).","operationId":"get_bg_theme_pref_route_api_auth_bg_theme_pref_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Bg Theme Pref Route Api Auth Bg Theme Pref Get"}}}}}},"patch":{"tags":["auth"],"summary":"Patch Bg Theme Pref Route","description":"Persist the users account-scoped wallpaper theme id.","operationId":"patch_bg_theme_pref_route_api_auth_bg_theme_pref_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BgThemePrefBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Patch Bg Theme Pref Route Api Auth Bg Theme Pref Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/onboarding/complete":{"post":{"tags":["auth"],"summary":"Complete Onboarding","description":"Mark app-level onboarding as completed.","operationId":"complete_onboarding_api_auth_onboarding_complete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Complete Onboarding Api Auth Onboarding Complete Post"}}}}}}},"/api/auth/onboarding/reset":{"post":{"tags":["auth"],"summary":"Reset Onboarding","description":"Reset app-level onboarding so the user can replay it.","operationId":"reset_onboarding_api_auth_onboarding_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset Onboarding Api Auth Onboarding Reset Post"}}}}}}},"/api/auth/admin/reset-user":{"post":{"tags":["auth"],"summary":"Admin Reset User","description":"Admin: reset a user's onboarding and role from ALLOWED_EMAILS.","operationId":"admin_reset_user_api_auth_admin_reset_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminResetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Reset User Api Auth Admin Reset User Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/admin/delete-user":{"post":{"tags":["auth"],"summary":"Admin Delete User","description":"Admin: hard-delete any user. Requires body.confirm to exactly match\nbody.email (typo protection; prevents fat-finger deletes from curl/Postman).","operationId":"admin_delete_user_api_auth_admin_delete_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Delete User Api Auth Admin Delete User Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/users/me":{"delete":{"tags":["auth"],"summary":"Delete Own Account","description":"Self-serve full account deletion (WA MHMDA / CA CMIA deletion right).\n\nHard-deletes the calling user's account: SuperTokens credentials, every\nuser_id-bearing row in _USER_DEPENDENT_TABLES (including spiritus_consents),\nand the app user row. Purge is immediate — well inside the 30-day SLA the\nprivacy policy promises (WA MHMDA allows 45 days).\n\nRequires body.confirm to exactly match the account email so a stray client\ncall can't wipe an account. The session is revoked as part of deletion, so\nthe caller is logged out everywhere when this returns.","operationId":"delete_own_account_api_auth_users_me_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfDeleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Delete Own Account Api Auth Users Me Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devices":{"get":{"tags":["devices"],"summary":"List My Devices","operationId":"list_my_devices_api_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List My Devices Api Devices Get"}}}}}}},"/api/devices/pair/start":{"post":{"tags":["devices"],"summary":"Pair Start","operationId":"pair_start_api_devices_pair_start_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Pair Start Api Devices Pair Start Post"}}}}}}},"/api/devices/pair/complete":{"post":{"tags":["devices"],"summary":"Pair Complete","operationId":"pair_complete_api_devices_pair_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairCompleteBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Pair Complete Api Devices Pair Complete Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devices/heartbeat":{"post":{"tags":["devices"],"summary":"Device Heartbeat","operationId":"device_heartbeat_api_devices_heartbeat_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Device Heartbeat Api Devices Heartbeat Post"}}}}}}},"/api/devices/{device_id}/revoke":{"post":{"tags":["devices"],"summary":"Revoke Device","operationId":"revoke_device_api_devices__device_id__revoke_post","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Device Api Devices  Device Id  Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devices/approvals/{approval_id}":{"get":{"tags":["devices"],"summary":"Get Approval","description":"Fetch the summary for a pending device-action approval.\n\nReturns {\"summary\": <str>, \"pending\": true} when the approval exists,\nis owned by the calling user, and has not yet been resolved.\nReturns 404 otherwise — same as POST to avoid existence leaks.","operationId":"get_approval_api_devices_approvals__approval_id__get","parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","title":"Approval Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Approval Api Devices Approvals  Approval Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["devices"],"summary":"Resolve Approval","description":"Resolve a pending device-action approval request.\n\nCalled by the frontend after the user taps Approve/Deny on the push\nnotification deep-link (/devices/approve/{approval_id}).\nReturns 404 if the approval_id is not pending (already resolved or expired).","operationId":"resolve_approval_api_devices_approvals__approval_id__post","parameters":[{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","title":"Approval Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resolve Approval Api Devices Approvals  Approval Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/backup/download/{db_name}":{"get":{"tags":["admin","backup"],"summary":"Download Backup","description":"Download a consistent snapshot of a database file.\n\nUses sqlite3 .backup internally for a safe copy that won't\nconflict with active writes.\n\nArgs:\n    db_name: One of \"app\" (zugaapp.db) or \"auth\" (auth.db)","operationId":"download_backup_api_admin_backup_download__db_name__get","parameters":[{"name":"db_name","in":"path","required":true,"schema":{"type":"string","title":"Db Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/backup/list":{"get":{"tags":["admin","backup"],"summary":"List Backups","description":"List available pre-deploy backups on the volume.","operationId":"list_backups_api_admin_backup_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/team/identity":{"post":{"tags":["team-issues"],"summary":"Set Identity","description":"OWNER: map a teammate's ZugaId user_id to their GitHub login.","operationId":"set_identity_api_team_identity_post","parameters":[{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/team/onboard":{"post":{"tags":["team-issues"],"summary":"Onboard Teammate","description":"OWNER: one-shot teammate setup — maps ZugaId -> GitHub/Google identity.\n\nIdempotent: re-running updates the identity. Resolves email -> user_id so the\nowner can onboard by signup email instead of the ZugaId UUID.\n\nBody: user_id OR email, plus github_login, display_name, google_email.\n\n(Doc sharing moved to the hivemind: docs are team-wide read via its\nlist_docs/read_doc tools — no per-doc grants here anymore.)","operationId":"onboard_teammate_api_team_onboard_post","parameters":[{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/team/issues":{"get":{"tags":["team-issues"],"summary":"List Issues","description":"Issues assigned to the caller across the org.","operationId":"list_issues_api_team_issues_get","parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","pattern":"^(open|closed|all)$","default":"open","title":"State"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/team/issue":{"get":{"tags":["team-issues"],"summary":"Get Issue","description":"One issue + its comments. Caller must be an assignee.","operationId":"get_issue_api_team_issue_get","parameters":[{"name":"repo","in":"query","required":true,"schema":{"type":"string","title":"Repo"}},{"name":"number","in":"query","required":true,"schema":{"type":"integer","title":"Number"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["team-issues"],"summary":"Create Issue","description":"Open a new issue in an org repo, assigned to the caller.","operationId":"create_issue_api_team_issue_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/team/issue/comment":{"post":{"tags":["team-issues"],"summary":"Comment Issue","description":"Comment on an issue the caller is assigned. Footer attributes the human.","operationId":"comment_issue_api_team_issue_comment_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/team/issue/close":{"post":{"tags":["team-issues"],"summary":"Close Issue","description":"Close an issue the caller is assigned, optionally with a comment.","operationId":"close_issue_api_team_issue_close_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/token":{"post":{"tags":["node"],"summary":"Mint Node Token","description":"Mint a node-pairing token for the logged-in user. Plaintext shown once.\n\nPaste it into the thin-node installer; the node presents it on /ws/node.\nRe-minting does NOT revoke the old token — use the Settings token list to\nrevoke explicitly (mirrors docs_mcp behavior). Every teammate mints their\nown — the token's user_id is what the registry keys pairing on, so one\nperson's node can never answer another's chat turn.","operationId":"mint_node_token_api_node_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__infra__node__MintResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/status":{"get":{"tags":["node"],"summary":"Node Status","description":"Is THIS caller's own node currently paired/online?","operationId":"node_status_api_node_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/node/domain/manifest":{"get":{"tags":["node"],"summary":"Node Domain Manifest","description":"Static identity for the Dominion's ZugaNode (\"Outpost\") building.","operationId":"node_domain_manifest_api_node_domain_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/node/domain/summary":{"get":{"tags":["node"],"summary":"Node Domain Summary","description":"Team-wide paired-node count only — no per-user identity crosses this\nunauthenticated endpoint (that would leak who's online to anyone hitting\na public URL). Per-user \"is MY node online\" stays behind /api/node/status.","operationId":"node_domain_summary_api_node_domain_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/node/proposals":{"post":{"tags":["node-proposals"],"summary":"Propose Action","description":"Zugabot proposes a node-dispatch action for human review.\n\nGated by ENABLE_ZUGABOT_NODE_BRIDGE — unset/false (the default) refuses\nwith 403 before anything is written, not a silent no-op success.","operationId":"propose_action_api_node_proposals_post","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposeBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["node-proposals"],"summary":"List Proposals","description":"Admin-only review queue. Newest first.","operationId":"list_proposals_api_node_proposals_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Proposals Api Node Proposals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/proposals/{proposal_id}":{"get":{"tags":["node-proposals"],"summary":"Get Proposal","description":"Zugabot polls this to learn the outcome of a proposal it made; an\nadmin can also inspect one directly. Either X-Service-Key or an admin\nsession is accepted — not both required.","operationId":"get_proposal_api_node_proposals__proposal_id__get","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Proposal Api Node Proposals  Proposal Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/proposals/{proposal_id}/approve":{"post":{"tags":["node-proposals"],"summary":"Approve Proposal","description":"The ONLY path that can ever reach NodeConnection.dispatch(). Requires\nan admin session — this is the human-in-the-loop gate the whole queue\nexists for.","operationId":"approve_proposal_api_node_proposals__proposal_id__approve_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Proposal Api Node Proposals  Proposal Id  Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/node/proposals/{proposal_id}/reject":{"post":{"tags":["node-proposals"],"summary":"Reject Proposal","operationId":"reject_proposal_api_node_proposals__proposal_id__reject_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"integer","title":"Proposal Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RejectBody"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reject Proposal Api Node Proposals  Proposal Id  Reject Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/budget/status":{"get":{"tags":["budget"],"summary":"Status","description":"Get the current AI spend for today. Admin only.","operationId":"status_api_budget_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetStatusResponse"}}}}}}},"/api/budget/reset":{"post":{"tags":["budget"],"summary":"Reset","description":"Reset today's spending counter to zero. Admin only.","operationId":"reset_api_budget_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset Api Budget Reset Post"}}}}}}},"/api/budget/limit":{"put":{"tags":["budget"],"summary":"Update Limit","description":"Change the daily spending limit. Admin only.","operationId":"update_limit_api_budget_limit_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Update Limit Api Budget Limit Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/balance":{"get":{"tags":["tokens"],"summary":"My Balance","description":"Get your ZugaToken balance across all wallets.","operationId":"my_balance_api_tokens_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response My Balance Api Tokens Balance Get"}}}}}}},"/api/gamer/tokens/balance":{"get":{"tags":["tokens"],"summary":"Gamer Balance","description":"Get token balance for Overlay clients. Supports HMAC or X-User-Id auth.\n\nThe Overlay can't easily maintain a browser session, so this endpoint\naccepts HMAC-signed requests (X-App-Signature + X-Timestamp + X-User-Id).","operationId":"gamer_balance_api_gamer_tokens_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Gamer Balance Api Gamer Tokens Balance Get"}}}}}}},"/api/tokens/history":{"get":{"tags":["tokens"],"summary":"My History","description":"Get your recent token transaction history, optionally filtered by\ntransaction type, reason (feature/studio), and a trailing day window.","operationId":"my_history_api_tokens_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Type"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Reason"}},{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response My History Api Tokens History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/usage":{"get":{"tags":["tokens"],"summary":"My Usage","description":"Get your token usage summary (spend breakdown by service).","operationId":"my_usage_api_tokens_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response My Usage Api Tokens Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/spending-cap":{"get":{"tags":["tokens"],"summary":"My Spending Cap","description":"Get your monthly spending cap state (cap_tokens null = disabled).","operationId":"my_spending_cap_api_tokens_spending_cap_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response My Spending Cap Api Tokens Spending Cap Get"}}}}}},"post":{"tags":["tokens"],"summary":"Set My Spending Cap","description":"Set or clear (cap_tokens=null) your monthly token spending cap.","operationId":"set_my_spending_cap_api_tokens_spending_cap_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendingCapRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set My Spending Cap Api Tokens Spending Cap Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/autotopup":{"get":{"tags":["tokens"],"summary":"My Autotopup","description":"Auto top-up settings. `available:false` when the feature flag is off.","operationId":"my_autotopup_api_tokens_autotopup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response My Autotopup Api Tokens Autotopup Get"}}}}}},"post":{"tags":["tokens"],"summary":"Set My Autotopup","description":"Update auto top-up settings (only provided fields change).","operationId":"set_my_autotopup_api_tokens_autotopup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutotopupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set My Autotopup Api Tokens Autotopup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/setup-intent":{"post":{"tags":["tokens"],"summary":"My Setup Intent","description":"Create a SetupIntent so the frontend can save a card for auto top-up.","operationId":"my_setup_intent_api_tokens_setup_intent_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response My Setup Intent Api Tokens Setup Intent Post"}}}}}}},"/api/tokens/packs":{"get":{"tags":["tokens"],"summary":"List Packs","description":"List available top-up packs and subscription tiers with live Stripe prices.","operationId":"list_packs_api_tokens_packs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Packs Api Tokens Packs Get"}}}}}}},"/api/tokens/subscription":{"get":{"tags":["tokens"],"summary":"My Subscription","description":"Get your current subscription status.","operationId":"my_subscription_api_tokens_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response My Subscription Api Tokens Subscription Get"}}}}}}},"/api/tokens/purchase":{"post":{"tags":["tokens"],"summary":"Purchase Topup","description":"Create a Stripe Checkout session for a one-time token top-up.","operationId":"purchase_topup_api_tokens_purchase_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Purchase Topup Api Tokens Purchase Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/subscribe":{"post":{"tags":["tokens"],"summary":"Subscribe Tier","description":"Create a Stripe Checkout session for a subscription.","operationId":"subscribe_tier_api_tokens_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/core__credits__routes__SubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Subscribe Tier Api Tokens Subscribe Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/cancel-subscription":{"post":{"tags":["tokens"],"summary":"Cancel Sub","description":"Cancel your subscription at the end of the current billing period.","operationId":"cancel_sub_api_tokens_cancel_subscription_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Cancel Sub Api Tokens Cancel Subscription Post"}}}}}}},"/api/tokens/portal":{"post":{"tags":["tokens"],"summary":"Open Portal","description":"Create a Stripe Customer Portal session.\n\nCA ARL: portal is the canonical \"online cancellation\" surface — users can\ncancel, change payment, view invoices without contacting support.","operationId":"open_portal_api_tokens_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Open Portal Api Tokens Portal Post"}}}}}}},"/api/webhooks/stripe":{"post":{"tags":["tokens"],"summary":"Stripe Webhook","description":"Stripe webhook endpoint — verifies signature and processes events.","operationId":"stripe_webhook_api_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stripe Webhook Api Webhooks Stripe Post"}}}}}}},"/api/admin/tokens/overview":{"get":{"tags":["tokens"],"summary":"Admin Overview","description":"Admin: overview of token economy metrics.","operationId":"admin_overview_api_admin_tokens_overview_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Overview Api Admin Tokens Overview Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tokens/user/{user_id}":{"get":{"tags":["tokens"],"summary":"Admin User Detail","description":"Admin: detailed token info for a specific user.","operationId":"admin_user_detail_api_admin_tokens_user__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin User Detail Api Admin Tokens User  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tokens/grant":{"post":{"tags":["tokens"],"summary":"Admin Grant","description":"Admin: grant bonus tokens to a user.","operationId":"admin_grant_api_admin_tokens_grant_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantTokensRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Grant Api Admin Tokens Grant Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tokens/set-tier":{"post":{"tags":["tokens"],"summary":"Admin Set Test Tier","description":"Admin: toggle the test account between free/subscriber tiers.\n\nRestricted to the designated test email only.","operationId":"admin_set_test_tier_api_admin_tokens_set_tier_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTestTierRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Set Test Tier Api Admin Tokens Set Tier Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/spend":{"post":{"tags":["tokens"],"summary":"Overlay Token Spend","description":"Deduct tokens from a user's balance. Used by Overlay for overflow.\n\nAuth: X-User-Id header required. Accepts either:\n  - Session auth (logged-in user)\n  - HMAC signature (X-App-Signature + X-Timestamp) from Overlay","operationId":"overlay_token_spend_api_tokens_spend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverlaySpendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Token Spend Api Tokens Spend Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credits/can-spend":{"post":{"tags":["tokens"],"summary":"Check Can Spend","description":"Check if a user can spend tokens. Service-to-service only.","operationId":"check_can_spend_api_credits_can_spend_post","parameters":[{"name":"X-Service-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanSpendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Can Spend Api Credits Can Spend Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credits/grant":{"post":{"tags":["tokens"],"summary":"Service Grant","description":"Grant tokens to a user from a service-to-service caller.\n\nSame X-Service-Key gate as can-spend / report-spend. Used by standalone\nstudios (e.g. ZugaSnipe verified-buy rewards) to credit user wallets\nwithout going through the user-admin path. Returns the manager's\n`{tokens_granted, new_total}` shape.","operationId":"service_grant_api_credits_grant_post","parameters":[{"name":"X-Service-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceGrantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Service Grant Api Credits Grant Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/credits/report-spend":{"post":{"tags":["tokens"],"summary":"Report Spend","description":"Record a token spend from a standalone studio. Service-to-service only.","operationId":"report_spend_api_credits_report_spend_post","parameters":[{"name":"X-Service-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSpendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Report Spend Api Credits Report Spend Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cli/users":{"get":{"tags":["tokens"],"summary":"Cli List Users","description":"CLI: List all registered users with their roles and balances.","operationId":"cli_list_users_api_cli_users_get","parameters":[{"name":"X-Service-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cli List Users Api Cli Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cli/usage":{"get":{"tags":["tokens"],"summary":"Cli Usage Report","description":"CLI: Usage report across all users (AI calls, cost, tokens).","operationId":"cli_usage_report_api_cli_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"X-Service-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cli Usage Report Api Cli Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cli/audit/{user_id}":{"get":{"tags":["tokens"],"summary":"Cli User Audit","description":"CLI: Full audit trail for a specific user.","operationId":"cli_user_audit_api_cli_audit__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"X-Service-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cli User Audit Api Cli Audit  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cli/sync-roles":{"post":{"tags":["tokens"],"summary":"Cli Sync Roles","description":"CLI: Sync user roles from ADMIN_EMAILS env var to the users table.\n\nUpdates any user whose DB role doesn't match what ADMIN_EMAILS says.","operationId":"cli_sync_roles_api_cli_sync_roles_post","parameters":[{"name":"X-Service-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cli Sync Roles Api Cli Sync Roles Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cli/reset-free-tokens":{"post":{"tags":["tokens"],"summary":"Cli Reset Free Tokens","description":"CLI: Reset all users' free_tokens to the current ZUGATOKEN_WELCOME_GRANT value.\n\nUsed to correct balances after an env var misconfiguration.","operationId":"cli_reset_free_tokens_api_cli_reset_free_tokens_post","parameters":[{"name":"X-Service-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cli Reset Free Tokens Api Cli Reset Free Tokens Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations":{"get":{"tags":["forge"],"summary":"List Creations","description":"List all creations owned by the current user.","operationId":"list_creations_api_forge_creations_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ForgeCreationResponse"},"title":"Response List Creations Api Forge Creations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["forge"],"summary":"Create Creation","description":"Create a new forge creation.","operationId":"create_creation_api_forge_creations_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}":{"get":{"tags":["forge"],"summary":"Get Creation","description":"Get a single creation with full source code.","operationId":"get_creation_api_forge_creations__creation_id__get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["forge"],"summary":"Update Creation","description":"Update a creation's metadata or source.","operationId":"update_creation_api_forge_creations__creation_id__patch","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["forge"],"summary":"Delete Creation","description":"Soft-delete a creation (set to archived).\n\nFor type=\"theme\" creations, also hard-deletes any dual-written\ntheme_overrides rows so the injected CSS stops re-applying.\nSee project_theme_dual_write_0417.md.","operationId":"delete_creation_api_forge_creations__creation_id__delete","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/improve":{"post":{"tags":["forge"],"summary":"Improve Creation Endpoint","description":"Regenerate this creation via Claude, billed to the owner's ZugaTokens, and\nauto-apply the improved version live. The prior version is snapshotted for rollback.","operationId":"improve_creation_endpoint_api_forge_creations__creation_id__improve_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeImproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/rollback":{"post":{"tags":["forge"],"summary":"Rollback Creation Endpoint","description":"Restore the previous source snapshot (free) — the undo for an improvement.","operationId":"rollback_creation_endpoint_api_forge_creations__creation_id__rollback_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/feedback":{"post":{"tags":["forge"],"summary":"Submit Feedback","description":"Record a 👍/👎 on a creation. 👎 (with optional note) marks it for the next\nautonomous improve pass and feeds the complaint into the regen prompt; 👍 tells\nthe loop to leave it alone.","operationId":"submit_feedback_api_forge_creations__creation_id__feedback_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeFeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/functions/{creation_id}/invoke":{"post":{"tags":["forge"],"summary":"Invoke Function","description":"Run a Forge Function's handler in an isolated E2B sandbox, billed per-invoke\nto the owner's ZugaTokens. The handler can call external APIs and return JSON.\n\nv1: owner-only, no secret vault yet (secrets injection lands with the vault slice).","operationId":"invoke_function_api_forge_functions__creation_id__invoke_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeInvokeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/health":{"get":{"tags":["forge"],"summary":"Creation Runtime Health","description":"Liveness of a custom creation's runtime on the owner's paired node.\n\nThe S0 round-trip: resolve the owner's ZugaNode and forward `forge_health`.\nReturns 200 with online=false (never an error) when no node is paired, so a\npolling health badge has one stable shape to render.","operationId":"creation_runtime_health_api_forge_creations__creation_id__health_get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/custom/generate":{"post":{"tags":["forge"],"summary":"Custom Generate","description":"Generate a multi-file `custom` creation and persist its file tree as a draft.\n\nDeploy it to a paired node afterward with POST /creations/{id}/push.","operationId":"custom_generate_api_forge_custom_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCustomGenerateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/custom/create":{"post":{"tags":["forge"],"summary":"Custom Create","description":"Create an EMPTY custom creation to build from scratch (the 'start from\nscratch' entry mode). Seeds a blank entrypoint so the tree isn't empty.","operationId":"custom_create_api_forge_custom_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCustomCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/files":{"get":{"tags":["forge"],"summary":"List Custom Files","description":"The live file tree of a custom creation (editor reads this).","operationId":"list_custom_files_api_forge_creations__creation_id__files_get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["forge"],"summary":"Write Custom File","description":"Create or overwrite one file in the tree (editor saves through this).","operationId":"write_custom_file_api_forge_creations__creation_id__files_put","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeFileWriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/files/{path}":{"delete":{"tags":["forge"],"summary":"Delete Custom File","description":"Soft-delete one file from the tree.","operationId":"delete_custom_file_api_forge_creations__creation_id__files__path__delete","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/push":{"post":{"tags":["forge"],"summary":"Push Custom To Node","description":"Push a custom creation's file tree onto the owner's paired node (forge_deploy).","operationId":"push_custom_to_node_api_forge_creations__creation_id__push_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/taste/archetypes":{"get":{"tags":["forge"],"summary":"List Taste Archetypes","description":"The visual archetype keys offered at onboarding (frontend renders tiles).","operationId":"list_taste_archetypes_api_forge_taste_archetypes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/forge/taste/onboarding":{"post":{"tags":["forge"],"summary":"Taste Onboarding","description":"Cold-start a user's per-studio taste from 1-8 archetype picks.","operationId":"taste_onboarding_api_forge_taste_onboarding_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeTasteOnboardRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/taste/{studio}":{"get":{"tags":["forge"],"summary":"Get Taste Profile","description":"The caller's taste profile for a studio (persona + phase). Drives a UI panel.","operationId":"get_taste_profile_api_forge_taste__studio__get","parameters":[{"name":"studio","in":"path","required":true,"schema":{"type":"string","title":"Studio"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/runtime-token":{"post":{"tags":["forge"],"summary":"Mint Runtime Access","description":"Set a short-lived, path-scoped cookie so the app's iframe can load through\nthe proxy. Owner-gated; the cookie is HttpOnly + SameSite=strict + path-scoped.","operationId":"mint_runtime_access_api_forge_creations__creation_id__runtime_token_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/approve":{"post":{"tags":["forge"],"summary":"Approve Custom","description":"Owner approves a custom creation to run. Untrusted code is NOT runnable until\nthis explicit gate: draft/pending_approval -> live. Reversible via /stop semantics\nis separate — this only flips the approval state.","operationId":"approve_custom_api_forge_creations__creation_id__approve_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/start":{"post":{"tags":["forge"],"summary":"Start Custom","description":"Start the custom app's process on the owner's paired node (forge_start).\n\nGated: the creation must be approved (status='live') first — we never spawn\nunreviewed code on the user's machine.","operationId":"start_custom_api_forge_creations__creation_id__start_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/stop":{"post":{"tags":["forge"],"summary":"Stop Custom","description":"Stop the custom app's process on the owner's paired node (forge_stop).","operationId":"stop_custom_api_forge_creations__creation_id__stop_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/apps/{creation_id}/{path}":{"get":{"tags":["forge"],"summary":"Proxy Custom App","description":"Proxy ONE HTTP request to a running custom app on the owner's node.\n\nThe whole app's HTTP surface lives behind this single catch-all — the request\nis forwarded as a forge_http tool call over the node WS, so N apps never add N\nroutes here. (S2: no streaming / websockets; those land later.)\n\nAuth is bearer OR the path-scoped runtime cookie (iframe + sub-requests).","operationId":"proxy_custom_app_api_forge_apps__creation_id___path__get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["forge"],"summary":"Proxy Custom App","description":"Proxy ONE HTTP request to a running custom app on the owner's node.\n\nThe whole app's HTTP surface lives behind this single catch-all — the request\nis forwarded as a forge_http tool call over the node WS, so N apps never add N\nroutes here. (S2: no streaming / websockets; those land later.)\n\nAuth is bearer OR the path-scoped runtime cookie (iframe + sub-requests).","operationId":"proxy_custom_app_api_forge_apps__creation_id___path__get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["forge"],"summary":"Proxy Custom App","description":"Proxy ONE HTTP request to a running custom app on the owner's node.\n\nThe whole app's HTTP surface lives behind this single catch-all — the request\nis forwarded as a forge_http tool call over the node WS, so N apps never add N\nroutes here. (S2: no streaming / websockets; those land later.)\n\nAuth is bearer OR the path-scoped runtime cookie (iframe + sub-requests).","operationId":"proxy_custom_app_api_forge_apps__creation_id___path__get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["forge"],"summary":"Proxy Custom App","description":"Proxy ONE HTTP request to a running custom app on the owner's node.\n\nThe whole app's HTTP surface lives behind this single catch-all — the request\nis forwarded as a forge_http tool call over the node WS, so N apps never add N\nroutes here. (S2: no streaming / websockets; those land later.)\n\nAuth is bearer OR the path-scoped runtime cookie (iframe + sub-requests).","operationId":"proxy_custom_app_api_forge_apps__creation_id___path__get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["forge"],"summary":"Proxy Custom App","description":"Proxy ONE HTTP request to a running custom app on the owner's node.\n\nThe whole app's HTTP surface lives behind this single catch-all — the request\nis forwarded as a forge_http tool call over the node WS, so N apps never add N\nroutes here. (S2: no streaming / websockets; those land later.)\n\nAuth is bearer OR the path-scoped runtime cookie (iframe + sub-requests).","operationId":"proxy_custom_app_api_forge_apps__creation_id___path__get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/secrets":{"get":{"tags":["forge"],"summary":"List Secrets","description":"List a creation's stored secret NAMES (values are never returned).","operationId":"list_secrets_api_forge_creations__creation_id__secrets_get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ForgeSecretInfo"},"title":"Response List Secrets Api Forge Creations  Creation Id  Secrets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["forge"],"summary":"Add Secret","description":"Store (or overwrite) an encrypted outbound API key, exposed to the function as\nan env var named `name`. Write-only: the value can never be read back.","operationId":"add_secret_api_forge_creations__creation_id__secrets_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeSecretRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeSecretInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/secrets/{secret_id}":{"delete":{"tags":["forge"],"summary":"Delete Secret","description":"Revoke a stored secret (owner-checked via the parent creation).","operationId":"delete_secret_api_forge_creations__creation_id__secrets__secret_id__delete","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}},{"name":"secret_id","in":"path","required":true,"schema":{"type":"integer","title":"Secret Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/deploy":{"post":{"tags":["forge"],"summary":"Deploy Creation","description":"Deploy a creation — set status to 'live'.","operationId":"deploy_creation_api_forge_creations__creation_id__deploy_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/publish":{"post":{"tags":["forge"],"summary":"Publish Creation","description":"Publish a creation to the marketplace (set visibility to public).","operationId":"publish_creation_api_forge_creations__creation_id__publish_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/internal/create":{"post":{"tags":["forge"],"summary":"Internal Create","description":"Service endpoint for Zugabot to register creations.\n\nAuthenticated via ZUGABOT_SERVICE_KEY, not user JWT.","operationId":"internal_create_api_forge_internal_create_post","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeInternalCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/internal/list":{"post":{"tags":["forge"],"summary":"Internal List","description":"Service endpoint for Zugabot to list a user's creations.\n\nAuthenticated via ZUGABOT_SERVICE_KEY, not user JWT. Mirrors the\nuser-facing GET /creations but scoped to body.user_id so the MM\nagent can answer \"what's in my Forge\" without a user session.","operationId":"internal_list_api_forge_internal_list_post","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeInternalListRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ForgeCreationResponse"},"title":"Response Internal List Api Forge Internal List Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/installs":{"get":{"tags":["forge"],"summary":"List Installs","operationId":"list_installs_api_forge_installs_get","parameters":[{"name":"studio","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ForgeInstallResponse"},"title":"Response List Installs Api Forge Installs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/install":{"post":{"tags":["forge"],"summary":"Install Creation","operationId":"install_creation_api_forge_creations__creation_id__install_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeInstallRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeInstallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/installs/{install_id}":{"delete":{"tags":["forge"],"summary":"Uninstall Creation","operationId":"uninstall_creation_api_forge_installs__install_id__delete","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"integer","title":"Install Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/installs/{install_id}/position":{"put":{"tags":["forge"],"summary":"Update Install Position","operationId":"update_install_position_api_forge_installs__install_id__position_put","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"integer","title":"Install Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgePositionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/installs/{install_id}/toggle":{"put":{"tags":["forge"],"summary":"Toggle Install","operationId":"toggle_install_api_forge_installs__install_id__toggle_put","parameters":[{"name":"install_id","in":"path","required":true,"schema":{"type":"integer","title":"Install Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/creations/{creation_id}/state":{"get":{"tags":["forge"],"summary":"Get Creation State","operationId":"get_creation_state_api_forge_creations__creation_id__state_get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["forge"],"summary":"Set Creation State","operationId":"set_creation_state_api_forge_creations__creation_id__state_put","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeStateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/marketplace/browse":{"get":{"tags":["forge"],"summary":"Browse Marketplace","operationId":"browse_marketplace_api_forge_marketplace_browse_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"popular","title":"Sort"}},{"name":"price","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Price"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/marketplace/{creation_id}/get":{"post":{"tags":["forge"],"summary":"Get From Marketplace","description":"Fork a published creation into the caller's own Forge (a remix copy).\n\nCross-user ownership is intentionally avoided: instead of granting access to\nsomeone else's row, we copy the source into a new creation the caller owns\n(parent_id points back to the original), so they can run/install/improve it\nfreely. Increments the original's install counter.","operationId":"get_from_marketplace_api_forge_marketplace__creation_id__get_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/marketplace/{creation_id}/buy":{"post":{"tags":["forge"],"summary":"Buy From Marketplace","description":"Buy a paid published creation: debit the buyer, pay the seller 90%, keep 10%.\n\nThe whole purchase (token transfer + ForgePurchase record + fork grant) runs in\nONE session/transaction — it all commits on a clean exit or all rolls back on any\nraise, so a crash mid-flight can never mint or vaporize tokens. Re-buying an\nalready-owned creation re-grants the existing fork for free. Free creations\n(price_tokens == 0) must use /get instead.","operationId":"buy_from_marketplace_api_forge_marketplace__creation_id__buy_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/marketplace/sales":{"get":{"tags":["forge"],"summary":"My Sales","description":"What the caller has SOLD: each ForgePurchase where they're the seller, plus a\ntotal of creator_cut earned (already spendable in their wallet from each sale).\n\nRead-only reporting — earnings were credited at purchase time (Phase A); this\nsurfaces them. No new ledger.","operationId":"my_sales_api_forge_marketplace_sales_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/forge/creations/{creation_id}/reviews":{"post":{"tags":["forge"],"summary":"Create Review","description":"Leave a rating (1-5) + optional text. Verified buyers only (own the creation\nvia a purchase or a free fork → else 403). One review per user, upserted; the\ncreation's rating_sum/rating_count are kept in sync for marketplace discovery.","operationId":"create_review_api_forge_creations__creation_id__reviews_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeReviewRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["forge"],"summary":"List Reviews","description":"Public reviews for a creation, newest first, with the average rating.","operationId":"list_reviews_api_forge_creations__creation_id__reviews_get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/domain/manifest":{"get":{"tags":["forge"],"summary":"Forge Domain Manifest","description":"Static identity for the Dominion's Workshop (`forge`) building.","operationId":"forge_domain_manifest_api_forge_domain_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/forge/domain/summary":{"get":{"tags":["forge"],"summary":"Forge Domain Summary","description":"Workshop snapshot: what the app-builder has actually built and sold.\nNever raises — internal errors degrade with HTTP 200 per contract.","operationId":"forge_domain_summary_api_forge_domain_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/theme/overrides":{"get":{"tags":["theme"],"summary":"List Overrides","description":"List all theme overrides for the current user.","operationId":"list_overrides_api_theme_overrides_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ThemeOverrideResponse"},"type":"array","title":"Response List Overrides Api Theme Overrides Get"}}}}}}},"/api/theme/overrides/{scope}":{"get":{"tags":["theme"],"summary":"Get Override","description":"Get the theme override for a specific scope.","operationId":"get_override_api_theme_overrides__scope__get","parameters":[{"name":"scope","in":"path","required":true,"schema":{"type":"string","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeOverrideResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["theme"],"summary":"Upsert Override","description":"Create or update a theme override for a scope.","operationId":"upsert_override_api_theme_overrides__scope__put","parameters":[{"name":"scope","in":"path","required":true,"schema":{"type":"string","title":"Scope"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeOverrideUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeOverrideResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["theme"],"summary":"Delete Override","description":"Remove a theme override for a scope.\n\nSymmetrically archives the dual-written Forge mirror so the two stores\nstay in sync. See project_theme_dual_write_0417.md.","operationId":"delete_override_api_theme_overrides__scope__delete","parameters":[{"name":"scope","in":"path","required":true,"schema":{"type":"string","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/theme/internal/apply":{"post":{"tags":["theme"],"summary":"Internal Apply Theme","description":"Service endpoint for Zugabot to apply themes.\n\nAuthenticated via ZUGABOT_SERVICE_KEY, not user JWT.","operationId":"internal_apply_theme_api_theme_internal_apply_post","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalApplyThemeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeOverrideResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes":{"post":{"tags":["wallpaper"],"summary":"Create Theme","operationId":"create_theme_api_themes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/themes/mine":{"get":{"tags":["wallpaper"],"summary":"List My Themes","operationId":"list_my_themes_api_themes_mine_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ThemeResponse"},"type":"array","title":"Response List My Themes Api Themes Mine Get"}}}}}}},"/api/themes/{theme_id}":{"get":{"tags":["wallpaper"],"summary":"Get Theme","operationId":"get_theme_api_themes__theme_id__get","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"string","title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeWithCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["wallpaper"],"summary":"Update Theme","operationId":"update_theme_api_themes__theme_id__patch","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"string","title":"Theme Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["wallpaper"],"summary":"Delete Theme","operationId":"delete_theme_api_themes__theme_id__delete","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"string","title":"Theme Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wallpapers/mine":{"get":{"tags":["wallpaper"],"summary":"List My Wallpapers","operationId":"list_my_wallpapers_api_wallpapers_mine_get","parameters":[{"name":"theme_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WallpaperResponse"},"title":"Response List My Wallpapers Api Wallpapers Mine Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wallpapers":{"post":{"tags":["wallpaper"],"summary":"Create Wallpaper","description":"Create a wallpaper row directly without going through a studio's\ngeneration pipeline. Used for the still-image set-as-wallpaper flow.\n\nCaller provides EITHER theme_id (existing, must be owned by user) OR\nnew_theme_name (creates a fresh theme owned by user).","operationId":"create_wallpaper_api_wallpapers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WallpaperCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WallpaperResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wallpapers/by-source":{"get":{"tags":["wallpaper"],"summary":"By Source","description":"Studios call this before deleting a source asset to warn the user\nthat it is registered as a wallpaper.","operationId":"by_source_api_wallpapers_by_source_get","parameters":[{"name":"studio","in":"query","required":true,"schema":{"type":"string","title":"Studio"}},{"name":"id","in":"query","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WallpaperBySourceResponse"},"title":"Response By Source Api Wallpapers By Source Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wallpaper/generate-particles":{"post":{"tags":["wallpaper"],"summary":"Generate Particle Wallpaper","description":"Generate a particle wallpaper config from a natural-language prompt.\n\nUses Haiku via the AI gateway, which handles ZugaToken deduction atomically.\nCost: typically 1-3 ZugaTokens per generation.","operationId":"generate_particle_wallpaper_api_wallpaper_generate_particles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticleGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParticleGenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/vapid-key":{"get":{"tags":["notifications"],"summary":"Get Vapid Key","description":"Return the VAPID public key for frontend push subscription.","operationId":"get_vapid_key_api_notifications_vapid_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/notifications/subscribe":{"post":{"tags":["notifications"],"summary":"Subscribe","description":"Register (or refresh) this device's push subscription. Idempotent per endpoint.","operationId":"subscribe_api_notifications_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/core__notifications__routes__SubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/unsubscribe":{"delete":{"tags":["notifications"],"summary":"Unsubscribe","description":"Deactivate all of this user's push subscriptions.","operationId":"unsubscribe_api_notifications_unsubscribe_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/notifications/contact":{"get":{"tags":["notifications"],"summary":"Get Contact","description":"Return this user's contact + channel settings.","operationId":"get_contact_api_notifications_contact_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}}}},"put":{"tags":["notifications"],"summary":"Update Contact","description":"Set this user's phone + channel toggles. Phone is store-only (no OTP yet).","operationId":"update_contact_api_notifications_contact_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/test":{"post":{"tags":["notifications"],"summary":"Send Test Push","description":"Fire a test web-push to all of this user's active devices (for verifying setup).","operationId":"send_test_push_api_notifications_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/notifications/fanout":{"post":{"tags":["notifications"],"summary":"Fanout","description":"Fan a single source notification out to the owner's push devices.\n\nIdempotent on source_id (a FanoutLog unique row) so the MM poller can re-send\nsafely. Returns {deduped:true} if this source_id was already handled.","operationId":"fanout_api_notifications_fanout_post","parameters":[{"name":"X-Owner-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FanoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/chat":{"post":{"tags":["ai-gateway"],"summary":"Ai Chat","description":"Token-gated AI text completion via Venice AI.\n\nReturns 402 with a structured body if the user can't afford the\npre-flight estimate; actual cost is deducted after the provider call.","operationId":"ai_chat_api_ai_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/core__gateway__routes__ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/tts":{"post":{"tags":["ai-gateway"],"summary":"Ai Tts","description":"Token-gated text-to-speech via OpenAI TTS.\n\nReturns base64-encoded MP3 audio; caller decodes and plays/saves locally.\nTTS cost is fully known from len(text), so pre-flight estimate equals\nactual cost — no under-charge window like /chat has.","operationId":"ai_tts_api_ai_tts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ai/models":{"get":{"tags":["ai-gateway"],"summary":"Available Models","description":"List available AI models and estimated token costs per feature.\n\nPublic endpoint — helps frontend show cost previews before users commit.","operationId":"available_models_api_ai_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Available Models Api Ai Models Get"}}}}}}},"/api/machine/beatsheets":{"post":{"tags":["machine-pipeline"],"summary":"Machine Create Beat Sheet","operationId":"machine_create_beat_sheet_api_machine_beatsheets_post","parameters":[{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_MachineBeatSheetCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["machine-pipeline"],"summary":"Machine List Beat Sheets","operationId":"machine_list_beat_sheets_api_machine_beatsheets_get","parameters":[{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/machine/beatsheets/{sheet_id}":{"put":{"tags":["machine-pipeline"],"summary":"Machine Update Beat Sheet","operationId":"machine_update_beat_sheet_api_machine_beatsheets__sheet_id__put","parameters":[{"name":"sheet_id","in":"path","required":true,"schema":{"type":"integer","title":"Sheet Id"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_MachineBeatSheetUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["machine-pipeline"],"summary":"Machine Get Beat Sheet","operationId":"machine_get_beat_sheet_api_machine_beatsheets__sheet_id__get","parameters":[{"name":"sheet_id","in":"path","required":true,"schema":{"type":"integer","title":"Sheet Id"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/machine/beatsheets/{sheet_id}/publish":{"post":{"tags":["machine-pipeline"],"summary":"Machine Publish Beat Sheet","description":"Same flow as zugadocs' own beat_sheet_routes.py::publish_beat_sheet:\nbuild the contract dict, hand it to the visus connector, store\nvideo_project_id/status on success.","operationId":"machine_publish_beat_sheet_api_machine_beatsheets__sheet_id__publish_post","parameters":[{"name":"sheet_id","in":"path","required":true,"schema":{"type":"integer","title":"Sheet Id"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/machine/video/projects/{project_id}/export":{"post":{"tags":["machine-pipeline"],"summary":"Machine Start Export","description":"Create a VideoExportJob and fire the export background task exactly\nas zugavideo.routes' POST /exports does — reuses its own\n`_run_export_job` via sys.modules rather than duplicating the render\nlogic.","operationId":"machine_start_export_api_machine_video_projects__project_id__export_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/_MachineExportOptions"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/machine/video/exports/{job_uuid}":{"get":{"tags":["machine-pipeline"],"summary":"Machine Get Export Status","operationId":"machine_get_export_status_api_machine_video_exports__job_uuid__get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/machine/video/assets/{filename}":{"get":{"tags":["machine-pipeline"],"summary":"Machine Get Asset","description":"Serve a file from ZugaVideo's EXPORT_DIR. Same traversal guard as\nzugavideo.routes' own GET /assets/{filename}.","operationId":"machine_get_asset_api_machine_video_assets__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/machine/video/surgical-jobs":{"get":{"tags":["machine-pipeline"],"summary":"Machine List Surgical Jobs","operationId":"machine_list_surgical_jobs_api_machine_video_surgical_jobs_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"pending","title":"Status"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/machine/video/surgical-jobs/{job_uuid}/claim":{"post":{"tags":["machine-pipeline"],"summary":"Machine Claim Surgical Job","description":"Atomic claim: an UPDATE ... WHERE status='pending' (not a read-then-\nwrite) so two workers racing on the same job can't both \"win\" it —\nexactly one gets rowcount==1, the other gets 409.","operationId":"machine_claim_surgical_job_api_machine_video_surgical_jobs__job_uuid__claim_post","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_SurgicalClaimBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/machine/video/surgical-jobs/{job_uuid}/result":{"post":{"tags":["machine-pipeline"],"summary":"Machine Submit Surgical Result","description":"Accept a completed surgical-job result upload.\n\nMost job kinds (e.g. \"remove_object\") produce an MP4 render. Preview\njobs (e.g. \"remove_preview\") instead produce a PNG mask-overlay image.\nThe output extension is taken from the uploaded file's filename\n(whitelisted to {.mp4, .png, .jpg, .webm}, defaulting to .mp4).","operationId":"machine_submit_surgical_result_api_machine_video_surgical_jobs__job_uuid__result_post","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_machine_submit_surgical_result_api_machine_video_surgical_jobs__job_uuid__result_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/machine/video/surgical-jobs/{job_uuid}/fail":{"post":{"tags":["machine-pipeline"],"summary":"Machine Fail Surgical Job","operationId":"machine_fail_surgical_job_api_machine_video_surgical_jobs__job_uuid__fail_post","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_SurgicalFailBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/stream":{"post":{"tags":["chat"],"summary":"Chat Stream","description":"SSE streaming chat endpoint — proxies to Mac Mini Zugabot via embassy.\n\nFlow:\n1. Load or create DB-backed session\n2. Append user message to history + DB\n3. Shield check on input\n4. Open WS to brain, stream brain events out as SSE events\n5. Save assistant response to DB\n\nSSE events:\n- data: {\"session_id\": \"...\"}           (first event, always)\n- data: {\"token\": \"...\"}                (content chunk)\n- data: {\"done\": true, \"model\": \"...\", \"cost\": 0.001}","operationId":"chat_stream_api_chat_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__platform__chat__ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/stream/resume":{"get":{"tags":["chat"],"summary":"Chat Stream Resume","description":"Re-attach to an in-flight (or just-finished) turn after the client left.\n\nReplays the tokens already produced, then streams the rest live. Returns\n204 when there's no active turn for this session — the client then falls\nback to a plain history reload (the reply is already persisted).","operationId":"chat_stream_resume_api_chat_stream_resume_get","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/cancel/{session_id}":{"post":{"tags":["chat"],"summary":"Chat Cancel","description":"Stop an in-flight turn (user hit the stop button). Best-effort: the\ndetached driver's finally still saves whatever was produced so far.","operationId":"chat_cancel_api_chat_cancel__session_id__post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Chat Cancel Api Chat Cancel  Session Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}/regenerate":{"post":{"tags":["chat"],"summary":"Regenerate Turn","description":"Re-run the last assistant turn and store the result as a NEW VARIANT of\nthat message (ChatGPT's ‹2/2›) — NOT a new row, and crucially WITHOUT\nre-appending the user's message (which is what duplicated it before).\n\nStreams over SSE exactly like /stream, and is detached the same way so a\nregenerate also survives navigating away mid-stream.","operationId":"regenerate_turn_api_chat_sessions__session_id__regenerate_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}/messages/{message_id}/select-variant":{"post":{"tags":["chat"],"summary":"Select Variant","description":"Switch which regenerated variant is the active one for a message, and\npersist the choice so it survives reload. Owner-checked.","operationId":"select_variant_api_chat_sessions__session_id__messages__message_id__select_variant_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelectVariantBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Select Variant Api Chat Sessions  Session Id  Messages  Message Id  Select Variant Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions":{"get":{"tags":["chat"],"summary":"List Sessions","description":"List user's chat sessions, newest first.","operationId":"list_sessions_api_chat_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"tags":["chat"],"summary":"Delete All Sessions","description":"Delete ALL chat sessions + messages owned by the caller. Single round-trip.\n\nReplaces the FE pattern of looping `DELETE /sessions/{id}` per session,\nwhich silently swallowed individual failures and left a partial state.\nReturns counts so the caller can verify nothing leaked.","operationId":"delete_all_sessions_api_chat_sessions_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Delete All Sessions Api Chat Sessions Delete"}}}}}}},"/api/chat/sessions/{session_id}/messages":{"get":{"tags":["chat"],"summary":"Get Session Messages","description":"Return the text-only message history for one of the caller's sessions.\n\nThe streaming endpoint persists role+content per turn (see _save_message);\nrich shape (toolSteps/widget/thinking) is NOT yet persisted server-side, so\nthis returns a text rebuild only. The chat panel uses this on mount to\nsurvive localStorage clears + cross-device sync; rich state still lives\nonly in localStorage until the schema is expanded.","operationId":"get_session_messages_api_chat_sessions__session_id__messages_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}/truncate":{"post":{"tags":["chat"],"summary":"Truncate Session Messages","description":"Delete all messages in a session beyond the first `keep_count`.\n\nUsed by the FE for edit/rewind affordances: truncate at index i, then\nre-dispatch (edit) or wait for user input (rewind). Owner-checked.\nAlso resets ChatSession.message_count to keep the badge counter honest.","operationId":"truncate_session_messages_api_chat_sessions__session_id__truncate_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TruncateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Truncate Session Messages Api Chat Sessions  Session Id  Truncate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}/branch":{"post":{"tags":["chat"],"summary":"Branch Session","description":"Create a new chat session containing the first `keep_count` messages\nof an existing session. Used by the FE \"Branch from here\" button.\n\nOriginal session is left intact — the user keeps both branches in their\nsession list. Returns the new session_id for the FE to switch to.","operationId":"branch_session_api_chat_sessions__session_id__branch_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Branch Session Api Chat Sessions  Session Id  Branch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}/compact":{"post":{"tags":["chat"],"summary":"Compact Session","description":"Summarize the older portion of a chat session into one synthetic\nassistant message, freeing context budget while preserving continuity.\n\nStrategy: load all messages ASC, keep the last `keep_recent` verbatim,\nand replace the older portion with a single summary message. The summary\nis written into the FIRST old row in place (preserving its low id) so\nordering stays intact when the FE re-fetches; the rest of the old rows\nare deleted. Multi-tier compaction (compact-of-compactions) is rejected.","operationId":"compact_session_api_chat_sessions__session_id__compact_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompactBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Compact Session Api Chat Sessions  Session Id  Compact Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}/inject-assistant-message":{"post":{"tags":["chat"],"summary":"Inject Assistant Message","description":"Inject an assistant message without triggering the LLM.\n\nProactive-seed flow: when Buga opens a proactive inbox thread as a chat,\nthe frontend calls this to persist Zugabots opening ask as prior history\nso the brain sees it on the first real reply. Creates the session if absent.","operationId":"inject_assistant_message_api_chat_sessions__session_id__inject_assistant_message_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_InjectMessagePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}":{"delete":{"tags":["chat"],"summary":"Delete Session","description":"Delete a chat session and all its messages.","operationId":"delete_session_api_chat_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["chat"],"summary":"Rename Session","description":"Rename a chat session.","operationId":"rename_session_api_chat_sessions__session_id__patch","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_RenamePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/sessions/{session_id}/auto-title":{"post":{"tags":["chat"],"summary":"Auto Title Session","description":"Generate a concise 3-5 word title from the first user message via Haiku.","operationId":"auto_title_session_api_chat_sessions__session_id__auto_title_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/memories":{"get":{"tags":["chat"],"summary":"List User Memories","description":"List all memories Zugabot has saved about this user.","operationId":"list_user_memories_api_chat_memories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chat/memories/{memory_id}":{"delete":{"tags":["chat"],"summary":"Delete User Memory","description":"Delete a specific memory. Ownership-checked — users can only delete their own.","operationId":"delete_user_memory_api_chat_memories__memory_id__delete","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"type":"integer","title":"Memory Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/proactive":{"post":{"tags":["chat"],"summary":"Inject Proactive","description":"Owner-only: drop a Zugabot-initiated message into a user's chat as a new session.","operationId":"inject_proactive_api_chat_proactive_post","parameters":[{"name":"X-Owner-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProactivePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Inject Proactive Api Chat Proactive Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/feedback":{"post":{"tags":["chat"],"summary":"Submit Chat Feedback","description":"Forward a thumbs up/down rating to Zugabot's feedback endpoint.","operationId":"submit_chat_feedback_api_chat_feedback_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Submit Chat Feedback Api Chat Feedback Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/brain-status":{"get":{"tags":["chat"],"summary":"Brain Status","description":"Lightweight probe of the Mac Mini brain.\n\nPolls the brain's public /health endpoint and returns a normalised\nreadiness shape so the frontend can show a booting-timer rather than a\nstatic \"connection failed\" state while the brain warms up.","operationId":"brain_status_api_chat_brain_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Brain Status Api Chat Brain Status Get"}}}}}}},"/api/voice/token":{"post":{"tags":["voice"],"summary":"Create Voice Token","description":"Generate a LiveKit room token for a voice session.\n\nCreates a unique room and returns a JWT token the client uses\nto connect via WebRTC. The LiveKit agent worker auto-joins\nwhen it sees a new room.","operationId":"create_voice_token_api_voice_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceTokenResponse"}}}}}}},"/api/copilot/entities":{"post":{"tags":["copilot"],"summary":"Confirm Entity","description":"Persist a user-confirmed entity stance to Zugabot memory (owner-only).","operationId":"confirm_entity_api_copilot_entities_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityConfirm"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Confirm Entity Api Copilot Entities Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/copilot/clients":{"get":{"tags":["copilot"],"summary":"List Clients","description":"List saved consulting prospects/clients from Zugabot's vault (owner-only).\n\nEach item carries the full saved brief so the copilot can preload it into\nthe pre-brief when the user picks a client. Best-effort: returns an empty\nlist rather than erroring if the brain is unreachable or replies off-format.","operationId":"list_clients_api_copilot_clients_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Clients Api Copilot Clients Get"}}}}}}},"/api/widgets/spec":{"post":{"tags":["widgets"],"summary":"Create Widget Spec","description":"Generate a quick spec from the user's prompt. Returns in ~1-2s.\n\nThe spec is a plain-English description of what will be built,\nso the user can confirm or adjust before we spend tokens generating code.","operationId":"create_widget_spec_api_widgets_spec_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetSpecRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetSpecResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/generate":{"post":{"tags":["widgets"],"summary":"Generate Widget","description":"Kick off widget generation. Returns immediately.\n\nProgress and final widget are pushed via WebSocket to the user.\nExtension picks it up and injects the widget.","operationId":"generate_widget_api_widgets_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/widgets/generate-sync":{"post":{"tags":["widgets"],"summary":"Generate Widget Sync","description":"Debug/test endpoint — generates widget synchronously and returns it.\n\nUse /generate for production (async + WebSocket push).","operationId":"generate_widget_sync_api_widgets_generate_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/themes/spec":{"post":{"tags":["forge-generate"],"summary":"Theme Spec","operationId":"theme_spec_api_forge_themes_spec_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenSpecRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenSpecResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/themes/generate":{"post":{"tags":["forge-generate"],"summary":"Theme Generate","description":"Generate a theme and APPLY it at the given scope. Returns the mirrored Forge creation.","operationId":"theme_generate_api_forge_themes_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/apps/spec":{"post":{"tags":["forge-generate"],"summary":"App Spec","operationId":"app_spec_api_forge_apps_spec_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenSpecRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenSpecResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/apps/generate":{"post":{"tags":["forge-generate"],"summary":"App Generate","description":"Generate a full-page app and persist it as a live, private Forge creation.","operationId":"app_generate_api_forge_apps_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/brainstorm":{"post":{"tags":["forge-brainstorm"],"summary":"Brainstorm","operationId":"brainstorm_api_forge_brainstorm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/brainstorm/{creation_id}/build":{"post":{"tags":["forge-brainstorm"],"summary":"Brainstorm Build","description":"Generate the converged spec via the existing app generator and persist it live.","operationId":"brainstorm_build_api_forge_brainstorm__creation_id__build_post","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeCreationDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/automations":{"get":{"tags":["forge-automations"],"summary":"List Automations","operationId":"list_automations_api_forge_automations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["forge-automations"],"summary":"Create Automation","operationId":"create_automation_api_forge_automations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/automations/{creation_id}":{"get":{"tags":["forge-automations"],"summary":"Get Automation","operationId":"get_automation_api_forge_automations__creation_id__get","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["forge-automations"],"summary":"Delete Automation","operationId":"delete_automation_api_forge_automations__creation_id__delete","parameters":[{"name":"creation_id","in":"path","required":true,"schema":{"type":"integer","title":"Creation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/automations/generate":{"post":{"tags":["forge-automations"],"summary":"Generate Automation","description":"Zugabot intent → artifact. Returns a preview for user to confirm + then POST to /api/forge/automations.","operationId":"generate_automation_api_forge_automations_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/automations/internal/generate":{"post":{"tags":["forge-automations"],"summary":"Internal Generate Automation","description":"Service-key variant for Zugabot on Mac Mini.\n\nZugabot chat tool calls this when the user types natural-language intent\n(\"when I finish a habit, text my wife\"). Returns the same preview as\n/generate — the actual subscription + ForgeCreation rows are created\nlater via the user-authed POST /api/forge/automations.","operationId":"internal_generate_automation_api_forge_automations_internal_generate_post","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationInternalGenerateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/automations/internal/create":{"post":{"tags":["forge-automations"],"summary":"Internal Create Automation","description":"Service-key variant of POST /api/forge/automations.\n\nUsed by the Zugabot `forge_automation_persist` chat tool after the user\nconfirms a preview. Creates ForgeCreation + WebhookSubscription atomically\nvia the shared helper so this path and the user-JWT path cannot diverge.","operationId":"internal_create_automation_api_forge_automations_internal_create_post","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationInternalCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/internal/secrets/mint":{"post":{"tags":["forge-secrets"],"summary":"Mint Secret","operationId":"mint_secret_api_forge_internal_secrets_mint_post","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/core__forge__secrets_routes__MintResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/internal/secrets":{"get":{"tags":["forge-secrets"],"summary":"List Secrets","operationId":"list_secrets_api_forge_internal_secrets_get","parameters":[{"name":"studio_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Slug"}},{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Secrets Api Forge Internal Secrets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/forge/internal/secrets/{secret_id}":{"delete":{"tags":["forge-secrets"],"summary":"Revoke Secret Endpoint","operationId":"revoke_secret_endpoint_api_forge_internal_secrets__secret_id__delete","parameters":[{"name":"secret_id","in":"path","required":true,"schema":{"type":"integer","title":"Secret Id"}},{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trader/commands":{"get":{"tags":["trader-proxy"],"summary":"Get Commands","description":"ZugaOS catalog passthrough — proxies upstream /commands WITHOUT the\nadmin gate. Catalogs are capability descriptors, not user data. Defined\nBEFORE the admin-gated catch-all so FastAPI matches this explicit route\nfirst. Returns an empty catalog if upstream is unreachable; the aggregator\ntreats that as 'unreachable' rather than failing.","operationId":"get_commands_api_trader_commands_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Commands Api Trader Commands Get"}}}}}}},"/api/trader/{path}":{"get":{"tags":["trader-proxy"],"summary":"Proxy Trader","description":"Proxy requests to ZugaTrader backend. Admin only.","operationId":"proxy_trader_api_trader__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["trader-proxy"],"summary":"Proxy Trader","description":"Proxy requests to ZugaTrader backend. Admin only.","operationId":"proxy_trader_api_trader__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["trader-proxy"],"summary":"Proxy Trader","description":"Proxy requests to ZugaTrader backend. Admin only.","operationId":"proxy_trader_api_trader__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["trader-proxy"],"summary":"Proxy Trader","description":"Proxy requests to ZugaTrader backend. Admin only.","operationId":"proxy_trader_api_trader__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["trader-proxy"],"summary":"Proxy Trader","description":"Proxy requests to ZugaTrader backend. Admin only.","operationId":"proxy_trader_api_trader__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/treasury/{path}":{"get":{"tags":["treasury-proxy"],"summary":"Proxy Treasury","description":"Proxy requests to the ZugaTreasury backend. Admin only.","operationId":"proxy_treasury_api_treasury__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["treasury-proxy"],"summary":"Proxy Treasury","description":"Proxy requests to the ZugaTreasury backend. Admin only.","operationId":"proxy_treasury_api_treasury__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/tebex":{"post":{"tags":["tebex-gamer"],"summary":"Tebex Webhook","description":"Receive and process Tebex payment events.\n\nTebex sends webhooks for: payment.completed, subscription.renewed,\nsubscription.cancelled, etc.","operationId":"tebex_webhook_api_webhooks_tebex_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Tebex Webhook Api Webhooks Tebex Post"}}}}}}},"/api/gamer/subscription/{user_id}":{"get":{"tags":["tebex-gamer"],"summary":"Get Subscription","description":"Check if a user has an active ZugaGamerOverlay subscription.\n\nCalled by the overlay on launch to determine tier.\n\nIdentity resolution (fail-safe — lower privilege wins on ambiguity):\n  - If a valid SuperTokens Bearer session is present, the entitlement lookup\n    uses the SESSION user id.  The path user_id is IGNORED for the admin\n    check.  This prevents a device UUID from granting admin to an anonymous\n    or differently-authenticated caller.\n  - If there is no valid session (anonymous first-run bootstrap) the path\n    user_id is used, but admin tier is NEVER returned — anonymous callers\n    can only receive free or an active device-bound sub tier.","operationId":"get_subscription_api_gamer_subscription__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Subscription Api Gamer Subscription  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/bootstrap":{"post":{"tags":["tebex-gamer"],"summary":"Overlay Bootstrap","description":"Return what the overlay client needs for direct (non-proxied)\nconnections: short-lived Deepgram + Cartesia TTS tokens (minted here from\nthe real keys, which never leave this process — see _mint_* above),\nCARTESIA_MANAGEMENT_KEY (still the raw key — the 3 voice-management REST\ncalls a scoped token can't authenticate; hardening queued), and the\nSpotify OAuth client ID (public by design, not a secret). Tavily and xAI\nare NOT in this response at all as of 2026-07-15 — both fully proxied\nthrough /api/gamer/ai/* (search, grok-query, grok-stream) in gamer_ai.py;\nthe client never sees those keys.\n\nAuth is a HARD gate — no unauthenticated fallback. There used to be an\n\"open bootstrap\" mode (Buga 2026-06-21) that issued keys to anyone who hit\nthis URL, added to unstick testers whose sign-in wasn't captured. That\npath handed raw production Anthropic/GH/HMAC-signing secrets to anonymous\ncallers — removed 2026-07-15. A stuck tester now gets a clear 401 and must\nre-authenticate; that's a smaller problem than the keys being public.\n\nANTHROPIC_API_KEY, GH_TOKEN, and OVERLAY_APP_SECRET are deliberately never\nreturned:\n- ANTHROPIC_API_KEY: every tier's Claude traffic already routes through\n  the token-gated /api/gamer/ai/* proxy (gamer_ai.py), which holds its\n  own server-side key. Handing this out made the client's isBYOK() check\n  (`!!process.env.ANTHROPIC_API_KEY`) true for 100% of installs, silently\n  routing every user's Claude calls direct-to-Anthropic on Zuga's key and\n  skipping the budget-enforced proxy entirely.\n- GH_TOKEN: the update feed is server-proxied (main.ts — \"the CLIENT needs\n  no token at all\"); nothing client-side consumes this anymore.\n- OVERLAY_APP_SECRET: this is the HMAC signing secret the client uses to\n  prove request authenticity. Handing it back over the same channel it's\n  meant to authenticate defeats the whole scheme — it must only ever be\n  embedded at build time, never fetched at runtime.","operationId":"overlay_bootstrap_api_gamer_overlay_bootstrap_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BootstrapRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Bootstrap Api Gamer Overlay Bootstrap Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/bootstrap":{"post":{"tags":["tebex-gamer"],"summary":"Overlay Bootstrap","description":"Return what the overlay client needs for direct (non-proxied)\nconnections: short-lived Deepgram + Cartesia TTS tokens (minted here from\nthe real keys, which never leave this process — see _mint_* above),\nCARTESIA_MANAGEMENT_KEY (still the raw key — the 3 voice-management REST\ncalls a scoped token can't authenticate; hardening queued), and the\nSpotify OAuth client ID (public by design, not a secret). Tavily and xAI\nare NOT in this response at all as of 2026-07-15 — both fully proxied\nthrough /api/gamer/ai/* (search, grok-query, grok-stream) in gamer_ai.py;\nthe client never sees those keys.\n\nAuth is a HARD gate — no unauthenticated fallback. There used to be an\n\"open bootstrap\" mode (Buga 2026-06-21) that issued keys to anyone who hit\nthis URL, added to unstick testers whose sign-in wasn't captured. That\npath handed raw production Anthropic/GH/HMAC-signing secrets to anonymous\ncallers — removed 2026-07-15. A stuck tester now gets a clear 401 and must\nre-authenticate; that's a smaller problem than the keys being public.\n\nANTHROPIC_API_KEY, GH_TOKEN, and OVERLAY_APP_SECRET are deliberately never\nreturned:\n- ANTHROPIC_API_KEY: every tier's Claude traffic already routes through\n  the token-gated /api/gamer/ai/* proxy (gamer_ai.py), which holds its\n  own server-side key. Handing this out made the client's isBYOK() check\n  (`!!process.env.ANTHROPIC_API_KEY`) true for 100% of installs, silently\n  routing every user's Claude calls direct-to-Anthropic on Zuga's key and\n  skipping the budget-enforced proxy entirely.\n- GH_TOKEN: the update feed is server-proxied (main.ts — \"the CLIENT needs\n  no token at all\"); nothing client-side consumes this anymore.\n- OVERLAY_APP_SECRET: this is the HMAC signing secret the client uses to\n  prove request authenticity. Handing it back over the same channel it's\n  meant to authenticate defeats the whole scheme — it must only ever be\n  embedded at build time, never fetched at runtime.","operationId":"overlay_bootstrap_api_ludus_bootstrap_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BootstrapRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Bootstrap Api Ludus Bootstrap Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/version/latest":{"get":{"tags":["tebex-gamer"],"summary":"Ludus Latest Version","description":"Public: the latest published Ludus version + download links.\n\nThe overlay (or a tester in a browser) can poll this to see if a newer\nbuild exists without needing a GitHub token of its own.","operationId":"ludus_latest_version_api_ludus_version_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ludus Latest Version Api Ludus Version Latest Get"}}}}}}},"/api/ludus/download/latest":{"get":{"tags":["tebex-gamer"],"summary":"Ludus Download Latest","description":"Public: redirect the caller straight to the latest installer binary.\n\nThe server resolves the asset via its own GitHub PAT, then hands GitHub's\nshort-lived signed asset URL (which needs no auth) back to the browser as a\n302. This is the manual-update escape hatch when client auto-update is dead.","operationId":"ludus_download_latest_api_ludus_download_latest_get","parameters":[{"name":"channel","in":"query","required":false,"schema":{"type":"string","default":"ow","title":"Channel"}},{"name":"portable","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Portable"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/updates/{filename}":{"get":{"tags":["tebex-gamer"],"summary":"Ludus Update Feed","description":"electron-updater 'generic' feed, server-mediated so the CLIENT NEVER needs\na GitHub token.\n\nThis decouples auto-update from login: previously the overlay had to fetch\nGH_TOKEN via the (now auth-gated) bootstrap to read the private repo's release\nfeed, so a broken login killed auto-update. Here the SERVER holds the token —\nthe overlay points electron-updater at `https://zugabot.ai/api/ludus/updates`\nand asks for `ow.yml` / `latest.yml` and the installer by filename, no auth.\n\n- `*.yml` manifests are tiny text -> fetched and returned inline (the updater\n  parses them).\n- installers / blockmaps -> 302 to GitHub's short-lived signed CDN URL so the\n  ~300 MB binary never streams through this worker.","operationId":"ludus_update_feed_api_ludus_updates__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/bundles":{"get":{"tags":["tebex-gamer"],"summary":"Gamer Bundles","description":"Public: list available token bundles for the overlay purchase UI.","operationId":"gamer_bundles_api_gamer_bundles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Gamer Bundles Api Gamer Bundles Get"}}}}}}},"/api/gamer/checkout":{"post":{"tags":["tebex-gamer"],"summary":"Gamer Checkout","description":"Create a checkout session for overlay users (no login required).\n\nRoutes to Tebex for Overwolf-distributed subscriptions (required by\nOverwolf ToS §8 — Tebex as merchant of record) and to Stripe for all\nother purchases. The webhook credits tokens to user_id via metadata\n(Stripe) or customer.username (Tebex) — no account needed either way.\n\nAuth: HMAC signature (same as bootstrap).","operationId":"gamer_checkout_api_gamer_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverlayCheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Gamer Checkout Api Gamer Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/financials/gamer":{"get":{"tags":["tebex-gamer"],"summary":"Gamer Financials","description":"Live revenue snapshot for ZugaGamerOverlay. Reads from GamerPaymentEvent\n(per-payment append-only log) and GamerSubscription (current-status table).\n\nMoney figures are in USD and converted from amount_cents at query time.\nExcludes cancellations from revenue rollup. Idempotent reads only — no\nside effects.","operationId":"gamer_financials_api_admin_financials_gamer_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GamerFinancialsResponse"}}}}}}},"/api/gamer/overlay/acknowledge":{"post":{"tags":["tebex-gamer"],"summary":"Record Acknowledgment","description":"Record a compliance acknowledgment from the overlay first-run flow.\n\nIdempotent: a duplicate (user_id, kind, version) returns the existing row\nrather than creating a second one. Rejects unknown `kind` values.","operationId":"record_acknowledgment_api_gamer_overlay_acknowledge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Record Acknowledgment Api Gamer Overlay Acknowledge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/acknowledge":{"post":{"tags":["tebex-gamer"],"summary":"Record Acknowledgment","description":"Record a compliance acknowledgment from the overlay first-run flow.\n\nIdempotent: a duplicate (user_id, kind, version) returns the existing row\nrather than creating a second one. Rejects unknown `kind` values.","operationId":"record_acknowledgment_api_ludus_acknowledge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceAckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Record Acknowledgment Api Ludus Acknowledge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/settings":{"get":{"tags":["tebex-gamer"],"summary":"Get Ludus Settings","description":"Return the caller's roaming overlay settings blob (Bearer-gated).\n\nEmpty blob + client_updated_at=0 for a user who has never synced — the\nclient then falls back to its localStorage defaults.","operationId":"get_ludus_settings_api_ludus_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Ludus Settings Api Ludus Settings Get"}}}}}},"put":{"tags":["tebex-gamer"],"summary":"Put Ludus Settings","description":"Upsert the caller's roaming overlay settings blob (Bearer-gated).\n\nLast-write-wins: a PUT whose client_updated_at is older than the stored\nvalue is ignored (returns the current stored timestamp) so a stale device\ncan't clobber a newer device's settings.","operationId":"put_ludus_settings_api_ludus_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LudusSettingsPut"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Put Ludus Settings Api Ludus Settings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/logs":{"post":{"tags":["ludus-telemetry"],"summary":"Overlay Upload Logs","description":"Receive logs from overlay instances for remote debugging.","operationId":"overlay_upload_logs_api_gamer_overlay_logs_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Upload Logs Api Gamer Overlay Logs Post"}}}}}}},"/api/ludus/logs":{"post":{"tags":["ludus-telemetry"],"summary":"Overlay Upload Logs","description":"Receive logs from overlay instances for remote debugging.","operationId":"overlay_upload_logs_api_ludus_logs_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Upload Logs Api Ludus Logs Post"}}}}}}},"/api/gamer/overlay/log-users":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay List Users","description":"List all user prefixes that have uploaded logs.","operationId":"overlay_list_users_api_gamer_overlay_log_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay List Users Api Gamer Overlay Log Users Get"}}}}}}},"/api/ludus/log-users":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay List Users","description":"List all user prefixes that have uploaded logs.","operationId":"overlay_list_users_api_ludus_log_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay List Users Api Ludus Log Users Get"}}}}}}},"/api/gamer/overlay/logs/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Get Logs","description":"Retrieve a session log for a user. index=0 (default) is the latest;\nindex=1 is the prior session, etc. Backward-compatible with callers that\nomit the param.","operationId":"overlay_get_logs_api_gamer_overlay_logs__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"index","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Index"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Get Logs Api Gamer Overlay Logs  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/logs/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Get Logs","description":"Retrieve a session log for a user. index=0 (default) is the latest;\nindex=1 is the prior session, etc. Backward-compatible with callers that\nomit the param.","operationId":"overlay_get_logs_api_ludus_logs__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"index","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Index"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Get Logs Api Ludus Logs  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/log-history/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Log History","description":"List all retained session logs for a user (newest first), with metadata.","operationId":"overlay_log_history_api_gamer_overlay_log_history__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Log History Api Gamer Overlay Log History  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/log-history/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Log History","description":"List all retained session logs for a user (newest first), with metadata.","operationId":"overlay_log_history_api_ludus_log_history__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Log History Api Ludus Log History  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/fp-audio":{"post":{"tags":["ludus-telemetry"],"summary":"Overlay Upload Fp Audio","description":"Receive wake word audio (FP or TP) for model retraining.","operationId":"overlay_upload_fp_audio_api_gamer_overlay_fp_audio_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Upload Fp Audio Api Gamer Overlay Fp Audio Post"}}}}}}},"/api/ludus/fp-audio":{"post":{"tags":["ludus-telemetry"],"summary":"Overlay Upload Fp Audio","description":"Receive wake word audio (FP or TP) for model retraining.","operationId":"overlay_upload_fp_audio_api_ludus_fp_audio_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Upload Fp Audio Api Ludus Fp Audio Post"}}}}}}},"/api/gamer/overlay/wake-audio/stats":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Wake Audio Stats","description":"Training data stats — TP, FP, FN counts across all testers.","operationId":"overlay_wake_audio_stats_api_gamer_overlay_wake_audio_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Wake Audio Stats Api Gamer Overlay Wake Audio Stats Get"}}}}}}},"/api/ludus/wake-audio/stats":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Wake Audio Stats","description":"Training data stats — TP, FP, FN counts across all testers.","operationId":"overlay_wake_audio_stats_api_ludus_wake_audio_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Wake Audio Stats Api Ludus Wake Audio Stats Get"}}}}}}},"/api/gamer/overlay/fp-audio/list":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay List Fp Audio","description":"List available FP audio files grouped by user (legacy endpoint).","operationId":"overlay_list_fp_audio_api_gamer_overlay_fp_audio_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay List Fp Audio Api Gamer Overlay Fp Audio List Get"}}}}}}},"/api/ludus/fp-audio/list":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay List Fp Audio","description":"List available FP audio files grouped by user (legacy endpoint).","operationId":"overlay_list_fp_audio_api_ludus_fp_audio_list_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay List Fp Audio Api Ludus Fp Audio List Get"}}}}}}},"/api/gamer/overlay/stats":{"post":{"tags":["ludus-telemetry"],"summary":"Overlay Upload Stats","description":"Receive one game-session usage record from an overlay instance.","operationId":"overlay_upload_stats_api_gamer_overlay_stats_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Upload Stats Api Gamer Overlay Stats Post"}}}}}}},"/api/ludus/stats":{"post":{"tags":["ludus-telemetry"],"summary":"Overlay Upload Stats","description":"Receive one game-session usage record from an overlay instance.","operationId":"overlay_upload_stats_api_ludus_stats_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Upload Stats Api Ludus Stats Post"}}}}}}},"/api/gamer/overlay/stats/aggregate":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Stats Aggregate","description":"Owner-gated rollup: DAU, hours, sessions, top games, per-mode time,\ntool usage, and error rate across all testers over the window.","operationId":"overlay_stats_aggregate_api_gamer_overlay_stats_aggregate_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Stats Aggregate Api Gamer Overlay Stats Aggregate Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/stats/aggregate":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Stats Aggregate","description":"Owner-gated rollup: DAU, hours, sessions, top games, per-mode time,\ntool usage, and error rate across all testers over the window.","operationId":"overlay_stats_aggregate_api_ludus_stats_aggregate_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Stats Aggregate Api Ludus Stats Aggregate Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/crash":{"post":{"tags":["ludus-telemetry"],"summary":"Overlay Upload Crash","description":"Receive one crash-evidence record from an overlay instance.","operationId":"overlay_upload_crash_api_gamer_overlay_crash_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Upload Crash Api Gamer Overlay Crash Post"}}}}}}},"/api/ludus/crash":{"post":{"tags":["ludus-telemetry"],"summary":"Overlay Upload Crash","description":"Receive one crash-evidence record from an overlay instance.","operationId":"overlay_upload_crash_api_ludus_crash_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Upload Crash Api Ludus Crash Post"}}}}}}},"/api/gamer/overlay/crash-recent":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Recent Crashes","description":"Owner-gated: all testers' crash records in the last N hours, newest first.","operationId":"overlay_recent_crashes_api_gamer_overlay_crash_recent_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","default":48,"title":"Hours"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Recent Crashes Api Gamer Overlay Crash Recent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/crash-recent":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Recent Crashes","description":"Owner-gated: all testers' crash records in the last N hours, newest first.","operationId":"overlay_recent_crashes_api_ludus_crash_recent_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","default":48,"title":"Hours"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Recent Crashes Api Ludus Crash Recent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/crash-history/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Crash History","description":"Owner-gated: one tester's crash records (summaries), newest first.","operationId":"overlay_crash_history_api_gamer_overlay_crash_history__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Crash History Api Gamer Overlay Crash History  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/crash-history/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Crash History","description":"Owner-gated: one tester's crash records (summaries), newest first.","operationId":"overlay_crash_history_api_ludus_crash_history__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Crash History Api Ludus Crash History  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/crashes/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Get Crash","description":"Owner-gated: full crash record for a tester. index=0 = latest.","operationId":"overlay_get_crash_api_gamer_overlay_crashes__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"index","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Index"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Get Crash Api Gamer Overlay Crashes  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/crashes/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Get Crash","description":"Owner-gated: full crash record for a tester. index=0 = latest.","operationId":"overlay_get_crash_api_ludus_crashes__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"index","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Index"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Get Crash Api Ludus Crashes  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/budget":{"post":{"tags":["ludus-telemetry"],"summary":"Overlay Upload Budget","description":"Receive session budget JSON from overlay instances for cost analysis.","operationId":"overlay_upload_budget_api_gamer_overlay_budget_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Upload Budget Api Gamer Overlay Budget Post"}}}}}}},"/api/ludus/budget":{"post":{"tags":["ludus-telemetry"],"summary":"Overlay Upload Budget","description":"Receive session budget JSON from overlay instances for cost analysis.","operationId":"overlay_upload_budget_api_ludus_budget_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Overlay Upload Budget Api Ludus Budget Post"}}}}}}},"/api/gamer/overlay/budget-users":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Budget Users","description":"List all users who have uploaded budget data. Owner-gated — joins the\nusers table to surface per-uploader email (PII), so it must not be public.","operationId":"overlay_budget_users_api_gamer_overlay_budget_users_get","parameters":[{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Budget Users Api Gamer Overlay Budget Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/budget-users":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Budget Users","description":"List all users who have uploaded budget data. Owner-gated — joins the\nusers table to surface per-uploader email (PII), so it must not be public.","operationId":"overlay_budget_users_api_ludus_budget_users_get","parameters":[{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Budget Users Api Ludus Budget Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/budget/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Get Budget","description":"Retrieve budget data for a user. ?latest=N returns N most recent sessions.","operationId":"overlay_get_budget_api_gamer_overlay_budget__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"latest","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Latest"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Get Budget Api Gamer Overlay Budget  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/budget/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Get Budget","description":"Retrieve budget data for a user. ?latest=N returns N most recent sessions.","operationId":"overlay_get_budget_api_ludus_budget__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"latest","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Latest"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Get Budget Api Ludus Budget  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/budget-summary/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Budget Summary","description":"Aggregated cost summary across all sessions for a user.","operationId":"overlay_budget_summary_api_gamer_overlay_budget_summary__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Budget Summary Api Gamer Overlay Budget Summary  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/budget-summary/{user_id}":{"get":{"tags":["ludus-telemetry"],"summary":"Overlay Budget Summary","description":"Aggregated cost summary across all sessions for a user.","operationId":"overlay_budget_summary_api_ludus_budget_summary__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Budget Summary Api Ludus Budget Summary  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/cosmetics/catalog":{"get":{"tags":["cosmetics"],"summary":"Get Catalog","description":"Public, no auth. Returns the full cosmetic manifest (id, slot, name).\n\nSpec §4: public, CDN-cacheable.\nPhase 1 stub: full rects stay client-bundled; only manifest-lite here.","operationId":"get_catalog_api_gamer_cosmetics_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Catalog Api Gamer Cosmetics Catalog Get"}}}}}}},"/api/gamer/cosmetics/me":{"get":{"tags":["cosmetics"],"summary":"Get Me","description":"Auth required. Returns all unlocks + current loadout.\n\nUnlocks are computed from REAL entitlement (Ludus #32): free always, base if the\none-time unlock was bought, premium if subscribed (pro/ultra), plus every explicitly\ngranted id (founder/earned/admin). The server is the sole authority — the client\ncan never self-grant.\n\nFallback: if the id->source map hasn't been generated yet (SOURCE_BY_ID empty), we\nrevert to the pre-#32 behavior (free starter set + granted exclusives) so a missing\nartifact degrades to \"too generous\" locally rather than locking everyone out. The\nreal gate is the overlay's seedOwned (Phase 3) honoring this list.\n\nLoadout: returned from DB if a row exists, else DEFAULT_LOADOUT (no row created).","operationId":"get_me_api_gamer_cosmetics_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/api/gamer/cosmetics/daily-login":{"post":{"tags":["cosmetics"],"summary":"Daily Login","description":"Auth required. Records today's login (server clock), advances/reset the streak,\nand awards a random earn-pool piece on milestone days. Idempotent per UTC day —\ncalling twice on the same day is a no-op that grants nothing.\n\nStreak rules (server-authoritative, cheat-proof):\n  - same UTC day as last login   -> already_claimed=True, no change, no grant\n  - exactly the next day         -> current_streak += 1\n  - a gap (or first ever login)  -> current_streak reset to 1\nA grant fires when the resulting current_streak is in STREAK_REWARD_DAYS.","operationId":"daily_login_api_gamer_cosmetics_daily_login_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyLoginResponse"}}}}}}},"/api/gamer/cosmetics/claim":{"post":{"tags":["cosmetics"],"summary":"Claim Achievement","description":"Auth required. Client-reported achievement -> earn-pool cosmetic grant.\n\nTrust model (Ludus #32): achievements are counted client-side, so this endpoint\nTRUSTS the client's claim — `achievement_id` is accepted verbatim and is never\nchecked against Steam or Xbox. It is bounded ONLY to earn-pool (free)\ncosmetics: a cheated claim nets at most a free piece the user would grind out\nanyway, and can NEVER yield a paid/premium/founder piece (those need\nserver-verifiable entitlement). Idempotent per (user, cosmetic).\n\nCORRECTED 2026-08-29 — this used to end with \"that bounds the abuse to zero\nmonetary value, so no game-stat tracking or rate limiter is warranted.\" That\nstopped being true the moment the LudusTokens drip below was added: tokens\nhave real spend value, so a fabricated claim now mints them. Read plainly,\nthe exposure is:\n\n  - the COSMETIC is still worth nothing in money, as originally argued;\n  - the TOKENS are not. One mint per newly-granted earn-pool piece, so a\n    fresh account with zero gameplay can currently reach the same total an\n    honest grinder does — capped by ACHIEVEMENT_TOKEN_LIFETIME_CAP in\n    ludus_tokens.py, which is derived from the earn-pool size rather than\n    left as an accident of it.\n\nSo the cap is what bounds this, NOT the \"zero monetary value\" argument. Do\nnot cite that argument to justify skipping a limit on a future extension of\nthis endpoint — it is the reason this was missed for as long as it was.","operationId":"claim_achievement_api_gamer_cosmetics_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/cosmetics/roll-drop":{"post":{"tags":["cosmetics"],"summary":"Roll Drop","description":"Auth required. A single mid-play random-drop roll. The overlay pings this on a\ncoarse cadence while a session is live; the server owns the probability AND a daily\ncap, so even a client that spams it can win at most MAX_PLAY_DROPS_PER_DAY free\npieces. Returns the piece (if any) plus the running daily count.","operationId":"roll_drop_api_gamer_cosmetics_roll_drop_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollDropResponse"}}}}}}},"/api/gamer/cosmetics/equip":{"post":{"tags":["cosmetics"],"summary":"Equip","description":"Auth required. Validates slot assignments, upserts gamer_loadout.\n\nValidation rules:\n- hat_id must be null OR a cosmetic with slot \"hat\"\n- eyes_id must be a cosmetic with slot \"eyes\"\n- skin_id / voice_id: placeholder slots — validate they're in catalog when provided\n- Any provided id NOT in CATALOG_IDS → 422\n- Any provided id in wrong slot → 422","operationId":"equip_api_gamer_cosmetics_equip_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/cosmetics/test/grant-all":{"post":{"tags":["cosmetics"],"summary":"Test Grant All","description":"Admin-only QA: grant the full pool to the CALLER (source=\"admin\").\n\nVisual-QA switch so admins/testers can see every piece without a sub. Excludes\n`free` (always owned via bucket) and `founder` (stays genuinely exclusive).\nEvery write funnels through _grant_cosmetic (the single grant path), so this is\nidempotent; /test/reset-grants removes exactly these rows to restore the organic\nstate for unlock-flow testing.","operationId":"test_grant_all_api_gamer_cosmetics_test_grant_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestGrantAllResponse"}}}}}}},"/api/gamer/cosmetics/test/reset-grants":{"post":{"tags":["cosmetics"],"summary":"Test Reset Grants","description":"Admin-only QA: delete the CALLER's source=\"admin\" unlock rows ONLY.\n\nEarned/founder/signature/streak grants survive - this returns the account to its\norganic entitlement state so streaks, claims, and play drops are testable again.","operationId":"test_reset_grants_api_gamer_cosmetics_test_reset_grants_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResetResponse"}}}}}}},"/api/gamer/tokens/attest":{"post":{"tags":["ludus-tokens"],"summary":"Attest","description":"One-time DOB attestation; creates the wallet. Under-13 = no wallet (403).\n13-17 keeps the $25/month cap; 18+ uncapped (cap 0). Conservative year-only\nmath: age = current_year - birth_year - 1 (minimum possible age for that\nbirth year) — the only estimate that can never under-restrict the gate.","operationId":"attest_api_gamer_tokens_attest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Attest Api Gamer Tokens Attest Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/tokens/wallet":{"get":{"tags":["ludus-tokens"],"summary":"Get Wallet","operationId":"get_wallet_api_gamer_tokens_wallet_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Wallet Api Gamer Tokens Wallet Get"}}}}}}},"/api/gamer/tokens/test/credit":{"post":{"tags":["ludus-tokens"],"summary":"Test Credit","description":"Admin-only QA: credit tokens without real money (mirrors cosmetics QA).","operationId":"test_credit_api_gamer_tokens_test_credit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestCreditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Test Credit Api Gamer Tokens Test Credit Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/tokens/shop":{"get":{"tags":["ludus-tokens"],"summary":"Shop List","description":"Must apply the same purchasability guard shop_buy() enforces — otherwise\na listed item could 422 the moment the user tries to buy it. Fail closed\nlike shop_buy(): an empty/missing source map means nothing is listed,\nnot everything (a read endpoint has no 503 to raise, so it just returns\nno items instead).","operationId":"shop_list_api_gamer_tokens_shop_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Shop List Api Gamer Tokens Shop Get"}}}}}}},"/api/gamer/tokens/shop/buy":{"post":{"tags":["ludus-tokens"],"summary":"Shop Buy","operationId":"shop_buy_api_gamer_tokens_shop_buy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Shop Buy Api Gamer Tokens Shop Buy Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/tokens/packs":{"get":{"tags":["ludus-tokens"],"summary":"List Packs","operationId":"list_packs_api_gamer_tokens_packs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Packs Api Gamer Tokens Packs Get"}}}}}}},"/api/gamer/tokens/checkout":{"post":{"tags":["ludus-tokens"],"summary":"Checkout","description":"Issue a Tebex checkout link for a token pack — this is the ONLY place\nthe monthly minor spend cap is enforced. credit_token_pack() (the webhook\nhandler) never blocks a credit, because by webhook time Tebex has already\ncaptured the money. Consequence: N links issued concurrently can each pass\nthis check before any is redeemed, so up to (N-1) packs can overshoot the\ncap once all N are paid. That overshoot is logged at WARNING (never\nsilent) and refundable via /api/gamer/tokens/refund — see\ncredit_token_pack()'s docstring.","operationId":"checkout_api_gamer_tokens_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Checkout Api Gamer Tokens Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/tokens/history":{"get":{"tags":["ludus-tokens"],"summary":"Get History","operationId":"get_history_api_gamer_tokens_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get History Api Gamer Tokens History Get"}}}}}}},"/api/gamer/tokens/refund":{"post":{"tags":["ludus-tokens"],"summary":"Refund","description":"Self-serve refund of an UNSPENT pack within 14 days. Debits the tokens;\nthe money side is flagged for manual Tebex payout (support queue).\n\nDouble-refund guard: _refund_already_exists() below is a SELECT against\nsource='refund', ref=f\"refund:{txn_id}\" run BEFORE the debit — an\napp-level pre-check only, so it's TOCTOU-racy by itself under two\nconcurrent calls. The real backstop is the partial unique DB index on\n(user_id, ref) for source='refund' (see GamerTokenLedger.__table_args__):\na lost race now surfaces as IntegrityError inside mutate_balance(), whose\nrecovery path reports reason=\"duplicate\" — mapped below to the same 409\n\"already refunded\" the sequential pre-check already returns, so the race\nloser and the sequential re-refund get identical responses.","operationId":"refund_api_gamer_tokens_refund_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Refund Api Gamer Tokens Refund Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/party/create":{"post":{"tags":["party"],"summary":"Create Party","description":"Auth required. Create a new open party room and add the creator as first member.\n\nReturns the 4-digit code, room_id, and a relative ws_url the client uses to\nbuild the full WebSocket URL. Room state is in-memory and ephemeral (a\nserver restart drops open rooms — fine for presence-only parties).","operationId":"create_party_api_gamer_party_create_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponse"}}}}}}},"/api/gamer/party/join":{"post":{"tags":["party"],"summary":"Join Party","description":"Auth required. Join an open party room by its 4-digit code.\n\n- 404 if no open room with that code exists.\n- Idempotent: re-joining is safe (membership is a set).","operationId":"join_party_api_gamer_party_join_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/party/leave":{"post":{"tags":["party"],"summary":"Leave Party","description":"Auth required. Leave a party room — removes the caller's PartyMember row.\n\nBody accepts either {code} or {room_id}; at least one must be supplied (422\nif neither is present).\n\nIdempotency: leaving when not a member returns 200 (no-op). Callers may\nsafely call leave multiple times without error.\n\n404 only if the room/code does not exist at all (including closed rooms —\nthe row must simply exist in the DB).\n\nIf no members remain after the leave, the room (and its code) is dropped.","operationId":"leave_party_api_gamer_party_leave_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/ai/query":{"post":{"tags":["gamer-ai"],"summary":"Gamer Ai Query","description":"Sync Claude completion for the Overlay.\n\nReturns the full Anthropic-style response object so the Overlay\nclient doesn't need to change its response parsing.","operationId":"gamer_ai_query_api_gamer_ai_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Gamer Ai Query Api Gamer Ai Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/ai/stream":{"post":{"tags":["gamer-ai"],"summary":"Gamer Ai Stream","description":"Streaming Claude completion for the Overlay.\n\nReturns an SSE stream matching Anthropic's streaming format so the\nOverlay client can parse it identically to a direct Anthropic call.","operationId":"gamer_ai_stream_api_gamer_ai_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/ai/search":{"post":{"tags":["gamer-ai"],"summary":"Gamer Ai Search","description":"Tavily web search for the Overlay.\n\nProxied to avoid exposing the Tavily API key to clients.\nCost: ~$0.008 per basic search, ~$0.016 per advanced search.","operationId":"gamer_ai_search_api_gamer_ai_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Gamer Ai Search Api Gamer Ai Search Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/ai/grok-query":{"post":{"tags":["gamer-ai"],"summary":"Gamer Ai Grok Query","description":"Sync Grok completion for the Overlay's friend-mode persona.","operationId":"gamer_ai_grok_query_api_gamer_ai_grok_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrokChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Gamer Ai Grok Query Api Gamer Ai Grok Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/ai/grok-stream":{"post":{"tags":["gamer-ai"],"summary":"Gamer Ai Grok Stream","description":"Streaming Grok completion — raw OpenAI-compatible SSE passthrough.\nThe client already parses raw xAI SSE itself (api-proxy.ts comment:\n\"pipes the RAW xAI SSE back to the renderer... parses the OpenAI deltas\nitself\"), so this relays bytes unchanged rather than reconstructing\nevents the way the Anthropic SDK-backed /stream above does.","operationId":"gamer_ai_grok_stream_api_gamer_ai_grok_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrokChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/game-context":{"post":{"tags":["ludus","ludus"],"summary":"Game Context","description":"Return cached game context for `game_name`, refreshing from Tavily on\ncache miss / staleness / explicit force_refresh.\n\nCache is shared across users — keyed by slug(game_name). A miss fetches\nonce and serves the next ~2hrs of requests for that game from disk.","operationId":"game_context_api_ludus_game_context_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameContextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/game-context":{"post":{"tags":["ludus-deprecated","ludus"],"summary":"Game Context","description":"Return cached game context for `game_name`, refreshing from Tavily on\ncache miss / staleness / explicit force_refresh.\n\nCache is shared across users — keyed by slug(game_name). A miss fetches\nonce and serves the next ~2hrs of requests for that game from disk.","operationId":"game_context_api_gamer_overlay_game_context_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameContextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/drift-audit":{"post":{"tags":["ludus","ludus"],"summary":"Drift Audit","description":"Ingest one drift-audit entry. Observability only — never charges tokens.\n\nReturns {ok, remaining_today}. Quota-exceeded returns 429 so the client\nring buffer can hold entries until the next UTC day.","operationId":"drift_audit_api_ludus_drift_audit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftAuditPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Drift Audit Api Ludus Drift Audit Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/drift-audit/quota":{"get":{"tags":["ludus","ludus"],"summary":"Drift Audit Quota","description":"Report remaining quota for the calling user — useful for the client\nring buffer to decide whether to flush early.","operationId":"drift_audit_quota_api_ludus_drift_audit_quota_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Drift Audit Quota Api Ludus Drift Audit Quota Get"}}}}}}},"/api/ludus/admin/drift-audit/scan":{"get":{"tags":["ludus","ludus"],"summary":"Admin Drift Audit Scan","description":"Run the three drift detectors over a UTC-day window and return a\nreport shape Zugabot's autonomous loop can append to findings.md.\n\nOwner-key gated. No LLM, no Tavily. Pure SQL read + Python analysis.","operationId":"admin_drift_audit_scan_api_ludus_admin_drift_audit_scan_get","parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"UTC day, YYYY-MM-DD; defaults to yesterday","title":"Day"},"description":"UTC day, YYYY-MM-DD; defaults to yesterday"},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Drift Audit Scan Api Ludus Admin Drift Audit Scan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/drift-audit":{"post":{"tags":["ludus-deprecated","ludus"],"summary":"Drift Audit","description":"Ingest one drift-audit entry. Observability only — never charges tokens.\n\nReturns {ok, remaining_today}. Quota-exceeded returns 429 so the client\nring buffer can hold entries until the next UTC day.","operationId":"drift_audit_api_gamer_overlay_drift_audit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftAuditPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Drift Audit Api Gamer Overlay Drift Audit Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/overlay/drift-audit/quota":{"get":{"tags":["ludus-deprecated","ludus"],"summary":"Drift Audit Quota","description":"Report remaining quota for the calling user — useful for the client\nring buffer to decide whether to flush early.","operationId":"drift_audit_quota_api_gamer_overlay_drift_audit_quota_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Drift Audit Quota Api Gamer Overlay Drift Audit Quota Get"}}}}}}},"/api/gamer/overlay/admin/drift-audit/scan":{"get":{"tags":["ludus-deprecated","ludus"],"summary":"Admin Drift Audit Scan","description":"Run the three drift detectors over a UTC-day window and return a\nreport shape Zugabot's autonomous loop can append to findings.md.\n\nOwner-key gated. No LLM, no Tavily. Pure SQL read + Python analysis.","operationId":"admin_drift_audit_scan_api_gamer_overlay_admin_drift_audit_scan_get","parameters":[{"name":"day","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"UTC day, YYYY-MM-DD; defaults to yesterday","title":"Day"},"description":"UTC day, YYYY-MM-DD; defaults to yesterday"},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Drift Audit Scan Api Gamer Overlay Admin Drift Audit Scan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/admin/purge-user":{"post":{"tags":["ludus","ludus"],"summary":"Purge User","description":"Enqueue a purge sentinel for *user_id*. Admin-only; service-key gated.","operationId":"purge_user_api_ludus_admin_purge_user_post","parameters":[{"name":"x-service-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeUserBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Purge User Api Ludus Admin Purge User Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/consent/zugabot":{"get":{"tags":["ludus","ludus"],"summary":"Get Ludus Consent","description":"Report the caller's current Ludus->Zugabot consent state.","operationId":"get_ludus_consent_api_ludus_consent_zugabot_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Ludus Consent Api Ludus Consent Zugabot Get"}}}}}},"post":{"tags":["ludus","ludus"],"summary":"Set Ludus Consent","description":"User opt-in/out for the Ludus->Zugabot feed (the per-user egress gate when\nMULTIUSER_ISOLATION_ENABLED is on). Authenticated as the calling user — a user\ncan only set their OWN consent. Revoke (enabled=false) clears the flag.","operationId":"set_ludus_consent_api_ludus_consent_zugabot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__gaming__ludus_events__ConsentBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Ludus Consent Api Ludus Consent Zugabot Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/events":{"post":{"tags":["ludus","ludus"],"summary":"Ingest Event","operationId":"ingest_event_api_ludus_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageEventBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ingest Event Api Ludus Events Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/events/outbox":{"get":{"tags":["ludus","ludus"],"summary":"Drain Events","operationId":"drain_events_api_ludus_events_outbox_get","parameters":[{"name":"x-service-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Drain Events Api Ludus Events Outbox Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/events/outbox/ack":{"post":{"tags":["ludus","ludus"],"summary":"Ack Events","operationId":"ack_events_api_ludus_events_outbox_ack_post","parameters":[{"name":"x-service-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_ack_events_api_ludus_events_outbox_ack_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ack Events Api Ludus Events Outbox Ack Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/overlay-harness/scan":{"get":{"tags":["ludus-harness"],"summary":"Overlay Harness Scan","description":"Scan uploaded overlay logs and return a triaged defect report.","operationId":"overlay_harness_scan_api_admin_overlay_harness_scan_get","parameters":[{"name":"since_hours","in":"query","required":false,"schema":{"type":"integer","maximum":720,"minimum":1,"description":"look back window in hours","default":24,"title":"Since Hours"},"description":"look back window in hours"},{"name":"user","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"filter by user_id prefix","title":"User"},"description":"filter by user_id prefix"},{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Overlay Harness Scan Api Admin Overlay Harness Scan Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/waitlist":{"post":{"tags":["ludus-waitlist"],"summary":"Join Waitlist","operationId":"join_waitlist_api_ludus_waitlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistJoinRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Join Waitlist Api Ludus Waitlist Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/waitlist/stats":{"get":{"tags":["ludus-waitlist"],"summary":"Waitlist Stats","operationId":"waitlist_stats_api_ludus_waitlist_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Waitlist Stats Api Ludus Waitlist Stats Get"}}}}}}},"/api/ludus/invite/issue":{"post":{"tags":["ludus-waitlist"],"summary":"Issue Codes","operationId":"issue_codes_api_ludus_invite_issue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCodesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Issue Codes Api Ludus Invite Issue Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/invite/redeem":{"post":{"tags":["ludus-waitlist"],"summary":"Redeem Code","operationId":"redeem_code_api_ludus_invite_redeem_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Redeem Code Api Ludus Invite Redeem Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ludus/founder/claim-early-access":{"post":{"tags":["ludus-waitlist"],"summary":"Claim Early Access","description":"Automatic Founder grant for the first EARLY_ACCESS_CAP real sign-ins — no\ncode required. Called once client-side right after a fresh sign-in; a quiet\nno-op (not an error) once the pool is full, same posture as the waitlist's\nown wave-full response. Idempotent per user like redeem_code().","operationId":"claim_early_access_api_ludus_founder_claim_early_access_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Claim Early Access Api Ludus Founder Claim Early Access Post"}}}}}}},"/api/ludus/founder/status":{"get":{"tags":["ludus-waitlist"],"summary":"Founder Status","operationId":"founder_status_api_ludus_founder_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Founder Status Api Ludus Founder Status Get"}}}}}}},"/api/gamer/gep/contribute":{"post":{"tags":["gamer-proxy"],"summary":"Gep Contribute","description":"Store one install's confirmed-feature discoveries (upsert per game).","operationId":"gep_contribute_api_gamer_gep_contribute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GepContributeIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gamer/gep/catalog":{"get":{"tags":["gamer-proxy"],"summary":"Gep Catalog","description":"Aggregate discoveries with a per-feature contributor quality gate.","operationId":"gep_catalog_api_gamer_gep_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/gamer/{path}":{"get":{"tags":["gamer-proxy"],"summary":"Proxy Gamer Read","description":"Public read proxy — game data, search, new releases.","operationId":"proxy_gamer_read_api_gamer__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["gamer-proxy"],"summary":"Proxy Gamer Write","description":"Write proxy — public for RL training & auth, auth-required for everything else.","operationId":"proxy_gamer_write_api_gamer__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["gamer-proxy"],"summary":"Proxy Gamer Write","description":"Write proxy — public for RL training & auth, auth-required for everything else.","operationId":"proxy_gamer_write_api_gamer__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["gamer-proxy"],"summary":"Proxy Gamer Write","description":"Write proxy — public for RL training & auth, auth-required for everything else.","operationId":"proxy_gamer_write_api_gamer__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["gamer-proxy"],"summary":"Proxy Gamer Write","description":"Write proxy — public for RL training & auth, auth-required for everything else.","operationId":"proxy_gamer_write_api_gamer__path__put","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code-remote/commands":{"get":{"tags":["code-proxy"],"summary":"Get Commands","description":"ZugaOS catalog passthrough — proxies upstream /api/code/commands\nWITHOUT the admin gate. Catalogs are capability descriptors, not user\ndata. Defined BEFORE the admin-gated catch-all so FastAPI matches this\nexplicit route first. Returns an empty catalog if upstream is unreachable.","operationId":"get_commands_api_code_remote_commands_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Commands Api Code Remote Commands Get"}}}}}}},"/api/code-remote/{path}":{"get":{"tags":["code-proxy"],"summary":"Proxy Code","description":"Proxy requests to ZugaCode backend on Mac Mini. Admin only.","operationId":"proxy_code_api_code_remote__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["code-proxy"],"summary":"Proxy Code","description":"Proxy requests to ZugaCode backend on Mac Mini. Admin only.","operationId":"proxy_code_api_code_remote__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["code-proxy"],"summary":"Proxy Code","description":"Proxy requests to ZugaCode backend on Mac Mini. Admin only.","operationId":"proxy_code_api_code_remote__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["code-proxy"],"summary":"Proxy Code","description":"Proxy requests to ZugaCode backend on Mac Mini. Admin only.","operationId":"proxy_code_api_code_remote__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["code-proxy"],"summary":"Proxy Code","description":"Proxy requests to ZugaCode backend on Mac Mini. Admin only.","operationId":"proxy_code_api_code_remote__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reviews/{path}":{"get":{"tags":["unified-proxy"],"summary":"Proxy Reviews","operationId":"proxy_reviews_api_reviews__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["unified-proxy"],"summary":"Proxy Reviews","operationId":"proxy_reviews_api_reviews__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["unified-proxy"],"summary":"Proxy Reviews","operationId":"proxy_reviews_api_reviews__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["unified-proxy"],"summary":"Proxy Reviews","operationId":"proxy_reviews_api_reviews__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["unified-proxy"],"summary":"Proxy Reviews","operationId":"proxy_reviews_api_reviews__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/git/{path}":{"get":{"tags":["unified-proxy"],"summary":"Proxy Code Git","operationId":"proxy_code_git_api_code_git__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["unified-proxy"],"summary":"Proxy Code Git","operationId":"proxy_code_git_api_code_git__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["unified-proxy"],"summary":"Proxy Code Git","operationId":"proxy_code_git_api_code_git__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["unified-proxy"],"summary":"Proxy Code Git","operationId":"proxy_code_git_api_code_git__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["unified-proxy"],"summary":"Proxy Code Git","operationId":"proxy_code_git_api_code_git__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/x402":{"get":{"tags":["unified-proxy"],"summary":"Proxy X402 Landing","operationId":"proxy_x402_landing_x402_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/agents.txt":{"get":{"tags":["unified-proxy"],"summary":"Proxy Agents Txt","operationId":"proxy_agents_txt_agents_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"tags":["unified-proxy"],"summary":"Proxy Llms Txt","operationId":"proxy_llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/{path}":{"get":{"tags":["unified-proxy"],"summary":"Proxy Well Known","operationId":"proxy_well_known__well_known__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/x402/{path}":{"get":{"tags":["unified-proxy"],"summary":"Proxy X402 Api","operationId":"proxy_x402_api_api_x402__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["unified-proxy"],"summary":"Proxy X402 Api","operationId":"proxy_x402_api_api_x402__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["unified-proxy"],"summary":"Proxy X402 Api","operationId":"proxy_x402_api_api_x402__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["unified-proxy"],"summary":"Proxy X402 Api","operationId":"proxy_x402_api_api_x402__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["unified-proxy"],"summary":"Proxy X402 Api","operationId":"proxy_x402_api_api_x402__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/zugaqueue/{path}":{"get":{"tags":["unified-proxy"],"summary":"Proxy Zugaqueue","operationId":"proxy_zugaqueue_api_zugaqueue__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["unified-proxy"],"summary":"Proxy Zugaqueue","operationId":"proxy_zugaqueue_api_zugaqueue__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["unified-proxy"],"summary":"Proxy Zugaqueue","operationId":"proxy_zugaqueue_api_zugaqueue__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["unified-proxy"],"summary":"Proxy Zugaqueue","operationId":"proxy_zugaqueue_api_zugaqueue__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["unified-proxy"],"summary":"Proxy Zugaqueue","operationId":"proxy_zugaqueue_api_zugaqueue__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/minichat/proactive_threads/{path}":{"get":{"tags":["unified-proxy"],"summary":"Proxy Minichat Proactive Threads","operationId":"proxy_minichat_proactive_threads_api_minichat_proactive_threads__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["unified-proxy"],"summary":"Proxy Minichat Proactive Threads","operationId":"proxy_minichat_proactive_threads_api_minichat_proactive_threads__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["unified-proxy"],"summary":"Proxy Minichat Proactive Threads","operationId":"proxy_minichat_proactive_threads_api_minichat_proactive_threads__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["unified-proxy"],"summary":"Proxy Minichat Proactive Threads","operationId":"proxy_minichat_proactive_threads_api_minichat_proactive_threads__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["unified-proxy"],"summary":"Proxy Minichat Proactive Threads","operationId":"proxy_minichat_proactive_threads_api_minichat_proactive_threads__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/zugaos/ping":{"get":{"tags":["zugaos"],"summary":"Ping","operationId":"ping_api_zugaos_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ping Api Zugaos Ping Get"}}}}}}},"/api/zugaos/status":{"get":{"tags":["zugaos"],"summary":"Status","operationId":"status_api_zugaos_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Status Api Zugaos Status Get"}}}}}}},"/api/zugaos/catalog":{"get":{"tags":["zugaos"],"summary":"Aggregated Catalog","description":"Fetch every studio's /commands and return the union.\n\nStudios that don't respond within 2s are listed in `unreachable`. The\nintent router (Phase 3) treats unreachable studios as if they had no\ncommands — degraded but not broken.","operationId":"aggregated_catalog_api_zugaos_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AggregatedCatalog"}}}}}}},"/api/zugaos/route":{"post":{"tags":["zugaos"],"summary":"Route Intent","description":"Route a natural-language utterance to a studio intent.\n\nPhase 3: returns the SELECTION only (which studio.intent + args). Dispatch\nis Phase 5. The seam is intentional — the composer can stitch multiple\nselections, and the router stays unit-testable.\n\nuser_id is resolved via SuperTokens → ZugaApp local id by `get_current_user`.\nNever pass SuperTokens IDs into studio bodies; let each studio's existing\nauth path resolve identity from the session cookie when dispatch happens.","operationId":"route_intent_api_zugaos_route_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/zugaos/persona":{"get":{"tags":["zugaos"],"summary":"Read Persona","description":"Return the user's voice mode + mood + last-N session summaries.\n\nFirst-time callers (no row yet) get sensible defaults (voice_mode='witness')\nwithout any DB write. Studios can use this to color their behavior — e.g.\nHype mode in the gamer overlay = chattier proactive scans.","operationId":"read_persona_api_zugaos_persona_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaState"}}}}}},"post":{"tags":["zugaos"],"summary":"Write Voice Mode","description":"Set the user's voice mode. Mirrors what ZugaGamerOverlay writes to its\nown localStorage — does NOT replace the overlay's storage, just makes the\nsame value available to other studios + ZugaApp shell.\n\nValidation matches the overlay's VoiceMode enum exactly.","operationId":"write_voice_mode_api_zugaos_persona_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceModeUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/zugaos/persona/session_summary":{"post":{"tags":["zugaos"],"summary":"Append Summary","description":"Studios POST here at session end with a freeform summary. The composer\n(Phase 5) reads these to answer cross-studio questions like 'how was my day?'.\n\nThe store keeps a rolling window (last 8) so this never grows unbounded.","operationId":"append_summary_api_zugaos_persona_session_summary_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionSummaryAppend"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/zugaos/compose":{"post":{"tags":["zugaos"],"summary":"Compose","description":"Cross-studio synthesis. Phase 5a reads persona.last_session_summaries +\nvoice_mode and asks Claude to compose one paragraph that weaves the sources\nnaturally. Tone follows the user's voice mode.\n\nPhase 5b will swap the data source from cached summaries to live fan-out\n(parallel calls to studio dispatch endpoints) — same return shape, fresher\ndata. The /compose endpoint contract stays stable across that swap.\n\nTopics:\n  day_summary  — 'how was my day?' style cross-studio recap","operationId":"compose_api_zugaos_compose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/summary":{"get":{"tags":["analytics"],"summary":"Analytics Summary","description":"Traffic summary: unique visitors, page views, top pages, top referrers.","operationId":"analytics_summary_api_analytics_summary_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/events":{"get":{"summary":"List Available Events","description":"List all event types that studios have declared.","operationId":"list_available_events_api_webhooks_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/webhooks/":{"get":{"summary":"List Webhooks","description":"List the current user's webhook subscriptions.","operationId":"list_webhooks_api_webhooks__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Webhook","description":"Create a new webhook subscription. Returns the secret (shown once).","operationId":"create_webhook_api_webhooks__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/{sub_id}":{"get":{"summary":"Get Webhook","description":"Get a specific webhook subscription.","operationId":"get_webhook_api_webhooks__sub_id__get","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Webhook","description":"Update a webhook subscription.","operationId":"update_webhook_api_webhooks__sub_id__patch","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Webhook","description":"Delete a webhook subscription and its delivery history.","operationId":"delete_webhook_api_webhooks__sub_id__delete","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/{sub_id}/test":{"post":{"summary":"Test Webhook","description":"Send a test event to verify the webhook endpoint.","operationId":"test_webhook_api_webhooks__sub_id__test_post","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/{sub_id}/deliveries":{"get":{"summary":"List Deliveries","description":"Recent delivery log for a webhook subscription.","operationId":"list_deliveries_api_webhooks__sub_id__deliveries_get","parameters":[{"name":"sub_id","in":"path","required":true,"schema":{"type":"string","title":"Sub Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/events/emit":{"post":{"summary":"Emit Event","description":"Internal endpoint for proxy studios to push events into the bus.\n\nAuth: X-Studio-Secret header. Two paths accepted:\n  1. NEW (preferred): hash matches a non-revoked forge_secrets row with\n     scope='inbound_emit'. The row's studio_slug identifies the caller.\n  2. LEGACY (transitional): plaintext matches settings.webhook_studio_secret.\n     Logged with a warning so we can drive callers off it.","operationId":"emit_event_api_events_emit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/waitlist":{"post":{"tags":["waitlist"],"summary":"Join Waitlist","description":"Add an email to the waitlist.","operationId":"join_waitlist_api_waitlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/waitlist/approve":{"get":{"tags":["waitlist"],"summary":"Approve Waitlist","description":"Approve a waitlist signup (called from admin email link).","operationId":"approve_waitlist_api_waitlist_approve_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/waitlist/deny":{"get":{"tags":["waitlist"],"summary":"Deny Waitlist","description":"Deny a waitlist signup (called from admin email link).","operationId":"deny_waitlist_api_waitlist_deny_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/waitlist/reset":{"get":{"tags":["waitlist"],"summary":"Reset Waitlist Entry","description":"Admin: delete a waitlist entry so the user can re-signup. HMAC-signed.","operationId":"reset_waitlist_entry_api_waitlist_reset_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/waitlist/resend-invite":{"get":{"tags":["waitlist"],"summary":"Resend Invite","description":"Resend the 'You're in!' email. HMAC-signed (same token as approve).","operationId":"resend_invite_api_waitlist_resend_invite_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/waitlist/stats":{"get":{"tags":["waitlist"],"summary":"Waitlist Stats","description":"Get waitlist stats (public — shows total count for social proof).","operationId":"waitlist_stats_api_waitlist_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistStatsResponse"}}}}}}},"/api/waitlist/verify-invite":{"get":{"tags":["waitlist"],"summary":"Verify Invite","description":"Verify an invite token from the 'You're in!' email.","operationId":"verify_invite_api_waitlist_verify_invite_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/minichat/taglines":{"get":{"tags":["minichat"],"summary":"Get Taglines","description":"DB first, disk seed second. FE picks the daily index.","operationId":"get_taglines_api_minichat_taglines_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Taglines Api Minichat Taglines Get"}}}}}},"put":{"tags":["minichat"],"summary":"Put Taglines","description":"Replace the tagline pool. Owner-only — Zugabot's daily refresh job calls this.\n\nPersists to the DB singleton (id=1). The on-disk JSON file is intentionally\nNOT touched — it stays as the bootstrap seed for fresh deploys / dev.","operationId":"put_taglines_api_minichat_taglines_put","parameters":[{"name":"X-Owner-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaglinesPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Put Taglines Api Minichat Taglines Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/minichat/taglines/react":{"post":{"tags":["minichat"],"summary":"React","description":"Forward a cohort-member reaction to Zugabot's reaction endpoint.\n\nAuth: any authed ZugaApp user (the access-code gate at signup is the\ncohort filter today). Anonymous callers can't reach here.\nForwards via X-Owner-Key to Zugabot's internal endpoint.","operationId":"react_api_minichat_taglines_react_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__platform__minichat__ReactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response React Api Minichat Taglines React Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/og/{slug}.svg":{"get":{"tags":["blog"],"summary":"Og Image","description":"Per-post OG share image. Renders from live data; downstream scrapers\ncache by URL for ~30 days, so a same-slug image stays stable in shares\neven if the title gets edited later (matches the OG-stability invariant).","operationId":"og_image_api_blog_og__slug__svg_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog":{"get":{"tags":["blog"],"summary":"List Posts","description":"Paginated list of published posts, newest first.\n\n`tag` filters in-Python after fetch (acceptable for v1 — diary will have\n≤52 posts/year, well under any pagination performance threshold).","operationId":"list_posts_api_blog_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Page Size"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":2100,"minimum":2020},{"type":"null"}],"title":"Year"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Posts Api Blog Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["blog"],"summary":"Create Post","description":"Bot submits a draft. Trust-level decides initial state:\n   trust=auto  → status=published (autonomous publish for routine roundups)\n   trust=queue → status=queued    (waits for HITL approval at /admin/blog)\n\nBot CANNOT submit status=published directly — that path is closed by design.\nAuthor is always forced to 'zugabot' v1.","operationId":"create_post_api_blog_post","parameters":[{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Post Api Blog Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/sitemap.xml":{"get":{"tags":["blog"],"summary":"Sitemap Xml","description":"All published posts, sitemap protocol 0.9.","operationId":"sitemap_xml_api_blog_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blog/rss.xml":{"get":{"tags":["blog"],"summary":"Rss Xml","description":"RSS 2.0 — last 50 published posts.","operationId":"rss_xml_api_blog_rss_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blog/admin/queue":{"get":{"tags":["blog"],"summary":"List Admin Queue","description":"List queued posts awaiting HITL approval.\n\nReturns oldest-queued first so the admin works through a FIFO. Each entry\nincludes the queue_reason so the admin sees why the trust classifier\nflagged it.","operationId":"list_admin_queue_api_blog_admin_queue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Admin Queue Api Blog Admin Queue Get"}}}}}}},"/api/blog/{slug}":{"get":{"tags":["blog"],"summary":"Get Post","operationId":"get_post_api_blog__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Post Api Blog  Slug  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/{post_id}":{"patch":{"tags":["blog"],"summary":"Edit Post","description":"Admin inline edit. Cannot change status/author/trust_level here — those have\ndedicated approve/reject endpoints to keep state transitions auditable.","operationId":"edit_post_api_blog__post_id__patch","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Edit Post Api Blog  Post Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/{post_id}/approve":{"patch":{"tags":["blog"],"summary":"Approve Post","description":"Move queued → published. No-op (200) if already published.","operationId":"approve_post_api_blog__post_id__approve_patch","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Post Api Blog  Post Id  Approve Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blog/{post_id}/reject":{"patch":{"tags":["blog"],"summary":"Reject Post","description":"Move queued/draft → rejected. Stores rejection_reason for audit trail.","operationId":"reject_post_api_blog__post_id__reject_patch","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogRejectPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reject Post Api Blog  Post Id  Reject Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/atlas/catalog":{"get":{"tags":["atlas"],"summary":"Get Catalog","description":"Full catalog.json — every generator x style-pack build, tri counts,\nquality budgets. Source of truth for the gallery + viewer dropdown.","operationId":"get_catalog_api_atlas_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Catalog Api Atlas Catalog Get"}}}}}}},"/api/atlas/domain/manifest":{"get":{"tags":["atlas"],"summary":"Get Domain Manifest","description":"Domain Outcome Contract manifest — static identity for the Dominion's\nZugaForge building (the Pattern Shop). Public/unauthenticated, same as\nevery other studio's /domain/manifest (see mm_domain_pusher.py).","operationId":"get_domain_manifest_api_atlas_domain_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Domain Manifest Api Atlas Domain Manifest Get"}}}}}}},"/api/atlas/domain/summary":{"get":{"tags":["atlas"],"summary":"Get Domain Summary","description":"Domain Outcome Contract summary — real numbers computed from\ncatalog.json, the same file the gallery/viewer already read from. No\nnew state, no live pipeline dependency: this just makes visible what\nwas already on disk (generator count, style-pack count, real build\ncount, and which builds are over their QUALITY.md tri budget).","operationId":"get_domain_summary_api_atlas_domain_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Domain Summary Api Atlas Domain Summary Get"}}}}}}},"/api/atlas/models/{style}/{generator}.glb":{"get":{"tags":["atlas"],"summary":"Get Model","description":"Serve one generator's built GLB for a given style pack.","operationId":"get_model_api_atlas_models__style___generator__glb_get","parameters":[{"name":"style","in":"path","required":true,"schema":{"type":"string","title":"Style"}},{"name":"generator","in":"path","required":true,"schema":{"type":"string","title":"Generator"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/atlas/thumbnails/{style}/{generator}/{angle}.png":{"get":{"tags":["atlas"],"summary":"Get Thumbnail","description":"Serve a turntable render (angle is one of 0/90/180/270) if it exists.\n\nPath convention comes from core/zuga_common.py's turntable() output:\ncatalog/<generator>_<style>/<generator>_<angle>.png — not recorded in\ncatalog.json itself, so this route reconstructs it rather than trusting\nclient input; a 404 here means \"no render for that combo,\" which the\ngallery treats as a placeholder, not an error.","operationId":"get_thumbnail_api_atlas_thumbnails__style___generator___angle__png_get","parameters":[{"name":"style","in":"path","required":true,"schema":{"type":"string","title":"Style"}},{"name":"generator","in":"path","required":true,"schema":{"type":"string","title":"Generator"}},{"name":"angle","in":"path","required":true,"schema":{"type":"string","title":"Angle"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/projects":{"get":{"tags":["audio"],"summary":"List Projects","operationId":"list_projects_api_audio_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/zugaaudio__schemas__ProjectSummary"},"type":"array","title":"Response List Projects Api Audio Projects Get"}}}}}},"post":{"tags":["audio"],"summary":"Create Project","operationId":"create_project_api_audio_projects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugaaudio__schemas__ProjectCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugaaudio__schemas__ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/projects/{project_id}":{"get":{"tags":["audio"],"summary":"Get Project","operationId":"get_project_api_audio_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugaaudio__schemas__ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["audio"],"summary":"Delete Project","operationId":"delete_project_api_audio_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/projects/{project_id}/timeline":{"put":{"tags":["audio"],"summary":"Update Timeline","operationId":"update_timeline_api_audio_projects__project_id__timeline_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugaaudio__schemas__TimelineUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/upload":{"post":{"tags":["audio"],"summary":"Upload Audio","description":"Upload an audio or video file. Video files will have audio extracted.","operationId":"upload_audio_api_audio_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_audio_api_audio_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/generate":{"get":{"tags":["audio"],"summary":"List Generation Jobs","operationId":"list_generation_jobs_api_audio_generate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AIJobStatus"},"type":"array","title":"Response List Generation Jobs Api Audio Generate Get"}}}}}},"post":{"tags":["audio"],"summary":"Generate Audio","description":"Submit an AI audio generation job. Returns immediately with job ID for polling.","operationId":"generate_audio_api_audio_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIGenerateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIJobStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/adr":{"post":{"tags":["audio"],"summary":"Generate Adr","description":"Submit an ADR (Automated Dialogue Replacement) voice acting job.","operationId":"generate_adr_api_audio_adr_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ADRRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIJobStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/generate/{job_id}":{"get":{"tags":["audio"],"summary":"Get Generation Status","operationId":"get_generation_status_api_audio_generate__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIJobStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/estimate-cost":{"get":{"tags":["audio"],"summary":"Estimate Generation Cost","description":"Preview token cost before generating. Displayed in ZugaTokens.","operationId":"estimate_generation_cost_api_audio_estimate_cost_get","parameters":[{"name":"provider","in":"query","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"duration_seconds","in":"query","required":false,"schema":{"type":"number","default":10.0,"title":"Duration Seconds"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostEstimate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/projects/{project_id}/export":{"post":{"tags":["audio"],"summary":"Start Export","description":"Start an audio export/render job.","operationId":"start_export_api_audio_projects__project_id__export_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugaaudio__schemas__ExportRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/exports/{job_id}":{"get":{"tags":["audio"],"summary":"Get Export Status","operationId":"get_export_status_api_audio_exports__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/youtube/info":{"post":{"tags":["audio"],"summary":"Youtube Info","description":"Fetch metadata for a YouTube video before downloading.","operationId":"youtube_info_api_audio_youtube_info_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeInfoRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/youtube/download":{"post":{"tags":["audio"],"summary":"Youtube Download","description":"Download audio from a YouTube video. Extracts audio and converts to requested format.","operationId":"youtube_download_api_audio_youtube_download_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeDownloadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/YouTubeDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audio/health":{"get":{"tags":["audio"],"summary":"Health","operationId":"health_api_audio_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/claw/ping":{"get":{"tags":["claw"],"summary":"Ping","description":"Liveness probe for the ZugaClaw plugin.","operationId":"ping_api_claw_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ping Api Claw Ping Get"}}}}}}},"/api/claw/_debug/emit-test":{"post":{"tags":["claw"],"summary":"Emit Test","description":"Emit one synthetic `inference_call` event with all 8 core dims.\n\nUsed to verify the per-step telemetry pipeline (registry → coerce\n→ writer → unit_events) end-to-end without depending on a real\nLLM call site (which doesn't exist in ZugaClaw's Python yet —\nOpenClaw runs in a Node subprocess and cannot use a Claude key).","operationId":"emit_test_api_claw__debug_emit_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Emit Test Api Claw  Debug Emit Test Post"}}}}}}},"/api/claw/telemetry/ingest":{"post":{"tags":["claw"],"summary":"Telemetry Ingest","description":"Accept one telemetry event from a ZugaClaw-fork emitter and forward\nit to the Phase 1 emitter.\n\nAuth: any logged-in user / agent token. The fork authenticates as\nsource=zugaclaw via the agent-tokens flow.\n\nValidation: dim names are checked against dimension_registry by the emitter\nitself; unknown dims are silently dropped (matches Phase 1 behavior).\nReturns 202 even when dims drop, because the row still lands.\n\nTimestamp: when payload.started_at is provided (ISO 8601), it is parsed\nand used as the canonical unit_events.ts value so the persisted timestamp\nreflects tool-execution time, not Python-ingest time.  This is critical for\naccurate hourly p95/p99 rollup buckets.  Malformed timestamps fall back to\ningest time gracefully.","operationId":"telemetry_ingest_api_claw_telemetry_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryIngestPayload"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Telemetry Ingest Api Claw Telemetry Ingest Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/claw/agent-tokens":{"post":{"tags":["claw"],"summary":"Mint Agent Token","description":"Mint a new ingest token for the authenticated user. Plaintext returned\nONCE — after this response, only sha256(token) is retrievable.","operationId":"mint_agent_token_api_claw_agent_tokens_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintTokenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["claw"],"summary":"List Agent Tokens","description":"List the authenticated user's agent tokens. Secret hash excluded.","operationId":"list_agent_tokens_api_claw_agent_tokens_get","parameters":[{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Revoked"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TokenSummary"},"title":"Response List Agent Tokens Api Claw Agent Tokens Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/claw/agent-tokens/{token_id}":{"delete":{"tags":["claw"],"summary":"Revoke Agent Token","description":"Soft-revoke. Returns 404 for both not-found and not-yours to avoid\nenumeration leaks.","operationId":"revoke_agent_token_api_claw_agent_tokens__token_id__delete","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/claw/agent-tokens/{token_id}/installed":{"post":{"tags":["claw"],"summary":"Mark Agent Token Installed","description":"Called by ZugaClaw after it writes the hook config. Auth = the Bearer\ntoken itself: ZugaClaw proves it received the token by POSTing back with it.\n\nNOTE: ZugaCode's legacy /api/code/agent-tokens/{id}/installed broadcasts\nan `agent_connected` meta event so the Settings panel auto-flips to\n\"Connected ✓\". The new path here does NOT broadcast — TODO migrate to\nevent_bus for cross-plugin notification. Settings panel needs a poll.","operationId":"mark_agent_token_installed_api_claw_agent_tokens__token_id__installed_post","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/claw/heartbeat":{"post":{"tags":["claw"],"summary":"Zugaclaw Heartbeat","description":"Called by ZugaClaw every ~30s while running.","operationId":"zugaclaw_heartbeat_api_claw_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/claw/status":{"get":{"tags":["claw"],"summary":"Zugaclaw Status","description":"Frontend presence probe. Returns running=true if the user's most recent\nheartbeat is within ZUGACLAW_STALE_SECONDS.","operationId":"zugaclaw_status_api_claw_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZugaClawStatus"}}}}}}},"/api/code/activity/tool-call":{"post":{"tags":["code-activity"],"summary":"Receive Tool Call","description":"Receive a coding-agent tool call event via webhook hook.\n\nAuth paths (tried in order):\n  1. Authorization: Bearer zcat_...\n     → per-user token; user_id + agent_id + source all derived from it\n  2. payload.secret == ZUGACODE_ACTIVITY_SECRET\n     → legacy shared-secret path; user_id stays NULL (unscoped event)\n  3. ACTIVITY_SECRET unset AND no Bearer\n     → legacy open path (preserved to not break MM dev)\n  4. else → 403\n\nThe legacy paths will be deprecated after the frontend + all user\nClaude Code hooks migrate to the Bearer token flow.","operationId":"receive_tool_call_api_code_activity_tool_call_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCallWebhook"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/activity/tracked-devices":{"get":{"tags":["code-activity"],"summary":"List Tracked Devices","description":"Return every machine that's ever posted a tool-call event, along with\nits tracked flag and activity metadata. Used by the Settings UI.","operationId":"list_tracked_devices_api_code_activity_tracked_devices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/code/activity/tracked-devices/{machine}":{"post":{"tags":["code-activity"],"summary":"Set Device Tracking","description":"Toggle whether a device's events are stored. label is optional —\nfalls back to the raw hostname in the UI when null. Upserts the row\nif the device hasn't posted yet (install-flow path).","operationId":"set_device_tracking_api_code_activity_tracked_devices__machine__post","parameters":[{"name":"machine","in":"path","required":true,"schema":{"type":"string","title":"Machine"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceTrackingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/install/observe-tools.py":{"get":{"tags":["code-activity"],"summary":"Install Observer Script","description":"The observer script itself, with the backend URL baked in.\nCalled by the install wrappers (not directly by the user).","operationId":"install_observer_script_api_code_install_observe_tools_py_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/code/install/observer":{"get":{"tags":["code-activity"],"summary":"Install Observer Bash","description":"Bash installer for macOS/Linux. Run: curl -fsSL <url> | bash","operationId":"install_observer_bash_api_code_install_observer_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/code/install/observer.ps1":{"get":{"tags":["code-activity"],"summary":"Install Observer Powershell","description":"PowerShell installer for Windows. Run: irm <url> | iex","operationId":"install_observer_powershell_api_code_install_observer_ps1_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/code/activity/recent":{"get":{"tags":["code-activity"],"summary":"Get Recent Activity Scoped","description":"Get recent tool call events, filtered to the caller if authenticated.\n\nBehavior:\n  - Unauthenticated → returns all events (legacy; will tighten post-migration)\n  - Authenticated non-admin → filtered to events WHERE user_id = caller.id\n  - Authenticated admin → returns all events","operationId":"get_recent_activity_scoped_api_code_activity_recent_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"tools","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated tool filter","default":"","title":"Tools"},"description":"Comma-separated tool filter"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/files":{"get":{"tags":["code"],"summary":"List Directory","description":"List files and directories in a given path.","operationId":"list_directory_api_code_files_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Directory path to list","title":"Path"},"description":"Directory path to list"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["code"],"summary":"Delete File","description":"Delete a file or empty directory.","operationId":"delete_file_api_code_files_delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/files/content":{"get":{"tags":["code"],"summary":"Read File","description":"Read file content.","operationId":"read_file_api_code_files_content_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"File path to read","title":"Path"},"description":"File path to read"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["code"],"summary":"Write File","description":"Write content to a file.","operationId":"write_file_api_code_files_content_put","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/files/resolve":{"get":{"tags":["code"],"summary":"Resolve Folder Name","description":"Find the absolute path of a folder by its leaf name within allowed_directories.\n\nUsed by the browser after opening a local folder via File System Access API —\nthe browser only gives us handle.name (leaf), not the full path. We scan\neach allowed root for a directory with that name and return the first match.","operationId":"resolve_folder_name_api_code_files_resolve_get","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","description":"Leaf folder name to resolve","title":"Name"},"description":"Leaf folder name to resolve"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/files/tree":{"get":{"tags":["code"],"summary":"Get File Tree","description":"Get recursive file tree.","operationId":"get_file_tree_api_code_files_tree_get","parameters":[{"name":"root","in":"query","required":true,"schema":{"type":"string","description":"Root directory for tree","title":"Root"},"description":"Root directory for tree"},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Max depth","default":5,"title":"Depth"},"description":"Max depth"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/files/create":{"post":{"tags":["code"],"summary":"Create File","description":"Create a new file or directory.","operationId":"create_file_api_code_files_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/files/rename":{"post":{"tags":["code"],"summary":"Rename File","description":"Rename or move a file/directory.","operationId":"rename_file_api_code_files_rename_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameFileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/search/files":{"get":{"tags":["code"],"summary":"Search Filenames","description":"Search for files by name (case-insensitive substring match).","operationId":"search_filenames_api_code_search_files_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Filename pattern","title":"Query"},"description":"Filename pattern"},{"name":"root","in":"query","required":true,"schema":{"type":"string","description":"Root directory","title":"Root"},"description":"Root directory"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/search/content":{"get":{"tags":["code"],"summary":"Search Content","description":"Search file contents across the workspace (regex, case-insensitive).","operationId":"search_content_api_code_search_content_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search pattern (regex)","title":"Query"},"description":"Search pattern (regex)"},{"name":"root","in":"query","required":true,"schema":{"type":"string","description":"Root directory","title":"Root"},"description":"Root directory"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/git/status":{"get":{"tags":["code"],"summary":"Get Git Status","description":"Get git status for a repository.","operationId":"get_git_status_api_code_git_status_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Path inside a git repo","title":"Path"},"description":"Path inside a git repo"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/git/diff":{"get":{"tags":["code"],"summary":"Get Git Diff","description":"Get git diff.","operationId":"get_git_diff_api_code_git_diff_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Path inside a git repo","title":"Path"},"description":"Path inside a git repo"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/git/log":{"get":{"tags":["code"],"summary":"Get Git Log","description":"Get recent git commits.","operationId":"get_git_log_api_code_git_log_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Path inside a git repo","title":"Path"},"description":"Path inside a git repo"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/git/timeline":{"get":{"tags":["code"],"summary":"Get Git Timeline","description":"Get recent commits with file changes and diffs — for the diff timeline.","operationId":"get_git_timeline_api_code_git_timeline_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Path inside a git repo","title":"Path"},"description":"Path inside a git repo"},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"description":"Hours of history","default":24,"title":"Hours"},"description":"Hours of history"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/git/commit-diff":{"get":{"tags":["code"],"summary":"Get Commit Diff","description":"Get the full diff for a specific commit.","operationId":"get_commit_diff_api_code_git_commit_diff_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Path inside a git repo","title":"Path"},"description":"Path inside a git repo"},{"name":"commit","in":"query","required":true,"schema":{"type":"string","description":"Commit hash","title":"Commit"},"description":"Commit hash"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/git/range-diff":{"get":{"tags":["code"],"summary":"Get Range Diff","description":"Cumulative diff from base..head (base exclusive, head inclusive).\n\nBuilt for multi-commit autonomous-branch review items, where showing\nonly `source_ref`'s single-commit diff would hide N-1 commits of work.\nCaller composes the range — e.g. `base=<first_commit>^, head=<source_ref>`.","operationId":"get_range_diff_api_code_git_range_diff_get","parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Path inside a git repo","title":"Path"},"description":"Path inside a git repo"},{"name":"base","in":"query","required":true,"schema":{"type":"string","description":"Base ref (exclusive) — e.g. 'abc^' or a branch","title":"Base"},"description":"Base ref (exclusive) — e.g. 'abc^' or a branch"},{"name":"head","in":"query","required":true,"schema":{"type":"string","description":"Head ref (inclusive)","title":"Head"},"description":"Head ref (inclusive)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/reviews":{"get":{"tags":["code"],"summary":"List Reviews","description":"List pending daemon worktree reviews.","operationId":"list_reviews_api_code_reviews_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/code/reviews/{task_id}":{"get":{"tags":["code"],"summary":"Get Review","description":"Get full diff for a specific review.","operationId":"get_review_api_code_reviews__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/reviews/{task_id}/approve":{"post":{"tags":["code"],"summary":"Approve Review","description":"Approve and merge a daemon worktree into main.","operationId":"approve_review_api_code_reviews__task_id__approve_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/reviews/{task_id}/reject":{"post":{"tags":["code"],"summary":"Reject Review","description":"Reject a daemon worktree — remove without merging.","operationId":"reject_review_api_code_reviews__task_id__reject_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/restart-brain":{"post":{"tags":["code"],"summary":"Restart Brain","description":"Restart the Zugabot agent so a just-merged brain change takes effect.\nSurfaced by the post-merge banner when the merged diff touched backend/,\nzugamind/, or zugabee/.","operationId":"restart_brain_api_code_restart_brain_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/code/git/add":{"post":{"tags":["code"],"summary":"Git Add Files","description":"Stage files for commit.","operationId":"git_add_files_api_code_git_add_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitAddRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/git/commit":{"post":{"tags":["code"],"summary":"Git Commit Changes","description":"Commit staged changes.","operationId":"git_commit_changes_api_code_git_commit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitCommitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/git/push":{"post":{"tags":["code"],"summary":"Git Push Changes","description":"Push to origin.","operationId":"git_push_changes_api_code_git_push_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitPushRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/git/pull":{"post":{"tags":["code"],"summary":"Git Pull Changes","description":"Pull from origin.","operationId":"git_pull_changes_api_code_git_pull_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitPullRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/github/auth-url":{"get":{"tags":["code-github"],"summary":"Get Auth Url","description":"Return the GitHub OAuth authorization URL.","operationId":"get_auth_url_api_code_github_auth_url_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/code/github/callback":{"get":{"tags":["code-github"],"summary":"Github Callback","description":"Handle GitHub OAuth callback — exchange code for token.","operationId":"github_callback_api_code_github_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/github/status":{"get":{"tags":["code-github"],"summary":"Github Status","description":"Check if the current user has a connected GitHub account.","operationId":"github_status_api_code_github_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/code/github/disconnect":{"delete":{"tags":["code-github"],"summary":"Disconnect Github","description":"Remove GitHub connection for the current user.","operationId":"disconnect_github_api_code_github_disconnect_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/code/github/repos":{"get":{"tags":["code-github"],"summary":"List Github Repos","description":"List the user's GitHub repos using their stored token.","operationId":"list_github_repos_api_code_github_repos_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Per Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/repos/clone":{"post":{"tags":["code-repos"],"summary":"Clone Repo","description":"Clone a GitHub repo into the user's workspace.","operationId":"clone_repo_api_code_repos_clone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/repos":{"get":{"tags":["code-repos"],"summary":"List Repos","description":"List the user's cloned repos.","operationId":"list_repos_api_code_repos_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/code/repos/{repo_id}":{"delete":{"tags":["code-repos"],"summary":"Delete Repo","description":"Delete a cloned repo from disk and database.","operationId":"delete_repo_api_code_repos__repo_id__delete","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"integer","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/repos/{repo_id}/usage":{"get":{"tags":["code-repos"],"summary":"Repo Usage","description":"Get disk usage for a specific repo.","operationId":"repo_usage_api_code_repos__repo_id__usage_get","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"integer","title":"Repo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/code/config":{"get":{"tags":["code"],"summary":"Get Config","description":"Return ZugaCode configuration for the frontend.","operationId":"get_config_api_code_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/zugadata/health":{"get":{"tags":["zugadata"],"summary":"Health","operationId":"health_api_zugadata_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Api Zugadata Health Get"}}}}}}},"/api/zugadata/workbooks":{"get":{"tags":["zugadata"],"summary":"List Workbooks","operationId":"list_workbooks_api_zugadata_workbooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkbookSummary"},"type":"array","title":"Response List Workbooks Api Zugadata Workbooks Get"}}}}}},"post":{"tags":["zugadata"],"summary":"Create Workbook","operationId":"create_workbook_api_zugadata_workbooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkbookCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkbookSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/zugadata/workbooks/{workbook_id}":{"get":{"tags":["zugadata"],"summary":"Read Workbook","operationId":"read_workbook_api_zugadata_workbooks__workbook_id__get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Workbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkbookOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/zugadata/workbooks/{workbook_id}/cells":{"post":{"tags":["zugadata"],"summary":"Write Cell","operationId":"write_cell_api_zugadata_workbooks__workbook_id__cells_post","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Workbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellWriteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/zugadata/workbooks/{workbook_id}/history":{"get":{"tags":["zugadata"],"summary":"Workbook History","operationId":"workbook_history_api_zugadata_workbooks__workbook_id__history_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Workbook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"before_version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEntry"},"title":"Response Workbook History Api Zugadata Workbooks  Workbook Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/zugadata/workbooks/{workbook_id}/cells/{sheet_id}/{cell_ref}/history":{"get":{"tags":["zugadata"],"summary":"Cell History","description":"Full provenance / time-travel for a SINGLE cell.\n\nEvery value the cell has ever held, who wrote it (human user vs agent),\nwhen, and the formula — folded from the append-only journal. This is the\nZugaData feature Excel has no equivalent for. Backed by\nidx_cell_change_workbook_cell(workbook_id, sheet_id, cell_ref).","operationId":"cell_history_api_zugadata_workbooks__workbook_id__cells__sheet_id___cell_ref__history_get","parameters":[{"name":"workbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Workbook Id"}},{"name":"sheet_id","in":"path","required":true,"schema":{"type":"string","title":"Sheet Id"}},{"name":"cell_ref","in":"path","required":true,"schema":{"type":"string","title":"Cell Ref"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"before_version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEntry"},"title":"Response Cell History Api Zugadata Workbooks  Workbook Id  Cells  Sheet Id   Cell Ref  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/folders":{"get":{"tags":["docs"],"summary":"List Folders","operationId":"list_folders_api_docs_folders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["docs"],"summary":"Create Folder","operationId":"create_folder_api_docs_folders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/folders/{folder_id}":{"delete":{"tags":["docs"],"summary":"Delete Folder","description":"Delete a folder AND everything inside it — every nested subfolder and\nevery doc at every level of the subtree. This is \"remove the whole\ngrouping of an import\" (e.g. undo a bad import in one click), not a soft\nungroup that would leave the docs behind at vault root.","operationId":"delete_folder_api_docs_folders__folder_id__delete","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"integer","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/vault":{"delete":{"tags":["docs"],"summary":"Clear Vault","description":"Empty the whole vault: every folder and every doc this user owns,\ngone. This only touches Documentus' own copy in this app's database --\nimport is a one-time copy, never a live sync, so nothing outside\nDocumentus (an Obsidian folder on disk, a Google Drive file, a OneNote\nnotebook) is read, modified, or deleted by this.","operationId":"clear_vault_api_docs_vault_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/docs/docs":{"get":{"tags":["docs"],"summary":"List Docs","operationId":"list_docs_api_docs_docs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["docs"],"summary":"Create Doc","operationId":"create_doc_api_docs_docs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/docs/{doc_id}":{"get":{"tags":["docs"],"summary":"Get Doc","operationId":"get_doc_api_docs_docs__doc_id__get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["docs"],"summary":"Update Doc","operationId":"update_doc_api_docs_docs__doc_id__put","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["docs"],"summary":"Delete Doc","operationId":"delete_doc_api_docs_docs__doc_id__delete","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/ai/chat":{"post":{"tags":["docs"],"summary":"Ai Chat","operationId":"ai_chat_api_docs_ai_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/ingest":{"post":{"tags":["docs"],"summary":"Ingest Doc","description":"Machine endpoint: Zugabot daemon publishes a doc into the owner's vault.\n\nAuth: X-Owner-Key header must match OWNER_API_KEY env var.\nIdempotency: a doc whose title already exists in the Zugabot folder is\nupdated (content_md replaced) rather than duplicated.\nThe \"Zugabot\" folder is created on first use and reused on subsequent calls.","operationId":"ingest_doc_api_docs_ingest_post","parameters":[{"name":"X-Owner-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Owner-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/import":{"post":{"tags":["docs"],"summary":"Import Files","description":"Bulk-import markdown. Accepts an Obsidian vault folder (webkitdirectory —\neach file's multipart name carries its relative path), loose .md/.txt files,\nor a .zip of markdown. Directory structure becomes Documentus folders.","operationId":"import_files_api_docs_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_files_api_docs_import_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResultOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/transcribe/config":{"get":{"tags":["docs"],"summary":"Transcribe Config","operationId":"transcribe_config_api_docs_transcribe_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/docs/transcribe":{"post":{"tags":["docs"],"summary":"Transcribe Audio","operationId":"transcribe_audio_api_docs_transcribe_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_transcribe_audio_api_docs_transcribe_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/onenote/status":{"get":{"tags":["docs"],"summary":"Onenote Status","operationId":"onenote_status_api_docs_onenote_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneNoteStatusOut"}}}}}}},"/api/docs/onenote/connect":{"get":{"tags":["docs"],"summary":"Onenote Connect","operationId":"onenote_connect_api_docs_onenote_connect_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/docs/onenote/callback":{"get":{"tags":["docs"],"summary":"Onenote Callback","operationId":"onenote_callback_api_docs_onenote_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","default":"","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/onenote/notebooks":{"get":{"tags":["docs"],"summary":"Onenote Notebooks","operationId":"onenote_notebooks_api_docs_onenote_notebooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OneNoteNotebookOut"},"type":"array","title":"Response Onenote Notebooks Api Docs Onenote Notebooks Get"}}}}}}},"/api/docs/onenote/import":{"post":{"tags":["docs"],"summary":"Onenote Import","operationId":"onenote_import_api_docs_onenote_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneNoteImportBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResultOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/compose/posts":{"get":{"tags":["compose"],"summary":"List Posts","operationId":"list_posts_api_docs_compose_posts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["compose"],"summary":"Create Post","operationId":"create_post_api_docs_compose_posts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposePostCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/compose/posts/{post_id}":{"get":{"tags":["compose"],"summary":"Get Post","operationId":"get_post_api_docs_compose_posts__post_id__get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["compose"],"summary":"Update Post","operationId":"update_post_api_docs_compose_posts__post_id__put","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposePostUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["compose"],"summary":"Delete Post","operationId":"delete_post_api_docs_compose_posts__post_id__delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/compose/sources":{"post":{"tags":["compose"],"summary":"Get Sources","operationId":"get_sources_api_docs_compose_sources_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/compose/draft":{"post":{"tags":["compose"],"summary":"Draft","operationId":"draft_api_docs_compose_draft_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/compose/variants":{"post":{"tags":["compose"],"summary":"Variants","operationId":"variants_api_docs_compose_variants_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/compose/posts/{post_id}/agent":{"post":{"tags":["compose"],"summary":"Send Agent Message","operationId":"send_agent_message_api_docs_compose_posts__post_id__agent_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["compose"],"summary":"Get Agent Thread","operationId":"get_agent_thread_api_docs_compose_posts__post_id__agent_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/compose/posts/{post_id}/video":{"post":{"tags":["compose"],"summary":"Request Video","operationId":"request_video_api_docs_compose_posts__post_id__video_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["compose"],"summary":"List Video Assets","operationId":"list_video_assets_api_docs_compose_posts__post_id__video_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/compose/posts/{post_id}/publish":{"post":{"tags":["compose"],"summary":"Request Publish","operationId":"request_publish_api_docs_compose_posts__post_id__publish_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["compose"],"summary":"List Publish Records","operationId":"list_publish_records_api_docs_compose_posts__post_id__publish_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/beatsheets/":{"get":{"tags":["beatsheets"],"summary":"List Beat Sheets","operationId":"list_beat_sheets_api_docs_beatsheets__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["beatsheets"],"summary":"Create Beat Sheet","operationId":"create_beat_sheet_api_docs_beatsheets__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeatSheetCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/beatsheets/{sheet_id}":{"get":{"tags":["beatsheets"],"summary":"Get Beat Sheet","operationId":"get_beat_sheet_api_docs_beatsheets__sheet_id__get","parameters":[{"name":"sheet_id","in":"path","required":true,"schema":{"type":"integer","title":"Sheet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["beatsheets"],"summary":"Update Beat Sheet","operationId":"update_beat_sheet_api_docs_beatsheets__sheet_id__put","parameters":[{"name":"sheet_id","in":"path","required":true,"schema":{"type":"integer","title":"Sheet Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeatSheetUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["beatsheets"],"summary":"Delete Beat Sheet","operationId":"delete_beat_sheet_api_docs_beatsheets__sheet_id__delete","parameters":[{"name":"sheet_id","in":"path","required":true,"schema":{"type":"integer","title":"Sheet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/beatsheets/{sheet_id}/publish":{"post":{"tags":["beatsheets"],"summary":"Publish Beat Sheet","description":"Publish a locked beat sheet into a Visus (ZugaVideo) project + timeline\nvia the in-process assembly seam. Re-publishing an already-published sheet\nis allowed and creates a NEW Visus project (overwrites video_project_id) —\niteration-friendly, not idempotent.","operationId":"publish_beat_sheet_api_docs_beatsheets__sheet_id__publish_post","parameters":[{"name":"sheet_id","in":"path","required":true,"schema":{"type":"integer","title":"Sheet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/socialposts/":{"get":{"tags":["socialposts"],"summary":"List Social Posts","operationId":"list_social_posts_api_docs_socialposts__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["socialposts"],"summary":"Create Social Post","operationId":"create_social_post_api_docs_socialposts__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPostCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/socialposts/{post_id}":{"get":{"tags":["socialposts"],"summary":"Get Social Post","operationId":"get_social_post_api_docs_socialposts__post_id__get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["socialposts"],"summary":"Update Social Post","operationId":"update_social_post_api_docs_socialposts__post_id__put","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPostUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["socialposts"],"summary":"Delete Social Post","operationId":"delete_social_post_api_docs_socialposts__post_id__delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/socialposts/{post_id}/grade":{"post":{"tags":["socialposts"],"summary":"Grade Social Post","description":"Grade the draft against the hivemind rule engine and persist the result.\nDeterministic and rule-cited; re-grading overwrites the previous grade.","operationId":"grade_social_post_api_docs_socialposts__post_id__grade_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/socialposts/{post_id}/refine":{"post":{"tags":["socialposts"],"summary":"Refine Social Post","description":"Ask the AI (host gateway ONLY) to apply the last grade's refine_brief.\nThe result is stored as refined_body — a side-by-side suggestion the user\naccepts explicitly; the draft body is never overwritten silently.","operationId":"refine_social_post_api_docs_socialposts__post_id__refine_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/socialposts/{post_id}/refine/accept":{"post":{"tags":["socialposts"],"summary":"Accept Refined Body","description":"Promote the refined suggestion into the draft. The first refined line\nbecomes the hook, the rest the body; the grade resets (new text, new grade).","operationId":"accept_refined_body_api_docs_socialposts__post_id__refine_accept_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/socialposts/{post_id}/mark-published":{"post":{"tags":["socialposts"],"summary":"Mark Published","operationId":"mark_published_api_docs_socialposts__post_id__mark_published_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkPublishedBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/docs/socialposts/{post_id}/refine/dismiss":{"post":{"tags":["socialposts"],"summary":"Dismiss Refined Body","description":"Discard the AI suggestion server-side so it doesn't resurface on refresh.","operationId":"dismiss_refined_body_api_docs_socialposts__post_id__refine_dismiss_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"integer","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/connect":{"get":{"tags":["health-fitbit-public"],"summary":"Connect Fitbit","description":"Start Fitbit OAuth flow.\n\nformat=redirect (default): 307 redirect to Fitbit auth page\nformat=url: returns the auth URL as JSON (use if redirect gets stuck on Fitbit's transfer page)","operationId":"connect_fitbit_api_health_fitbit_connect_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"redirect","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/callback":{"get":{"tags":["health-fitbit-public"],"summary":"Fitbit Callback","description":"OAuth callback — exchanges authorization code for tokens.\n\nFitbit redirects here after user grants access.\nStores tokens and redirects to the health dashboard.","operationId":"fitbit_callback_api_health_fitbit_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/webhook":{"get":{"tags":["health-fitbit-public"],"summary":"Fitbit Webhook Verify","description":"One-time Fitbit-developer-console verification handshake.\n\nResponds 204 iff `verify` matches FITBIT_WEBHOOK_VERIFICATION_CODE;\nelse 404. Called by Fitbit ONCE when you register the webhook URL\nin their developer console.","operationId":"fitbit_webhook_verify_api_health_fitbit_webhook_get","parameters":[{"name":"verify","in":"query","required":false,"schema":{"type":"string","default":"","title":"Verify"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["health-fitbit-public"],"summary":"Fitbit Webhook","description":"Receive Fitbit push notification when a subscribed user's data changes.\n\nFitbit requires 204 response within 3 seconds or it retries.\nWe verify the HMAC-SHA1 signature, then queue sync_tick as a\nbackground task so the response lands fast.","operationId":"fitbit_webhook_api_health_fitbit_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/domain/manifest":{"get":{"tags":["domain-outcome-contract"],"summary":"Domain Manifest","operationId":"domain_manifest_domain_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/domain/summary":{"get":{"tags":["domain-outcome-contract"],"summary":"Domain Summary","description":"Domain outcome snapshot. Always returns HTTP 200 (contract requirement).","operationId":"domain_summary_domain_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health/exercises":{"get":{"tags":["health-exercises"],"summary":"List Exercises","description":"List all exercises in the user's library.","operationId":"list_exercises_api_health_exercises_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExerciseResponse"},"type":"array","title":"Response List Exercises Api Health Exercises Get"}}}}}},"post":{"tags":["health-exercises"],"summary":"Create Exercise","description":"Add a custom exercise to the user's library.","operationId":"create_exercise_api_health_exercises_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/exercises/{exercise_id}":{"delete":{"tags":["health-exercises"],"summary":"Delete Exercise","description":"Remove an exercise from the user's library.","operationId":"delete_exercise_api_health_exercises__exercise_id__delete","parameters":[{"name":"exercise_id","in":"path","required":true,"schema":{"type":"integer","title":"Exercise Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/workouts":{"get":{"tags":["health-workouts"],"summary":"List Workouts","description":"List workout history, most recent first.","operationId":"list_workouts_api_health_workouts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["health-workouts"],"summary":"Create Workout","description":"Start a new workout with optional pre-loaded exercises.","operationId":"create_workout_api_health_workouts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/workouts/{workout_id}":{"get":{"tags":["health-workouts"],"summary":"Get Workout","description":"Get full workout detail with all exercises and sets.","operationId":"get_workout_api_health_workouts__workout_id__get","parameters":[{"name":"workout_id","in":"path","required":true,"schema":{"type":"integer","title":"Workout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["health-workouts"],"summary":"Delete Workout","description":"Delete a workout and all its exercises/sets.","operationId":"delete_workout_api_health_workouts__workout_id__delete","parameters":[{"name":"workout_id","in":"path","required":true,"schema":{"type":"integer","title":"Workout Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/workouts/{workout_id}/finish":{"post":{"tags":["health-workouts"],"summary":"Finish Workout","description":"Mark a workout as finished — calculates duration.","operationId":"finish_workout_api_health_workouts__workout_id__finish_post","parameters":[{"name":"workout_id","in":"path","required":true,"schema":{"type":"integer","title":"Workout Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkoutFinish"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/workouts/{workout_id}/exercises":{"post":{"tags":["health-workouts"],"summary":"Add Exercise To Workout","description":"Add an exercise to an existing workout.","operationId":"add_exercise_to_workout_api_health_workouts__workout_id__exercises_post","parameters":[{"name":"workout_id","in":"path","required":true,"schema":{"type":"integer","title":"Workout Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExerciseInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/workouts/{workout_id}/exercises/{exercise_entry_id}":{"delete":{"tags":["health-workouts"],"summary":"Remove Exercise From Workout","description":"Remove an exercise (and its sets) from a workout.","operationId":"remove_exercise_from_workout_api_health_workouts__workout_id__exercises__exercise_entry_id__delete","parameters":[{"name":"workout_id","in":"path","required":true,"schema":{"type":"integer","title":"Workout Id"}},{"name":"exercise_entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Exercise Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/workouts/{workout_id}/exercises/{exercise_entry_id}/sets":{"post":{"tags":["health-workouts"],"summary":"Add Set","description":"Add a set to an exercise within a workout.","operationId":"add_set_api_health_workouts__workout_id__exercises__exercise_entry_id__sets_post","parameters":[{"name":"workout_id","in":"path","required":true,"schema":{"type":"integer","title":"Workout Id"}},{"name":"exercise_entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Exercise Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/workouts/{workout_id}/exercises/{exercise_entry_id}/sets/{set_id}":{"delete":{"tags":["health-workouts"],"summary":"Delete Set","description":"Delete a set from an exercise within a workout.","operationId":"delete_set_api_health_workouts__workout_id__exercises__exercise_entry_id__sets__set_id__delete","parameters":[{"name":"workout_id","in":"path","required":true,"schema":{"type":"integer","title":"Workout Id"}},{"name":"exercise_entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Exercise Entry Id"}},{"name":"set_id","in":"path","required":true,"schema":{"type":"integer","title":"Set Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkoutDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/catalog":{"get":{"tags":["health-catalog"],"summary":"Browse Catalog","description":"Browse the exercise catalog with optional filters.","operationId":"browse_catalog_api_health_catalog_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"muscle","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Muscle"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"equipment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment"}},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/catalog/{catalog_id}":{"get":{"tags":["health-catalog"],"summary":"Get Catalog Exercise","description":"Get a single catalog exercise with full details.","operationId":"get_catalog_exercise_api_health_catalog__catalog_id__get","parameters":[{"name":"catalog_id","in":"path","required":true,"schema":{"type":"integer","title":"Catalog Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogExerciseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/catalog/reseed":{"post":{"tags":["health-catalog"],"summary":"Reseed","description":"Fill in missing catalog entries from the bundled seed file.\n\nAdmin-only via ZugaHealth's plugin guard. Safe to re-run — never deletes\nexisting rows, so user Exercise.catalog_id references stay intact.","operationId":"reseed_api_health_catalog_reseed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health/catalog/{catalog_id}/add":{"post":{"tags":["health-catalog"],"summary":"Add Catalog To Library","description":"Add a catalog exercise to the user's personal library.","operationId":"add_catalog_to_library_api_health_catalog__catalog_id__add_post","parameters":[{"name":"catalog_id","in":"path","required":true,"schema":{"type":"integer","title":"Catalog Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/splits":{"get":{"tags":["health-splits"],"summary":"List Splits","description":"List all splits for the user (presets + custom).","operationId":"list_splits_api_health_splits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitListResponse"}}}}}},"post":{"tags":["health-splits"],"summary":"Create Split","description":"Create a custom split.","operationId":"create_split_api_health_splits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/splits/{split_id}":{"put":{"tags":["health-splits"],"summary":"Update Split","description":"Update a split name or muscle groups.","operationId":"update_split_api_health_splits__split_id__put","parameters":[{"name":"split_id","in":"path","required":true,"schema":{"type":"integer","title":"Split Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["health-splits"],"summary":"Delete Split","description":"Delete a custom split.","operationId":"delete_split_api_health_splits__split_id__delete","parameters":[{"name":"split_id","in":"path","required":true,"schema":{"type":"integer","title":"Split Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/splits/{split_id}/suggest":{"get":{"tags":["health-splits"],"summary":"Suggest Exercises","description":"Suggest exercises from the user's library matching a split's muscle groups.\n\nOptional equipment filter (comma-separated): ?equipment=dumbbell,barbell","operationId":"suggest_exercises_api_health_splits__split_id__suggest_get","parameters":[{"name":"split_id","in":"path","required":true,"schema":{"type":"integer","title":"Split Id"}},{"name":"equipment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuggestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/splits/{split_id}/template":{"post":{"tags":["health-splits"],"summary":"Save Template","description":"Save specific exercises as a reusable template for this split.","operationId":"save_template_api_health_splits__split_id__template_post","parameters":[{"name":"split_id","in":"path","required":true,"schema":{"type":"integer","title":"Split Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveTemplateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/status":{"get":{"tags":["health-fitbit"],"summary":"Fitbit Status","description":"Return structured connection state for the Vue dashboard.\n\nreason: 'never_connected' | 'ok' | 'needs_reauth'\nlast_successful_sync_ago_s: only present when a successful sync\n                            has ever happened.","operationId":"fitbit_status_api_health_fitbit_status_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/disconnect":{"post":{"tags":["health-fitbit"],"summary":"Disconnect Fitbit","description":"Disconnect Fitbit (revoke stored tokens).","operationId":"disconnect_fitbit_api_health_fitbit_disconnect_post","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/today":{"get":{"tags":["health-fitbit"],"summary":"Get Today","description":"Get today's complete health snapshot from Fitbit.","operationId":"get_today_api_health_fitbit_today_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/day/{day}":{"get":{"tags":["health-fitbit"],"summary":"Get Day","description":"Get a specific day's health snapshot.","operationId":"get_day_api_health_fitbit_day__day__get","parameters":[{"name":"day","in":"path","required":true,"schema":{"type":"string","title":"Day"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/activity/week":{"get":{"tags":["health-fitbit"],"summary":"Get Activity Week","description":"Get last 7 days of activity data (steps, calories, active minutes).","operationId":"get_activity_week_api_health_fitbit_activity_week_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/sleep/week":{"get":{"tags":["health-fitbit"],"summary":"Get Sleep Week","description":"Get last 7 days of sleep data.","operationId":"get_sleep_week_api_health_fitbit_sleep_week_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/nutrition/today":{"get":{"tags":["health-fitbit"],"summary":"Get Nutrition Today","description":"Get today's nutrition log (calories, macros, water).","operationId":"get_nutrition_today_api_health_fitbit_nutrition_today_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/heart/today":{"get":{"tags":["health-fitbit"],"summary":"Get Heart Today","description":"Get today's heart rate data (resting HR + zones + HRV).","operationId":"get_heart_today_api_health_fitbit_heart_today_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/fitbit/profile":{"get":{"tags":["health-fitbit"],"summary":"Get Fitbit Profile","description":"Get Fitbit user profile (age, height, etc.).","operationId":"get_fitbit_profile_api_health_fitbit_profile_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/current/{metric}":{"get":{"tags":["health-biometrics"],"summary":"Current Metric","description":"Most recent sample of one metric, with freshness age.","operationId":"current_metric_api_health_biometrics_current__metric__get","parameters":[{"name":"metric","in":"path","required":true,"schema":{"type":"string","title":"Metric"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/current":{"get":{"tags":["health-biometrics"],"summary":"Current All","description":"Most recent sample of every metric that has data, keyed by metric name.","operationId":"current_all_api_health_biometrics_current_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/freshness":{"get":{"tags":["health-biometrics"],"summary":"Freshness","description":"Per-metric status map — healthy | stale | unavailable.","operationId":"freshness_api_health_biometrics_freshness_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/range":{"get":{"tags":["health-biometrics"],"summary":"Range Samples","description":"Raw samples in a window. Truncates at _RANGE_MAX_POINTS.","operationId":"range_samples_api_health_biometrics_range_get","parameters":[{"name":"metric","in":"query","required":true,"schema":{"type":"string","title":"Metric"}},{"name":"from_ts","in":"query","required":true,"schema":{"type":"integer","title":"From Ts"}},{"name":"to_ts","in":"query","required":true,"schema":{"type":"integer","title":"To Ts"}},{"name":"granularity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Granularity"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/sleep/sessions":{"get":{"tags":["health-biometrics"],"summary":"Sleep Sessions","description":"Sleep sessions with stage breakdown for a date range.","operationId":"sleep_sessions_api_health_biometrics_sleep_sessions_get","parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","title":"From Date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","title":"To Date"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/workouts":{"get":{"tags":["health-biometrics"],"summary":"Workouts","operationId":"workouts_api_health_biometrics_workouts_get","parameters":[{"name":"from_date","in":"query","required":true,"schema":{"type":"string","title":"From Date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","title":"To Date"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/backfill":{"post":{"tags":["health-biometrics"],"summary":"Trigger Backfill","description":"Kick off an async backfill of the past N days.","operationId":"trigger_backfill_api_health_biometrics_backfill_post","parameters":[{"name":"days","in":"query","required":true,"schema":{"type":"integer","maximum":90,"minimum":1,"title":"Days"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/backfill/{job_id}":{"get":{"tags":["health-biometrics"],"summary":"Backfill Status","operationId":"backfill_status_api_health_biometrics_backfill__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/report/latest":{"get":{"tags":["health-biometrics"],"summary":"Report Latest","description":"Return the most recent weekly report. Compute on-demand if missing.","operationId":"report_latest_api_health_biometrics_report_latest_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/report/{week_ident}":{"get":{"tags":["health-biometrics"],"summary":"Report By Week","description":"Fetch report by ISO week identifier 'YYYY-W##' or date 'YYYY-MM-DD'.","operationId":"report_by_week_api_health_biometrics_report__week_ident__get","parameters":[{"name":"week_ident","in":"path","required":true,"schema":{"type":"string","title":"Week Ident"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/biometrics/reports":{"get":{"tags":["health-biometrics"],"summary":"Reports List","description":"List the last N weekly reports (compact — just week_start + summary).","operationId":"reports_list_api_health_biometrics_reports_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":52,"minimum":1,"default":12,"title":"Limit"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string","default":"default","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/hunter/profile":{"get":{"tags":["aestus-hunter"],"summary":"Get Profile","operationId":"get_profile_api_health_hunter_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health/hunter/goal":{"post":{"tags":["aestus-hunter"],"summary":"Post Goal","operationId":"post_goal_api_health_hunter_goal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/hunter/quest/today":{"get":{"tags":["aestus-hunter"],"summary":"Quest Today","operationId":"quest_today_api_health_hunter_quest_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health/hunter/quest/{quest_id}/progress":{"post":{"tags":["aestus-hunter"],"summary":"Quest Progress","operationId":"quest_progress_api_health_hunter_quest__quest_id__progress_post","parameters":[{"name":"quest_id","in":"path","required":true,"schema":{"type":"integer","title":"Quest Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/hunter/schedule":{"get":{"tags":["aestus-hunter"],"summary":"Get Schedule","operationId":"get_schedule_api_health_hunter_schedule_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["aestus-hunter"],"summary":"Put Schedule","operationId":"put_schedule_api_health_hunter_schedule_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health/hunter/ledger":{"get":{"tags":["aestus-hunter"],"summary":"Get Ledger","operationId":"get_ledger_api_health_hunter_ledger_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/domain/manifest":{"get":{"tags":["domain-outcome-contract"],"summary":"Domain Manifest","operationId":"domain_manifest_api_image_domain_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/image/domain/summary":{"get":{"tags":["domain-outcome-contract"],"summary":"Domain Summary","description":"Domain outcome snapshot. Always returns HTTP 200 (contract requirement).","operationId":"domain_summary_api_image_domain_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/image/generate":{"post":{"tags":["image"],"summary":"Generate Image","description":"Generate an image from a text prompt.","operationId":"generate_image_api_image_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugaimage__schemas__GenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/inpaint":{"post":{"tags":["image"],"summary":"Inpaint Image","description":"Edit an image using a mask.","operationId":"inpaint_image_api_image_inpaint_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_inpaint_image_api_image_inpaint_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/outpaint":{"post":{"tags":["image"],"summary":"Outpaint Image","description":"Extend an image beyond its current boundaries.","operationId":"outpaint_image_api_image_outpaint_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_outpaint_image_api_image_outpaint_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/upscale":{"post":{"tags":["image"],"summary":"Upscale Image","description":"Upscale an image using Real-ESRGAN.","operationId":"upscale_image_api_image_upscale_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upscale_image_api_image_upscale_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/img2img":{"post":{"tags":["image"],"summary":"Img2Img","description":"Generate a variation of an existing image.","operationId":"img2img_api_image_img2img_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_img2img_api_image_img2img_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/providers":{"get":{"tags":["image"],"summary":"List Providers","operationId":"list_providers_api_image_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProviderInfo"},"type":"array","title":"Response List Providers Api Image Providers Get"}}}}}}},"/api/image/estimate":{"post":{"tags":["image"],"summary":"Estimate Cost","operationId":"estimate_cost_api_image_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/status":{"get":{"tags":["image"],"summary":"Get Status","operationId":"get_status_api_image_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}}}},"/api/image/health":{"get":{"tags":["image"],"summary":"Health Check","operationId":"health_check_api_image_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/image/segment-subject":{"post":{"tags":["image"],"summary":"Segment Subject","description":"Automatically detect and segment the main subject.","operationId":"segment_subject_api_image_segment_subject_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_segment_subject_api_image_segment_subject_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentSubjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/segment-point":{"post":{"tags":["image"],"summary":"Segment At Point","description":"Segment the object at a specific point.","operationId":"segment_at_point_api_image_segment_point_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_segment_at_point_api_image_segment_point_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentPointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/remove-background":{"post":{"tags":["image"],"summary":"Remove Background","description":"Remove the background from an image.","operationId":"remove_background_api_image_remove_background_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_remove_background_api_image_remove_background_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveBackgroundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/save":{"post":{"tags":["image"],"summary":"Save Image","description":"Save a generated image to the local filesystem.","operationId":"save_image_api_image_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveImageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/saved":{"get":{"tags":["image"],"summary":"List Saved Images","operationId":"list_saved_images_api_image_saved_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListImagesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/saved/{filename}":{"get":{"tags":["image"],"summary":"Get Saved Image","operationId":"get_saved_image_api_image_saved__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["image"],"summary":"Delete Saved Image","operationId":"delete_saved_image_api_image_saved__filename__delete","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/reference":{"post":{"tags":["image"],"summary":"Save Reference","description":"Save a named reference image to the reference library.","operationId":"save_reference_api_image_reference_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveReferenceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveReferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/references":{"get":{"tags":["image"],"summary":"List References","operationId":"list_references_api_image_references_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/reference/{filename}":{"get":{"tags":["image"],"summary":"Get Reference","operationId":"get_reference_api_image_reference__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["image"],"summary":"Delete Reference","operationId":"delete_reference_api_image_reference__filename__delete","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/enhance":{"post":{"tags":["image"],"summary":"Enhance Image","description":"Enhance or restore an image using AI.","operationId":"enhance_image_api_image_enhance_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_enhance_image_api_image_enhance_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/colorize":{"post":{"tags":["image"],"summary":"Colorize Image","description":"Colorize a black & white image.","operationId":"colorize_image_api_image_colorize_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_colorize_image_api_image_colorize_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/image/refine-edge":{"post":{"tags":["image"],"summary":"Refine Edge","description":"Refine selection edges using AI alpha matting.","operationId":"refine_edge_api_image_refine_edge_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_refine_edge_api_image_refine_edge_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/curriculums":{"get":{"tags":["learn"],"summary":"List Curriculums","description":"List all curriculums for a user.","operationId":"list_curriculums_api_learn_curriculums_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["learn"],"summary":"Create Curriculum","description":"Create a new curriculum (learning path).","operationId":"create_curriculum_api_learn_curriculums_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurriculumCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/curriculums/{curriculum_id}":{"get":{"tags":["learn"],"summary":"Get Curriculum","description":"Get a single curriculum with its modules.","operationId":"get_curriculum_api_learn_curriculums__curriculum_id__get","parameters":[{"name":"curriculum_id","in":"path","required":true,"schema":{"type":"integer","title":"Curriculum Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["learn"],"summary":"Delete Curriculum","description":"Delete a curriculum and all its contents.","operationId":"delete_curriculum_api_learn_curriculums__curriculum_id__delete","parameters":[{"name":"curriculum_id","in":"path","required":true,"schema":{"type":"integer","title":"Curriculum Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/curriculums/generate":{"post":{"tags":["learn"],"summary":"Generate Curriculum","description":"Use AI to generate a full curriculum with modules and lessons.","operationId":"generate_curriculum_api_learn_curriculums_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurriculumGenerate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/curriculums/{curriculum_id}/modules":{"post":{"tags":["learn"],"summary":"Create Module","description":"Add a module to a curriculum.","operationId":"create_module_api_learn_curriculums__curriculum_id__modules_post","parameters":[{"name":"curriculum_id","in":"path","required":true,"schema":{"type":"integer","title":"Curriculum Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/modules/{module_id}/lessons":{"get":{"tags":["learn-lessons"],"summary":"List Lessons","description":"List all lessons in a module.","operationId":"list_lessons_api_learn_modules__module_id__lessons_get","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"integer","title":"Module Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/lessons/{lesson_id}":{"get":{"tags":["learn-lessons"],"summary":"Get Lesson","description":"Get a lesson with its full content and interaction history.","operationId":"get_lesson_api_learn_lessons__lesson_id__get","parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/lessons/{lesson_id}/interact":{"post":{"tags":["learn-lessons"],"summary":"Interact With Lesson","description":"Send a message to the AI teacher during a lesson.\n\nThis is the core teaching loop:\n1. Student sends message\n2. AI processes using lesson context + history\n3. AI responds with teaching content\n4. Both messages are logged for context","operationId":"interact_with_lesson_api_learn_lessons__lesson_id__interact_post","parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentMessage"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/lessons/{lesson_id}/readiness":{"get":{"tags":["learn-lessons"],"summary":"Check Readiness","description":"Check if a student is ready to complete a lesson.\n\nAnalyzes the conversation to verify the student answered\nat least 2 retrieval/check questions substantively.","operationId":"check_readiness_api_learn_lessons__lesson_id__readiness_get","parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/lessons/{lesson_id}/complete":{"post":{"tags":["learn-lessons"],"summary":"Complete Lesson","description":"Mark a lesson as completed and unlock the next lesson in the module.\n\nProgression logic:\n1. Mark this lesson as completed (with timestamp)\n2. Find the next lesson in the same module (by order)\n3. If it exists and is locked, set it to available\n4. If this was the last lesson in the module, unlock the first lesson\n   of the next module in the curriculum","operationId":"complete_lesson_api_learn_lessons__lesson_id__complete_post","parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/review/due":{"get":{"tags":["learn-retention"],"summary":"Get Due Cards","description":"Get cards due for review right now.\n\nReturns cards where next_review <= now, ordered by most overdue first.\nThis is the daily review queue.","operationId":"get_due_cards_api_learn_review_due_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/review/cards/{card_id}/review":{"post":{"tags":["learn-retention"],"summary":"Submit Review","description":"Submit a review for a card — updates SM-2 scheduling.\n\nThe quality rating drives the algorithm:\n0-2 = failed (card resets to 1-day interval)\n3   = correct but hard (interval grows slowly)\n4   = correct (normal growth)\n5   = perfect (interval grows fastest)","operationId":"submit_review_api_learn_review_cards__card_id__review_post","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"integer","title":"Card Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSubmit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/review/stats":{"get":{"tags":["learn-retention"],"summary":"Get Retention Stats","description":"Get retention statistics — how well is the user retaining knowledge?","operationId":"get_retention_stats_api_learn_review_stats_get","parameters":[{"name":"curriculum_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Curriculum Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/goals":{"get":{"tags":["learn-goals"],"summary":"List Goals","description":"List all learning goals.","operationId":"list_goals_api_learn_goals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["learn-goals"],"summary":"Create Goal","description":"Create a new learning goal.","operationId":"create_goal_api_learn_goals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/goals/{goal_id}/link/{curriculum_id}":{"post":{"tags":["learn-goals"],"summary":"Link Goal To Curriculum","description":"Link a learning goal to a curriculum.","operationId":"link_goal_to_curriculum_api_learn_goals__goal_id__link__curriculum_id__post","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}},{"name":"curriculum_id","in":"path","required":true,"schema":{"type":"integer","title":"Curriculum Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/goals/{goal_id}":{"delete":{"tags":["learn-goals"],"summary":"Delete Goal","description":"Delete a learning goal.","operationId":"delete_goal_api_learn_goals__goal_id__delete","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/notes":{"get":{"tags":["learn-notes"],"summary":"List Notes","description":"List notes, optionally filtered by curriculum or lesson.","operationId":"list_notes_api_learn_notes_get","parameters":[{"name":"curriculum_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Curriculum Id"}},{"name":"lesson_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["learn-notes"],"summary":"Create Note","description":"Create a new study note.","operationId":"create_note_api_learn_notes_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/notes/{note_id}":{"put":{"tags":["learn-notes"],"summary":"Update Note","description":"Update a note (auto-save target).","operationId":"update_note_api_learn_notes__note_id__put","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["learn-notes"],"summary":"Delete Note","description":"Delete a study note.","operationId":"delete_note_api_learn_notes__note_id__delete","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/notes/search":{"get":{"tags":["learn-notes"],"summary":"Search Notes","description":"Full-text search notes (LIKE for MVP).","operationId":"search_notes_api_learn_notes_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/notes/{note_id}/export":{"get":{"tags":["learn-notes"],"summary":"Export Note","description":"Download a note as markdown (.md) or JSON (.json).","operationId":"export_note_api_learn_notes__note_id__export_get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"md","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/quiz/generate/{module_id}":{"post":{"tags":["learn-quiz"],"summary":"Generate Quiz","description":"Generate a quiz for a module based on its lesson content.\n\nUses AI to create targeted multiple-choice questions from:\n1. Lesson content (RAG source material)\n2. Student's interaction history (what they struggled with)\n3. Proven pedagogical patterns (retrieval practice, elaborative interrogation)","operationId":"generate_quiz_api_learn_quiz_generate__module_id__post","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"integer","title":"Module Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/quiz/generate/lesson/{lesson_id}":{"post":{"tags":["learn-quiz"],"summary":"Generate Lesson Quiz","description":"Generate a short optional quiz for a single lesson (3-5 questions).\n\nUnlike module quizzes, lesson quizzes do NOT gate progression.\nThey're purely for self-assessment and retrieval practice.","operationId":"generate_lesson_quiz_api_learn_quiz_generate_lesson__lesson_id__post","parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/quiz/{quiz_id}":{"get":{"tags":["learn-quiz"],"summary":"Get Quiz","description":"Get a quiz with its questions (without answers).","operationId":"get_quiz_api_learn_quiz__quiz_id__get","parameters":[{"name":"quiz_id","in":"path","required":true,"schema":{"type":"integer","title":"Quiz Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/quiz/{quiz_id}/answer/{question_id}":{"post":{"tags":["learn-quiz"],"summary":"Answer Question","description":"Submit an answer to a quiz question.\n\nReturns whether the answer is correct + explanation.\nStores the attempt with confidence rating for calibration analysis.","operationId":"answer_question_api_learn_quiz__quiz_id__answer__question_id__post","parameters":[{"name":"quiz_id","in":"path","required":true,"schema":{"type":"integer","title":"Quiz Id"}},{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerSubmit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/quiz/{quiz_id}/complete":{"post":{"tags":["learn-quiz"],"summary":"Complete Quiz","description":"Finalize a quiz and compute results with calibration score.\n\nCalibration = how well confidence matches actual performance.\nPerfect calibration = 0. Higher = more miscalibrated.","operationId":"complete_quiz_api_learn_quiz__quiz_id__complete_post","parameters":[{"name":"quiz_id","in":"path","required":true,"schema":{"type":"integer","title":"Quiz Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/quiz/results/module/{module_id}":{"get":{"tags":["learn-quiz"],"summary":"Get Module Results","description":"Get all quiz results for a module.","operationId":"get_module_results_api_learn_quiz_results_module__module_id__get","parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"integer","title":"Module Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/ingest":{"post":{"tags":["learn-ingest"],"summary":"Ingest Vault","description":"Ingest a folder of Obsidian markdown notes into a ZugaLearn curriculum.\n\nMaps folder structure to curriculum hierarchy:\n- Root folder → Curriculum\n- Subfolders → Modules (ordered alphabetically)\n- .md files → Lessons (with note content pre-loaded)\n\nFiles directly in the root become a \"General\" module.","operationId":"ingest_vault_api_learn_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/ingest/notion":{"post":{"tags":["learn-ingest"],"summary":"Ingest Notion","description":"Import a Notion page tree into a ZugaLearn curriculum.\n\nStructure mapping:\n- Root page → Curriculum\n- Child pages → Modules\n- Grandchild pages (or blocks within child pages) → Lessons\n\nRequires a Notion integration token with read access to the pages.","operationId":"ingest_notion_api_learn_ingest_notion_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotionIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/ingest/onenote":{"post":{"tags":["learn-ingest"],"summary":"Ingest Onenote","description":"Import documents into a ZugaLearn curriculum.\n\nAccepts:\n- .html / .htm / .md — OneNote or plain text exports\n- .zip — archive of .html/.md files (OneNote notebook export)\n- .docx — Word documents (Heading 1 → modules, Heading 2 → lessons)\n- .xlsx / .csv — spreadsheets (col 1: title, col 2: content, col 3: module)\n\nStructure mapping:\n- Zip root folders / Word H1 / spreadsheet col 3 → Modules\n- Files / Word H2 / spreadsheet rows → Lessons","operationId":"ingest_onenote_api_learn_ingest_onenote_post","parameters":[{"name":"curriculum_title","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curriculum Title"}},{"name":"max_notes","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Max Notes"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_onenote_api_learn_ingest_onenote_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/voice/speak":{"post":{"tags":["learn-voice"],"summary":"Speak","description":"Convert teacher text to speech audio.\n\nReturns raw PCM16 audio (24kHz, mono, signed 16-bit LE).\nThe frontend wraps this in a WAV header for playback.","operationId":"speak_api_learn_voice_speak_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/voice/speak/stream":{"post":{"tags":["learn-voice"],"summary":"Speak Stream","description":"Stream teacher text as audio, sentence by sentence.\n\nReturns a stream of PCM16 chunks. Each chunk is one sentence.\nFrontend can start playing immediately (low TTFB).","operationId":"speak_stream_api_learn_voice_speak_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/lessons/{lesson_id}/deck":{"get":{"tags":["learn-video"],"summary":"Get Lesson Deck","description":"Return the lesson's video deck, rendering+caching it on first request.","operationId":"get_lesson_deck_api_learn_lessons__lesson_id__deck_get","parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/lessons/deck/audio/{sha}":{"get":{"tags":["learn-video"],"summary":"Get Deck Audio","description":"Serve a cached narration WAV by content hash.","operationId":"get_deck_audio_api_learn_lessons_deck_audio__sha__get","parameters":[{"name":"sha","in":"path","required":true,"schema":{"type":"string","title":"Sha"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/learn/dashboard":{"get":{"tags":["learn-dashboard"],"summary":"Get Dashboard","description":"Learning dashboard — goals, active curriculums, cards due, streak.","operationId":"get_dashboard_api_learn_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/mood":{"post":{"tags":["life"],"summary":"Log Mood","description":"Log a mood entry. Rate-limited to 1 entry per 6-hour window.","operationId":"log_mood_api_spiritus_mood_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoodLogRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoodLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["life"],"summary":"Get History","description":"Get mood history for the last N days.","operationId":"get_history_api_spiritus_mood_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoodHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/mood/streak":{"get":{"tags":["life"],"summary":"Get Streak","description":"Get current consecutive-day streak and total log count.","operationId":"get_streak_api_spiritus_mood_streak_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoodStreakResponse"}}}}}}},"/api/spiritus/journal/prompt":{"get":{"tags":["life-journal"],"summary":"Get Daily Prompt","description":"Get today's guided journal prompt (Pennebaker-informed, rotating by category).","operationId":"get_daily_prompt_api_spiritus_journal_prompt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/journal":{"post":{"tags":["life-journal"],"summary":"Create Journal Entry","description":"Create a new journal entry.","operationId":"create_journal_entry_api_spiritus_journal_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["life-journal"],"summary":"List Journal Entries","description":"List journal entries with pagination. Returns brief previews.","operationId":"list_journal_entries_api_spiritus_journal_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/journal/export":{"get":{"tags":["life-journal"],"summary":"Export Journal","description":"Export journal entries as a ZIP of markdown files or JSON.","operationId":"export_journal_api_spiritus_journal_export_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(markdown|json|obsidian)$","default":"markdown","title":"Format"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Start date YYYY-MM-DD","title":"Start"},"description":"Start date YYYY-MM-DD"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"End date YYYY-MM-DD","title":"End"},"description":"End date YYYY-MM-DD"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/journal/{entry_id}/export":{"get":{"tags":["life-journal"],"summary":"Export Single Entry","description":"Export a single journal entry as Markdown (.md) or JSON file.","operationId":"export_single_entry_api_spiritus_journal__entry_id__export_get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(markdown|json|obsidian)$","default":"markdown","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/journal/{entry_id}":{"get":{"tags":["life-journal"],"summary":"Get Journal Entry","description":"Get a single journal entry with all reflections.","operationId":"get_journal_entry_api_spiritus_journal__entry_id__get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["life-journal"],"summary":"Delete Journal Entry","description":"Delete a journal entry and all its reflections (cascade).","operationId":"delete_journal_entry_api_spiritus_journal__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/journal/{entry_id}/reflect":{"post":{"tags":["life-journal"],"summary":"Reflect On Entry","description":"Generate an AI reflection on a journal entry. Costs credits.","operationId":"reflect_on_entry_api_spiritus_journal__entry_id__reflect_post","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"integer","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalReflectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/habits":{"get":{"tags":["life-habits"],"summary":"List Habits","description":"List all habit definitions. Auto-seeds presets on first call.","operationId":"list_habits_api_spiritus_habits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HabitDefinitionResponse"},"type":"array","title":"Response List Habits Api Spiritus Habits Get"}}}}}},"post":{"tags":["life-habits"],"summary":"Create Habit","description":"Create a custom habit.","operationId":"create_habit_api_spiritus_habits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/habits/weekly":{"get":{"tags":["life-habits"],"summary":"Get Weekly Targets","description":"Get weekly target progress for all habits that have a target set.","operationId":"get_weekly_targets_api_spiritus_habits_weekly_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyTargetsResponse"}}}}}}},"/api/spiritus/habits/{habit_id}":{"patch":{"tags":["life-habits"],"summary":"Update Habit","description":"Update a habit definition (rename, toggle active, reorder).","operationId":"update_habit_api_spiritus_habits__habit_id__patch","parameters":[{"name":"habit_id","in":"path","required":true,"schema":{"type":"integer","title":"Habit Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["life-habits"],"summary":"Delete Habit","description":"Delete a custom habit. Presets can only be deactivated, not deleted.","operationId":"delete_habit_api_spiritus_habits__habit_id__delete","parameters":[{"name":"habit_id","in":"path","required":true,"schema":{"type":"integer","title":"Habit Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/habits/{habit_id}/escalate":{"post":{"tags":["life-habits"],"summary":"Escalate Habit","description":"Bump a habit's target one step toward its full target.\n\nPsychology: BJ Fogg's Tiny Habits — start absurdly small, escalate only\nwhen the user feels ready. Never risk failure.","operationId":"escalate_habit_api_spiritus_habits__habit_id__escalate_post","parameters":[{"name":"habit_id","in":"path","required":true,"schema":{"type":"integer","title":"Habit Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/habits/log":{"post":{"tags":["life-habits"],"summary":"Log Habit","description":"Log or update a habit for a date. Upserts — same habit+date updates the existing log.","operationId":"log_habit_api_spiritus_habits_log_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitLogRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/habits/log/{habit_id}/{log_date}":{"delete":{"tags":["life-habits"],"summary":"Uncheck Habit","description":"Remove a habit log for a specific date (uncheck).","operationId":"uncheck_habit_api_spiritus_habits_log__habit_id___log_date__delete","parameters":[{"name":"habit_id","in":"path","required":true,"schema":{"type":"integer","title":"Habit Id"}},{"name":"log_date","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Log Date"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/habits/reset/today":{"delete":{"tags":["life-habits"],"summary":"Reset Today","description":"Delete all habit logs for today — uncheck everything.","operationId":"reset_today_api_spiritus_habits_reset_today_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/habits/reset/insights":{"delete":{"tags":["life-habits"],"summary":"Reset Insights Only","description":"Delete past AI insight rows so the 7-day cooldown clears.\nHabit logs are preserved — this is for unblocking after a stale or\nbad insight without losing tracking history.","operationId":"reset_insights_only_api_spiritus_habits_reset_insights_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/habits/reset/history":{"delete":{"tags":["life-habits"],"summary":"Reset All History","description":"Delete ALL habit logs AND past AI insights for this user. Streaks\nreset to zero, and the 7-day insight cooldown also resets so a fresh\nhistory can be analysed without being blocked by a stale insight.","operationId":"reset_all_history_api_spiritus_habits_reset_history_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/habits/reset/day/{log_date}":{"delete":{"tags":["life-habits"],"summary":"Reset Single Day","description":"Delete all habit logs for a single day. Use from the History view\nto remove an entire day (e.g. one bad day skewing the streaks).","operationId":"reset_single_day_api_spiritus_habits_reset_day__log_date__delete","parameters":[{"name":"log_date","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Log Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/habits/reset/{habit_id}":{"delete":{"tags":["life-habits"],"summary":"Reset Single Habit","description":"Delete all logs for a single habit. Its streak resets to zero.","operationId":"reset_single_habit_api_spiritus_habits_reset__habit_id__delete","parameters":[{"name":"habit_id","in":"path","required":true,"schema":{"type":"integer","title":"Habit Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/habits/checkin":{"get":{"tags":["life-habits"],"summary":"Get Checkin","description":"Get today's (or a specific date's) check-in view — all habits with their log status.","operationId":"get_checkin_api_spiritus_habits_checkin_get","parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyCheckInResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/habits/history":{"get":{"tags":["life-habits"],"summary":"Get History","description":"Get day-by-day habit history with completion rates.","operationId":"get_history_api_spiritus_habits_history_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/habits/streaks":{"get":{"tags":["life-habits"],"summary":"Get Streaks","description":"Get current and longest streak per habit + overall.","operationId":"get_streaks_api_spiritus_habits_streaks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllStreaksResponse"}}}}}}},"/api/spiritus/habits/insight":{"post":{"tags":["life-habits"],"summary":"Generate Insight","description":"Generate an AI weekly insight correlating habits with moods. 7-day cooldown.","operationId":"generate_insight_api_spiritus_habits_insight_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitInsightResponse"}}}}}}},"/api/spiritus/habits/insights":{"get":{"tags":["life-habits"],"summary":"List Insights","description":"List past AI habit insights.","operationId":"list_insights_api_spiritus_habits_insights_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitInsightListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals/templates":{"get":{"tags":["life-goals"],"summary":"List Templates","description":"List available goal templates, marking which ones are already adopted.","operationId":"list_templates_api_spiritus_goals_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GoalTemplateResponse"},"type":"array","title":"Response List Templates Api Spiritus Goals Templates Get"}}}}}}},"/api/spiritus/goals/from-template":{"post":{"tags":["life-goals"],"summary":"Create From Template","description":"Create a goal from a template, auto-link matching habits, and seed milestones.","operationId":"create_from_template_api_spiritus_goals_from_template_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalFromTemplateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals":{"get":{"tags":["life-goals"],"summary":"List Goals","description":"List all goals split into active and completed, with milestones and linked habits.","operationId":"list_goals_api_spiritus_goals_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalListResponse"}}}}}},"post":{"tags":["life-goals"],"summary":"Create Goal","description":"Create a new custom life goal.","operationId":"create_goal_api_spiritus_goals_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals/{goal_id}":{"patch":{"tags":["life-goals"],"summary":"Update Goal","description":"Update goal fields (title, description, deadline, sort_order).","operationId":"update_goal_api_spiritus_goals__goal_id__patch","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["life-goals"],"summary":"Delete Goal","description":"Delete a goal and cascade-delete its milestones and habit links.","operationId":"delete_goal_api_spiritus_goals__goal_id__delete","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals/{goal_id}/complete":{"patch":{"tags":["life-goals"],"summary":"Toggle Goal Complete","description":"Toggle a goal's completed status.","operationId":"toggle_goal_complete_api_spiritus_goals__goal_id__complete_patch","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals/{goal_id}/progress":{"patch":{"tags":["life-goals"],"summary":"Update Goal Progress","description":"Set a goal's completion status explicitly.\n\nUnlike /complete (which toggles), this sets is_completed to the given\nvalue — idempotent-set semantics for external writers like theme\nwidgets (ThemeBridge's `goal_progress` write) that don't track prior\nstate. Backed by the same is_completed/completed_at fields /complete\nuses; the goal model has no separate progress field.","operationId":"update_goal_progress_api_spiritus_goals__goal_id__progress_patch","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalProgressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals/{goal_id}/habits":{"post":{"tags":["life-goals"],"summary":"Link Habit","description":"Link a habit to a goal.","operationId":"link_habit_api_spiritus_goals__goal_id__habits_post","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HabitLinkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals/{goal_id}/habits/{habit_id}":{"delete":{"tags":["life-goals"],"summary":"Unlink Habit","description":"Unlink a habit from a goal.","operationId":"unlink_habit_api_spiritus_goals__goal_id__habits__habit_id__delete","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}},{"name":"habit_id","in":"path","required":true,"schema":{"type":"integer","title":"Habit Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals/{goal_id}/milestones":{"post":{"tags":["life-goals"],"summary":"Create Milestone","description":"Add a milestone to a goal.","operationId":"create_milestone_api_spiritus_goals__goal_id__milestones_post","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals/{goal_id}/milestones/{milestone_id}":{"patch":{"tags":["life-goals"],"summary":"Update Milestone","description":"Update or toggle a milestone.","operationId":"update_milestone_api_spiritus_goals__goal_id__milestones__milestone_id__patch","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}},{"name":"milestone_id","in":"path","required":true,"schema":{"type":"integer","title":"Milestone Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MilestoneResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["life-goals"],"summary":"Delete Milestone","description":"Delete a milestone.","operationId":"delete_milestone_api_spiritus_goals__goal_id__milestones__milestone_id__delete","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}},{"name":"milestone_id","in":"path","required":true,"schema":{"type":"integer","title":"Milestone Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals/{goal_id}/recommit":{"post":{"tags":["life-goals"],"summary":"Recommit Goal","description":"Recommit to a goal — push deadline forward after missing it.","operationId":"recommit_goal_api_spiritus_goals__goal_id__recommit_post","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/goals/{goal_id}/insight":{"post":{"tags":["life-goals"],"summary":"Goal Insight","description":"Generate an AI insight for a specific goal based on milestone and habit data.","operationId":"goal_insight_api_spiritus_goals__goal_id__insight_post","parameters":[{"name":"goal_id","in":"path","required":true,"schema":{"type":"integer","title":"Goal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/meditation/generate":{"post":{"tags":["life-meditation"],"summary":"Generate Meditation","description":"Start meditation generation in the background.\n\nReturns immediately with a session stub (status=\"generating\").\nThe client polls GET /sessions/{id} until status becomes \"ready\" or \"failed\".\nGeneration survives client disconnects and page refreshes.","operationId":"generate_meditation_api_spiritus_meditation_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/spiritus__meditation__schemas__GenerateRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/spiritus__meditation__schemas__SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/meditation/in-progress":{"get":{"tags":["life-meditation"],"summary":"Get In Progress","description":"Return the currently-generating session, if any. Used by frontend to\nresume polling after page refresh / navigation.\n\nAuto-fails sessions stuck generating for >10 minutes.","operationId":"get_in_progress_api_spiritus_meditation_in_progress_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/meditation/generate-script":{"post":{"tags":["life-meditation"],"summary":"Generate Script","description":"Generate a meditation script via the AI gateway (GPT-4o).\n\nUsed by the Chrome extension for the LLM step only.","operationId":"generate_script_api_spiritus_meditation_generate_script_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateScriptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/meditation/generate-from-script":{"post":{"tags":["life-meditation"],"summary":"Generate From Script","description":"Take a pre-generated script and run TTS + stitching server-side.\n\nThe extension generates the script (expensive LLM call via proxy),\nthen hands it to the server for TTS + audio stitching (proven pipeline).\nReturns a complete session with audio, ready to play on any device.","operationId":"generate_from_script_api_spiritus_meditation_generate_from_script_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/meditation/upload":{"post":{"tags":["life-meditation"],"summary":"Upload Meditation","description":"Accept a meditation MP3 uploaded from the Chrome extension.\n\nCreates a MeditationSession record so the meditation appears across all\ndevices. The extension generates audio locally (via server-proxied API\ncalls) and uploads the finished file here for cross-device sync.","operationId":"upload_meditation_api_spiritus_meditation_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_meditation_api_spiritus_meditation_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/meditation/sessions":{"get":{"tags":["life-meditation"],"summary":"List Sessions","description":"List past meditation sessions (most recent first). Excludes in-progress.","operationId":"list_sessions_api_spiritus_meditation_sessions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionListResponse"}}}}}}},"/api/spiritus/meditation/sessions/{session_id}":{"get":{"tags":["life-meditation"],"summary":"Get Session Detail","description":"Get full session detail including transcript and audio URL.","operationId":"get_session_detail_api_spiritus_meditation_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/spiritus__meditation__schemas__SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["life-meditation"],"summary":"Delete Session","description":"Delete a meditation session and its audio file.","operationId":"delete_session_api_spiritus_meditation_sessions__session_id__delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/meditation/sessions/{session_id}/favorite":{"patch":{"tags":["life-meditation"],"summary":"Toggle Favorite","description":"Toggle a session's favorite status.","operationId":"toggle_favorite_api_spiritus_meditation_sessions__session_id__favorite_patch","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/spiritus__meditation__schemas__SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/meditation/sessions/{session_id}/mood":{"patch":{"tags":["life-meditation"],"summary":"Set Mood After","description":"Set the post-session mood emoji.","operationId":"set_mood_after_api_spiritus_meditation_sessions__session_id__mood_patch","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoodAfterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/spiritus__meditation__schemas__SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/meditation/sessions/{session_id}/complete":{"post":{"tags":["life-meditation"],"summary":"Complete Session","description":"Mark a meditation session as completed (user listened through).\n\nAwards XP and triggers challenge completion. Idempotent — calling\nagain on an already-completed session returns it without re-awarding.","operationId":"complete_session_api_spiritus_meditation_sessions__session_id__complete_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/spiritus__meditation__schemas__SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/meditation/audio/{user_id}/{filename}":{"get":{"tags":["life-meditation"],"summary":"Serve Audio","description":"Serve a meditation audio file. Users can only access their own files.","operationId":"serve_audio_api_spiritus_meditation_audio__user_id___filename__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/meditation/remaining":{"get":{"tags":["life-meditation"],"summary":"Get Remaining","description":"Get how many meditation sessions remain today.","operationId":"get_remaining_api_spiritus_meditation_remaining_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemainingResponse"}}}}}}},"/api/spiritus/meditation/stats":{"get":{"tags":["life-meditation"],"summary":"Get Stats","description":"Get aggregate meditation stats — total sessions, total minutes, streak.","operationId":"get_stats_api_spiritus_meditation_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeditationStatsResponse"}}}}}}},"/api/spiritus/therapist/status":{"get":{"tags":["life-therapist"],"summary":"Therapist Status","description":"Get therapist availability: sessions used/remaining, first session flag.","operationId":"therapist_status_api_spiritus_therapist_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TherapistStatusResponse"}}}}}}},"/api/spiritus/therapist/greeting":{"get":{"tags":["life-therapist"],"summary":"Therapist Greeting","description":"Get a context-aware greeting for starting a new session.","operationId":"therapist_greeting_api_spiritus_therapist_greeting_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/therapist/starters":{"get":{"tags":["life-therapist"],"summary":"Conversation Starters","description":"Generate suggested conversation starters based on recent user data.","operationId":"conversation_starters_api_spiritus_therapist_starters_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TherapistStartersResponse"}}}}}}},"/api/spiritus/therapist/chat":{"post":{"tags":["life-therapist"],"summary":"Therapist Chat","description":"Send a message to the therapist and get a response.\n\nThe frontend maintains the full conversation in memory and sends\nthe growing message array with each request. Nothing is stored\nserver-side until end-session.","operationId":"therapist_chat_api_spiritus_therapist_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TherapistChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TherapistChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/therapist/chat-stream":{"post":{"tags":["life-therapist"],"summary":"Therapist Chat Stream","description":"Streaming twin of /chat (SSE). Emits `{\"token\": str}` deltas as Venice\ngenerates, then one `{\"done\": true, ...}` event with the same metadata\n/chat returns. The buffered /chat endpoint is unchanged and remains the\nfallback + flag-off path.\n\nOrdering invariants (same as /chat): session/exchange caps and the crisis\nguardrail run BEFORE the LLM — a crisis message yields the scripted\nhotline response as a single token and Venice is never called.","operationId":"therapist_chat_stream_api_spiritus_therapist_chat_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TherapistChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/therapist/end-session":{"post":{"tags":["life-therapist"],"summary":"End Session","description":"End a therapy session: generate a summary note from the conversation.\n\nThe full conversation is sent one final time for summarization,\nthen the client discards it. Only the structured note persists.","operationId":"end_session_api_spiritus_therapist_end_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TherapistEndSessionRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/therapist/notes":{"get":{"tags":["life-therapist"],"summary":"List Notes","description":"List all therapist session notes for the user, newest first.","operationId":"list_notes_api_spiritus_therapist_notes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNoteListResponse"}}}}}}},"/api/spiritus/therapist/notes/{note_id}":{"get":{"tags":["life-therapist"],"summary":"Get Note","description":"Get a single session note.","operationId":"get_note_api_spiritus_therapist_notes__note_id__get","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["life-therapist"],"summary":"Update Note","description":"Update a session note (user can edit themes, patterns, follow-up).","operationId":"update_note_api_spiritus_therapist_notes__note_id__patch","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNoteUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["life-therapist"],"summary":"Delete Note","description":"Delete a session note.","operationId":"delete_note_api_spiritus_therapist_notes__note_id__delete","parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/therapist/speak":{"post":{"tags":["life-therapist"],"summary":"Therapist Speak","description":"Synthesize an assistant utterance via Cartesia, WITH word timestamps.\n\nReturns JSON `{audio, words, cost_usd, voice}` where `audio` is base64 MP3\nand `words` is [{word, start, end}] (seconds) so the avatar can lip-sync to\nthe real word onsets instead of guessing timing from the text. Budget:\npre-flight `can_spend`, post-success `record_spend`. Errors return 402\n(no credits), 503 (provider down), or 500 (unexpected).","operationId":"therapist_speak_api_spiritus_therapist_speak_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TherapistSpeakRequest"}}},"required":true},"responses":{"200":{"description":"JSON: base64 MP3 + word timestamps for lip-sync","content":{"application/json":{"schema":{}}}},"402":{"description":"Insufficient credits"},"503":{"description":"TTS provider unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/therapist/transcribe":{"post":{"tags":["life-therapist"],"summary":"Therapist Transcribe","description":"Transcribe a user audio recording via OpenAI Whisper.\n\nBudget: the pre-flight estimate uses file size (~1 MB ≈ 1 min for typical\nbrowser webm/opus). If the user has fewer ZugaTokens than the estimate,\nwe 402 before calling Whisper. The actual recorded spend uses Whisper's\nreported duration so users only pay for real audio length.","operationId":"therapist_transcribe_api_spiritus_therapist_transcribe_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_therapist_transcribe_api_spiritus_therapist_transcribe_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TherapistTranscribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/settings":{"get":{"tags":["life-settings"],"summary":"Get Settings","description":"Return current user settings. Auto-creates defaults on first call.","operationId":"get_settings_api_spiritus_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifeSettingsResponse"}}}}}},"put":{"tags":["life-settings"],"summary":"Update Settings","description":"Update user settings. Only provided fields are changed.","operationId":"update_settings_api_spiritus_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifeSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifeSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/onboarding":{"get":{"tags":["life-settings"],"summary":"Get Life Onboarding","description":"Check if the user has completed Spiritus studio onboarding.","operationId":"get_life_onboarding_api_spiritus_onboarding_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Life Onboarding Api Spiritus Onboarding Get"}}}}}}},"/api/spiritus/onboarding/complete":{"post":{"tags":["life-settings"],"summary":"Complete Life Onboarding","description":"Mark Spiritus studio onboarding as completed.","operationId":"complete_life_onboarding_api_spiritus_onboarding_complete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Complete Life Onboarding Api Spiritus Onboarding Complete Post"}}}}}}},"/api/spiritus/onboarding/reset":{"post":{"tags":["life-settings"],"summary":"Reset Life Onboarding","description":"Reset Spiritus studio onboarding so the user can replay it.","operationId":"reset_life_onboarding_api_spiritus_onboarding_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Reset Life Onboarding Api Spiritus Onboarding Reset Post"}}}}}}},"/api/spiritus/breath/today":{"get":{"tags":["life-settings"],"summary":"Get Breath Today","description":"Return whether the user has completed today's breath ritual on any device.\n\n\"Today\" is in the user's configured timezone — so rollover happens at the\nuser's midnight, not UTC's. Otherwise the prompt re-appears at 8pm EDT\n(UTC midnight) instead of true local midnight.","operationId":"get_breath_today_api_spiritus_breath_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Breath Today Api Spiritus Breath Today Get"}}}}}}},"/api/spiritus/breath/done":{"post":{"tags":["life-settings"],"summary":"Mark Breath Done","description":"Mark today's breath ritual complete. Idempotent — safe to call repeatedly.","operationId":"mark_breath_done_api_spiritus_breath_done_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mark Breath Done Api Spiritus Breath Done Post"}}}}}}},"/api/spiritus/settings/personalization":{"get":{"tags":["life-settings"],"summary":"Get Personalization","description":"Get current personalization config (readable by frontend and Zugabot).","operationId":"get_personalization_api_spiritus_settings_personalization_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizationResponse"}}}}}},"patch":{"tags":["life-settings"],"summary":"Update Personalization","description":"Update personalization config. Writable by both the user and Zugabot agent.\n\nZugabot can learn which gamification style works for each user (Bartle player types)\nand adjust challenge difficulty in real-time (Csikszentmihalyi's flow channel).","operationId":"update_personalization_api_spiritus_settings_personalization_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizationUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/internal/apply-theme":{"post":{"tags":["life-settings"],"summary":"Internal Apply Theme","description":"Service-to-service endpoint for Zugabot to apply themes.\n\nNow forwards to ZugaApp's theme override system instead of writing\nto custom_colors. This ensures themes show in Settings > My Themes\nand can be scoped to any studio.","operationId":"internal_apply_theme_api_spiritus_internal_apply_theme_post","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalThemeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/personality/items":{"get":{"tags":["spiritus-personality"],"summary":"Get Items","description":"Combined item bank: 32 OEJTS bipolar items + 4 Neuroticism Likert items.\nKeying (scale/sign/reverse) is never exposed.","operationId":"get_items_api_spiritus_personality_items_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemBankResponse"}}}}}}},"/api/spiritus/personality":{"get":{"tags":["spiritus-personality"],"summary":"Get Personality","description":"Return the caller's stored personality result, or {completed: false}.","operationId":"get_personality_api_spiritus_personality_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalityResponse"}}}}}},"delete":{"tags":["spiritus-personality"],"summary":"Delete Personality","description":"Revoke consent and purge the caller's personality row.","operationId":"delete_personality_api_spiritus_personality_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Delete Personality Api Spiritus Personality Delete"}}}}}}},"/api/spiritus/personality/submit":{"post":{"tags":["spiritus-personality"],"summary":"Submit Personality","description":"Score the combined assessment and store the 16-type + Big-Five result. Requires explicit consent.","operationId":"submit_personality_api_spiritus_personality_submit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/personality/share":{"get":{"tags":["spiritus-personality"],"summary":"Get Share Status","description":"Whether the caller is sharing a coarse Big-Five vector with Zugabot.","operationId":"get_share_status_api_spiritus_personality_share_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareStatus"}}}}}},"patch":{"tags":["spiritus-personality"],"summary":"Update Share","description":"Toggle the coarse-vector crossing opt-in. Off by default; off clears it.","operationId":"update_share_api_spiritus_personality_share_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/internal/personality/{user_id}":{"get":{"tags":["spiritus-personality-internal"],"summary":"Internal Get Coarse Vector","description":"Zugabot reads a user's COARSE Big-Five vector + 4-letter type — only if they opted\ninto sharing. Returns 404 (not 403) when not shared so a non-sharing user is\nindistinguishable from one who never took the test. Never exposes raw answers\nor exact floats.","operationId":"internal_get_coarse_vector_api_spiritus_internal_personality__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"X-Service-Key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoarseVector"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/mood/forecast":{"get":{"tags":["life-forecasting"],"summary":"Get Mood Forecast","description":"Compute mood analytics: trend, patterns, forecast, correlations.\n\nPure statistics — no AI calls, no stored predictions.\nMinimum 7-day window to produce meaningful results.","operationId":"get_mood_forecast_api_spiritus_mood_forecast_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"description":"Analysis window in days","default":30,"title":"Days"},"description":"Analysis window in days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoodForecastResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/forecasting/narrative":{"get":{"tags":["life-forecasting"],"summary":"Get Weekly Narrative","description":"AI-generated weekly narrative synthesis — mood trends, habit patterns, goal progress.\n\nCached: one generation per user per week (Monday-Sunday).\nThe #1 gap in mood tracking research is lack of interpretation — this fills it.","operationId":"get_weekly_narrative_api_spiritus_forecasting_narrative_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/mood/forecast/arima":{"get":{"tags":["life-forecasting"],"summary":"Get Arima Forecast","description":"ARIMA-based mood forecast — next day and 7-day prediction.\n\nUses ARIMA(1,1,1) on daily average valence scores.\nRequires at least 7 mood entries across 7 different days.","operationId":"get_arima_forecast_api_spiritus_mood_forecast_arima_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"description":"Analysis window in days","default":30,"title":"Days"},"description":"Analysis window in days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArimaForecastResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/mood/forecast/arimax":{"get":{"tags":["life-forecasting"],"summary":"Get Arimax Forecast","description":"ARIMAX multivariate mood forecast — mood + external factors.\n\nUses ARIMA(1,1,1) with exogenous variables: habit completions,\nmeditation sessions, and journal entries. Falls back to plain\nARIMA if no external factor data has variance.","operationId":"get_arimax_forecast_api_spiritus_mood_forecast_arimax_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"description":"Analysis window in days","default":30,"title":"Days"},"description":"Analysis window in days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArimaxForecastResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/gamification":{"get":{"tags":["life-gamification"],"summary":"Get Gamification Dashboard","description":"Full gamification status — XP, badges, recent transactions, and today's challenges.","operationId":"get_gamification_dashboard_api_spiritus_gamification_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GamificationDashboard"}}}}}}},"/api/spiritus/gamification/insights":{"get":{"tags":["life-gamification"],"summary":"Get Insights","description":"Get contextual psychological insight cards triggered by user activity.","operationId":"get_insights_api_spiritus_gamification_insights_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/gamification/insights/{insight_key}/dismiss":{"post":{"tags":["life-gamification"],"summary":"Dismiss Insight","description":"Dismiss an insight card so it won't show again.","operationId":"dismiss_insight_api_spiritus_gamification_insights__insight_key__dismiss_post","parameters":[{"name":"insight_key","in":"path","required":true,"schema":{"type":"string","title":"Insight Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/gamification/xp":{"get":{"tags":["life-gamification"],"summary":"Get Xp Status","description":"Current XP, level, streak, and progress toward next level.","operationId":"get_xp_status_api_spiritus_gamification_xp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XPStatusResponse"}}}}}}},"/api/spiritus/gamification/badges":{"get":{"tags":["life-gamification"],"summary":"Get Badges","description":"All badges earned by this user, enriched with badge metadata.","operationId":"get_badges_api_spiritus_gamification_badges_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BadgeResponse"},"type":"array","title":"Response Get Badges Api Spiritus Gamification Badges Get"}}}}}}},"/api/spiritus/gamification/challenges":{"get":{"tags":["life-gamification"],"summary":"Get Daily Challenges","description":"Today's daily challenges for this user (AI-generated on first request, static fallback).","operationId":"get_daily_challenges_api_spiritus_gamification_challenges_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DailyChallengeResponse"},"type":"array","title":"Response Get Daily Challenges Api Spiritus Gamification Challenges Get"}}}}}}},"/api/spiritus/gamification/weekly-quests":{"get":{"tags":["life-gamification"],"summary":"Get Weekly Quests","description":"This week's quests for this user (AI-generated on first request).","operationId":"get_weekly_quests_api_spiritus_gamification_weekly_quests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WeeklyQuestResponse"},"type":"array","title":"Response Get Weekly Quests Api Spiritus Gamification Weekly Quests Get"}}}}}}},"/api/spiritus/gamification/award":{"post":{"tags":["life-gamification"],"summary":"Award Xp","description":"Award XP to the authenticated user.\n\nThis endpoint is intended for internal calls from other Spiritus modules\nand for testing.  The source must be a known XP_TABLE key or 'streak_bonus'.\n\nValid sources: mood_log, habit_check, journal_entry, meditation_complete,\ntherapist_session, goal_milestone, daily_challenge, streak_bonus.","operationId":"award_xp_api_spiritus_gamification_award_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AwardXPRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/XPGainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/gamification/prestige":{"post":{"tags":["life-gamification"],"summary":"Prestige","description":"Prestige: reset level/XP to 1, gain permanent XP multiplier and unique badge.\n\nRequires reaching the prestige level (25). Streaks and badges are kept.","operationId":"prestige_api_spiritus_gamification_prestige_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrestigeResponse"}}}}}}},"/api/spiritus/notifications/vapid-key":{"get":{"tags":["life-notifications"],"summary":"Get Vapid Key","description":"Return the VAPID public key for frontend push subscription.","operationId":"get_vapid_key_api_spiritus_notifications_vapid_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/notifications/subscribe":{"post":{"tags":["life-notifications"],"summary":"Subscribe","description":"Register a push subscription for the authenticated user.","operationId":"subscribe_api_spiritus_notifications_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/spiritus__gamification__notification_routes__SubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/notifications/unsubscribe":{"delete":{"tags":["life-notifications"],"summary":"Unsubscribe","description":"Deactivate all push subscriptions for the authenticated user.","operationId":"unsubscribe_api_spiritus_notifications_unsubscribe_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/notifications/preferences":{"get":{"tags":["life-notifications"],"summary":"Get Preferences","description":"Get notification preferences for the authenticated user.","operationId":"get_preferences_api_spiritus_notifications_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesResponse"}}}}}},"put":{"tags":["life-notifications"],"summary":"Update Preferences","description":"Update notification preferences for the authenticated user.","operationId":"update_preferences_api_spiritus_notifications_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferencesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/notifications/trigger-check":{"post":{"tags":["life-notifications"],"summary":"Trigger Notification Check","description":"Manually trigger the notification scheduler check.\n\nIntended for daemon/cron or admin testing.","operationId":"trigger_notification_check_api_spiritus_notifications_trigger_check_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/discover/today":{"get":{"tags":["spiritus-discover"],"summary":"Get Today","operationId":"get_today_api_spiritus_discover_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TodayResponse"}}}}}}},"/api/spiritus/discover/feed":{"get":{"tags":["spiritus-discover"],"summary":"Get Feed","operationId":"get_feed_api_spiritus_discover_feed_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/discover/search":{"get":{"tags":["spiritus-discover"],"summary":"Search","operationId":"search_api_spiritus_discover_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"school","in":"query","required":false,"schema":{"type":"string","default":"","title":"School"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/discover/thinker/{thinker_key}":{"get":{"tags":["spiritus-discover"],"summary":"Thinker Profile","operationId":"thinker_profile_api_spiritus_discover_thinker__thinker_key__get","parameters":[{"name":"thinker_key","in":"path","required":true,"schema":{"type":"string","title":"Thinker Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/discover/sources":{"get":{"tags":["spiritus-discover"],"summary":"List Sources","description":"All sources with how many active ideas each has (grouped 'by book' view).","operationId":"list_sources_api_spiritus_discover_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcesResponse"}}}}}}},"/api/spiritus/discover/source/{source_key}":{"get":{"tags":["spiritus-discover"],"summary":"Source Detail","description":"One source + all of its active cards (the source detail / reader view).","operationId":"source_detail_api_spiritus_discover_source__source_key__get","parameters":[{"name":"source_key","in":"path","required":true,"schema":{"type":"string","title":"Source Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/discover/{card_id}/react":{"post":{"tags":["spiritus-discover"],"summary":"React","operationId":"react_api_spiritus_discover__card_id__react_post","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"integer","title":"Card Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/spiritus__discover_routes__ReactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/discover/stash":{"get":{"tags":["spiritus-discover"],"summary":"Get Stash","operationId":"get_stash_api_spiritus_discover_stash_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StashResponse"}}}}}}},"/api/spiritus/discover/collections":{"get":{"tags":["spiritus-discover"],"summary":"List Collections","operationId":"list_collections_api_spiritus_discover_collections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionsResponse"}}}}}},"post":{"tags":["spiritus-discover"],"summary":"Create Collection","operationId":"create_collection_api_spiritus_discover_collections_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCollectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/discover/stash/{card_id}/collection":{"post":{"tags":["spiritus-discover"],"summary":"Assign Collection","operationId":"assign_collection_api_spiritus_discover_stash__card_id__collection_post","parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"integer","title":"Card Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/data/reset/mood":{"delete":{"tags":["life-data-management"],"summary":"Reset Mood","description":"Delete all mood entries for this user.","operationId":"reset_mood_api_spiritus_data_reset_mood_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/data/reset/habits":{"delete":{"tags":["life-data-management"],"summary":"Reset Habits","description":"Delete all habit logs, insights, and definitions for this user.\n\nThis is a full wipe — custom habits are removed along with all history.\nPreset habits will be re-seeded automatically on the next visit to the\nhabits page.","operationId":"reset_habits_api_spiritus_data_reset_habits_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/data/reset/goals":{"delete":{"tags":["life-data-management"],"summary":"Reset Goals","description":"Delete all goal definitions for this user.\n\nMilestones and habit links are removed automatically via FK cascade delete.","operationId":"reset_goals_api_spiritus_data_reset_goals_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/data/reset/journal":{"delete":{"tags":["life-data-management"],"summary":"Reset Journal","description":"Delete all journal entries for this user.\n\nReflections are removed automatically via FK cascade delete.","operationId":"reset_journal_api_spiritus_data_reset_journal_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/data/reset/meditation":{"delete":{"tags":["life-data-management"],"summary":"Reset Meditation","description":"Delete all meditation sessions for this user and remove their audio files.\n\nAudio files live at data/meditation_audio/{user_id}/. The entire directory\nis removed with shutil.rmtree. The path is constructed server-side from\nuser.id — no user input touches the filesystem path.","operationId":"reset_meditation_api_spiritus_data_reset_meditation_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/data/reset/breathing":{"delete":{"tags":["life-data-management"],"summary":"Reset Breathing","description":"Reset the daily breath cold-open gate for this user.\n\nThere is no breath history table — the gate is a single date field\n(last_breath_date) on the user's settings row. Nulling it makes today's\nbreathing ritual eligible to be offered again. Settings preferences are\nuntouched; only the daily-state field is cleared. Returns 0 if the user\nhas no settings row yet (nothing to reset).","operationId":"reset_breathing_api_spiritus_data_reset_breathing_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/data/reset/therapist":{"delete":{"tags":["life-data-management"],"summary":"Reset Therapist","description":"Delete all therapist session notes for this user.","operationId":"reset_therapist_api_spiritus_data_reset_therapist_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/data/reset/gamification":{"delete":{"tags":["life-data-management"],"summary":"Reset Gamification","description":"Delete all gamification data (XP, transactions, badges, challenges) for this user.","operationId":"reset_gamification_api_spiritus_data_reset_gamification_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/data/reset/all":{"delete":{"tags":["life-data-management"],"summary":"Reset All","description":"Delete all Spiritus data for this user across every module.\n\nSettings are intentionally preserved — the user keeps their timezone,\ntheme, voice, and ambience preferences after a data reset.\n\nReturns per-module deleted counts plus a combined total.","operationId":"reset_all_api_spiritus_data_reset_all_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/consent":{"get":{"tags":["life-consent"],"summary":"Get Consent","operationId":"get_consent_api_spiritus_consent_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentState"}}}}}},"post":{"tags":["life-consent"],"summary":"Record Consent","description":"Stamp consent timestamps. Idempotent: re-posting only stamps fields that\nhaven't been stamped yet — consent can be GIVEN but never silently revoked\nthrough this endpoint. (Per-flag revocation uses dedicated revoke endpoints,\ne.g. POST /api/spiritus/consent/zugabot/revoke; full account deletion runs\nthrough DELETE /api/spiritus/users/me.)","operationId":"record_consent_api_spiritus_consent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/spiritus__data_management__ConsentBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/consent/zugabot/revoke":{"post":{"tags":["life-consent"],"summary":"Revoke Zugabot Connection","description":"Revoke the Zugabot feed: clear the consent stamp, then REQUEST hard-deletion of the already-ingested Spiritus slice (actioned by Zugabot's purge consumer). Idempotent.\n\nConsent is the user-facing source of truth: we clear (and commit) the stamp\nfirst so the export endpoint 403s immediately. The purge runs after; if it\nfails we still return success (consent IS off) and rely on the durable purge\nretry (Task B8) — we never leave consent ON because the purge failed.","operationId":"revoke_zugabot_connection_api_spiritus_consent_zugabot_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentState"}}}}}}},"/api/spiritus/users/me":{"delete":{"tags":["life-users"],"summary":"Delete Me","description":"Full Spiritus account deletion.\n\nRuns the same per-module purge as /api/spiritus/data/reset/all and stamps\ndeletion_requested_at on the user's consent record. The stamp is the\nSLA anchor — any latent caches / logs / backups must be purged within\n30 days of that timestamp.","operationId":"delete_me_api_spiritus_users_me_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}}}}},"/api/spiritus/zugabot-export":{"get":{"tags":["spiritus-zugabot"],"summary":"Zugabot Export","operationId":"zugabot_export_api_spiritus_zugabot_export_get","parameters":[{"name":"x-service-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/zugabot-outbox":{"get":{"tags":["spiritus-zugabot"],"summary":"Zugabot Outbox Drain","description":"Zugabot drains pending events. Service-key gated (server-to-server; no user\ntoken). For each pending pull_signal we inline the derived slice ONLY if the\nuser STILL consents (re-checked here) — a user who revoked between signal and\ndrain leaks nothing. Purge events carry just the user_id.","operationId":"zugabot_outbox_drain_api_spiritus_zugabot_outbox_get","parameters":[{"name":"x-service-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/zugabot-outbox/ack":{"post":{"tags":["spiritus-zugabot"],"summary":"Zugabot Outbox Ack","description":"Mark drained events consumed. Service-key gated.","operationId":"zugabot_outbox_ack_api_spiritus_zugabot_outbox_ack_post","parameters":[{"name":"x-service-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_zugabot_outbox_ack_api_spiritus_zugabot_outbox_ack_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/spiritus/dashboard":{"get":{"tags":["life-dashboard"],"summary":"Get Dashboard","description":"Aggregated dashboard data — one call, all modules.","operationId":"get_dashboard_api_spiritus_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/spiritus/commands":{"get":{"tags":["life-zugaos"],"summary":"Get Commands","description":"Return Spiritus's intent catalog. Public — capability descriptors only,\nno user data. ZugaOS aggregator merges this with other studios' catalogs.","operationId":"get_commands_api_spiritus_commands_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Commands Api Spiritus Commands Get"}}}}}}},"/api/motion/projects":{"get":{"tags":["motion"],"summary":"List Projects","operationId":"list_projects_api_motion_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["motion"],"summary":"Create Project","operationId":"create_project_api_motion_projects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugamotion__schemas__ProjectCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/projects/{project_id}":{"get":{"tags":["motion"],"summary":"Get Project","operationId":"get_project_api_motion_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["motion"],"summary":"Update Project","operationId":"update_project_api_motion_projects__project_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugamotion__schemas__ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["motion"],"summary":"Delete Project","operationId":"delete_project_api_motion_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/projects/{project_id}/clips":{"get":{"tags":["motion"],"summary":"List Clips","operationId":"list_clips_api_motion_projects__project_id__clips_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["motion"],"summary":"Create Clip","operationId":"create_clip_api_motion_projects__project_id__clips_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClipCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/projects/{project_id}/clips/{clip_id}":{"get":{"tags":["motion"],"summary":"Get Clip","operationId":"get_clip_api_motion_projects__project_id__clips__clip_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}},{"name":"clip_id","in":"path","required":true,"schema":{"type":"integer","title":"Clip Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["motion"],"summary":"Update Clip","operationId":"update_clip_api_motion_projects__project_id__clips__clip_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}},{"name":"clip_id","in":"path","required":true,"schema":{"type":"integer","title":"Clip Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClipUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["motion"],"summary":"Delete Clip","operationId":"delete_clip_api_motion_projects__project_id__clips__clip_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}},{"name":"clip_id","in":"path","required":true,"schema":{"type":"integer","title":"Clip Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/projects/{project_id}/state-config":{"get":{"tags":["motion"],"summary":"Get State Config","description":"Get the state machine config for a project. Auto-generates defaults if empty.","operationId":"get_state_config_api_motion_projects__project_id__state_config_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["motion"],"summary":"Update State Config","description":"Validate and save the state machine config.","operationId":"update_state_config_api_motion_projects__project_id__state_config_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateConfig"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/projects/{project_id}/export-bundle":{"get":{"tags":["motion"],"summary":"Get Export Bundle","description":"Assemble the full character export bundle (state config + all clip lottie data).","operationId":"get_export_bundle_api_motion_projects__project_id__export_bundle_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/projects/{project_id}/generate-idle":{"post":{"tags":["motion"],"summary":"Generate Idle","description":"Generate (or regenerate) an idle breathing clip for an existing project.","operationId":"generate_idle_api_motion_projects__project_id__generate_idle_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/templates":{"get":{"tags":["motion"],"summary":"List Templates","operationId":"list_templates_api_motion_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/motion/templates/{template_id}":{"get":{"tags":["motion"],"summary":"Get Template","operationId":"get_template_api_motion_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/generate/character":{"post":{"tags":["motion"],"summary":"Generate Character","operationId":"generate_character_api_motion_generate_character_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateCharacterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/generate/animation":{"post":{"tags":["motion"],"summary":"Generate Animation","operationId":"generate_animation_api_motion_generate_animation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAnimationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/generate/edit":{"post":{"tags":["motion"],"summary":"Generate Edit","operationId":"generate_edit_api_motion_generate_edit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/generate/behavior":{"post":{"tags":["motion"],"summary":"Generate Behavior","description":"One-prompt behavior generation: personality → states + clips + state machine config.","operationId":"generate_behavior_api_motion_generate_behavior_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateBehaviorRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/motion/generate/chat":{"post":{"tags":["motion"],"summary":"Generate Chat","operationId":"generate_chat_api_motion_generate_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/v1/digest":{"get":{"tags":["news-public"],"summary":"V1 Digest","description":"One-call situational briefing: top cross-source stories, themes, category pulse.","operationId":"v1_digest_api_news_v1_digest_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"number","maximum":72,"minimum":0.5,"description":"Hours to look back","default":4.0,"title":"Since"},"description":"Hours to look back"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Max stories per section","default":5,"title":"Limit"},"description":"Max stories per section"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/v1/blindspots":{"get":{"tags":["news-public"],"summary":"V1 Blindspots","description":"Coverage gaps — stories one side covers and the other ignores.","operationId":"v1_blindspots_api_news_v1_blindspots_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max trending stories to analyze","default":20,"title":"Limit"},"description":"Max trending stories to analyze"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/v1/search":{"get":{"tags":["news-public"],"summary":"V1 Search","description":"Tag-ranked article search. Returns slimmed articles.","operationId":"v1_search_api_news_v1_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search query","title":"Q"},"description":"Search query"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":25,"title":"Limit"},"description":"Max results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/v1/story/{article_id}":{"get":{"tags":["news-public"],"summary":"V1 Story","description":"Multi-source breakdown for one trending story (each source + its bias).","operationId":"v1_story_api_news_v1_story__article_id__get","parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","title":"Article Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/v1/headlines":{"get":{"tags":["news-public"],"summary":"V1 Headlines","description":"Latest headlines (slimmed).","operationId":"v1_headlines_api_news_v1_headlines_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max articles","default":25,"title":"Limit"},"description":"Max articles"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Pagination offset","default":0,"title":"Offset"},"description":"Pagination offset"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/v1/trending":{"get":{"tags":["news-public"],"summary":"V1 Trending","description":"Trending stories (covered by 2+ sources).","operationId":"v1_trending_api_news_v1_trending_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of trending stories","default":5,"title":"Limit"},"description":"Number of trending stories"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/v1/bookmarks/export":{"get":{"tags":["news-public"],"summary":"V1 Bookmarks Export","description":"Export bookmarks (token-light) for Zugabot's news connector. Single-user scope.","operationId":"v1_bookmarks_export_api_news_v1_bookmarks_export_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO-8601; only bookmarks created at/after this","title":"Since"},"description":"ISO-8601; only bookmarks created at/after this"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/v1/lexicon-bridge/discover":{"get":{"tags":["news-public"],"summary":"V1 Discover Lexicon","description":"Discover emerging terms from article tags not yet in the lexicon.\n\nNews -> Zugabot direction: surfaces new terms for the proposer co-evolution loop.\nReturns terms sorted by frequency that are not yet in the framing lexicon.","operationId":"v1_discover_lexicon_api_news_v1_lexicon_bridge_discover_get","parameters":[{"name":"min_frequency","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":2,"description":"Minimum term frequency","default":5,"title":"Min Frequency"},"description":"Minimum term frequency"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/v1/lexicon":{"post":{"tags":["news-public"],"summary":"V1 Add Lexicon","description":"Key-gated lexicon write for Zugabot's co-evolution loop (human-approved upstream).","operationId":"v1_add_lexicon_api_news_v1_lexicon_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V1LexiconBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/headlines":{"get":{"tags":["news"],"summary":"Get Headlines","description":"Get latest headlines, optionally filtered by category.\n\nSupports offset-based pagination. Returns has_more flag to indicate\nif more articles are available beyond the current page.","operationId":"get_headlines_api_news_headlines_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max articles to return","default":50,"title":"Limit"},"description":"Max articles to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/trending":{"get":{"tags":["news"],"summary":"Get Trending","description":"Get trending stories (covered by multiple sources).","operationId":"get_trending_api_news_trending_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Number of trending stories","default":5,"title":"Limit"},"description":"Number of trending stories"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/categories":{"get":{"tags":["news"],"summary":"Get Categories","description":"Get available categories with article counts.","operationId":"get_categories_api_news_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/news/digest":{"get":{"tags":["news"],"summary":"Get Digest","description":"Structured news digest for AI agent consumption.\n\nReturns briefing (top stories), themes (cross-source patterns),\ncategory pulse (distribution), and metadata. Optimized for\nperiodic brain cycle queries.","operationId":"get_digest_api_news_digest_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"number","maximum":72,"minimum":0.5,"description":"Hours to look back","default":4.0,"title":"Since"},"description":"Hours to look back"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Max stories per section","default":5,"title":"Limit"},"description":"Max stories per section"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/blindspots":{"get":{"tags":["news"],"summary":"Get Blindspots","description":"Detect coverage blindspots — stories covered by one side but not the other.\n\nAnalyzes trending stories and buckets their sources into left/center/right\nbased on source_label from Layer 1 bias detection. Flags stories where one\nside has 2+ sources and the other has 0.","operationId":"get_blindspots_api_news_blindspots_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max trending stories to analyze","default":20,"title":"Limit"},"description":"Max trending stories to analyze"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/story/{article_id}":{"get":{"tags":["news"],"summary":"Get Story","description":"Get multi-source view for a trending story.\n\nReturns the representative article plus all source articles\ncovering the same story, each with their own bias data.","operationId":"get_story_api_news_story__article_id__get","parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","title":"Article Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/search":{"get":{"tags":["news"],"summary":"Search Articles","description":"Search articles by tags (keywords, entities, topics).\n\nUses full-text search across the tag database. Searches keywords,\ntopics, entities, title, and category. Returns articles ranked by relevance.","operationId":"search_articles_api_news_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Search query","default":"","title":"Q"},"description":"Search query"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":50,"title":"Limit"},"description":"Max results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/tags/stats":{"get":{"tags":["news"],"summary":"Get Tag Stats","description":"Get tag database statistics — top keywords, topics, counts.","operationId":"get_tag_stats_api_news_tags_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/news/tags/{article_id}":{"get":{"tags":["news"],"summary":"Get Article Tags","description":"Get tags for a specific article.","operationId":"get_article_tags_api_news_tags__article_id__get","parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","title":"Article Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/lexicon-bridge":{"get":{"tags":["news"],"summary":"Get Lexicon Bridge","description":"Get the current lexicon terms and weights used for tag boosting.","operationId":"get_lexicon_bridge_api_news_lexicon_bridge_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["news"],"summary":"Add Lexicon Bridge Term","description":"Add a term to the lexicon bridge. Zugabot → News direction.\n\nTerms added here will boost matching topics during article tagging.\nHigher weight = stronger boost (default 1.0, max useful ~3.0).","operationId":"add_lexicon_bridge_term_api_news_lexicon_bridge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LexiconTermBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["news"],"summary":"Remove Lexicon Bridge Term","description":"Remove a term from the lexicon bridge.","operationId":"remove_lexicon_bridge_term_api_news_lexicon_bridge_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LexiconRemoveTermBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/lexicon-bridge/discover":{"get":{"tags":["news"],"summary":"Discover Lexicon Terms","description":"Discover emerging terms from article tags not yet in the lexicon.\n\nNews → Zugabot direction: surfaces new terms for the lexicon.","operationId":"discover_lexicon_terms_api_news_lexicon_bridge_discover_get","parameters":[{"name":"min_frequency","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":2,"description":"Minimum term frequency","default":5,"title":"Min Frequency"},"description":"Minimum term frequency"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/refresh":{"post":{"tags":["news"],"summary":"Refresh Feeds","description":"Force refresh all feeds (bypasses cache).","operationId":"refresh_feeds_api_news_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/news/archive/stats":{"get":{"tags":["news"],"summary":"Get Archive Stats","description":"Get archive statistics — total articles, age distribution, categories.","operationId":"get_archive_stats_api_news_archive_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/news/archive/search":{"get":{"tags":["news"],"summary":"Search Archived","description":"Search the article archive (up to 30 days of history).\n\nUnlike /search (which queries the tag index), this does a direct\ntext search on stored article titles and summaries.","operationId":"search_archived_api_news_archive_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text search","title":"Q"},"description":"Text search"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":30,"minimum":1},{"type":"null"}],"description":"Only last N days","title":"Days"},"description":"Only last N days"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Max results","default":50,"title":"Limit"},"description":"Max results"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/bookmark-lists":{"get":{"tags":["news"],"summary":"Get Bookmark Lists","description":"Get all bookmark lists with counts.","operationId":"get_bookmark_lists_api_news_bookmark_lists_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["news"],"summary":"Create Bookmark List","description":"Create a new bookmark list.","operationId":"create_bookmark_list_api_news_bookmark_lists_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateListBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/bookmark-lists/{list_id}":{"put":{"tags":["news"],"summary":"Update Bookmark List","description":"Update a bookmark list.","operationId":"update_bookmark_list_api_news_bookmark_lists__list_id__put","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateListBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["news"],"summary":"Delete Bookmark List","description":"Delete a bookmark list and all its bookmarks.","operationId":"delete_bookmark_list_api_news_bookmark_lists__list_id__delete","parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/bookmarks":{"get":{"tags":["news"],"summary":"Get Bookmarks","description":"Get bookmarks, optionally filtered by list.","operationId":"get_bookmarks_api_news_bookmarks_get","parameters":[{"name":"list_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by list ID","title":"List Id"},"description":"Filter by list ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/bookmarks/toggle":{"post":{"tags":["news"],"summary":"Toggle Bookmark","description":"Toggle bookmark: add if not saved, remove if already saved.","operationId":"toggle_bookmark_api_news_bookmarks_toggle_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleBookmarkBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/bookmarks/check/{article_id}":{"get":{"tags":["news"],"summary":"Check Bookmarked","description":"Check which lists an article is bookmarked in.","operationId":"check_bookmarked_api_news_bookmarks_check__article_id__get","parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"string","title":"Article Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/bookmarks/{bookmark_id}":{"delete":{"tags":["news"],"summary":"Delete Bookmark","description":"Remove a specific bookmark.","operationId":"delete_bookmark_api_news_bookmarks__bookmark_id__delete","parameters":[{"name":"bookmark_id","in":"path","required":true,"schema":{"type":"string","title":"Bookmark Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/lexicon":{"get":{"tags":["news"],"summary":"Get Lexicon","description":"Get all framing lexicon entries, optionally filtered by domain.","operationId":"get_lexicon_api_news_lexicon_get","parameters":[{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by domain","title":"Domain"},"description":"Filter by domain"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["news"],"summary":"Add Lexicon Entry","description":"Add a new framing lexicon entry. Validates regex and persists to disk.\n\nUsed by OpenClaw research cycle to evolve the framing lexicon over time.","operationId":"add_lexicon_entry_api_news_lexicon_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LexiconEntryBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["news"],"summary":"Remove Lexicon Entry","description":"Remove a framing lexicon entry by pattern.","operationId":"remove_lexicon_entry_api_news_lexicon_delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LexiconRemoveBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/lexicon/reload":{"post":{"tags":["news"],"summary":"Reload Lexicon","description":"Hot-reload lexicon from disk (after manual edits to JSON file).","operationId":"reload_lexicon_api_news_lexicon_reload_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/news/usage/reference":{"post":{"tags":["news"],"summary":"Log News Reference","description":"Report that news influenced a vault write or decision.\n\nCalled by Zugabot when a digest item leads to actual research output.\nInclude the digest _call_id for correlation if available.","operationId":"log_news_reference_api_news_usage_reference_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsReferenceBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/usage/stats":{"get":{"tags":["news"],"summary":"Get Usage Stats","description":"Get news usage statistics — signal-vs-noise analysis.\n\nShows digest call frequency, reference rate, category breakdown,\nand a human-readable interpretation.","operationId":"get_usage_stats_api_news_usage_stats_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Days to look back","default":30,"title":"Days"},"description":"Days to look back"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/news/debug/status":{"get":{"tags":["news"],"summary":"Debug Status","description":"Diagnostic endpoint — shows aggregator state and tests a single feed.","operationId":"debug_status_api_news_debug_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/operator/stats":{"get":{"tags":["operator"],"summary":"Get Stats","description":"Dashboard stats — cost breakdown, session counts, tier distribution.","operationId":"get_stats_api_operator_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperatorStatsResponse"}}}}}}},"/api/operator/sessions":{"get":{"tags":["operator"],"summary":"List Sessions","description":"List sessions with optional filters.","operationId":"list_sessions_api_operator_sessions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"requester","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}},{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/zugaoperator__schemas__SessionResponse"},"title":"Response List Sessions Api Operator Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["operator"],"summary":"Create Session","description":"Request a new automation task. Determines escalation path automatically.","operationId":"create_session_api_operator_sessions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugaoperator__schemas__SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/sessions/{session_id}":{"get":{"tags":["operator"],"summary":"Get Session Detail","description":"Get session with full action timeline — the replay view.","operationId":"get_session_detail_api_operator_sessions__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/sessions/sync":{"post":{"tags":["operator"],"summary":"Sync Runner Session","description":"Bridge: Runner POSTs completed sessions here for DB persistence.\n\nThis keeps the runner lightweight (in-memory) while ensuring all\nsession data ends up in the ZugaApp database for stats and history.","operationId":"sync_runner_session_api_operator_sessions_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunnerSessionSync"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugaoperator__schemas__SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/escalation/{target_type}":{"get":{"tags":["operator"],"summary":"Get Escalation Path","description":"Preview which tiers will be attempted for a target type.","operationId":"get_escalation_path_api_operator_escalation__target_type__get","parameters":[{"name":"target_type","in":"path","required":true,"schema":{"type":"string","title":"Target Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EscalationPathResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/tools":{"get":{"tags":["operator"],"summary":"List Categories","description":"List all tool categories and counts.","operationId":"list_categories_api_operator_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryListResponse"}}}}}}},"/api/operator/tools/search":{"get":{"tags":["operator"],"summary":"Search Tools","description":"Search tools by keyword. Agents call this to find the right CLI command.\n\nExamples:\n  /operator/tools/search?q=render+3d\n  /operator/tools/search?q=convert+video&cli_only=true\n  /operator/tools/search?q=unity+build&platform=macos","operationId":"search_tools_api_operator_tools_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}},{"name":"cli_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Cli Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/tools/{tool_name}":{"get":{"tags":["operator"],"summary":"Get Tool","description":"Direct lookup — get a specific tool's CLI capabilities.\n\nExamples:\n  /operator/tools/blender\n  /operator/tools/ffmpeg?platform=macos\n  /operator/tools/unity?platform=windows","operationId":"get_tool_api_operator_tools__tool_name__get","parameters":[{"name":"tool_name","in":"path","required":true,"schema":{"type":"string","title":"Tool Name"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/tools/category/{category}":{"get":{"tags":["operator"],"summary":"List Tools By Category","description":"List all tools in a category.","operationId":"list_tools_by_category_api_operator_tools_category__category__get","parameters":[{"name":"category","in":"path","required":true,"schema":{"type":"string","title":"Category"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/tools/suggest/{task_description}":{"get":{"tags":["operator"],"summary":"Suggest Tool","description":"Smart suggest — describe what you want to do, get back the best tool + command.\n\nExamples:\n  /operator/tools/suggest/convert mp4 to mp3\n  /operator/tools/suggest/render 3d scene headless\n  /operator/tools/suggest/build unity project for windows\n  /operator/tools/suggest/batch resize images","operationId":"suggest_tool_api_operator_tools_suggest__task_description__get","parameters":[{"name":"task_description","in":"path","required":true,"schema":{"type":"string","title":"Task Description"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/execute":{"post":{"tags":["operator"],"summary":"Execute Computer Use","description":"Execute a Computer Use session — screenshot → Claude → action → repeat.\n\nThis is the most expensive operation in the system. Every call:\n- Creates a tracked session in the database\n- Requires budget headroom (max_cost_usd enforced per-session)\n- Records every action for post-hoc review\n\nThe session runs synchronously — the response comes when the task\ncompletes, fails, or exhausts its budget.","operationId":"execute_computer_use_api_operator_execute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputerUseRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputerUseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/queue":{"post":{"tags":["operator"],"summary":"Enqueue Task","description":"Enqueue a task for the queue processor. Non-blocking — returns immediately.\n\nThe processor will pick it up based on priority, budget, and dependencies.\nIf estimated cost exceeds $0.25, approval is required before execution.","operationId":"enqueue_task_api_operator_queue_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueEnqueueRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["operator"],"summary":"List Queue","description":"List queue items with optional filters.","operationId":"list_queue_api_operator_queue_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"requester","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueueItemResponse"},"title":"Response List Queue Api Operator Queue Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/queue/stats":{"get":{"tags":["operator"],"summary":"Queue Stats","description":"Queue statistics — counts by status, pending cost, budget remaining.","operationId":"queue_stats_api_operator_queue_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStatsResponse"}}}}}}},"/api/operator/queue/{item_id}":{"get":{"tags":["operator"],"summary":"Get Queue Item","description":"Get a single queue item by ID.","operationId":"get_queue_item_api_operator_queue__item_id__get","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/queue/{item_id}/approve":{"post":{"tags":["operator"],"summary":"Approve Queue Item","description":"Approve a task waiting for approval.","operationId":"approve_queue_item_api_operator_queue__item_id__approve_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalAction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/queue/{item_id}/reject":{"post":{"tags":["operator"],"summary":"Reject Queue Item","description":"Reject a waiting-approval task (sets to cancelled).","operationId":"reject_queue_item_api_operator_queue__item_id__reject_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/queue/{item_id}/cancel":{"post":{"tags":["operator"],"summary":"Cancel Queue Item","description":"Cancel a pending or approved task.","operationId":"cancel_queue_item_api_operator_queue__item_id__cancel_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/queue/{item_id}/retry":{"post":{"tags":["operator"],"summary":"Retry Queue Item","description":"Retry a failed task (resets retry count and status).","operationId":"retry_queue_item_api_operator_queue__item_id__retry_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/insights":{"get":{"tags":["operator"],"summary":"List Insights","description":"List current insights from the feedback engine.","operationId":"list_insights_api_operator_insights_get","parameters":[{"name":"insight_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insight Type"}},{"name":"task_type_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InsightResponse"},"title":"Response List Insights Api Operator Insights Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/operator/insights/summary":{"get":{"tags":["operator"],"summary":"Insights Summary","description":"Dashboard-ready summary: top task types, tier recommendations, cost accuracy.","operationId":"insights_summary_api_operator_insights_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightSummaryResponse"}}}}}}},"/api/snipe/watchlist":{"get":{"tags":["snipe"],"summary":"Get Watchlist","operationId":"get_watchlist_api_snipe_watchlist_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Watchlist Api Snipe Watchlist Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["snipe"],"summary":"Add Watchlist","operationId":"add_watchlist_api_snipe_watchlist_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Watchlist Api Snipe Watchlist Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/snipe/buy-confirmed":{"post":{"tags":["snipe"],"summary":"Buy Confirmed","description":"Record a verified buy attribution. Idempotent per (user, drop, sku, 24h).\n\nv0 (Mike-deferred): records the attribution for prediction-quality\naccounting but awards 0 ZT. When VERIFIED_BUY_REWARD_ZT is 0 we\nskip the grant_tokens round-trip so we don't push empty audit\nentries to ZugaCore's credits ledger.","operationId":"buy_confirmed_api_snipe_buy_confirmed_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyConfirmedRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Buy Confirmed Api Snipe Buy Confirmed Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/snipe/predictions":{"get":{"tags":["snipe"],"summary":"Get Predictions","description":"Return predicted drops within the requested horizon. ZT-gated.\n\nThe cost from PREDICT_COST is debited only on a successful query.\nService uses backend.services.prediction_serving.list_predictions\nso tests can inject a stub list via monkeypatch.","operationId":"get_predictions_api_snipe_predictions_get","parameters":[{"name":"sku","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"}},{"name":"retailer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retailer"}},{"name":"horizon","in":"query","required":false,"schema":{"enum":["6h","24h"],"type":"string","default":"6h","title":"Horizon"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Predictions Api Snipe Predictions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/snipe/alerts/recent":{"get":{"tags":["snipe"],"summary":"Get Recent Alerts","description":"Return up to `limit` most-recent alerts for the user.\n\nReads from the in-memory _ALERTS map — Phase 3 loops populate this\nwhen they fire alerts via the WebSocket. Production version queries\nAlertLog rows by user_id ordered by fired_at desc.","operationId":"get_recent_alerts_api_snipe_alerts_recent_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Recent Alerts Api Snipe Alerts Recent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/snipe/push/subscribe":{"post":{"tags":["snipe"],"summary":"Push Subscribe","description":"Store a Web Push (VAPID) subscription for this user.\n\nDelegates to services.push_dispatcher.store_subscription so the\neventual DB-backed swap doesn't touch this handler.","operationId":"push_subscribe_api_snipe_push_subscribe_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Push Subscribe Api Snipe Push Subscribe Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/snipe/watchlist/{item_id}":{"delete":{"tags":["snipe"],"summary":"Delete Watchlist","operationId":"delete_watchlist_api_snipe_watchlist__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Watchlist Api Snipe Watchlist  Item Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/snipe/internal/active-skus":{"get":{"tags":["snipe"],"summary":"Internal Active Skus","description":"Return deduplicated (retailer, sku) pairs across ALL watchlists.\n\nThe retailer_stock_monitor loop polls each pair every cycle.","operationId":"internal_active_skus_api_snipe_internal_active_skus_get","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Internal Active Skus Api Snipe Internal Active Skus Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/snipe/internal/stock-event":{"post":{"tags":["snipe"],"summary":"Internal Stock Event","description":"Record a live stock_event and queue alerts for every watcher.","operationId":"internal_stock_event_api_snipe_internal_stock_event_post","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockEventRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Internal Stock Event Api Snipe Internal Stock Event Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/snipe/internal/predicted-drop":{"post":{"tags":["snipe"],"summary":"Internal Predicted Drop","description":"Record a predicted drop and queue heads-up alerts for watchers.","operationId":"internal_predicted_drop_api_snipe_internal_predicted_drop_post","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictedDropRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Internal Predicted Drop Api Snipe Internal Predicted Drop Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/snipe/internal/aggregate-watch-count":{"get":{"tags":["snipe"],"summary":"Internal Aggregate Watch Count","description":"Return {count, growth_6h_pct} for the network-effect predictor.\n\nv0 implementation: count = number of users whose watchlist currently\ncontains (retailer, sku). growth_6h_pct = 0.0 in v0 — we'd need\nhistorical snapshots to compute real growth. Production swap reads\nfrom the watchlist_history table windowed over the last 6h.\n\nThe drop_calendar_parser uplifts confidence linearly with growth_pct,\nso a 0.0 here means \"no uplift\" — the predictor still works, it just\ndoesn't get the network-effect boost yet. This is honest v0 behavior:\nthe contract is right, the math is right, the data isn't wired.","operationId":"internal_aggregate_watch_count_api_snipe_internal_aggregate_watch_count_get","parameters":[{"name":"sku","in":"query","required":true,"schema":{"type":"string","title":"Sku"}},{"name":"retailer","in":"query","required":true,"schema":{"type":"string","title":"Retailer"}},{"name":"X-Service-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Internal Aggregate Watch Count Api Snipe Internal Aggregate Watch Count Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/snipe/internal/pending-alerts":{"get":{"tags":["snipe"],"summary":"Internal Pending Alerts","description":"Drain the pending-alerts queue.\n\nsnipe_alert_aggregator calls this each iteration. The queue is\nconsumed (drained) so the same event isn't dispatched twice. v0\nbehavior: drain everything in one call. Production: paginate or\naccept a max_items query param.","operationId":"internal_pending_alerts_api_snipe_internal_pending_alerts_get","parameters":[{"name":"X-Service-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Internal Pending Alerts Api Snipe Internal Pending Alerts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/extension/mint-token":{"post":{"tags":["snipe-auth"],"summary":"Mint Token","description":"Mint a 90-day extension token for the SuperTokens-authenticated user.","operationId":"mint_token_api_auth_extension_mint_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mint Token Api Auth Extension Mint Token Post"}}}}}}},"/api/auth/extension/revoke":{"post":{"tags":["snipe-auth"],"summary":"Revoke Token","description":"Revoke the bearer token presented in the Authorization header.","operationId":"revoke_token_api_auth_extension_revoke_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Token Api Auth Extension Revoke Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/domain/manifest":{"get":{"tags":["domain-outcome-contract"],"summary":"Domain Manifest","operationId":"domain_manifest_api_video_domain_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/video/domain/summary":{"get":{"tags":["domain-outcome-contract"],"summary":"Domain Summary","description":"Domain outcome snapshot. Always returns HTTP 200 (contract requirement).","operationId":"domain_summary_api_video_domain_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/video/projects":{"get":{"tags":["video"],"summary":"List Projects","description":"List all video projects for the current user.","operationId":"list_projects_api_video_projects_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/zugavideo__schemas__ProjectSummary"},"type":"array","title":"Response List Projects Api Video Projects Get"}}}}}},"post":{"tags":["video"],"summary":"Create Project","description":"Create a new video project with default tracks.","operationId":"create_project_api_video_projects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugavideo__schemas__ProjectCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugavideo__schemas__ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/{project_id}":{"get":{"tags":["video"],"summary":"Get Project","description":"Get a project with its full timeline data.","operationId":"get_project_api_video_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugavideo__schemas__ProjectOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["video"],"summary":"Update Project","description":"Update project metadata (title, dimensions, fps).","operationId":"update_project_api_video_projects__project_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugavideo__schemas__ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugavideo__schemas__ProjectSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["video"],"summary":"Delete Project","description":"Delete a project and all associated data.","operationId":"delete_project_api_video_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/{project_id}/timeline":{"put":{"tags":["video"],"summary":"Update Timeline","description":"Save the full timeline (tracks + clips) for a project.","operationId":"update_timeline_api_video_projects__project_id__timeline_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugavideo__schemas__TimelineUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/{project_id}/ai-edit":{"post":{"tags":["video"],"summary":"Ai Edit Project","description":"Prompt-driven AI timeline edit.\n\nAn unparseable AI reply (or a gateway failure) leaves the timeline\ncompletely untouched. Once the reply parses into a valid ops batch,\nindividual ops referencing an unknown clip_id/track_id are skipped\n(not fatal) and reported back in `skipped` — the rest of the batch\nstill applies.","operationId":"ai_edit_project_api_video_projects__project_id__ai_edit_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIEditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIEditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/assemble":{"post":{"tags":["video"],"summary":"Assemble Project","description":"Turn a locked beat sheet into a VideoProject with a populated timeline.\n\nThin wrapper around assembly.assemble_from_beat_sheet — the reusable core\nother embedded plugins (e.g. ZugaDocs) can import and call in-process.","operationId":"assemble_project_api_video_projects_assemble_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssembleRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssembleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/exports":{"post":{"tags":["video"],"summary":"Start Export","description":"Start an export job for a project.","operationId":"start_export_api_video_exports_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugavideo__schemas__ExportRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/exports/{job_uuid}":{"get":{"tags":["video"],"summary":"Get Export Status","description":"Get export job status.","operationId":"get_export_status_api_video_exports__job_uuid__get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportJobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/generate":{"post":{"tags":["video"],"summary":"Start Generation","description":"Kick off a prompt-driven generation job. Polls like exports.","operationId":"start_generation_api_video_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/zugavideo__schemas__GenerateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIJobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/estimate":{"get":{"tags":["video"],"summary":"Estimate Generation Cost","description":"Cost estimate for a video generation — shown before the user confirms\n(P1 guardrail: never fire a paid generation blind).","operationId":"estimate_generation_cost_api_video_estimate_get","parameters":[{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","default":5,"title":"Duration"}},{"name":"quality","in":"query","required":false,"schema":{"type":"string","default":"1080p","title":"Quality"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/upload-image":{"post":{"tags":["video"],"summary":"Upload Reference Image","description":"Upload a reference image (e.g. a face photo) to FAL storage. Returns a\nURL usable as GenerateRequest.image_url for image-to-video generation.","operationId":"upload_reference_image_api_video_upload_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_reference_image_api_video_upload_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/generate/{job_uuid}":{"get":{"tags":["video"],"summary":"Get Generation Status","description":"Poll a generation job.","operationId":"get_generation_status_api_video_generate__job_uuid__get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIJobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/{project_id}/surgical-edit":{"post":{"tags":["video"],"summary":"Create Surgical Edit","description":"Enqueue a surgical clip edit (upscale/interpolate/remove/remove_preview). A GPU\nworker polls the machine API to claim and execute it.","operationId":"create_surgical_edit_api_video_projects__project_id__surgical_edit_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurgicalEditRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurgicalJobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/surgical/{job_uuid}":{"get":{"tags":["video"],"summary":"Get Surgical Job","description":"Poll a surgical edit job.","operationId":"get_surgical_job_api_video_surgical__job_uuid__get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurgicalJobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/{project_id}/surgical":{"get":{"tags":["video"],"summary":"List Surgical Jobs","description":"List surgical edit jobs for a project, newest first (limit 50).","operationId":"list_surgical_jobs_api_video_projects__project_id__surgical_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SurgicalJobOut"},"title":"Response List Surgical Jobs Api Video Projects  Project Id  Surgical Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/{project_id}/clips/{clip_id}/surgical-revert":{"post":{"tags":["video"],"summary":"Revert Surgical Edit","description":"Undo the most recent surgical edit applied to a clip, restoring its\nprior source url.","operationId":"revert_surgical_edit_api_video_projects__project_id__clips__clip_id__surgical_revert_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}},{"name":"clip_id","in":"path","required":true,"schema":{"type":"string","title":"Clip Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurgicalRevertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/{project_id}/postfx":{"post":{"tags":["video"],"summary":"Create Postfx","description":"Apply a finishing effect. Runs locally via ffmpeg in a background task\n— poll `GET /postfx/{job_uuid}` for the result.","operationId":"create_postfx_api_video_projects__project_id__postfx_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostFxRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostFxJobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["video"],"summary":"List Postfx Jobs","description":"List postfx jobs for a project, newest first (limit 50).","operationId":"list_postfx_jobs_api_video_projects__project_id__postfx_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PostFxJobOut"},"title":"Response List Postfx Jobs Api Video Projects  Project Id  Postfx Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/postfx/{job_uuid}":{"get":{"tags":["video"],"summary":"Get Postfx Job","description":"Poll a postfx job.","operationId":"get_postfx_job_api_video_postfx__job_uuid__get","parameters":[{"name":"job_uuid","in":"path","required":true,"schema":{"type":"string","title":"Job Uuid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostFxJobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/{project_id}/clips/{clip_id}/postfx-revert":{"post":{"tags":["video"],"summary":"Revert Postfx","description":"Undo the most recent postfx applied to a clip, restoring its prior\nsource url.","operationId":"revert_postfx_api_video_projects__project_id__clips__clip_id__postfx_revert_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}},{"name":"clip_id","in":"path","required":true,"schema":{"type":"string","title":"Clip Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostFxRevertOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/{project_id}/shots":{"post":{"tags":["video"],"summary":"Create Shot","description":"Add a shot to a project's storyboard.","operationId":"create_shot_api_video_projects__project_id__shots_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShotSpecIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShotOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["video"],"summary":"List Shots","operationId":"list_shots_api_video_projects__project_id__shots_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShotOut"},"title":"Response List Shots Api Video Projects  Project Id  Shots Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/shots/{shot_id}":{"get":{"tags":["video"],"summary":"Get Shot","description":"Poll this while a keyframe renders — the row IS the job.","operationId":"get_shot_api_video_shots__shot_id__get","parameters":[{"name":"shot_id","in":"path","required":true,"schema":{"type":"integer","title":"Shot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShotOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["video"],"summary":"Update Shot","description":"Edit the direction. Clears any existing approval — the locked frame was\napproved against different direction.","operationId":"update_shot_api_video_shots__shot_id__put","parameters":[{"name":"shot_id","in":"path","required":true,"schema":{"type":"integer","title":"Shot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShotSpecIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShotOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["video"],"summary":"Delete Shot","operationId":"delete_shot_api_video_shots__shot_id__delete","parameters":[{"name":"shot_id","in":"path","required":true,"schema":{"type":"integer","title":"Shot Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/shots/{shot_id}/prompts":{"get":{"tags":["video"],"summary":"Get Shot Prompts","description":"Exactly what the compiler will send — readable BEFORE spending.","operationId":"get_shot_prompts_api_video_shots__shot_id__prompts_get","parameters":[{"name":"shot_id","in":"path","required":true,"schema":{"type":"integer","title":"Shot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShotPromptsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/shots/{shot_id}/keyframe":{"post":{"tags":["video"],"summary":"Render Shot Keyframe","description":"Render the still (~$0.003). Returns immediately — poll GET /shots/{id}.","operationId":"render_shot_keyframe_api_video_shots__shot_id__keyframe_post","parameters":[{"name":"shot_id","in":"path","required":true,"schema":{"type":"integer","title":"Shot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyframeRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShotOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/shots/{shot_id}/approve":{"post":{"tags":["video"],"summary":"Approve Shot","description":"Lock the keyframe. Only an approved keyframe may condition a motion\nrender — this is the gate between \"a picture\" and \"the shot\".","operationId":"approve_shot_api_video_shots__shot_id__approve_post","parameters":[{"name":"shot_id","in":"path","required":true,"schema":{"type":"integer","title":"Shot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShotOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/shots/{shot_id}/render":{"post":{"tags":["video"],"summary":"Render Shot Motion","description":"Interpolate motion between the shot's LOCKED keyframes.\n\nRefuses anything unapproved. Handing an unreviewed frame to a paid render\nis the exact failure the storyboard stage exists to prevent, so the check\nlives here rather than relying on the caller to be careful.","operationId":"render_shot_motion_api_video_shots__shot_id__render_post","parameters":[{"name":"shot_id","in":"path","required":true,"schema":{"type":"integer","title":"Shot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MotionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIJobOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/platforms":{"get":{"tags":["video"],"summary":"List Platforms","description":"Per-platform delivery specs — frame size, duration cap, caption limit.","operationId":"list_platforms_api_video_platforms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlatformSpecOut"},"type":"array","title":"Response List Platforms Api Video Platforms Get"}}}}}}},"/api/video/projects/{project_id}/distributions":{"post":{"tags":["video"],"summary":"Create Distribution","description":"Plan a post. Caption is validated against the platform's real character\nlimit here, not at upload time.","operationId":"create_distribution_api_video_projects__project_id__distributions_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["video"],"summary":"List Project Distributions","operationId":"list_project_distributions_api_video_projects__project_id__distributions_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DistributionOut"},"title":"Response List Project Distributions Api Video Projects  Project Id  Distributions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/distributions":{"get":{"tags":["video"],"summary":"List All Distributions","description":"The calendar feed — every planned post, soonest scheduled first.","operationId":"list_all_distributions_api_video_distributions_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DistributionOut"},"title":"Response List All Distributions Api Video Distributions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/distributions/{distribution_id}":{"put":{"tags":["video"],"summary":"Update Distribution","operationId":"update_distribution_api_video_distributions__distribution_id__put","parameters":[{"name":"distribution_id","in":"path","required":true,"schema":{"type":"integer","title":"Distribution Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["video"],"summary":"Delete Distribution","operationId":"delete_distribution_api_video_distributions__distribution_id__delete","parameters":[{"name":"distribution_id","in":"path","required":true,"schema":{"type":"integer","title":"Distribution Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/distributions/{distribution_id}/status":{"put":{"tags":["video"],"summary":"Set Distribution Status","description":"Move along draft -> approved -> rendered -> posted.","operationId":"set_distribution_status_api_video_distributions__distribution_id__status_put","parameters":[{"name":"distribution_id","in":"path","required":true,"schema":{"type":"integer","title":"Distribution Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/projects/{project_id}/bundle":{"post":{"tags":["video"],"summary":"Build Bundle","description":"Render every approved distribution into one upload-ready folder:\nthe right file per platform, captions.md, schedule.csv, UPLOAD.md.","operationId":"build_bundle_api_video_projects__project_id__bundle_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"integer","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BundleRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BundleOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/analyze":{"post":{"tags":["video"],"summary":"Analyze Video","description":"Analyze a video file and return metadata.","operationId":"analyze_video_api_video_analyze_post","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/thumbnail":{"post":{"tags":["video"],"summary":"Generate Thumbnail","description":"Generate a thumbnail from a video at a specific time.","operationId":"generate_thumbnail_api_video_thumbnail_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThumbnailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThumbnailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/video/assets/{filename}":{"get":{"tags":["video"],"summary":"Get Asset","description":"Serve a file from EXPORT_DIR (e.g. voiceover WAVs). Rejects any\npath-traversal attempt and 404s if the resolved file doesn't exist.","operationId":"get_asset_api_video_assets__filename__get","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wingmate/generate":{"post":{"tags":["wingmate"],"summary":"Generate Suggestions","description":"Upload a dating-app conversation/profile screenshot, get AI coaching\nsuggestions (technique + short example, not a finished copy-paste reply).\n\nFree tier: the shared ZugaToken welcome grant covers the first several\ngenerations; after that this call is metered like any other AI feature\non the platform (402 insufficient_tokens with a balance + top-up prompt).","operationId":"generate_suggestions_api_wingmate_generate_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_generate_suggestions_api_wingmate_generate_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSuggestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wingmate/anon-status":{"get":{"tags":["wingmate"],"summary":"Anon Status","description":"Public, no-auth: how many free generations does this anon_id have left?\n\nCalled on page load by the public landing page (before any upload) so it\ncan show \"3 free tries left\" immediately. No X-Anon-Id yet (first visit,\nid not minted) just reports the full allotment.","operationId":"anon_status_api_wingmate_anon_status_get","parameters":[{"name":"X-Anon-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anon-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnonStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wingmate/generate-anon":{"post":{"tags":["wingmate"],"summary":"Generate Suggestions Anonymous","description":"Public, no-signup entry point for Wingmate's cold-traffic landing page\n(bio-link -> /wingmate/try). Gives each anonymous browser (identified by\na client-generated UUID, NOT tied to any account — see AnonymousQuota in\nservices/infrastructure.py) a small number of free generations before\nrequiring real signup/login. This ADDS an anonymous path in front of the\nexisting authenticated flow — it does not replace or weaken /generate's\nZugaToken gating in any way.\n\nIf the caller actually IS authenticated (valid Bearer token, e.g. they\nlogged in and are still on the public landing page, or just hit this\nendpoint directly while signed in), route straight to the normal\nZugaToken-gated flow instead — this endpoint is a conversion funnel, not\na way to dodge billing once you have an account.","operationId":"generate_suggestions_anonymous_api_wingmate_generate_anon_post","parameters":[{"name":"X-Anon-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Anon-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_generate_suggestions_anonymous_api_wingmate_generate_anon_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSuggestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wingmate/history":{"get":{"tags":["wingmate"],"summary":"List History","description":"List this user's past generations, newest first.","operationId":"list_history_api_wingmate_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WingmateHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wingmate/voice-profile":{"get":{"tags":["wingmate"],"summary":"Get Voice Profile","description":"This user's saved texting voice/style (Part 3.2), or an empty profile\nif they haven't set one up yet.","operationId":"get_voice_profile_api_wingmate_voice_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProfileOut"}}}}}},"post":{"tags":["wingmate"],"summary":"Save Voice Profile","description":"Save (or update) this user's texting voice/style — a couple of style\ntags plus an optional writing sample. Feeds `render_voice_summary` into\nevery future generation prompt as a style constraint (Part 3.2).","operationId":"save_voice_profile_api_wingmate_voice_profile_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProfileIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceProfileOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wingmate/track-edit":{"post":{"tags":["wingmate"],"summary":"Track Edit","description":"Report how much the user changed a suggestion before using it\n(self-reliance / personalization tracking, Part 3.3). Called by the\nfrontend's \"done with this one\" action — never blocks the UI on failure.","operationId":"track_edit_api_wingmate_track_edit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackEditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/wingmate/personalization-stats":{"get":{"tags":["wingmate"],"summary":"Personalization Stats","description":"Rolling 'you personalized N% of your replies this week' stat (Part\n3.3). Deliberately minimal — a single percentage, no dashboard.","operationId":"personalization_stats_api_wingmate_personalization_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizationStatsResponse"}}}}}}},"/api/wingmate/health":{"get":{"tags":["wingmate"],"summary":"Health Check","operationId":"health_check_api_wingmate_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/app/lifecycle/shutdown":{"post":{"tags":["lifecycle"],"summary":"Lifecycle Shutdown","description":"Orchestrator-initiated graceful shutdown.","operationId":"lifecycle_shutdown_api_app_lifecycle_shutdown_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/app/lifecycle/status":{"get":{"tags":["lifecycle"],"summary":"Lifecycle Status","description":"Current lifecycle state.","operationId":"lifecycle_status_api_app_lifecycle_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ADRRequest":{"properties":{"script":{"type":"string","maxLength":10000,"minLength":1,"title":"Script"},"character_name":{"type":"string","maxLength":100,"minLength":1,"title":"Character Name"},"provider":{"type":"string","pattern":"^(elevenlabs|cartesia|bark|kokoro|piper)$","title":"Provider","default":"elevenlabs"},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"emotion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Emotion"},"target_track_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Track Id"},"insert_at":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Insert At"}},"type":"object","required":["script","character_name"],"title":"ADRRequest","description":"Automated Dialogue Replacement — voice acting generation."},"AIEditRequest":{"properties":{"instruction":{"type":"string","maxLength":2000,"minLength":1,"title":"Instruction"}},"type":"object","required":["instruction"],"title":"AIEditRequest","description":"Prompt-driven AI timeline edit request."},"AIEditResponse":{"properties":{"operations_applied":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Operations Applied","default":[]},"skipped":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Skipped","default":[]},"duration":{"type":"number","title":"Duration"},"version":{"type":"integer","title":"Version"}},"type":"object","required":["duration","version"],"title":"AIEditResponse"},"AIGenerateRequest":{"properties":{"provider":{"type":"string","pattern":"^(elevenlabs|cartesia|bark|kokoro|piper)$","title":"Provider"},"prompt":{"type":"string","maxLength":5000,"minLength":1,"title":"Prompt"},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"duration_seconds":{"anyOf":[{"type":"number","maximum":300.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Duration Seconds"},"target_track_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Track Id"},"insert_at":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Insert At"}},"type":"object","required":["provider","prompt"],"title":"AIGenerateRequest","description":"Request to generate audio via AI provider."},"AIJobOut":{"properties":{"job_uuid":{"type":"string","title":"Job Uuid"},"operation":{"type":"string","title":"Operation"},"provider":{"type":"string","title":"Provider"},"status":{"type":"string","title":"Status"},"progress":{"type":"number","title":"Progress"},"output_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Url"},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"critic_passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Critic Passed"},"critic_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Critic Score"},"critic_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Critic Max"},"critic_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Critic Json"},"critic_rounds":{"type":"integer","title":"Critic Rounds","default":0},"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":["job_uuid","operation","provider","status","progress","created_at"],"title":"AIJobOut"},"AIJobStatus":{"properties":{"id":{"type":"integer","title":"Id"},"provider":{"type":"string","title":"Provider"},"status":{"type":"string","title":"Status"},"prompt":{"type":"string","title":"Prompt"},"is_adr":{"type":"boolean","title":"Is Adr"},"adr_character":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adr Character"},"duration_generated":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Generated"},"token_cost":{"type":"number","title":"Token Cost"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"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","provider","status","prompt","is_adr","token_cost","created_at"],"title":"AIJobStatus"},"ActionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"session_id":{"type":"integer","title":"Session Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"tier":{"type":"string","title":"Tier"},"action_type":{"type":"string","title":"Action Type"},"details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Details"},"success":{"type":"boolean","title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"cost_usd":{"type":"number","title":"Cost Usd"},"screenshot_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Path"}},"type":"object","required":["id","session_id","created_at","tier","action_type","success","cost_usd"],"title":"ActionResponse"},"AdminDeleteUserRequest":{"properties":{"email":{"type":"string","title":"Email"},"confirm":{"type":"string","title":"Confirm"}},"type":"object","required":["email","confirm"],"title":"AdminDeleteUserRequest"},"AdminResetRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"AdminResetRequest"},"AgentSendRequest":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"AgentSendRequest"},"AggregatedCatalog":{"properties":{"catalogs":{"items":{"$ref":"#/components/schemas/StudioCatalog"},"type":"array","title":"Catalogs"},"unreachable":{"items":{"type":"string"},"type":"array","title":"Unreachable","description":"Studios that did not respond"}},"type":"object","title":"AggregatedCatalog","description":"Output of the /api/zugaos/catalog aggregator."},"AllStreaksResponse":{"properties":{"habits":{"items":{"$ref":"#/components/schemas/HabitStreakInfo"},"type":"array","title":"Habits"},"overall_current":{"type":"integer","title":"Overall Current"},"overall_longest":{"type":"integer","title":"Overall Longest"}},"type":"object","required":["habits","overall_current","overall_longest"],"title":"AllStreaksResponse"},"AmbienceType":{"type":"string","enum":["rain","ocean","forest","bowls","silence"],"title":"AmbienceType"},"AnonStatusResponse":{"properties":{"free_generations":{"type":"integer","title":"Free Generations"},"remaining":{"type":"integer","title":"Remaining"}},"type":"object","required":["free_generations","remaining"],"title":"AnonStatusResponse","description":"GET /api/wingmate/anon-status — lets the public landing page show the\nfree-generations count on page load, before the visitor uploads anything."},"AnswerSubmit":{"properties":{"selected_answer":{"type":"string","pattern":"^[abcd]$","title":"Selected Answer"},"confidence":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Confidence","default":3},"response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Ms"}},"type":"object","required":["selected_answer"],"title":"AnswerSubmit"},"AppGenerateRequest":{"properties":{"spec":{"type":"string","maxLength":5000,"minLength":1,"title":"Spec"},"studio":{"type":"string","title":"Studio","default":"default"}},"type":"object","required":["spec"],"title":"AppGenerateRequest"},"ApprovalAction":{"properties":{"approved_by":{"type":"string","title":"Approved By","default":"dashboard"}},"type":"object","title":"ApprovalAction"},"ApprovalBody":{"properties":{"approved":{"type":"boolean","title":"Approved"}},"type":"object","required":["approved"],"title":"ApprovalBody"},"ApproveRequest":{"properties":{"approved":{"type":"boolean","title":"Approved","default":true}},"type":"object","title":"ApproveRequest"},"Archetype":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"tagline":{"type":"string","title":"Tagline"},"blurb":{"type":"string","title":"Blurb"},"strengths":{"items":{"type":"string"},"type":"array","title":"Strengths"},"growth":{"items":{"type":"string"},"type":"array","title":"Growth"}},"type":"object","required":["code","name","tagline","blurb","strengths","growth"],"title":"Archetype"},"ArimaDayForecast":{"properties":{"date":{"type":"string","title":"Date"},"forecast_valence":{"type":"number","title":"Forecast Valence"},"forecast_label":{"type":"string","title":"Forecast Label"}},"type":"object","required":["date","forecast_valence","forecast_label"],"title":"ArimaDayForecast"},"ArimaForecastResponse":{"properties":{"next_day":{"anyOf":[{"$ref":"#/components/schemas/ArimaDayForecast"},{"type":"null"}]},"next_7_days":{"items":{"$ref":"#/components/schemas/ArimaWeekEntry"},"type":"array","title":"Next 7 Days"},"confidence":{"type":"string","title":"Confidence"},"data_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Days"},"model_order":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Model Order"},"aic":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aic"},"stationarity":{"anyOf":[{"$ref":"#/components/schemas/StationarityResult"},{"type":"null"}]},"description":{"type":"string","title":"Description"},"method":{"type":"string","title":"Method","default":"arima"}},"type":"object","required":["next_day","next_7_days","confidence","description"],"title":"ArimaForecastResponse"},"ArimaWeekEntry":{"properties":{"date":{"type":"string","title":"Date"},"day":{"type":"string","title":"Day"},"forecast_valence":{"type":"number","title":"Forecast Valence"},"forecast_label":{"type":"string","title":"Forecast Label"}},"type":"object","required":["date","day","forecast_valence","forecast_label"],"title":"ArimaWeekEntry"},"ArimaxForecastResponse":{"properties":{"next_day":{"anyOf":[{"$ref":"#/components/schemas/ArimaDayForecast"},{"type":"null"}]},"next_7_days":{"items":{"$ref":"#/components/schemas/ArimaWeekEntry"},"type":"array","title":"Next 7 Days"},"confidence":{"type":"string","title":"Confidence"},"data_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Days"},"model_order":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Model Order"},"aic":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Aic"},"exogenous_factors":{"items":{"type":"string"},"type":"array","title":"Exogenous Factors","default":[]},"description":{"type":"string","title":"Description"},"method":{"type":"string","title":"Method","default":"arimax"}},"type":"object","required":["next_day","next_7_days","confidence","description"],"title":"ArimaxForecastResponse"},"AssembleOut":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"fps":{"type":"number","title":"Fps"},"duration":{"type":"number","title":"Duration"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"timeline":{"additionalProperties":true,"type":"object","title":"Timeline","default":{}},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"generation_jobs":{"items":{"type":"string"},"type":"array","title":"Generation Jobs","default":[]},"voiceover":{"type":"string","enum":["skipped","generated"],"title":"Voiceover","default":"skipped"}},"type":"object","required":["id","title","width","height","fps","duration","created_at","updated_at"],"title":"AssembleOut","description":"Response for POST /projects/assemble — a ProjectOut plus the AI job\nuuids fired for `generated` beats and the voiceover synthesis outcome."},"AssembleRequest":{"properties":{"beat_sheet":{"$ref":"#/components/schemas/BeatSheet"}},"type":"object","required":["beat_sheet"],"title":"AssembleRequest"},"AssignRequest":{"properties":{"collection_id":{"type":"integer","title":"Collection Id"}},"type":"object","required":["collection_id"],"title":"AssignRequest"},"AttestRequest":{"properties":{"birth_year":{"type":"integer","maximum":2100.0,"minimum":1900.0,"title":"Birth Year"}},"type":"object","required":["birth_year"],"title":"AttestRequest"},"AudioUploadResponse":{"properties":{"clip_id":{"type":"string","title":"Clip Id"},"filename":{"type":"string","title":"Filename"},"duration":{"type":"number","title":"Duration"},"sample_rate":{"type":"integer","title":"Sample Rate"},"channels":{"type":"integer","title":"Channels"},"format":{"type":"string","title":"Format"},"waveform_peaks":{"items":{"type":"number"},"type":"array","title":"Waveform Peaks","default":[]},"spectrogram_url":{"type":"string","title":"Spectrogram Url","default":""}},"type":"object","required":["clip_id","filename","duration","sample_rate","channels","format"],"title":"AudioUploadResponse"},"AuthConfigResponse":{"properties":{"auth_mode":{"type":"string","title":"Auth Mode"},"google_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Google Client Id"},"github_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Client Id"},"microsoft_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Microsoft Client Id"},"providers":{"items":{"type":"string"},"type":"array","title":"Providers","default":[]}},"type":"object","required":["auth_mode"],"title":"AuthConfigResponse"},"AutomationCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"target":{"type":"string","title":"Target","description":"zapier | n8n | custom"},"event_filter":{"items":{"type":"string"},"type":"array","title":"Event Filter","description":"e.g. [\"life:habit_completed\", \"trader:*\"]"},"artifact":{"additionalProperties":true,"type":"object","title":"Artifact","description":"target-specific payload"},"receiver_url":{"type":"string","maxLength":2048,"title":"Receiver Url","description":"where events POST to"}},"type":"object","required":["name","target","event_filter","artifact","receiver_url"],"title":"AutomationCreateRequest"},"AutomationGenerateRequest":{"properties":{"prompt":{"type":"string","maxLength":2000,"title":"Prompt","description":"natural-language intent"}},"type":"object","required":["prompt"],"title":"AutomationGenerateRequest"},"AutomationInternalCreateRequest":{"properties":{"user_id":{"type":"string","title":"User Id","description":"the user to own the creation"},"name":{"type":"string","maxLength":100,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"target":{"type":"string","title":"Target","description":"zapier | n8n | custom"},"event_filter":{"items":{"type":"string"},"type":"array","title":"Event Filter"},"artifact":{"additionalProperties":true,"type":"object","title":"Artifact"},"receiver_url":{"type":"string","maxLength":2048,"title":"Receiver Url"}},"type":"object","required":["user_id","name","target","event_filter","artifact","receiver_url"],"title":"AutomationInternalCreateRequest"},"AutomationInternalGenerateRequest":{"properties":{"user_id":{"type":"string","title":"User Id","description":"the real user to bill"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email","description":"optional, passed to ai_call for receipts"},"prompt":{"type":"string","maxLength":2000,"title":"Prompt"}},"type":"object","required":["user_id","prompt"],"title":"AutomationInternalGenerateRequest"},"AutotopupRequest":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"threshold":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Threshold"},"pack":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Pack"}},"type":"object","title":"AutotopupRequest"},"AwardXPRequest":{"properties":{"source":{"type":"string","title":"Source"},"description":{"type":"string","title":"Description"},"base_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Base Amount"}},"type":"object","required":["source","description"],"title":"AwardXPRequest"},"AxisVector":{"properties":{"IE":{"type":"integer","title":"Ie"},"SN":{"type":"integer","title":"Sn"},"FT":{"type":"integer","title":"Ft"},"JP":{"type":"integer","title":"Jp"}},"type":"object","required":["IE","SN","FT","JP"],"title":"AxisVector"},"BadgeResponse":{"properties":{"badge_key":{"type":"string","title":"Badge Key"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"emoji":{"type":"string","title":"Emoji"},"earned_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earned At"}},"type":"object","required":["badge_key","title","description","emoji"],"title":"BadgeResponse"},"Beat":{"properties":{"id":{"type":"string","title":"Id"},"order":{"type":"integer","title":"Order"},"duration_s":{"type":"number","title":"Duration S"},"hook_type":{"anyOf":[{"type":"string","enum":["outcome","curiosity","bold_claim","roast"]},{"type":"null"}],"title":"Hook Type"},"on_screen_text":{"type":"string","title":"On Screen Text","default":""},"voiceover_line":{"type":"string","title":"Voiceover Line","default":""},"visual_source":{"type":"string","enum":["screen_capture","generated","b_roll","text_card"],"title":"Visual Source"},"visual_prompt":{"type":"string","title":"Visual Prompt","default":""},"asset_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Url"},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["id","order","duration_s","visual_source"],"title":"Beat"},"BeatSheet":{"properties":{"version":{"type":"integer","title":"Version","default":1},"title":{"type":"string","title":"Title","default":"Untitled"},"platform":{"type":"string","enum":["tiktok","reels","shorts","x","youtube"],"title":"Platform"},"aspect":{"type":"string","enum":["9:16","16:9","1:1"],"title":"Aspect"},"beats":{"items":{"$ref":"#/components/schemas/Beat"},"type":"array","title":"Beats"}},"type":"object","required":["platform","aspect","beats"],"title":"BeatSheet","description":"The locked v1 beat-sheet contract (script -> timeline input)."},"BeatSheetCreate":{"properties":{"title":{"type":"string","title":"Title","default":"Untitled"},"platform":{"type":"string","title":"Platform","default":"tiktok"},"aspect":{"type":"string","title":"Aspect","default":"9:16"},"beats":{"items":{"$ref":"#/components/schemas/Beat"},"type":"array","title":"Beats","default":[]},"status":{"type":"string","title":"Status","default":"draft"}},"type":"object","title":"BeatSheetCreate"},"BeatSheetUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"aspect":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspect"},"beats":{"anyOf":[{"items":{"$ref":"#/components/schemas/Beat"},"type":"array"},{"type":"null"}],"title":"Beats"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"BeatSheetUpdate"},"BgThemePrefBody":{"properties":{"theme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme"}},"type":"object","title":"BgThemePrefBody"},"Big5Vector":{"properties":{"O":{"type":"number","title":"O"},"C":{"type":"number","title":"C"},"E":{"type":"number","title":"E"},"A":{"type":"number","title":"A"},"N":{"type":"number","title":"N"}},"type":"object","required":["O","C","E","A","N"],"title":"Big5Vector"},"BlogPostCreate":{"properties":{"slug":{"type":"string","maxLength":160,"minLength":3,"title":"Slug"},"title":{"type":"string","maxLength":300,"minLength":1,"title":"Title"},"summary":{"type":"string","maxLength":1000,"minLength":1,"title":"Summary"},"body_md":{"type":"string","minLength":1,"title":"Body Md"},"topic_tags":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Topic Tags"},"trust_level":{"type":"string","title":"Trust Level"},"queue_reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Queue Reason"},"previous_post_id":{"anyOf":[{"type":"string","maxLength":36},{"type":"null"}],"title":"Previous Post Id"},"og_image_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Og Image Url"},"cognitive_stream_excerpt":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":50,"title":"Cognitive Stream Excerpt"}},"type":"object","required":["slug","title","summary","body_md","trust_level"],"title":"BlogPostCreate","description":"Bot-submitted draft. Status is decided by trust_level — never by the bot."},"BlogPostPatch":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Title"},"summary":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}],"title":"Summary"},"body_md":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Body Md"},"topic_tags":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Topic Tags"}},"type":"object","title":"BlogPostPatch","description":"Admin edit. All fields optional — patch semantics."},"BlogRejectPayload":{"properties":{"rejection_reason":{"type":"string","maxLength":500,"minLength":1,"title":"Rejection Reason"}},"type":"object","required":["rejection_reason"],"title":"BlogRejectPayload"},"Body_ack_events_api_ludus_events_outbox_ack_post":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"Body_ack_events_api_ludus_events_outbox_ack_post"},"Body_colorize_image_api_image_colorize_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"},"render_factor":{"type":"integer","maximum":40.0,"minimum":10.0,"title":"Render Factor","default":35}},"type":"object","required":["image"],"title":"Body_colorize_image_api_image_colorize_post"},"Body_enhance_image_api_image_enhance_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"},"mode":{"type":"string","title":"Mode","default":"face_restore"},"strength":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Strength","default":0.7}},"type":"object","required":["image"],"title":"Body_enhance_image_api_image_enhance_post"},"Body_generate_suggestions_anonymous_api_wingmate_generate_anon_post":{"properties":{"screenshot":{"type":"string","contentMediaType":"application/octet-stream","title":"Screenshot"},"tone":{"type":"string","title":"Tone","default":"casual"}},"type":"object","required":["screenshot"],"title":"Body_generate_suggestions_anonymous_api_wingmate_generate_anon_post"},"Body_generate_suggestions_api_wingmate_generate_post":{"properties":{"screenshot":{"type":"string","contentMediaType":"application/octet-stream","title":"Screenshot"},"tone":{"type":"string","title":"Tone","default":"casual"}},"type":"object","required":["screenshot"],"title":"Body_generate_suggestions_api_wingmate_generate_post"},"Body_img2img_api_image_img2img_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"},"prompt":{"type":"string","title":"Prompt"},"strength":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Strength","default":0.75},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"negative_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Negative Prompt"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"},"enable_fallback":{"type":"boolean","title":"Enable Fallback","default":true}},"type":"object","required":["image","prompt"],"title":"Body_img2img_api_image_img2img_post"},"Body_import_files_api_docs_import_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"Body_import_files_api_docs_import_post"},"Body_ingest_onenote_api_learn_ingest_onenote_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"Upload file (.zip, .html, .md, .docx, .xlsx, .csv)"}},"type":"object","required":["file"],"title":"Body_ingest_onenote_api_learn_ingest_onenote_post"},"Body_inpaint_image_api_image_inpaint_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"},"mask":{"type":"string","contentMediaType":"application/octet-stream","title":"Mask"},"prompt":{"type":"string","title":"Prompt"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"negative_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Negative Prompt"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"},"enable_fallback":{"type":"boolean","title":"Enable Fallback","default":true}},"type":"object","required":["image","mask","prompt"],"title":"Body_inpaint_image_api_image_inpaint_post"},"Body_machine_submit_surgical_result_api_machine_video_surgical_jobs__job_uuid__result_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_machine_submit_surgical_result_api_machine_video_surgical_jobs__job_uuid__result_post"},"Body_outpaint_image_api_image_outpaint_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"},"direction":{"type":"string","enum":["left","right","up","down","all"],"title":"Direction"},"expand_pixels":{"type":"integer","maximum":1024.0,"minimum":64.0,"title":"Expand Pixels","default":256},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"enable_fallback":{"type":"boolean","title":"Enable Fallback","default":true}},"type":"object","required":["image","direction"],"title":"Body_outpaint_image_api_image_outpaint_post"},"Body_refine_edge_api_image_refine_edge_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"},"trimap":{"type":"string","contentMediaType":"application/octet-stream","title":"Trimap"}},"type":"object","required":["image","trimap"],"title":"Body_refine_edge_api_image_refine_edge_post"},"Body_remove_background_api_image_remove_background_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"}},"type":"object","required":["image"],"title":"Body_remove_background_api_image_remove_background_post"},"Body_segment_at_point_api_image_segment_point_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"},"x":{"type":"integer","minimum":0.0,"title":"X"},"y":{"type":"integer","minimum":0.0,"title":"Y"},"include_x":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include X"},"include_y":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Include Y"},"exclude_x":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclude X"},"exclude_y":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclude Y"}},"type":"object","required":["image","x","y"],"title":"Body_segment_at_point_api_image_segment_point_post"},"Body_segment_subject_api_image_segment_subject_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"}},"type":"object","required":["image"],"title":"Body_segment_subject_api_image_segment_subject_post"},"Body_therapist_transcribe_api_spiritus_therapist_transcribe_post":{"properties":{"audio":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio"}},"type":"object","required":["audio"],"title":"Body_therapist_transcribe_api_spiritus_therapist_transcribe_post"},"Body_transcribe_audio_api_docs_transcribe_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_transcribe_audio_api_docs_transcribe_post"},"Body_upload_audio_api_audio_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_audio_api_audio_upload_post"},"Body_upload_meditation_api_spiritus_meditation_upload_post":{"properties":{"audio":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio"},"title":{"type":"string","title":"Title"},"transcript":{"type":"string","title":"Transcript"},"type":{"type":"string","title":"Type"},"length":{"type":"string","title":"Length","default":"medium"},"ambience":{"type":"string","title":"Ambience","default":"silence"},"voice":{"type":"string","title":"Voice","default":"serene"},"focus":{"type":"string","title":"Focus","default":""},"model_used":{"type":"string","title":"Model Used","default":""},"tts_model":{"type":"string","title":"Tts Model","default":"tts-1-hd"},"cost":{"type":"number","title":"Cost","default":0.0},"duration_seconds":{"type":"integer","title":"Duration Seconds","default":0}},"type":"object","required":["audio","title","transcript","type"],"title":"Body_upload_meditation_api_spiritus_meditation_upload_post"},"Body_upload_reference_image_api_video_upload_image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_reference_image_api_video_upload_image_post"},"Body_upscale_image_api_image_upscale_post":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"},"scale":{"type":"integer","maximum":10.0,"minimum":2.0,"title":"Scale","default":4},"face_enhance":{"type":"boolean","title":"Face Enhance","default":false}},"type":"object","required":["image"],"title":"Body_upscale_image_api_image_upscale_post"},"Body_zugabot_outbox_ack_api_spiritus_zugabot_outbox_ack_post":{"properties":{"ids":{"items":{"type":"integer"},"type":"array","title":"Ids"}},"type":"object","required":["ids"],"title":"Body_zugabot_outbox_ack_api_spiritus_zugabot_outbox_ack_post"},"BootstrapRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"timestamp":{"type":"integer","title":"Timestamp"}},"type":"object","required":["user_id","timestamp"],"title":"BootstrapRequest"},"BrainstormRequest":{"properties":{"message":{"type":"string","maxLength":5000,"minLength":1,"title":"Message"},"studio":{"type":"string","title":"Studio","default":"default"},"type":{"type":"string","title":"Type","description":"widget | app | theme","default":"app"},"creation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Creation Id"}},"type":"object","required":["message"],"title":"BrainstormRequest"},"BrainstormResponse":{"properties":{"phase":{"type":"string","title":"Phase"},"creation_id":{"type":"integer","title":"Creation Id"},"questions":{"items":{"type":"string"},"type":"array","title":"Questions","default":[]},"spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"title":"Spec"}},"type":"object","required":["phase","creation_id"],"title":"BrainstormResponse"},"BranchBody":{"properties":{"keep_count":{"type":"integer","minimum":1.0,"title":"Keep Count","description":"Number of messages to copy from the source session into the new branch."}},"type":"object","required":["keep_count"],"title":"BranchBody"},"BudgetStatusResponse":{"properties":{"date":{"type":"string","title":"Date"},"spent_today":{"type":"number","title":"Spent Today"},"daily_limit":{"type":"number","title":"Daily Limit"},"remaining":{"type":"number","title":"Remaining"},"utilization_pct":{"type":"number","title":"Utilization Pct"}},"type":"object","required":["date","spent_today","daily_limit","remaining","utilization_pct"],"title":"BudgetStatusResponse"},"BundleFailureOut":{"properties":{"id":{"type":"integer","title":"Id"},"platform":{"type":"string","title":"Platform"},"error":{"type":"string","title":"Error"}},"type":"object","required":["id","platform","error"],"title":"BundleFailureOut"},"BundleItemOut":{"properties":{"id":{"type":"integer","title":"Id"},"platform":{"type":"string","title":"Platform"},"filename":{"type":"string","title":"Filename"},"truncated":{"type":"boolean","title":"Truncated"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["id","platform","filename","truncated","size_bytes"],"title":"BundleItemOut"},"BundleOut":{"properties":{"bundle_dir":{"type":"string","title":"Bundle Dir"},"bundle_name":{"type":"string","title":"Bundle Name"},"rendered":{"items":{"$ref":"#/components/schemas/BundleItemOut"},"type":"array","title":"Rendered","default":[]},"failed":{"items":{"$ref":"#/components/schemas/BundleFailureOut"},"type":"array","title":"Failed","default":[]}},"type":"object","required":["bundle_dir","bundle_name"],"title":"BundleOut"},"BundleRequest":{"properties":{"distribution_ids":{"items":{"type":"integer"},"type":"array","title":"Distribution Ids"}},"type":"object","title":"BundleRequest"},"BuyConfirmedRequest":{"properties":{"drop_event_id":{"type":"string","title":"Drop Event Id"},"sku":{"type":"string","title":"Sku"},"retailer":{"type":"string","title":"Retailer"},"ts":{"type":"string","title":"Ts"},"order_total":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Order Total"}},"type":"object","required":["drop_event_id","sku","retailer","ts"],"title":"BuyConfirmedRequest"},"BuyRequest":{"properties":{"cosmetic_id":{"type":"string","maxLength":128,"title":"Cosmetic Id"}},"type":"object","required":["cosmetic_id"],"title":"BuyRequest"},"CanSpendRequest":{"properties":{"user_id":{"type":"string","maxLength":255,"title":"User Id"},"email":{"type":"string","maxLength":255,"title":"Email"},"estimated_tokens":{"type":"number","exclusiveMinimum":0.0,"title":"Estimated Tokens","description":"Must be positive — callers must estimate cost"}},"type":"object","required":["user_id","email","estimated_tokens"],"title":"CanSpendRequest"},"CaptionBudget":{"properties":{"platform":{"type":"string","title":"Platform"},"used":{"type":"integer","title":"Used"},"limit":{"type":"integer","title":"Limit"},"remaining":{"type":"integer","title":"Remaining"},"over":{"type":"boolean","title":"Over"},"hashtags_counted":{"type":"boolean","title":"Hashtags Counted"},"hashtag_chars":{"type":"integer","title":"Hashtag Chars"}},"type":"object","required":["platform","used","limit","remaining","over","hashtags_counted","hashtag_chars"],"title":"CaptionBudget"},"CardOut":{"properties":{"id":{"type":"integer","title":"Id"},"kind":{"type":"string","title":"Kind"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body"},"attribution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribution"},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Ref"},"school_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Tag"},"reflect_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reflect Prompt"},"source":{"anyOf":[{"$ref":"#/components/schemas/SourceOut"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["id","kind","title","body"],"title":"CardOut"},"CatalogExerciseResponse":{"properties":{"id":{"type":"integer","title":"Id"},"seed_id":{"type":"string","title":"Seed Id"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"level":{"type":"string","title":"Level"},"force":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Force"},"mechanic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mechanic"},"equipment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment"},"primary_muscles":{"items":{"type":"string"},"type":"array","title":"Primary Muscles"},"secondary_muscles":{"items":{"type":"string"},"type":"array","title":"Secondary Muscles"},"instructions":{"items":{"type":"string"},"type":"array","title":"Instructions"},"images":{"items":{"type":"string"},"type":"array","title":"Images"}},"type":"object","required":["id","seed_id","name","category","level","force","mechanic","equipment","primary_muscles","secondary_muscles","instructions","images"],"title":"CatalogExerciseResponse"},"CatalogListResponse":{"properties":{"exercises":{"items":{"$ref":"#/components/schemas/CatalogExerciseResponse"},"type":"array","title":"Exercises"},"total":{"type":"integer","title":"Total"},"muscles":{"items":{"type":"string"},"type":"array","title":"Muscles"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"equipment":{"items":{"type":"string"},"type":"array","title":"Equipment"}},"type":"object","required":["exercises","total","muscles","categories","equipment"],"title":"CatalogListResponse"},"CategoryListResponse":{"properties":{"categories":{"additionalProperties":{"type":"integer"},"type":"object","title":"Categories"},"total_tools":{"type":"integer","title":"Total Tools"}},"type":"object","required":["categories","total_tools"],"title":"CategoryListResponse","description":"List of all categories with tool counts."},"CellWrite":{"properties":{"sheet_id":{"type":"string","maxLength":64,"minLength":1,"title":"Sheet Id"},"cell_ref":{"type":"string","pattern":"^[A-Z]+[1-9][0-9]*$","title":"Cell Ref"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"formula":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Formula"},"format_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Format Json"},"last_known_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Known Version"}},"type":"object","required":["sheet_id","cell_ref"],"title":"CellWrite"},"CellWriteResult":{"properties":{"version":{"type":"integer","title":"Version"}},"type":"object","required":["version"],"title":"CellWriteResult"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"ChatMessage":{"properties":{"role":{"type":"string","pattern":"^(user|assistant)$","title":"Role"},"content":{"type":"string","maxLength":2000,"minLength":1,"title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMessage"},"ChatResponse":{"properties":{"content":{"type":"string","title":"Content"},"model":{"type":"string","title":"Model"},"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","title":"Output Tokens"},"tokens_charged":{"type":"number","title":"Tokens Charged"},"tokens_remaining":{"type":"number","title":"Tokens Remaining"}},"type":"object","required":["content","model","input_tokens","output_tokens","tokens_charged","tokens_remaining"],"title":"ChatResponse"},"CheckoutRequest":{"properties":{"pack_id":{"type":"string","maxLength":32,"title":"Pack Id"}},"type":"object","required":["pack_id"],"title":"CheckoutRequest"},"ClaimRequest":{"properties":{"achievement_id":{"type":"string","maxLength":128,"title":"Achievement Id"},"cosmetic_id":{"type":"string","maxLength":128,"title":"Cosmetic Id"}},"type":"object","required":["achievement_id","cosmetic_id"],"title":"ClaimRequest"},"ClaimResponse":{"properties":{"granted":{"type":"boolean","title":"Granted"},"cosmetic_id":{"type":"string","title":"Cosmetic Id"},"tokens_granted":{"type":"integer","title":"Tokens Granted","default":0}},"type":"object","required":["granted","cosmetic_id"],"title":"ClaimResponse"},"ClipCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"lottie_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lottie Json"},"duration_frames":{"type":"integer","title":"Duration Frames","default":90}},"type":"object","required":["name"],"title":"ClipCreate"},"ClipSource":{"properties":{"url":{"type":"string","title":"Url"},"original_duration":{"type":"number","title":"Original Duration"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"fps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fps"},"filename":{"type":"string","title":"Filename","default":""},"file_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mime Type"},"has_audio":{"type":"boolean","title":"Has Audio","default":false}},"type":"object","required":["url","original_duration"],"title":"ClipSource"},"ClipTransition":{"properties":{"type":{"$ref":"#/components/schemas/TransitionType","default":"none"},"duration":{"type":"number","maximum":5.0,"minimum":0.1,"title":"Duration","default":0.5},"easing":{"$ref":"#/components/schemas/EasingType","default":"linear"}},"type":"object","title":"ClipTransition"},"ClipType":{"type":"string","enum":["video","audio","image","text","solid"],"title":"ClipType"},"ClipUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"lottie_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lottie Json"},"duration_frames":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Frames"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"ClipUpdate"},"CloneRequest":{"properties":{"full_name":{"type":"string","title":"Full Name"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}},"type":"object","required":["full_name"],"title":"CloneRequest"},"CloseBody":{"properties":{"repo":{"type":"string","maxLength":140,"title":"Repo"},"number":{"type":"integer","title":"Number"},"comment":{"anyOf":[{"type":"string","maxLength":65000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["repo","number"],"title":"CloseBody"},"CoarseVector":{"properties":{"O":{"type":"string","title":"O"},"C":{"type":"string","title":"C"},"E":{"type":"string","title":"E"},"A":{"type":"string","title":"A"},"N":{"type":"string","title":"N"},"type_code":{"type":"string","title":"Type Code"}},"type":"object","required":["O","C","E","A","N","type_code"],"title":"CoarseVector"},"CollectionOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"CollectionOut"},"CollectionsResponse":{"properties":{"collections":{"items":{"$ref":"#/components/schemas/CollectionOut"},"type":"array","title":"Collections"}},"type":"object","required":["collections"],"title":"CollectionsResponse"},"ColorGrading":{"properties":{"brightness":{"type":"number","maximum":1.0,"minimum":-1.0,"title":"Brightness","default":0},"contrast":{"type":"number","maximum":3.0,"minimum":0.0,"title":"Contrast","default":1},"saturation":{"type":"number","maximum":3.0,"minimum":0.0,"title":"Saturation","default":1},"temperature":{"type":"number","maximum":10000.0,"minimum":2000.0,"title":"Temperature","default":6500},"gamma":{"type":"number","maximum":10.0,"minimum":0.1,"title":"Gamma","default":1}},"type":"object","title":"ColorGrading"},"CommentBody":{"properties":{"repo":{"type":"string","maxLength":140,"title":"Repo"},"number":{"type":"integer","title":"Number"},"body":{"type":"string","maxLength":65000,"minLength":1,"title":"Body"}},"type":"object","required":["repo","number","body"],"title":"CommentBody"},"CompactBody":{"properties":{"keep_recent":{"type":"integer","maximum":50.0,"minimum":2.0,"title":"Keep Recent","description":"Number of most-recent messages to preserve verbatim; everything older is summarized into one synthetic message.","default":10}},"type":"object","title":"CompactBody"},"ComplianceAckRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"kind":{"type":"string","title":"Kind"},"version":{"type":"string","title":"Version"},"text_hash":{"type":"string","title":"Text Hash"}},"type":"object","required":["user_id","kind","version","text_hash"],"title":"ComplianceAckRequest"},"ComposePostCreate":{"properties":{"title":{"type":"string","title":"Title","default":"Untitled"},"body_md":{"type":"string","title":"Body Md","default":""},"mode":{"type":"string","title":"Mode","default":"canvas"}},"type":"object","title":"ComposePostCreate"},"ComposePostUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Md"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},"type":"object","title":"ComposePostUpdate"},"ComposeRequest":{"properties":{"topic":{"type":"string","title":"Topic","description":"Compose topic — currently only day_summary","default":"day_summary"}},"type":"object","title":"ComposeRequest","description":"POST /api/zugaos/compose body. Phase 5a only supports topic='day_summary';\nfuture topics extend this enum (week_summary, last_session, etc)."},"ComposeResponse":{"properties":{"response":{"type":"string","title":"Response"},"sources_used":{"items":{"type":"string"},"type":"array","title":"Sources Used"},"voice_mode":{"type":"string","title":"Voice Mode"},"fallback":{"type":"boolean","title":"Fallback","description":"True when synthesis had no data to work with","default":false}},"type":"object","required":["response","voice_mode"],"title":"ComposeResponse","description":"Output of /api/zugaos/compose."},"ComputerUseRequest":{"properties":{"requester":{"type":"string","title":"Requester"},"task":{"type":"string","title":"Task"},"target":{"type":"string","title":"Target","default":""},"target_type":{"type":"string","title":"Target Type","default":"desktop_app"},"model":{"type":"string","title":"Model","default":"claude-sonnet-4-6"},"max_iterations":{"type":"integer","title":"Max Iterations","default":15},"max_cost_usd":{"type":"number","title":"Max Cost Usd","default":1.0},"width":{"type":"integer","title":"Width","default":1280},"height":{"type":"integer","title":"Height","default":800}},"type":"object","required":["requester","task"],"title":"ComputerUseRequest","description":"Request to execute a Computer Use session."},"ComputerUseResponse":{"properties":{"session_id":{"type":"integer","title":"Session Id"},"success":{"type":"boolean","title":"Success"},"iterations":{"type":"integer","title":"Iterations"},"total_cost_usd":{"type":"number","title":"Total Cost Usd"},"screenshot_count":{"type":"integer","title":"Screenshot Count"},"action_count":{"type":"integer","title":"Action Count"},"duration_ms":{"type":"integer","title":"Duration Ms"},"final_message":{"type":"string","title":"Final Message","default":""},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"actions_log":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Actions Log","default":[]}},"type":"object","required":["session_id","success","iterations","total_cost_usd","screenshot_count","action_count","duration_ms"],"title":"ComputerUseResponse","description":"Result of a Computer Use execution."},"ConsentState":{"properties":{"health_collected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Health Collected At"},"ai_sharing_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ai Sharing At"},"age_confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Age Confirmed At"},"deletion_requested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deletion Requested At"},"zugabot_connection_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Zugabot Connection At"},"consent_version":{"type":"integer","title":"Consent Version","default":0},"current_version":{"type":"integer","title":"Current Version","default":0}},"type":"object","required":["health_collected_at","ai_sharing_at","age_confirmed_at","deletion_requested_at"],"title":"ConsentState"},"ContactRequest":{"properties":{"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"sms_enabled":{"type":"boolean","title":"Sms Enabled","default":true},"push_enabled":{"type":"boolean","title":"Push Enabled","default":true}},"type":"object","title":"ContactRequest"},"ContactResponse":{"properties":{"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"phone_verified":{"type":"boolean","title":"Phone Verified"},"sms_enabled":{"type":"boolean","title":"Sms Enabled"},"push_enabled":{"type":"boolean","title":"Push Enabled"},"push_subscribed":{"type":"boolean","title":"Push Subscribed"}},"type":"object","required":["phone","phone_verified","sms_enabled","push_enabled","push_subscribed"],"title":"ContactResponse"},"ConversationStarter":{"properties":{"text":{"type":"string","title":"Text"},"source":{"type":"string","title":"Source"}},"type":"object","required":["text","source"],"title":"ConversationStarter"},"CostEstimate":{"properties":{"provider":{"type":"string","title":"Provider"},"estimated_duration_seconds":{"type":"number","title":"Estimated Duration Seconds"},"estimated_tokens":{"type":"number","title":"Estimated Tokens"},"token_rate":{"type":"number","title":"Token Rate"}},"type":"object","required":["provider","estimated_duration_seconds","estimated_tokens","token_rate"],"title":"CostEstimate"},"CreateBody":{"properties":{"repo":{"type":"string","maxLength":140,"title":"Repo"},"title":{"type":"string","maxLength":300,"minLength":1,"title":"Title"},"body":{"type":"string","maxLength":65000,"title":"Body","default":""}},"type":"object","required":["repo","title"],"title":"CreateBody"},"CreateCollectionRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateCollectionRequest"},"CreateFileRequest":{"properties":{"path":{"type":"string","title":"Path"},"type":{"type":"string","title":"Type","default":"file"},"content":{"type":"string","title":"Content","default":""}},"type":"object","required":["path"],"title":"CreateFileRequest"},"CreateListBody":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["name"],"title":"CreateListBody"},"CreateResponse":{"properties":{"code":{"type":"string","title":"Code"},"room_id":{"type":"string","title":"Room Id"},"ws_url":{"type":"string","title":"Ws Url"}},"type":"object","required":["code","room_id","ws_url"],"title":"CreateResponse"},"CurriculumCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"type":"string","title":"Description","default":""},"estimated_weeks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Weeks"}},"type":"object","required":["title"],"title":"CurriculumCreate"},"CurriculumGenerate":{"properties":{"goal":{"type":"string","maxLength":500,"minLength":3,"title":"Goal"},"timeframe":{"type":"string","title":"Timeframe","default":"4 weeks"},"level":{"type":"string","title":"Level","default":"beginner"}},"type":"object","required":["goal"],"title":"CurriculumGenerate"},"DailyChallengeResponse":{"properties":{"challenge_key":{"type":"string","title":"Challenge Key"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"xp_reward":{"type":"integer","title":"Xp Reward"},"is_completed":{"type":"boolean","title":"Is Completed"},"is_ai_generated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Ai Generated","default":false},"goal_connection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal Connection"}},"type":"object","required":["challenge_key","title","description","xp_reward","is_completed"],"title":"DailyChallengeResponse"},"DailyCheckInResponse":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"habits":{"items":{"$ref":"#/components/schemas/HabitCheckInItem"},"type":"array","title":"Habits"},"completed_count":{"type":"integer","title":"Completed Count"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["date","habits","completed_count","total_count"],"title":"DailyCheckInResponse"},"DailyLoginResponse":{"properties":{"current_streak":{"type":"integer","title":"Current Streak"},"longest_streak":{"type":"integer","title":"Longest Streak"},"already_claimed":{"type":"boolean","title":"Already Claimed"},"granted":{"items":{"type":"string"},"type":"array","title":"Granted"},"tokens_granted":{"type":"integer","title":"Tokens Granted","default":0}},"type":"object","required":["current_streak","longest_streak","already_claimed","granted"],"title":"DailyLoginResponse"},"DayHistory":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"completed_count":{"type":"integer","title":"Completed Count"},"total_active":{"type":"integer","title":"Total Active"},"completion_rate":{"type":"number","title":"Completion Rate"},"habits_done":{"items":{"type":"string"},"type":"array","title":"Habits Done"}},"type":"object","required":["date","completed_count","total_active","completion_rate","habits_done"],"title":"DayHistory"},"DayOfWeekEntry":{"properties":{"day":{"type":"string","title":"Day"},"avg_valence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Valence"},"entries":{"type":"integer","title":"Entries"}},"type":"object","required":["day","avg_valence","entries"],"title":"DayOfWeekEntry"},"DayOfWeekResult":{"properties":{"days":{"items":{"$ref":"#/components/schemas/DayOfWeekEntry"},"type":"array","title":"Days"},"description":{"type":"string","title":"Description"}},"type":"object","required":["days","description"],"title":"DayOfWeekResult"},"DeleteFileRequest":{"properties":{"path":{"type":"string","title":"Path"}},"type":"object","required":["path"],"title":"DeleteFileRequest"},"DeleteResponse":{"properties":{"status":{"type":"string","title":"Status"},"deletion_requested_at":{"type":"string","format":"date-time","title":"Deletion Requested At"},"sla_days":{"type":"integer","title":"Sla Days"},"purged":{"additionalProperties":true,"type":"object","title":"Purged"}},"type":"object","required":["status","deletion_requested_at","sla_days","purged"],"title":"DeleteResponse"},"DesktopCodeResponse":{"properties":{"code":{"type":"string","title":"Code"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["code","expires_in"],"title":"DesktopCodeResponse","description":"A single-use handoff code — deliberately carries no token (D55)."},"DesktopExchangeRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"DesktopExchangeRequest"},"DeviceTrackingUpdate":{"properties":{"tracked":{"type":"boolean","title":"Tracked"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["tracked"],"title":"DeviceTrackingUpdate"},"DistributionCreate":{"properties":{"platform":{"type":"string","title":"Platform"},"caption":{"type":"string","title":"Caption","default":""},"hashtags":{"items":{"type":"string"},"type":"array","title":"Hashtags"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"source_url":{"type":"string","title":"Source Url","default":""},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["platform"],"title":"DistributionCreate"},"DistributionOut":{"properties":{"id":{"type":"integer","title":"Id"},"project_id":{"type":"integer","title":"Project Id"},"platform":{"type":"string","title":"Platform"},"caption":{"type":"string","title":"Caption"},"hashtags":{"items":{"type":"string"},"type":"array","title":"Hashtags","default":[]},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"status":{"type":"string","title":"Status"},"source_url":{"type":"string","title":"Source Url","default":""},"output_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Url"},"bundle_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Dir"},"notes":{"type":"string","title":"Notes","default":""},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"posted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Posted At"},"budget":{"anyOf":[{"$ref":"#/components/schemas/CaptionBudget"},{"type":"null"}]}},"type":"object","required":["id","project_id","platform","caption","status","created_at","updated_at"],"title":"DistributionOut"},"DistributionStatusUpdate":{"properties":{"status":{"type":"string","enum":["draft","approved","rendered","posted"],"title":"Status"}},"type":"object","required":["status"],"title":"DistributionStatusUpdate"},"DistributionUpdate":{"properties":{"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hashtags"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"DistributionUpdate"},"DocChatMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"DocChatMessage"},"DocChatRequest":{"properties":{"doc_title":{"type":"string","title":"Doc Title","default":""},"doc_content":{"type":"string","title":"Doc Content","default":""},"message":{"type":"string","title":"Message"},"history":{"items":{"$ref":"#/components/schemas/DocChatMessage"},"type":"array","title":"History","default":[]},"model":{"type":"string","enum":["haiku","gpt4o","gemini","grok"],"title":"Model","default":"haiku"},"doc_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Doc Id"}},"type":"object","required":["message"],"title":"DocChatRequest"},"DocChatResponse":{"properties":{"reply":{"type":"string","title":"Reply"}},"type":"object","required":["reply"],"title":"DocChatResponse"},"DocCreate":{"properties":{"title":{"type":"string","title":"Title","default":"Untitled"},"folder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Folder Id"},"content_md":{"type":"string","title":"Content Md","default":""}},"type":"object","title":"DocCreate"},"DocUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"folder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Folder Id"},"content_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Md"}},"type":"object","title":"DocUpdate"},"DraftRequest":{"properties":{"brief":{"type":"string","title":"Brief"},"cards":{"items":{"$ref":"#/components/schemas/SourceCardIn"},"type":"array","title":"Cards","default":[]},"mode":{"type":"string","title":"Mode","default":"atomize"}},"type":"object","required":["brief"],"title":"DraftRequest"},"DriftAuditPayload":{"properties":{"session_id":{"type":"string","maxLength":64,"minLength":1,"title":"Session Id"},"turn_index":{"type":"integer","minimum":0.0,"title":"Turn Index"},"game_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Game Name"},"user_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Text"},"assistant_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Text"},"forced_search_fired":{"type":"boolean","title":"Forced Search Fired","default":false},"forced_search_sources":{"items":{"type":"string"},"type":"array","title":"Forced Search Sources"},"structured_claims":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structured Claims"},"regex_claims":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"Regex Claims"},"cache_anchor_at_turn":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Cache Anchor At Turn"},"prior_claims_count":{"type":"integer","minimum":0.0,"title":"Prior Claims Count","default":0}},"type":"object","required":["session_id","turn_index"],"title":"DriftAuditPayload"},"EasingType":{"type":"string","enum":["linear","ease-in","ease-out","ease-in-out"],"title":"EasingType"},"EnhanceResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"image_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Data"},"operation":{"type":"string","title":"Operation","default":""},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"duration_seconds":{"type":"number","title":"Duration Seconds","default":0.0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"EnhanceResponse"},"EntityConfirm":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"entity_type":{"type":"string","title":"Entity Type","default":"person"},"stance":{"type":"string","title":"Stance","default":"unknown"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["name"],"title":"EntityConfirm"},"EquipRequest":{"properties":{"hat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hat Id"},"eyes_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eyes Id"},"skin_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Skin Id"},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"ears_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Ears Id"},"mouth_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Mouth Id"}},"type":"object","title":"EquipRequest"},"EscalationPathResponse":{"properties":{"target_type":{"type":"string","title":"Target Type"},"tiers":{"items":{"type":"string"},"type":"array","title":"Tiers"},"estimated_cost":{"type":"number","title":"Estimated Cost"}},"type":"object","required":["target_type","tiers","estimated_cost"],"title":"EscalationPathResponse","description":"Shows which tiers will be attempted for a target type."},"EstimateRequest":{"properties":{"operation":{"type":"string","title":"Operation","description":"Operation: generate, inpaint, upscale"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Specific provider"},"size":{"type":"string","title":"Size","description":"Image dimensions","default":"1024x1024"},"quality":{"type":"string","title":"Quality","description":"Quality level","default":"standard"},"scale":{"type":"integer","maximum":10.0,"minimum":2.0,"title":"Scale","description":"Upscale factor","default":4}},"type":"object","required":["operation"],"title":"EstimateRequest"},"EstimateResponse":{"properties":{"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"all_providers":{"additionalProperties":true,"type":"object","title":"All Providers","default":{}}},"type":"object","title":"EstimateResponse"},"EventEmit":{"properties":{"type":{"type":"string","title":"Type"},"user_id":{"type":"string","title":"User Id"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["type","user_id","data"],"title":"EventEmit"},"ExerciseCreate":{"properties":{"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category","default":"strength"},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"},"equipment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment"},"primary_muscles":{"type":"string","title":"Primary Muscles","default":""},"secondary_muscles":{"type":"string","title":"Secondary Muscles","default":""}},"type":"object","required":["name"],"title":"ExerciseCreate"},"ExerciseInput":{"properties":{"exercise_id":{"type":"integer","title":"Exercise Id"},"order":{"type":"integer","title":"Order","default":0},"sets":{"items":{"$ref":"#/components/schemas/SetInput"},"type":"array","title":"Sets","default":[]}},"type":"object","required":["exercise_id"],"title":"ExerciseInput"},"ExerciseResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"},"equipment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment"},"primary_muscles":{"items":{"type":"string"},"type":"array","title":"Primary Muscles"},"secondary_muscles":{"items":{"type":"string"},"type":"array","title":"Secondary Muscles"},"is_custom":{"type":"boolean","title":"Is Custom"},"catalog_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Catalog Id"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","name","category","level","equipment","primary_muscles","secondary_muscles","is_custom","catalog_id","created_at"],"title":"ExerciseResponse"},"ExportFormat":{"type":"string","enum":["mp4","webm","mov","gif"],"title":"ExportFormat"},"ExportJobOut":{"properties":{"job_uuid":{"type":"string","title":"Job Uuid"},"status":{"type":"string","title":"Status"},"progress":{"type":"number","title":"Progress"},"format":{"type":"string","title":"Format"},"quality":{"type":"string","title":"Quality"},"resolution":{"type":"string","title":"Resolution"},"output_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Url"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"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":["job_uuid","status","progress","format","quality","resolution","created_at"],"title":"ExportJobOut"},"ExportJobStatus":{"properties":{"id":{"type":"integer","title":"Id"},"format":{"type":"string","title":"Format"},"status":{"type":"string","title":"Status"},"progress":{"type":"number","title":"Progress"},"output_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Path"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"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","format","status","progress","created_at"],"title":"ExportJobStatus"},"ExportOptions":{"properties":{"format":{"$ref":"#/components/schemas/ExportFormat","default":"mp4"},"quality":{"$ref":"#/components/schemas/ExportQuality","default":"standard"},"resolution":{"$ref":"#/components/schemas/ExportResolution","default":"1080p"},"fps":{"type":"integer","maximum":60.0,"minimum":12.0,"title":"Fps","default":30},"range":{"anyOf":[{"$ref":"#/components/schemas/TimeRange"},{"type":"null"}]},"include_audio":{"type":"boolean","title":"Include Audio","default":true},"video_codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Codec"},"audio_codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Codec"},"video_bitrate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Video Bitrate"},"audio_bitrate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audio Bitrate"}},"type":"object","title":"ExportOptions"},"ExportQuality":{"type":"string","enum":["draft","standard","high","ultra"],"title":"ExportQuality"},"ExportResolution":{"type":"string","enum":["480p","720p","1080p","4k"],"title":"ExportResolution"},"FanoutRequest":{"properties":{"source_id":{"type":"string","title":"Source Id"},"title":{"type":"string","title":"Title"},"body":{"type":"string","title":"Body","default":""},"deep_link":{"type":"string","title":"Deep Link","default":"/code/reviews"},"tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},"type":"object","required":["source_id","title"],"title":"FanoutRequest"},"FeedResponse":{"properties":{"cards":{"items":{"$ref":"#/components/schemas/CardOut"},"type":"array","title":"Cards"},"next_cursor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["cards"],"title":"FeedResponse"},"FolderCreate":{"properties":{"name":{"type":"string","title":"Name"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"}},"type":"object","required":["name"],"title":"FolderCreate"},"ForecastResult":{"properties":{"forecast_valence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Forecast Valence"},"forecast_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Forecast Label"},"confidence":{"type":"string","title":"Confidence"},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"},"description":{"type":"string","title":"Description"}},"type":"object","required":["forecast_valence","forecast_label","confidence","description"],"title":"ForecastResult"},"ForgeCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"type":{"type":"string","title":"Type","description":"widget | app | theme | automation"},"category":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Category"},"source_html":{"anyOf":[{"type":"string","maxLength":51200},{"type":"null"}],"title":"Source Html"},"source_css":{"anyOf":[{"type":"string","maxLength":20480},{"type":"null"}],"title":"Source Css"},"source_js":{"anyOf":[{"type":"string","maxLength":51200},{"type":"null"}],"title":"Source Js"},"theme_css":{"anyOf":[{"type":"string","maxLength":10240},{"type":"null"}],"title":"Theme Css"},"theme_font":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Theme Font"},"thumbnail_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Thumbnail Url"},"tags":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Tags"}},"type":"object","required":["name","type"],"title":"ForgeCreateRequest"},"ForgeCreationDetail":{"properties":{"id":{"type":"integer","title":"Id"},"creator_id":{"type":"string","title":"Creator Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"type":"string","title":"Type"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"status":{"type":"string","title":"Status"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"visibility":{"type":"string","title":"Visibility"},"price_tokens":{"type":"integer","title":"Price Tokens"},"installs":{"type":"integer","title":"Installs"},"rating_sum":{"type":"number","title":"Rating Sum"},"rating_count":{"type":"integer","title":"Rating Count"},"version":{"type":"integer","title":"Version"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"},"theme_font":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Font"},"auto_improve":{"type":"boolean","title":"Auto Improve","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"source_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Html"},"source_css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Css"},"source_js":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Js"},"theme_css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Css"},"permissions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permissions"},"legacy_theme_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legacy Theme Id"}},"type":"object","required":["id","creator_id","name","description","type","category","status","thumbnail_url","visibility","price_tokens","installs","rating_sum","rating_count","version","parent_id","tags","theme_font","created_at","updated_at"],"title":"ForgeCreationDetail","description":"Full detail including source code — for single-item GET."},"ForgeCreationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"creator_id":{"type":"string","title":"Creator Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"type":{"type":"string","title":"Type"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"status":{"type":"string","title":"Status"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"visibility":{"type":"string","title":"Visibility"},"price_tokens":{"type":"integer","title":"Price Tokens"},"installs":{"type":"integer","title":"Installs"},"rating_sum":{"type":"number","title":"Rating Sum"},"rating_count":{"type":"integer","title":"Rating Count"},"version":{"type":"integer","title":"Version"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"},"theme_font":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Font"},"auto_improve":{"type":"boolean","title":"Auto Improve","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","creator_id","name","description","type","category","status","thumbnail_url","visibility","price_tokens","installs","rating_sum","rating_count","version","parent_id","tags","theme_font","created_at","updated_at"],"title":"ForgeCreationResponse"},"ForgeCustomCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","default":"Untitled App"},"studio":{"type":"string","maxLength":50,"title":"Studio","default":"default"},"entrypoint":{"type":"string","maxLength":512,"title":"Entrypoint","default":"main.py"}},"type":"object","title":"ForgeCustomCreateRequest","description":"Create an empty custom creation to build from scratch (no generation)."},"ForgeCustomGenerateRequest":{"properties":{"spec":{"type":"string","maxLength":5000,"minLength":1,"title":"Spec"},"studio":{"type":"string","maxLength":50,"title":"Studio","default":"default"}},"type":"object","required":["spec"],"title":"ForgeCustomGenerateRequest","description":"Generate a multi-file `custom` creation from a natural-language spec."},"ForgeFeedbackRequest":{"properties":{"signal":{"type":"string","pattern":"^(up|down)$","title":"Signal"},"note":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Note"}},"type":"object","required":["signal"],"title":"ForgeFeedbackRequest","description":"A 👍/👎 signal on a creation, with an optional note (used on 👎 to steer the next improve)."},"ForgeFileWriteRequest":{"properties":{"path":{"type":"string","maxLength":512,"minLength":1,"title":"Path"},"content":{"type":"string","maxLength":200000,"title":"Content","default":""}},"type":"object","required":["path"],"title":"ForgeFileWriteRequest","description":"Create or overwrite one file in a custom creation's tree (scratch/editor mode)."},"ForgeImproveRequest":{"properties":{"instructions":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Instructions"}},"type":"object","title":"ForgeImproveRequest","description":"Optional steer for an improvement pass; empty = general 'make it better'."},"ForgeInstallRequest":{"properties":{"studio":{"type":"string","maxLength":50,"title":"Studio"},"position":{"anyOf":[{"$ref":"#/components/schemas/ForgePositionUpdate"},{"type":"null"}]}},"type":"object","required":["studio"],"title":"ForgeInstallRequest"},"ForgeInstallResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"string","title":"User Id"},"creation_id":{"type":"integer","title":"Creation Id"},"studio":{"type":"string","title":"Studio"},"pos_x":{"type":"integer","title":"Pos X"},"pos_y":{"type":"integer","title":"Pos Y"},"pos_w":{"type":"integer","title":"Pos W"},"pos_h":{"type":"integer","title":"Pos H"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","creation_id","studio","pos_x","pos_y","pos_w","pos_h","enabled","created_at"],"title":"ForgeInstallResponse"},"ForgeInternalCreateRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","maxLength":100,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"type":{"type":"string","title":"Type"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"source_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Html"},"source_css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Css"},"source_js":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Js"},"theme_css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Css"},"theme_font":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Font"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags"},"auto_deploy":{"type":"boolean","title":"Auto Deploy","description":"If true, set status to 'live' immediately","default":true}},"type":"object","required":["user_id","name","type"],"title":"ForgeInternalCreateRequest","description":"Service-to-service creation from Zugabot."},"ForgeInternalListRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"Optional type filter: widget | app | theme | studio | function"}},"type":"object","required":["user_id"],"title":"ForgeInternalListRequest","description":"Service-to-service list from Zugabot — list one user's creations."},"ForgeInvokeRequest":{"properties":{"args":{"additionalProperties":true,"type":"object","title":"Args"}},"type":"object","title":"ForgeInvokeRequest","description":"Arguments passed to a Forge Function's handler(args)."},"ForgePositionUpdate":{"properties":{"x":{"type":"integer","minimum":0.0,"title":"X","default":0},"y":{"type":"integer","minimum":0.0,"title":"Y","default":0},"w":{"type":"integer","maximum":24.0,"exclusiveMinimum":0.0,"title":"W","default":6},"h":{"type":"integer","maximum":24.0,"exclusiveMinimum":0.0,"title":"H","default":4}},"type":"object","title":"ForgePositionUpdate"},"ForgeReviewRequest":{"properties":{"rating":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Rating"},"review_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Review Text"}},"type":"object","required":["rating"],"title":"ForgeReviewRequest","description":"A verified buyer's rating (1-5) + optional text. Upserted per (user, creation)."},"ForgeSecretInfo":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","created_at"],"title":"ForgeSecretInfo","description":"Public view of a stored secret — NAME only, never the value."},"ForgeSecretRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","title":"Name"},"value":{"type":"string","maxLength":4096,"minLength":1,"title":"Value"}},"type":"object","required":["name","value"],"title":"ForgeSecretRequest","description":"Store an outbound API key for a creation. Value is write-only (never read back)."},"ForgeStateUpdate":{"properties":{"state":{"additionalProperties":true,"type":"object","title":"State"}},"type":"object","required":["state"],"title":"ForgeStateUpdate"},"ForgeTasteOnboardRequest":{"properties":{"picks":{"items":{"type":"string"},"type":"array","maxItems":8,"minItems":1,"title":"Picks"},"studio":{"type":"string","maxLength":50,"title":"Studio","default":"default"}},"type":"object","required":["picks"],"title":"ForgeTasteOnboardRequest","description":"Seed a user's per-studio taste profile from visual archetype picks."},"ForgeUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"category":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Category"},"source_html":{"anyOf":[{"type":"string","maxLength":51200},{"type":"null"}],"title":"Source Html"},"source_css":{"anyOf":[{"type":"string","maxLength":20480},{"type":"null"}],"title":"Source Css"},"source_js":{"anyOf":[{"type":"string","maxLength":51200},{"type":"null"}],"title":"Source Js"},"theme_css":{"anyOf":[{"type":"string","maxLength":10240},{"type":"null"}],"title":"Theme Css"},"theme_font":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Theme Font"},"thumbnail_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Thumbnail Url"},"tags":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Tags"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"auto_improve":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Improve"},"price_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Price Tokens"}},"type":"object","title":"ForgeUpdateRequest"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"GameContextRequest":{"properties":{"game_name":{"type":"string","maxLength":64,"minLength":3,"title":"Game Name"},"force_refresh":{"type":"boolean","title":"Force Refresh","default":false}},"type":"object","required":["game_name"],"title":"GameContextRequest"},"GameContextResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"game_name":{"type":"string","title":"Game Name"},"slug":{"type":"string","title":"Slug"},"patch_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patch Notes"},"meta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta"},"sources":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sources"},"fetched_at":{"type":"integer","title":"Fetched At"},"age_seconds":{"type":"integer","title":"Age Seconds"},"cache_hit":{"type":"boolean","title":"Cache Hit"},"quota_remaining":{"type":"integer","title":"Quota Remaining"}},"type":"object","required":["ok","game_name","slug","patch_notes","meta","sources","fetched_at","age_seconds","cache_hit","quota_remaining"],"title":"GameContextResponse"},"GamerFinancialsResponse":{"properties":{"this_month_revenue_usd":{"type":"number","title":"This Month Revenue Usd"},"this_month_event_count":{"type":"integer","title":"This Month Event Count"},"all_time_revenue_usd":{"type":"number","title":"All Time Revenue Usd"},"all_time_event_count":{"type":"integer","title":"All Time Event Count"},"active_subs_total":{"type":"integer","title":"Active Subs Total"},"active_subs_pro":{"type":"integer","title":"Active Subs Pro"},"active_subs_ultra":{"type":"integer","title":"Active Subs Ultra"},"cancelled_subs":{"type":"integer","title":"Cancelled Subs"},"as_of":{"type":"string","title":"As Of"}},"type":"object","required":["this_month_revenue_usd","this_month_event_count","all_time_revenue_usd","all_time_event_count","active_subs_total","active_subs_pro","active_subs_ultra","cancelled_subs","as_of"],"title":"GamerFinancialsResponse","description":"Live revenue snapshot for ZugaGamerOverlay. Admin-only."},"GamificationDashboard":{"properties":{"xp":{"$ref":"#/components/schemas/XPStatusResponse"},"badges":{"items":{"$ref":"#/components/schemas/BadgeResponse"},"type":"array","title":"Badges"},"recent_xp":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Recent Xp"},"daily_challenges":{"items":{"$ref":"#/components/schemas/DailyChallengeResponse"},"type":"array","title":"Daily Challenges"},"weekly_quests":{"items":{"$ref":"#/components/schemas/WeeklyQuestResponse"},"type":"array","title":"Weekly Quests"}},"type":"object","required":["xp","badges","recent_xp","daily_challenges","weekly_quests"],"title":"GamificationDashboard"},"GenSpecRequest":{"properties":{"prompt":{"type":"string","maxLength":5000,"minLength":1,"title":"Prompt"},"studio":{"type":"string","title":"Studio","default":"default"},"page_context":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Page Context"}},"type":"object","required":["prompt"],"title":"GenSpecRequest"},"GenSpecResponse":{"properties":{"spec":{"type":"string","title":"Spec"},"estimated_complexity":{"type":"string","title":"Estimated Complexity"}},"type":"object","required":["spec","estimated_complexity"],"title":"GenSpecResponse"},"GenerateAnimationRequest":{"properties":{"project_id":{"type":"integer","title":"Project Id"},"description":{"type":"string","maxLength":1000,"minLength":3,"title":"Description"},"clip_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clip Name"}},"type":"object","required":["project_id","description"],"title":"GenerateAnimationRequest"},"GenerateBehaviorRequest":{"properties":{"project_id":{"type":"integer","title":"Project Id"},"personality":{"type":"string","maxLength":2000,"minLength":10,"title":"Personality"}},"type":"object","required":["project_id","personality"],"title":"GenerateBehaviorRequest"},"GenerateCharacterRequest":{"properties":{"description":{"type":"string","maxLength":1000,"minLength":3,"title":"Description"},"width":{"type":"integer","title":"Width","default":512},"height":{"type":"integer","title":"Height","default":512}},"type":"object","required":["description"],"title":"GenerateCharacterRequest"},"GenerateChatRequest":{"properties":{"project_id":{"type":"integer","title":"Project Id"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","maxItems":50,"minItems":1,"title":"Messages"},"clip_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Clip Id"}},"type":"object","required":["project_id","messages"],"title":"GenerateChatRequest"},"GenerateEditRequest":{"properties":{"project_id":{"type":"integer","title":"Project Id"},"instruction":{"type":"string","maxLength":1000,"minLength":3,"title":"Instruction"},"clip_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Clip Id"}},"type":"object","required":["project_id","instruction"],"title":"GenerateEditRequest"},"GenerateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"image_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Data"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Size"},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"},"revised_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revised Prompt"},"duration_seconds":{"type":"number","title":"Duration Seconds","default":0.0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"}},"type":"object","required":["success"],"title":"GenerateResponse"},"GenerateScriptRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"max_tokens":{"type":"integer","title":"Max Tokens","default":3000},"task":{"type":"string","title":"Task","default":"creative"}},"type":"object","required":["prompt"],"title":"GenerateScriptRequest"},"GenerateSuggestionsResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"concrete_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concrete Detail"},"suggestions":{"items":{"$ref":"#/components/schemas/SuggestionOut"},"type":"array","title":"Suggestions"},"tone":{"type":"string","title":"Tone","default":"casual"},"tokens_charged":{"type":"number","title":"Tokens Charged","default":0.0},"tokens_remaining":{"type":"number","title":"Tokens Remaining","default":0.0},"cached":{"type":"boolean","title":"Cached","default":false},"could_not_read":{"type":"boolean","title":"Could Not Read","default":false},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"anon_generations_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Anon Generations Remaining"}},"type":"object","required":["success"],"title":"GenerateSuggestionsResponse"},"GepContributeIn":{"properties":{"install_id":{"type":"string","title":"Install Id"},"discoveries":{"items":{"$ref":"#/components/schemas/GepDiscovery"},"type":"array","title":"Discoveries","default":[]}},"type":"object","required":["install_id"],"title":"GepContributeIn"},"GepDiscovery":{"properties":{"game_id":{"type":"integer","title":"Game Id"},"confirmed_features":{"items":{"type":"string"},"type":"array","title":"Confirmed Features","default":[]},"total_events":{"type":"integer","title":"Total Events","default":0}},"type":"object","required":["game_id"],"title":"GepDiscovery"},"GitAddRequest":{"properties":{"path":{"type":"string","title":"Path"},"files":{"items":{"type":"string"},"type":"array","title":"Files"}},"type":"object","required":["path","files"],"title":"GitAddRequest"},"GitCommitRequest":{"properties":{"path":{"type":"string","title":"Path"},"message":{"type":"string","title":"Message"}},"type":"object","required":["path","message"],"title":"GitCommitRequest"},"GitPullRequest":{"properties":{"path":{"type":"string","title":"Path"}},"type":"object","required":["path"],"title":"GitPullRequest"},"GitPushRequest":{"properties":{"path":{"type":"string","title":"Path"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}},"type":"object","required":["path"],"title":"GitPushRequest"},"GoalBody":{"properties":{"goal_type":{"type":"string","title":"Goal Type"},"target_metric":{"type":"string","title":"Target Metric"},"target_value":{"type":"number","title":"Target Value"},"baseline_value":{"type":"number","title":"Baseline Value","default":0.0},"target_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Date"}},"type":"object","required":["goal_type","target_metric","target_value"],"title":"GoalBody"},"GoalCreate":{"properties":{"title":{"type":"string","maxLength":300,"minLength":1,"title":"Title"},"motivation":{"type":"string","title":"Motivation","default":""},"target_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Date"}},"type":"object","required":["title"],"title":"GoalCreate"},"GoalCreateRequest":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"deadline":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Deadline"},"identity_statement":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Identity Statement"},"obstacle":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Obstacle"},"implementation_plan":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Implementation Plan"},"approach_reframe":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Approach Reframe"}},"type":"object","required":["title"],"title":"GoalCreateRequest"},"GoalFromTemplateRequest":{"properties":{"template_key":{"type":"string","maxLength":50,"minLength":1,"title":"Template Key"}},"type":"object","required":["template_key"],"title":"GoalFromTemplateRequest"},"GoalListResponse":{"properties":{"active":{"items":{"$ref":"#/components/schemas/GoalResponse"},"type":"array","title":"Active"},"completed":{"items":{"$ref":"#/components/schemas/GoalResponse"},"type":"array","title":"Completed"}},"type":"object","required":["active","completed"],"title":"GoalListResponse"},"GoalProgressRequest":{"properties":{"is_completed":{"type":"boolean","title":"Is Completed"}},"type":"object","required":["is_completed"],"title":"GoalProgressRequest"},"GoalResponse":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"deadline":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Deadline"},"is_completed":{"type":"boolean","title":"Is Completed"},"sort_order":{"type":"integer","title":"Sort Order"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"template_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Key"},"identity_statement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identity Statement"},"obstacle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Obstacle"},"implementation_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Implementation Plan"},"approach_reframe":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approach Reframe"},"milestones":{"items":{"$ref":"#/components/schemas/MilestoneResponse"},"type":"array","title":"Milestones"},"milestone_count":{"type":"integer","title":"Milestone Count","default":0},"milestone_done":{"type":"integer","title":"Milestone Done","default":0},"linked_habits":{"items":{"$ref":"#/components/schemas/LinkedHabitResponse"},"type":"array","title":"Linked Habits","default":[]}},"type":"object","required":["id","title","description","deadline","is_completed","sort_order","completed_at","created_at","updated_at","milestones"],"title":"GoalResponse"},"GoalTemplateResponse":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"suggested_habits":{"items":{"type":"string"},"type":"array","title":"Suggested Habits"},"already_adopted":{"type":"boolean","title":"Already Adopted","default":false}},"type":"object","required":["key","title","description","suggested_habits"],"title":"GoalTemplateResponse"},"GoalUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"deadline":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Deadline"},"sort_order":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sort Order"},"identity_statement":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Identity Statement"},"obstacle":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Obstacle"},"implementation_plan":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Implementation Plan"},"approach_reframe":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Approach Reframe"}},"type":"object","title":"GoalUpdateRequest"},"GoogleLoginRequest":{"properties":{"credential":{"type":"string","title":"Credential"}},"type":"object","required":["credential"],"title":"GoogleLoginRequest"},"GrantTokensRequest":{"properties":{"user_id":{"type":"string","maxLength":255,"title":"User Id"},"amount":{"type":"number","maximum":100000.0,"exclusiveMinimum":0.0,"title":"Amount"},"reason":{"type":"string","maxLength":255,"title":"Reason","default":"admin_grant"}},"type":"object","required":["user_id","amount"],"title":"GrantTokensRequest"},"GrokChatRequest":{"properties":{"model":{"type":"string","maxLength":64,"title":"Model","default":"grok-3"},"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","minItems":1,"title":"Messages"},"max_tokens":{"type":"integer","maximum":4096.0,"minimum":1.0,"title":"Max Tokens","default":256},"temperature":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Temperature","default":0.9},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"tool_choice":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice"}},"type":"object","required":["messages"],"title":"GrokChatRequest","description":"Grok (xAI) chat completion request — OpenAI-compatible shape,\nmatches what the client already builds in api-proxy.ts's api:grok /\napi:grok-stream handlers."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HabitCheckInItem":{"properties":{"habit":{"$ref":"#/components/schemas/HabitDefinitionResponse"},"logged":{"type":"boolean","title":"Logged"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"log_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Log Id"}},"type":"object","required":["habit","logged"],"title":"HabitCheckInItem","description":"One habit's status for a given date."},"HabitCorrelation":{"properties":{"habit_name":{"type":"string","title":"Habit Name"},"habit_emoji":{"type":"string","title":"Habit Emoji"},"avg_mood_with":{"type":"number","title":"Avg Mood With"},"avg_mood_without":{"type":"number","title":"Avg Mood Without"},"delta":{"type":"number","title":"Delta"},"days_with":{"type":"integer","title":"Days With"},"days_without":{"type":"integer","title":"Days Without"}},"type":"object","required":["habit_name","habit_emoji","avg_mood_with","avg_mood_without","delta","days_with","days_without"],"title":"HabitCorrelation"},"HabitCorrelationsResult":{"properties":{"habits":{"items":{"$ref":"#/components/schemas/HabitCorrelation"},"type":"array","title":"Habits"},"description":{"type":"string","title":"Description"}},"type":"object","required":["habits","description"],"title":"HabitCorrelationsResult"},"HabitCreateRequest":{"properties":{"name":{"type":"string","maxLength":50,"minLength":1,"title":"Name"},"emoji":{"type":"string","maxLength":32,"minLength":1,"title":"Emoji"},"unit":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Unit"},"default_target":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Default Target"},"trigger":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Trigger"}},"type":"object","required":["name","emoji"],"title":"HabitCreateRequest"},"HabitDefinitionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"emoji":{"type":"string","title":"Emoji"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"default_target":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Target"},"is_preset":{"type":"boolean","title":"Is Preset"},"is_active":{"type":"boolean","title":"Is Active"},"sort_order":{"type":"integer","title":"Sort Order"},"weekly_target":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Weekly Target"},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"full_target":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Full Target"},"can_escalate":{"type":"boolean","title":"Can Escalate","default":false}},"type":"object","required":["id","name","emoji","unit","default_target","is_preset","is_active","sort_order","weekly_target","trigger","created_at"],"title":"HabitDefinitionResponse"},"HabitHistoryResponse":{"properties":{"days":{"items":{"$ref":"#/components/schemas/DayHistory"},"type":"array","title":"Days"},"period_days":{"type":"integer","title":"Period Days"}},"type":"object","required":["days","period_days"],"title":"HabitHistoryResponse"},"HabitInsightListResponse":{"properties":{"insights":{"items":{"$ref":"#/components/schemas/HabitInsightResponse"},"type":"array","title":"Insights"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["insights","total"],"title":"HabitInsightListResponse"},"HabitInsightResponse":{"properties":{"id":{"type":"integer","title":"Id"},"content":{"type":"string","title":"Content"},"model_used":{"type":"string","title":"Model Used"},"cost":{"type":"number","title":"Cost"},"week_start":{"type":"string","format":"date","title":"Week Start"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","content","model_used","cost","week_start","created_at"],"title":"HabitInsightResponse"},"HabitLinkRequest":{"properties":{"habit_id":{"type":"integer","title":"Habit Id"}},"type":"object","required":["habit_id"],"title":"HabitLinkRequest"},"HabitLogRequest":{"properties":{"habit_id":{"type":"integer","title":"Habit Id"},"completed":{"type":"boolean","title":"Completed","default":true},"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Amount"},"log_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Log Date"}},"type":"object","required":["habit_id"],"title":"HabitLogRequest"},"HabitLogResponse":{"properties":{"id":{"type":"integer","title":"Id"},"habit_id":{"type":"integer","title":"Habit Id"},"log_date":{"type":"string","format":"date","title":"Log Date"},"completed":{"type":"boolean","title":"Completed"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","habit_id","log_date","completed","amount","created_at"],"title":"HabitLogResponse"},"HabitStreakInfo":{"properties":{"habit_id":{"type":"integer","title":"Habit Id"},"habit_name":{"type":"string","title":"Habit Name"},"habit_emoji":{"type":"string","title":"Habit Emoji"},"current_streak":{"type":"integer","title":"Current Streak"},"longest_streak":{"type":"integer","title":"Longest Streak"}},"type":"object","required":["habit_id","habit_name","habit_emoji","current_streak","longest_streak"],"title":"HabitStreakInfo"},"HabitUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Name"},"emoji":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}],"title":"Emoji"},"unit":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Unit"},"default_target":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Default Target"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"sort_order":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sort Order"},"weekly_target":{"anyOf":[{"type":"integer","maximum":7.0,"minimum":1.0},{"type":"null"}],"title":"Weekly Target"},"trigger":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Trigger"}},"type":"object","title":"HabitUpdateRequest"},"HeartbeatRequest":{"properties":{"machine":{"type":"string","title":"Machine","default":""},"version":{"type":"string","title":"Version","default":""}},"type":"object","title":"HeartbeatRequest"},"HistoryEntry":{"properties":{"version":{"type":"integer","title":"Version"},"sheet_id":{"type":"string","title":"Sheet Id"},"cell_ref":{"type":"string","title":"Cell Ref"},"value":{"anyOf":[{},{"type":"null"}],"title":"Value"},"formula":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Formula"},"written_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Written By User Id"},"written_by_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Written By Agent"},"ts":{"type":"string","format":"date-time","title":"Ts"}},"type":"object","required":["version","sheet_id","cell_ref","value","formula","written_by_user_id","written_by_agent","ts"],"title":"HistoryEntry"},"IdentityBody":{"properties":{"user_id":{"type":"string","maxLength":255,"title":"User Id"},"github_login":{"type":"string","maxLength":255,"title":"Github Login"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["user_id","github_login"],"title":"IdentityBody"},"ImportResultOut":{"properties":{"created":{"type":"integer","title":"Created"},"folders":{"type":"integer","title":"Folders"},"skipped_count":{"type":"integer","title":"Skipped Count"},"skipped":{"items":{"type":"string"},"type":"array","title":"Skipped","default":[]}},"type":"object","required":["created","folders","skipped_count"],"title":"ImportResultOut"},"IngestBody":{"properties":{"title":{"type":"string","title":"Title","default":"Zugabot Note"},"content_md":{"type":"string","title":"Content Md","default":""},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder"}},"type":"object","title":"IngestBody"},"InsightResponse":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"insight_type":{"type":"string","title":"Insight Type"},"task_type_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type Key"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"requester":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester"},"metric_name":{"type":"string","title":"Metric Name"},"metric_value":{"type":"number","title":"Metric Value"},"sample_size":{"type":"integer","title":"Sample Size"},"details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Details"}},"type":"object","required":["id","created_at","insight_type","metric_name","metric_value","sample_size"],"title":"InsightResponse"},"InsightSummaryResponse":{"properties":{"top_task_types":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Top Task Types"},"tier_recommendations":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Tier Recommendations"},"cost_accuracy":{"type":"number","title":"Cost Accuracy"},"overall_success_rate":{"type":"number","title":"Overall Success Rate"},"requester_breakdown":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Requester Breakdown"}},"type":"object","required":["top_task_types","tier_recommendations","cost_accuracy","overall_success_rate","requester_breakdown"],"title":"InsightSummaryResponse"},"IntentSelection":{"properties":{"studio":{"type":"string","title":"Studio"},"intent":{"type":"string","title":"Intent"},"args":{"additionalProperties":true,"type":"object","title":"Args"},"reasoning":{"type":"string","title":"Reasoning","description":"Short rationale Claude provided for the pick","default":""},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","default":0.0}},"type":"object","required":["studio","intent"],"title":"IntentSelection","description":"The router's choice for one utterance — which studio + intent + args.\n\nPhase 3 returns this WITHOUT dispatching. Dispatch is Phase 5's job; the\nseam between selection and execution is intentional so the router can be\ntested in isolation and so the composer can stitch multiple selections\ninto one response."},"InternalApplyThemeRequest":{"properties":{"user_id":{"type":"string","maxLength":64,"title":"User Id"},"scope":{"type":"string","maxLength":30,"title":"Scope","default":"app"},"css_override":{"type":"string","maxLength":10000,"title":"Css Override"},"theme_name":{"type":"string","maxLength":100,"title":"Theme Name","default":"Custom"},"font":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Font"},"preset_id":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Preset Id"}},"type":"object","required":["user_id","css_override"],"title":"InternalApplyThemeRequest","description":"Service-to-service request from Zugabot."},"InternalThemeRequest":{"properties":{"user_id":{"type":"string","title":"User Id","description":"Target user ID"},"custom_colors":{"type":"string","title":"Custom Colors","description":"JSON string with css + name + font"},"theme_preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme Preset","description":"Optional preset ID to set"}},"type":"object","required":["user_id","custom_colors"],"title":"InternalThemeRequest"},"IssueCodesRequest":{"properties":{"count":{"type":"integer","title":"Count","default":1},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"grants_founder":{"type":"boolean","title":"Grants Founder","default":true}},"type":"object","title":"IssueCodesRequest"},"ItemBankResponse":{"properties":{"instrument":{"type":"string","title":"Instrument"},"items":{"items":{"$ref":"#/components/schemas/PersonalityItem"},"type":"array","title":"Items"}},"type":"object","required":["instrument","items"],"title":"ItemBankResponse"},"JoinRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"JoinRequest"},"JoinResponse":{"properties":{"room_id":{"type":"string","title":"Room Id"},"ws_url":{"type":"string","title":"Ws Url"}},"type":"object","required":["room_id","ws_url"],"title":"JoinResponse"},"JournalCreateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"content":{"type":"string","maxLength":50000,"minLength":1,"title":"Content"},"mood_emoji":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Mood Emoji"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10},{"type":"null"}],"title":"Tags"}},"type":"object","required":["content"],"title":"JournalCreateRequest"},"JournalEntryBrief":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content_preview":{"type":"string","title":"Content Preview"},"mood_emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood Emoji"},"mood_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood Label"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"reflection_count":{"type":"integer","title":"Reflection Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","title","content_preview","mood_emoji","mood_label","tags","reflection_count","created_at"],"title":"JournalEntryBrief","description":"Lightweight version for list views — no full content or reflections."},"JournalEntryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"string","title":"User Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"type":"string","title":"Content"},"mood_emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood Emoji"},"mood_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood Label"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"reflections":{"items":{"$ref":"#/components/schemas/JournalReflectionResponse"},"type":"array","title":"Reflections"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","title","content","mood_emoji","mood_label","reflections","created_at","updated_at"],"title":"JournalEntryResponse"},"JournalListResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/JournalEntryBrief"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entries","total"],"title":"JournalListResponse"},"JournalReflectResponse":{"properties":{"reflection":{"$ref":"#/components/schemas/JournalReflectionResponse"},"remaining":{"type":"integer","title":"Remaining"}},"type":"object","required":["reflection","remaining"],"title":"JournalReflectResponse"},"JournalReflectionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"content":{"type":"string","title":"Content"},"model_used":{"type":"string","title":"Model Used"},"cost":{"type":"number","title":"Cost"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","content","model_used","cost","created_at"],"title":"JournalReflectionResponse"},"KeyframeRequest":{"properties":{"slot":{"type":"string","enum":["in","out"],"title":"Slot","default":"in"},"critique":{"type":"boolean","title":"Critique","default":true},"auto_reroll":{"type":"boolean","title":"Auto Reroll","default":false},"max_rounds":{"type":"integer","maximum":3.0,"minimum":1.0,"title":"Max Rounds","default":3}},"type":"object","title":"KeyframeRequest"},"LeaveRequest":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"room_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Room Id"}},"type":"object","title":"LeaveRequest","description":"Accept either {code} or {room_id}; at least one is required."},"LeaveResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["ok"],"title":"LeaveResponse"},"LexiconEntryBody":{"properties":{"pattern":{"type":"string","title":"Pattern"},"direction":{"type":"string","title":"Direction"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["pattern","direction","domain"],"title":"LexiconEntryBody"},"LexiconRemoveBody":{"properties":{"pattern":{"type":"string","title":"Pattern"}},"type":"object","required":["pattern"],"title":"LexiconRemoveBody"},"LexiconRemoveTermBody":{"properties":{"term":{"type":"string","title":"Term"}},"type":"object","required":["term"],"title":"LexiconRemoveTermBody"},"LexiconTermBody":{"properties":{"term":{"type":"string","title":"Term"},"weight":{"type":"number","title":"Weight","default":1.0}},"type":"object","required":["term"],"title":"LexiconTermBody"},"LifeSettingsResponse":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"timezone":{"type":"string","title":"Timezone"},"theme":{"type":"string","title":"Theme"},"theme_opacity":{"type":"number","title":"Theme Opacity"},"theme_preset":{"type":"string","title":"Theme Preset","default":"default"},"med_length":{"type":"string","title":"Med Length","default":"medium"},"med_voice":{"type":"string","title":"Med Voice","default":"serene"},"med_ambience":{"type":"string","title":"Med Ambience","default":"rain"},"onboarding_completed":{"type":"boolean","title":"Onboarding Completed","default":false},"custom_colors":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Colors"}},"type":"object","required":["display_name","timezone","theme","theme_opacity"],"title":"LifeSettingsResponse"},"LifeSettingsUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Display Name"},"timezone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Timezone"},"theme":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Theme"},"theme_opacity":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Theme Opacity"},"theme_preset":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Theme Preset"},"med_length":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Med Length"},"med_voice":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Med Voice"},"med_ambience":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Med Ambience"},"custom_colors":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Custom Colors"}},"type":"object","title":"LifeSettingsUpdate","description":"Partial update — all fields optional."},"LimitUpdateRequest":{"properties":{"daily_limit":{"type":"number","title":"Daily Limit"}},"type":"object","required":["daily_limit"],"title":"LimitUpdateRequest"},"LinkedHabitResponse":{"properties":{"habit_id":{"type":"integer","title":"Habit Id"},"habit_name":{"type":"string","title":"Habit Name"},"habit_emoji":{"type":"string","title":"Habit Emoji"},"days_completed":{"type":"integer","title":"Days Completed"},"days_total":{"type":"integer","title":"Days Total"}},"type":"object","required":["habit_id","habit_name","habit_emoji","days_completed","days_total"],"title":"LinkedHabitResponse"},"ListImagesResponse":{"properties":{"images":{"items":{"$ref":"#/components/schemas/SavedImageInfo"},"type":"array","title":"Images"},"total":{"type":"integer","title":"Total"},"folder":{"type":"string","title":"Folder"}},"type":"object","required":["images","total","folder"],"title":"ListImagesResponse"},"ListReferencesResponse":{"properties":{"references":{"items":{"$ref":"#/components/schemas/ReferenceImageInfo"},"type":"array","title":"References"},"total":{"type":"integer","title":"Total"},"folder":{"type":"string","title":"Folder"}},"type":"object","required":["references","total","folder"],"title":"ListReferencesResponse"},"LoadoutResponse":{"properties":{"hat_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hat Id"},"eyes_id":{"type":"string","title":"Eyes Id"},"skin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skin Id"},"voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Id"},"ears_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ears Id"},"mouth_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mouth Id"}},"type":"object","required":["hat_id","eyes_id","skin_id","voice_id","ears_id","mouth_id"],"title":"LoadoutResponse"},"LoginRequest":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role","default":"user"}},"type":"object","required":["email"],"title":"LoginRequest"},"LoginResponse":{"properties":{"token":{"type":"string","title":"Token"},"user":{"additionalProperties":true,"type":"object","title":"User"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","required":["token","user"],"title":"LoginResponse"},"LudusSettingsPut":{"properties":{"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"client_updated_at":{"type":"integer","title":"Client Updated At","default":0}},"type":"object","required":["settings"],"title":"LudusSettingsPut"},"MarkPublishedBody":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"MarkPublishedBody"},"MeResponse":{"properties":{"unlocks":{"items":{"type":"string"},"type":"array","title":"Unlocks"},"loadout":{"$ref":"#/components/schemas/LoadoutResponse"}},"type":"object","required":["unlocks","loadout"],"title":"MeResponse"},"MeditationEffectivenessResult":{"properties":{"avg_delta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Delta"},"sessions_analyzed":{"type":"integer","title":"Sessions Analyzed"},"improved":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Improved"},"unchanged":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unchanged"},"worsened":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Worsened"},"description":{"type":"string","title":"Description"}},"type":"object","required":["avg_delta","sessions_analyzed","description"],"title":"MeditationEffectivenessResult"},"MeditationLength":{"type":"string","enum":["quick","short","medium","long"],"title":"MeditationLength"},"MeditationStatsResponse":{"properties":{"total_sessions":{"type":"integer","title":"Total Sessions"},"total_minutes":{"type":"integer","title":"Total Minutes"},"current_streak":{"type":"integer","title":"Current Streak"},"longest_streak":{"type":"integer","title":"Longest Streak"}},"type":"object","required":["total_sessions","total_minutes","current_streak","longest_streak"],"title":"MeditationStatsResponse"},"MeditationType":{"type":"string","enum":["breathing","body_scan","loving_kindness","visualization","gratitude","stress_relief"],"title":"MeditationType"},"MessageResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageResponse"},"MilestoneCreateRequest":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"}},"type":"object","required":["title"],"title":"MilestoneCreateRequest"},"MilestoneResponse":{"properties":{"id":{"type":"integer","title":"Id"},"goal_id":{"type":"integer","title":"Goal Id"},"title":{"type":"string","title":"Title"},"is_completed":{"type":"boolean","title":"Is Completed"},"sort_order":{"type":"integer","title":"Sort Order"},"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","goal_id","title","is_completed","sort_order","created_at","completed_at"],"title":"MilestoneResponse"},"MilestoneUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"is_completed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Completed"},"sort_order":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"MilestoneUpdateRequest"},"MintBody":{"properties":{"label":{"type":"string","maxLength":128,"title":"Label","default":"zugabot-node"}},"type":"object","title":"MintBody"},"MintRequest":{"properties":{"studio_slug":{"type":"string","title":"Studio Slug"},"creation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Creation Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["studio_slug"],"title":"MintRequest"},"MintTokenRequest":{"properties":{"source":{"type":"string","title":"Source"},"label":{"type":"string","title":"Label"}},"type":"object","required":["source","label"],"title":"MintTokenRequest"},"MintTokenResponse":{"properties":{"id":{"type":"string","title":"Id"},"token":{"type":"string","title":"Token"},"source":{"type":"string","title":"Source"},"label":{"type":"string","title":"Label"}},"type":"object","required":["id","token","source","label"],"title":"MintTokenResponse"},"ModuleCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"type":"string","title":"Description","default":""},"order":{"type":"integer","title":"Order","default":0}},"type":"object","required":["title"],"title":"ModuleCreate"},"MoodAfterRequest":{"properties":{"emoji":{"type":"string","maxLength":10,"minLength":1,"title":"Emoji"}},"type":"object","required":["emoji"],"title":"MoodAfterRequest"},"MoodEmoji":{"type":"string","enum":["😊","😢","😠","😰","😴","🤩","😐","🥰","😤","🤔","😌","💪"],"title":"MoodEmoji"},"MoodEntryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"string","title":"User Id"},"emoji":{"type":"string","title":"Emoji"},"label":{"type":"string","title":"Label"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","emoji","label","note","created_at"],"title":"MoodEntryResponse"},"MoodForecastResponse":{"properties":{"period_days":{"type":"integer","title":"Period Days"},"total_entries":{"type":"integer","title":"Total Entries"},"trend":{"$ref":"#/components/schemas/TrendResult"},"day_of_week":{"$ref":"#/components/schemas/DayOfWeekResult"},"forecast":{"$ref":"#/components/schemas/ForecastResult"},"habit_correlations":{"$ref":"#/components/schemas/HabitCorrelationsResult"},"volatility":{"$ref":"#/components/schemas/VolatilityResult"},"meditation_effectiveness":{"$ref":"#/components/schemas/MeditationEffectivenessResult"}},"type":"object","required":["period_days","total_entries","trend","day_of_week","forecast","habit_correlations","volatility","meditation_effectiveness"],"title":"MoodForecastResponse"},"MoodHistoryResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/MoodEntryResponse"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"},"days":{"type":"integer","title":"Days"}},"type":"object","required":["entries","total","days"],"title":"MoodHistoryResponse"},"MoodLogRequest":{"properties":{"emoji":{"$ref":"#/components/schemas/MoodEmoji"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","required":["emoji"],"title":"MoodLogRequest"},"MoodLogResponse":{"properties":{"entry":{"$ref":"#/components/schemas/MoodEntryResponse"},"streak":{"type":"integer","title":"Streak"},"today_count":{"type":"integer","title":"Today Count"},"suggestion":{"anyOf":[{"$ref":"#/components/schemas/MoodSuggestion"},{"type":"null"}]}},"type":"object","required":["entry","streak","today_count"],"title":"MoodLogResponse"},"MoodStreakResponse":{"properties":{"streak_days":{"type":"integer","title":"Streak Days"},"total_logs":{"type":"integer","title":"Total Logs"}},"type":"object","required":["streak_days","total_logs"],"title":"MoodStreakResponse"},"MoodSuggestion":{"properties":{"type":{"type":"string","title":"Type"},"message":{"type":"string","title":"Message"}},"type":"object","required":["type","message"],"title":"MoodSuggestion"},"MotionRequest":{"properties":{"critique":{"type":"boolean","title":"Critique","default":true},"auto_reroll":{"type":"boolean","title":"Auto Reroll","default":false},"max_rounds":{"type":"integer","maximum":3.0,"minimum":1.0,"title":"Max Rounds","default":3},"generate_audio":{"type":"boolean","title":"Generate Audio","default":false}},"type":"object","title":"MotionRequest","description":"Render motion between locked keyframes. Same critic policy as every\nother paid path: critique by default, reroll only on opt-in."},"NebulaConfig":{"properties":{"count":{"type":"integer","maximum":3.0,"minimum":0.0,"title":"Count","default":0},"hueBase":{"type":"number","maximum":360.0,"minimum":0.0,"title":"Huebase","default":240},"intensity":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Intensity","default":0.4},"driftSpeed":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Driftspeed","default":0.5}},"type":"object","title":"NebulaConfig","description":"Optional large soft glowing shapes drifting behind particles."},"NewsReferenceBody":{"properties":{"category":{"type":"string","title":"Category","default":""},"topic":{"type":"string","title":"Topic","default":""},"vault_path":{"type":"string","title":"Vault Path","default":""},"note":{"type":"string","title":"Note","default":""},"digest_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Digest Call Id"}},"type":"object","title":"NewsReferenceBody"},"NoteCreate":{"properties":{"title":{"type":"string","maxLength":200,"title":"Title","default":"Untitled"},"content":{"type":"string","title":"Content","default":""},"curriculum_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Curriculum Id"},"lesson_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lesson Id"},"pinned":{"type":"boolean","title":"Pinned","default":false}},"type":"object","title":"NoteCreate"},"NoteUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string","maxLength":50000},{"type":"null"}],"title":"Content"},"pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"}},"type":"object","title":"NoteUpdate"},"NotionIngestRequest":{"properties":{"token":{"type":"string","title":"Token","description":"Notion integration token (secret_xxx)"},"page_id":{"type":"string","title":"Page Id","description":"Root page or database ID to import from"},"curriculum_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curriculum Title","description":"Override title"},"max_pages":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"Max Pages","description":"Max pages to import","default":50}},"type":"object","required":["token","page_id"],"title":"NotionIngestRequest","description":"Import pages from a Notion database or page tree."},"OAuthLoginRequest":{"properties":{"provider":{"type":"string","title":"Provider"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"credential":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},"type":"object","required":["provider"],"title":"OAuthLoginRequest","description":"Universal OAuth login — provider sends auth code or credential."},"OnboardBody":{"properties":{"user_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"User Id"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email","description":"ZugaId signup email; server resolves it to user_id."},"github_login":{"type":"string","maxLength":255,"title":"Github Login"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"},"google_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Google Email","description":"The teammate's Google/Drive email if it differs from their ZugaId email."}},"type":"object","required":["github_login"],"title":"OnboardBody"},"OneNoteImportBody":{"properties":{"notebook_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notebook Id"}},"type":"object","title":"OneNoteImportBody"},"OneNoteNotebookOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"OneNoteNotebookOut"},"OneNoteStatusOut":{"properties":{"configured":{"type":"boolean","title":"Configured"},"connected":{"type":"boolean","title":"Connected"}},"type":"object","required":["configured","connected"],"title":"OneNoteStatusOut"},"OperatorStatsResponse":{"properties":{"total_sessions":{"type":"integer","title":"Total Sessions"},"total_cost_usd":{"type":"number","title":"Total Cost Usd"},"total_screenshots":{"type":"integer","title":"Total Screenshots"},"total_actions":{"type":"integer","title":"Total Actions"},"cost_today_usd":{"type":"number","title":"Cost Today Usd"},"cost_this_week_usd":{"type":"number","title":"Cost This Week Usd"},"cost_saved_usd":{"type":"number","title":"Cost Saved Usd"},"sessions_by_requester":{"additionalProperties":{"type":"integer"},"type":"object","title":"Sessions By Requester"},"sessions_by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"Sessions By Status"},"sessions_by_tier":{"additionalProperties":{"type":"integer"},"type":"object","title":"Sessions By Tier"},"sessions_by_platform":{"additionalProperties":{"type":"integer"},"type":"object","title":"Sessions By Platform"}},"type":"object","required":["total_sessions","total_cost_usd","total_screenshots","total_actions","cost_today_usd","cost_this_week_usd","cost_saved_usd","sessions_by_requester","sessions_by_status","sessions_by_tier","sessions_by_platform"],"title":"OperatorStatsResponse"},"OverlayCheckoutRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"timestamp":{"type":"integer","title":"Timestamp"},"pack":{"type":"string","title":"Pack","default":""},"tier":{"type":"string","title":"Tier","default":""},"platform":{"type":"string","title":"Platform","default":""}},"type":"object","required":["user_id","timestamp"],"title":"OverlayCheckoutRequest"},"OverlaySpendRequest":{"properties":{"amount":{"type":"number","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Amount"},"source":{"type":"string","maxLength":64,"title":"Source","default":"gamer_overlay"},"reason":{"type":"string","maxLength":255,"title":"Reason","default":"overflow_query"}},"type":"object","required":["amount"],"title":"OverlaySpendRequest"},"PairCompleteBody":{"properties":{"code":{"type":"string","title":"Code"},"device_id":{"type":"string","maxLength":64,"minLength":1,"title":"Device Id"},"name":{"type":"string","title":"Name","default":""},"platform":{"type":"string","title":"Platform","default":"desktop"},"client":{"type":"string","title":"Client","default":"custom"},"requested_capabilities":{"additionalProperties":true,"type":"object","title":"Requested Capabilities","default":{}}},"type":"object","required":["code","device_id"],"title":"PairCompleteBody"},"ParticleBackground":{"properties":{"colors":{"items":{"type":"string"},"type":"array","maxItems":6,"minItems":1,"title":"Colors"},"mode":{"type":"string","enum":["linear-diagonal","linear-vertical","radial","conic"],"title":"Mode","default":"linear-diagonal"}},"type":"object","required":["colors"],"title":"ParticleBackground"},"ParticleConfig":{"properties":{"background":{"$ref":"#/components/schemas/ParticleBackground"},"particles":{"$ref":"#/components/schemas/ParticleField"},"flow":{"$ref":"#/components/schemas/ParticleFlow"},"name":{"type":"string","maxLength":60,"title":"Name"},"nebula":{"$ref":"#/components/schemas/NebulaConfig"},"vignette":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Vignette","default":0}},"type":"object","required":["background","particles","flow","name"],"title":"ParticleConfig","description":"Validated particle wallpaper config returned to the client."},"ParticleField":{"properties":{"count":{"type":"integer","maximum":200.0,"minimum":20.0,"title":"Count"},"hueBase":{"type":"number","maximum":360.0,"minimum":0.0,"title":"Huebase"},"hueRange":{"type":"number","maximum":180.0,"minimum":0.0,"title":"Huerange"},"saturation":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Saturation"},"lightness":{"type":"number","maximum":90.0,"minimum":20.0,"title":"Lightness"},"sizeMin":{"type":"number","maximum":4.0,"minimum":0.3,"title":"Sizemin"},"sizeMax":{"type":"number","maximum":8.0,"minimum":0.5,"title":"Sizemax"},"glow":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Glow"},"speed":{"type":"number","maximum":2.5,"minimum":0.2,"title":"Speed"},"mouseRadius":{"type":"number","maximum":500.0,"minimum":80.0,"title":"Mouseradius"},"mouseAttract":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Mouseattract"},"shape":{"type":"string","enum":["circle","square","streak","sparkle","cross"],"title":"Shape","default":"circle"},"trail":{"type":"number","maximum":0.95,"minimum":0.0,"title":"Trail","default":0},"windX":{"type":"number","maximum":0.05,"minimum":-0.05,"title":"Windx","default":0},"windY":{"type":"number","maximum":0.05,"minimum":-0.05,"title":"Windy","default":0},"connectDistance":{"type":"number","maximum":200.0,"minimum":0.0,"title":"Connectdistance","default":0},"cursorMode":{"type":"string","enum":["auto","attract","repel","swirl","explode","none"],"title":"Cursormode","default":"auto"}},"type":"object","required":["count","hueBase","hueRange","saturation","lightness","sizeMin","sizeMax","glow","speed","mouseRadius","mouseAttract"],"title":"ParticleField"},"ParticleFlow":{"properties":{"amp":{"type":"number","maximum":0.03,"minimum":0.0,"title":"Amp"},"swirl":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Swirl"}},"type":"object","required":["amp","swirl"],"title":"ParticleFlow"},"ParticleGenerateRequest":{"properties":{"prompt":{"type":"string","maxLength":500,"minLength":3,"title":"Prompt"}},"type":"object","required":["prompt"],"title":"ParticleGenerateRequest"},"ParticleGenerateResponse":{"properties":{"config":{"$ref":"#/components/schemas/ParticleConfig"},"cost_tokens":{"type":"number","title":"Cost Tokens"},"cost_usd":{"type":"number","title":"Cost Usd"}},"type":"object","required":["config","cost_tokens","cost_usd"],"title":"ParticleGenerateResponse"},"PasswordLoginRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"PasswordLoginRequest"},"PersonaState":{"properties":{"user_id":{"type":"string","title":"User Id"},"voice_mode":{"type":"string","title":"Voice Mode","description":"off | witness | sidekick | coach | hype"},"mood_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Mood State"},"last_session_summaries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Last Session Summaries"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["user_id","voice_mode"],"title":"PersonaState","description":"Output of GET /api/zugaos/persona — full persona for the authed user."},"PersonalityItem":{"properties":{"id":{"type":"integer","title":"Id"},"kind":{"type":"string","title":"Kind"},"left":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Left"},"right":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Right"},"factor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Factor"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"type":"object","required":["id","kind"],"title":"PersonalityItem"},"PersonalityResponse":{"properties":{"completed":{"type":"boolean","title":"Completed"},"instrument":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instrument"},"type_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type Code"},"archetype":{"anyOf":[{"$ref":"#/components/schemas/Archetype"},{"type":"null"}]},"axes":{"anyOf":[{"$ref":"#/components/schemas/AxisVector"},{"type":"null"}]},"big5":{"anyOf":[{"$ref":"#/components/schemas/Big5Vector"},{"type":"null"}]},"big5_derived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Big5 Derived"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["completed"],"title":"PersonalityResponse"},"PersonalizationResponse":{"properties":{"player_type":{"type":"string","title":"Player Type"},"challenge_difficulty":{"type":"string","title":"Challenge Difficulty"},"gamification_emphasis":{"type":"number","title":"Gamification Emphasis"},"personalization_source":{"type":"string","title":"Personalization Source"}},"type":"object","required":["player_type","challenge_difficulty","gamification_emphasis","personalization_source"],"title":"PersonalizationResponse"},"PersonalizationStatsResponse":{"properties":{"personalized_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Personalized Pct"},"sample_size":{"type":"integer","title":"Sample Size","default":0}},"type":"object","title":"PersonalizationStatsResponse"},"PersonalizationUpdate":{"properties":{"player_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Player Type","description":"achiever|explorer|socializer"},"challenge_difficulty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Challenge Difficulty","description":"easy|medium|hard"},"gamification_emphasis":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Gamification Emphasis"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"user|zugabot"}},"type":"object","title":"PersonalizationUpdate"},"PlatformSpecOut":{"properties":{"name":{"type":"string","title":"Name"},"display":{"type":"string","title":"Display"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"aspect":{"type":"string","title":"Aspect"},"max_seconds":{"type":"integer","title":"Max Seconds"},"caption_limit":{"type":"integer","title":"Caption Limit"},"hashtags_count_toward_caption":{"type":"boolean","title":"Hashtags Count Toward Caption"},"recommended_hashtags":{"type":"integer","title":"Recommended Hashtags"}},"type":"object","required":["name","display","width","height","aspect","max_seconds","caption_limit","hashtags_count_toward_caption","recommended_hashtags"],"title":"PlatformSpecOut"},"PostFxJobOut":{"properties":{"job_uuid":{"type":"string","title":"Job Uuid"},"user_id":{"type":"string","title":"User Id"},"project_id":{"type":"integer","title":"Project Id"},"clip_id":{"type":"string","title":"Clip Id"},"effect":{"type":"string","title":"Effect"},"status":{"type":"string","title":"Status"},"progress":{"type":"number","title":"Progress"},"input_url":{"type":"string","title":"Input Url"},"output_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Url"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"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":["job_uuid","user_id","project_id","clip_id","effect","status","progress","input_url","created_at"],"title":"PostFxJobOut"},"PostFxRequest":{"properties":{"effect":{"type":"string","enum":["captions","captions_track","brand","logo","music","normalize","titlecard","lipsync"],"title":"Effect"},"clip_id":{"type":"string","title":"Clip Id","default":""},"params":{"additionalProperties":true,"type":"object","title":"Params"}},"type":"object","required":["effect"],"title":"PostFxRequest","description":"Apply a finishing effect to the project's timeline.\n\n`clip_id` is required for effects that modify an existing clip and ignored\nfor `titlecard`, which renders a new one. `params` is effect-specific and\nvalidated in postfx.service._apply rather than here — each effect takes a\ndifferent shape and a union type per effect buys nothing at this size."},"PostFxRevertOut":{"properties":{"clip_id":{"type":"string","title":"Clip Id"},"restored_url":{"type":"string","title":"Restored Url"}},"type":"object","required":["clip_id","restored_url"],"title":"PostFxRevertOut"},"PredictedDropRequest":{"properties":{"retailer":{"type":"string","title":"Retailer"},"sku":{"type":"string","title":"Sku"},"eta":{"type":"string","title":"Eta"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["retailer","sku","eta","confidence"],"title":"PredictedDropRequest"},"PreferencesRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"quiet_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quiet Start"},"quiet_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quiet End"},"reminder_hour":{"type":"integer","title":"Reminder Hour","default":9},"streak_warnings":{"type":"boolean","title":"Streak Warnings","default":true},"daily_nudges":{"type":"boolean","title":"Daily Nudges","default":true},"milestone_alerts":{"type":"boolean","title":"Milestone Alerts","default":true}},"type":"object","title":"PreferencesRequest"},"PreferencesResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"quiet_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quiet Start"},"quiet_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quiet End"},"reminder_hour":{"type":"integer","title":"Reminder Hour"},"streak_warnings":{"type":"boolean","title":"Streak Warnings"},"daily_nudges":{"type":"boolean","title":"Daily Nudges"},"milestone_alerts":{"type":"boolean","title":"Milestone Alerts"}},"type":"object","required":["enabled","quiet_start","quiet_end","reminder_hour","streak_warnings","daily_nudges","milestone_alerts"],"title":"PreferencesResponse"},"PrestigeResponse":{"properties":{"new_prestige_level":{"type":"integer","title":"New Prestige Level"},"prestige_multiplier":{"type":"number","title":"Prestige Multiplier"},"badge":{"$ref":"#/components/schemas/BadgeResponse"}},"type":"object","required":["new_prestige_level","prestige_multiplier","badge"],"title":"PrestigeResponse"},"ProactivePayload":{"properties":{"user_id":{"type":"string","maxLength":64,"minLength":1,"title":"User Id"},"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"title":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Title"},"source":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Source"}},"type":"object","required":["user_id","content"],"title":"ProactivePayload"},"ProgressBody":{"properties":{"item_index":{"type":"integer","title":"Item Index"},"amount":{"type":"number","title":"Amount"}},"type":"object","required":["item_index","amount"],"title":"ProgressBody"},"ProposeBody":{"properties":{"tool_name":{"type":"string","title":"Tool Name"},"tool_input":{"additionalProperties":true,"type":"object","title":"Tool Input"},"reasoning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning"}},"type":"object","required":["tool_name","tool_input"],"title":"ProposeBody"},"ProviderInfo":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"healthy":{"type":"boolean","title":"Healthy"},"is_default":{"type":"boolean","title":"Is Default"},"generate":{"type":"boolean","title":"Generate"},"inpaint":{"type":"boolean","title":"Inpaint"},"outpaint":{"type":"boolean","title":"Outpaint"},"img2img":{"type":"boolean","title":"Img2Img"},"upscale":{"type":"boolean","title":"Upscale"},"supported_sizes":{"items":{"type":"string"},"type":"array","title":"Supported Sizes"}},"type":"object","required":["name","display_name","healthy","is_default","generate","inpaint","outpaint","img2img","upscale","supported_sizes"],"title":"ProviderInfo"},"PublishRequest":{"properties":{"platform":{"type":"string","title":"Platform"},"body":{"type":"string","title":"Body"},"account_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Handle"}},"type":"object","required":["platform","body"],"title":"PublishRequest"},"PurchaseRequest":{"properties":{"pack":{"type":"string","maxLength":32,"title":"Pack"}},"type":"object","required":["pack"],"title":"PurchaseRequest"},"PurgeUserBody":{"properties":{"user_id":{"type":"string","minLength":1,"title":"User Id"}},"type":"object","required":["user_id"],"title":"PurgeUserBody"},"PushSubscribeRequest":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"p256dh":{"type":"string","title":"P256Dh"},"auth":{"type":"string","title":"Auth"}},"type":"object","required":["endpoint","p256dh","auth"],"title":"PushSubscribeRequest"},"QueryRequest":{"properties":{"model":{"type":"string","maxLength":64,"title":"Model","default":"claude-haiku-4-5-20251001"},"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","minItems":1,"title":"Messages"},"max_tokens":{"type":"integer","maximum":8192.0,"minimum":1.0,"title":"Max Tokens","default":1024},"system":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"System"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"}},"type":"object","required":["messages"],"title":"QueryRequest","description":"Claude text/vision completion request."},"QueueEnqueueRequest":{"properties":{"requester":{"type":"string","title":"Requester"},"source":{"type":"string","title":"Source","default":"api"},"task":{"type":"string","title":"Task"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"},"target_type":{"type":"string","title":"Target Type","default":"web"},"priority":{"type":"integer","title":"Priority","default":50},"scheduled_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Time"},"depends_on":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Depends On"},"max_cost_usd":{"type":"number","title":"Max Cost Usd","default":1.0},"task_type_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type Key"}},"type":"object","required":["requester","task"],"title":"QueueEnqueueRequest","description":"Enqueue a task for the Operator queue processor."},"QueueItemResponse":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"requester":{"type":"string","title":"Requester"},"source":{"type":"string","title":"Source"},"task":{"type":"string","title":"Task"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"},"target_type":{"type":"string","title":"Target Type"},"priority":{"type":"integer","title":"Priority"},"status":{"type":"string","title":"Status"},"scheduled_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Time"},"depends_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Depends On"},"estimated_cost_usd":{"type":"number","title":"Estimated Cost Usd"},"actual_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Actual Cost Usd"},"max_cost_usd":{"type":"number","title":"Max Cost Usd"},"tier_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Hint"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"retry_count":{"type":"integer","title":"Retry Count"},"max_retries":{"type":"integer","title":"Max Retries"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"result_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Summary"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"screenshot_count":{"type":"integer","title":"Screenshot Count"},"action_count":{"type":"integer","title":"Action Count"},"approval_required":{"type":"boolean","title":"Approval Required"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approved By"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"task_type_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type Key"}},"type":"object","required":["id","created_at","updated_at","requester","source","task","target_type","priority","status","estimated_cost_usd","max_cost_usd","retry_count","max_retries","screenshot_count","action_count","approval_required"],"title":"QueueItemResponse"},"QueueStatsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Status"},"pending":{"type":"integer","title":"Pending"},"executing":{"type":"integer","title":"Executing"},"waiting_approval":{"type":"integer","title":"Waiting Approval"},"estimated_cost_pending":{"type":"number","title":"Estimated Cost Pending"},"budget_remaining_usd":{"type":"number","title":"Budget Remaining Usd"},"recent_completions":{"type":"integer","title":"Recent Completions"}},"type":"object","required":["total","by_status","pending","executing","waiting_approval","estimated_cost_pending","budget_remaining_usd","recent_completions"],"title":"QueueStatsResponse"},"RecommitRequest":{"properties":{"new_deadline":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"New Deadline"}},"type":"object","title":"RecommitRequest"},"RedeemRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"RedeemRequest"},"ReferenceImageInfo":{"properties":{"filename":{"type":"string","title":"Filename"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","title":"Created At"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["filename","name","created_at","size_bytes"],"title":"ReferenceImageInfo"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RefreshResponse":{"properties":{"token":{"type":"string","title":"Token"},"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["token","refresh_token"],"title":"RefreshResponse"},"RefundRequest":{"properties":{"txn_id":{"type":"string","maxLength":255,"title":"Txn Id"}},"type":"object","required":["txn_id"],"title":"RefundRequest"},"RegenerateBody":{"properties":{"studio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"}},"type":"object","title":"RegenerateBody"},"RegisterRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"RejectBody":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"RejectBody"},"RemainingResponse":{"properties":{"used":{"type":"integer","title":"Used"},"limit":{"type":"integer","title":"Limit"},"remaining":{"type":"integer","title":"Remaining"}},"type":"object","required":["used","limit","remaining"],"title":"RemainingResponse"},"RemoveBackgroundResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"image_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Data"},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"duration_seconds":{"type":"number","title":"Duration Seconds","default":0.0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"RemoveBackgroundResponse"},"RenameFileRequest":{"properties":{"old_path":{"type":"string","title":"Old Path"},"new_path":{"type":"string","title":"New Path"}},"type":"object","required":["old_path","new_path"],"title":"RenameFileRequest"},"ReportSpendRequest":{"properties":{"user_id":{"type":"string","maxLength":255,"title":"User Id"},"tokens":{"type":"number","maximum":100000.0,"exclusiveMinimum":0.0,"title":"Tokens"},"cost_usd":{"type":"number","maximum":1000.0,"minimum":0.0,"title":"Cost Usd"},"service":{"type":"string","maxLength":64,"title":"Service"},"reason":{"type":"string","maxLength":255,"title":"Reason"},"model":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Model"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["user_id","tokens","cost_usd","service","reason"],"title":"ReportSpendRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"password":{"type":"string","title":"Password"}},"type":"object","required":["token","password"],"title":"ResetPasswordRequest"},"ReviewSubmit":{"properties":{"quality":{"type":"integer","maximum":5.0,"minimum":0.0,"title":"Quality","description":"SM-2 quality: 0=blackout, 5=perfect"},"response_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Ms","description":"How long the user took to answer"}},"type":"object","required":["quality"],"title":"ReviewSubmit","description":"User's self-rating after reviewing a card."},"RollDropResponse":{"properties":{"granted":{"items":{"type":"string"},"type":"array","title":"Granted"},"drops_today":{"type":"integer","title":"Drops Today"},"cap":{"type":"integer","title":"Cap"}},"type":"object","required":["granted","drops_today","cap"],"title":"RollDropResponse"},"RouteRequest":{"properties":{"text":{"type":"string","maxLength":2000,"minLength":1,"title":"Text","description":"User utterance to route"}},"type":"object","required":["text"],"title":"RouteRequest","description":"Inbound /api/zugaos/route payload."},"RouteResponse":{"properties":{"selection":{"anyOf":[{"$ref":"#/components/schemas/IntentSelection"},{"type":"null"}]},"dispatched":{"type":"boolean","title":"Dispatched","description":"Whether the studio call was actually invoked","default":false},"response":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response","description":"Studio response when dispatched=True"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"RouteResponse","description":"Output of /api/zugaos/route. Phase 3 = selection only."},"RunnerSessionSync":{"properties":{"runner_session_id":{"type":"string","title":"Runner Session Id"},"requester":{"type":"string","title":"Requester"},"task":{"type":"string","title":"Task"},"target":{"type":"string","title":"Target","default":""},"target_type":{"type":"string","title":"Target Type","default":"desktop_app"},"platform":{"type":"string","title":"Platform","default":"macos"},"machine":{"type":"string","title":"Machine","default":"mac-mini"},"status":{"type":"string","title":"Status"},"tier_resolved":{"type":"string","title":"Tier Resolved","default":"computer_use"},"result_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Summary"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"screenshot_count":{"type":"integer","title":"Screenshot Count","default":0},"action_count":{"type":"integer","title":"Action Count","default":0},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["runner_session_id","requester","task","status"],"title":"RunnerSessionSync","description":"Runner reports a completed session for persistence in the DB."},"SaveImageRequest":{"properties":{"image_data":{"type":"string","title":"Image Data","description":"Base64 image data"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Generation prompt for metadata"},"operation":{"type":"string","title":"Operation","description":"Operation type","default":"generate"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Provider used"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename","description":"Custom filename"}},"type":"object","required":["image_data"],"title":"SaveImageRequest"},"SaveImageResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"filename":{"type":"string","title":"Filename","default":""},"filepath":{"type":"string","title":"Filepath","default":""},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"SaveImageResponse"},"SaveReferenceRequest":{"properties":{"image_data":{"type":"string","title":"Image Data","description":"Base64 image data"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Display name for this reference"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename","description":"Custom filename"}},"type":"object","required":["image_data","name"],"title":"SaveReferenceRequest"},"SaveReferenceResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"filename":{"type":"string","title":"Filename","default":""},"name":{"type":"string","title":"Name","default":""},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"SaveReferenceResponse"},"SaveTemplateRequest":{"properties":{"exercise_ids":{"items":{"type":"integer"},"type":"array","title":"Exercise Ids"}},"type":"object","required":["exercise_ids"],"title":"SaveTemplateRequest"},"SavedImageInfo":{"properties":{"filename":{"type":"string","title":"Filename"},"filepath":{"type":"string","title":"Filepath"},"created_at":{"type":"string","title":"Created At"},"size_bytes":{"type":"integer","title":"Size Bytes"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"operation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},"type":"object","required":["filename","filepath","created_at","size_bytes"],"title":"SavedImageInfo"},"ScheduleBody":{"properties":{"slots":{"items":{"$ref":"#/components/schemas/ScheduleSlot"},"type":"array","title":"Slots"}},"type":"object","required":["slots"],"title":"ScheduleBody"},"ScheduleSlot":{"properties":{"weekday":{"type":"integer","title":"Weekday"},"time_local":{"type":"string","title":"Time Local"},"kind":{"type":"string","title":"Kind","default":"training"}},"type":"object","required":["weekday","time_local"],"title":"ScheduleSlot"},"SearchRequest":{"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},"search_depth":{"type":"string","pattern":"^(basic|advanced)$","title":"Search Depth","default":"basic"},"include_answer":{"type":"boolean","title":"Include Answer","default":true},"include_raw_content":{"type":"boolean","title":"Include Raw Content","default":false}},"type":"object","required":["query"],"title":"SearchRequest","description":"Tavily web search request."},"SearchResponse":{"properties":{"cards":{"items":{"$ref":"#/components/schemas/CardOut"},"type":"array","title":"Cards"}},"type":"object","required":["cards"],"title":"SearchResponse"},"SegmentPointResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"mask_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask Data"},"confidence":{"type":"number","title":"Confidence","default":0.0},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"duration_seconds":{"type":"number","title":"Duration Seconds","default":0.0},"click_point":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Click Point"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"SegmentPointResponse"},"SegmentSubjectResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"mask_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mask Data"},"confidence":{"type":"number","title":"Confidence","default":0.0},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"duration_seconds":{"type":"number","title":"Duration Seconds","default":0.0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"SegmentSubjectResponse"},"SelectVariantBody":{"properties":{"index":{"type":"integer","minimum":0.0,"title":"Index","description":"Which variant to make active."}},"type":"object","required":["index"],"title":"SelectVariantBody"},"SelfDeleteRequest":{"properties":{"confirm":{"type":"string","title":"Confirm"}},"type":"object","required":["confirm"],"title":"SelfDeleteRequest"},"ServiceGrantRequest":{"properties":{"user_id":{"type":"string","maxLength":255,"title":"User Id"},"amount":{"type":"number","maximum":100000.0,"exclusiveMinimum":0.0,"title":"Amount"},"reason":{"type":"string","maxLength":255,"minLength":1,"title":"Reason"}},"type":"object","required":["user_id","amount","reason"],"title":"ServiceGrantRequest"},"SessionBrief":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type"},"length":{"type":"string","title":"Length","default":"medium"},"duration_seconds":{"type":"integer","title":"Duration Seconds","default":0},"title":{"type":"string","title":"Title"},"is_favorite":{"type":"boolean","title":"Is Favorite"},"mood_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood After"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","type","title","is_favorite","mood_after","created_at"],"title":"SessionBrief"},"SessionCreateRequest":{"properties":{"requester":{"type":"string","title":"Requester"},"reason":{"type":"string","title":"Reason"},"target":{"type":"string","title":"Target"},"target_type":{"type":"string","title":"Target Type","default":"web"}},"type":"object","required":["requester","reason","target"],"title":"SessionCreateRequest","description":"An agent or user requests an automation task."},"SessionDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"requester":{"type":"string","title":"Requester"},"platform":{"type":"string","title":"Platform"},"machine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine"},"reason":{"type":"string","title":"Reason"},"target":{"type":"string","title":"Target"},"target_type":{"type":"string","title":"Target Type"},"tier_attempted":{"type":"string","title":"Tier Attempted"},"tier_resolved":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Resolved"},"status":{"type":"string","title":"Status"},"result_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Summary"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"screenshot_count":{"type":"integer","title":"Screenshot Count"},"action_count":{"type":"integer","title":"Action Count"},"cost_usd":{"type":"number","title":"Cost Usd"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"approved":{"type":"boolean","title":"Approved"},"actions":{"items":{"$ref":"#/components/schemas/ActionResponse"},"type":"array","title":"Actions","default":[]}},"type":"object","required":["id","created_at","requester","platform","reason","target","target_type","tier_attempted","status","screenshot_count","action_count","cost_usd","approved"],"title":"SessionDetailResponse"},"SessionListResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/SessionBrief"},"type":"array","title":"Sessions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["sessions","total"],"title":"SessionListResponse"},"SessionNoteListResponse":{"properties":{"notes":{"items":{"$ref":"#/components/schemas/SessionNoteResponse"},"type":"array","title":"Notes"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["notes","total"],"title":"SessionNoteListResponse"},"SessionNoteResponse":{"properties":{"id":{"type":"integer","title":"Id"},"themes":{"type":"string","title":"Themes"},"patterns":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patterns"},"follow_up":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Follow Up"},"mood_snapshot":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood Snapshot"},"mood_before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood Before"},"mood_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood After"},"rating":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rating"},"message_count":{"type":"integer","title":"Message Count"},"cost":{"type":"number","title":"Cost"},"provider":{"type":"string","title":"Provider"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","themes","patterns","follow_up","mood_snapshot","mood_before","mood_after","rating","message_count","cost","provider","created_at","updated_at"],"title":"SessionNoteResponse"},"SessionNoteUpdateRequest":{"properties":{"themes":{"anyOf":[{"type":"string","maxLength":5000,"minLength":1},{"type":"null"}],"title":"Themes"},"patterns":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Patterns"},"follow_up":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Follow Up"}},"type":"object","title":"SessionNoteUpdateRequest"},"SessionSummaryAppend":{"properties":{"studio":{"type":"string","maxLength":32,"minLength":1,"title":"Studio"},"summary":{"type":"string","maxLength":2000,"minLength":1,"title":"Summary"}},"type":"object","required":["studio","summary"],"title":"SessionSummaryAppend","description":"POST /api/zugaos/persona/session_summary body — studio reports a session ended.\n\n`summary` is freeform natural language; the composer (Phase 5) reads these\nwhen answering cross-studio questions like 'how was my day?'."},"SetInput":{"properties":{"set_number":{"type":"integer","title":"Set Number","default":1},"reps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reps"},"weight_kg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight Kg"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"distance_km":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance Km"}},"type":"object","title":"SetInput"},"SetResponse":{"properties":{"id":{"type":"integer","title":"Id"},"set_number":{"type":"integer","title":"Set Number"},"reps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reps"},"weight_kg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weight Kg"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"distance_km":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Distance Km"},"form_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Form Score"}},"type":"object","required":["id","set_number","reps","weight_kg","duration_seconds","distance_km","form_score"],"title":"SetResponse"},"SetTestTierRequest":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"tier":{"type":"string","title":"Tier"}},"type":"object","required":["user_id","email","tier"],"title":"SetTestTierRequest"},"ShareStatus":{"properties":{"sharing":{"type":"boolean","title":"Sharing"},"can_share":{"type":"boolean","title":"Can Share"}},"type":"object","required":["sharing","can_share"],"title":"ShareStatus"},"ShareUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Opt in (True) or out (False) of sharing the coarse vector with Zugabot"}},"type":"object","required":["enabled"],"title":"ShareUpdate"},"ShotOut":{"properties":{"id":{"type":"integer","title":"Id"},"project_id":{"type":"integer","title":"Project Id"},"beat_id":{"type":"string","title":"Beat Id"},"order":{"type":"integer","title":"Order"},"spec":{"additionalProperties":true,"type":"object","title":"Spec","default":{}},"status":{"type":"string","title":"Status"},"approved":{"type":"boolean","title":"Approved"},"keyframe_in_url":{"type":"string","title":"Keyframe In Url","default":""},"keyframe_out_url":{"type":"string","title":"Keyframe Out Url","default":""},"keyframe_prompt":{"type":"string","title":"Keyframe Prompt","default":""},"critic_passed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Critic Passed"},"critic_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Critic Score"},"critic_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Critic Max"},"critic_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Critic Json"},"cost_usd":{"type":"number","title":"Cost Usd","default":0.0},"rerolls":{"type":"integer","title":"Rerolls","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","beat_id","order","status","approved","created_at","updated_at"],"title":"ShotOut"},"ShotPromptsOut":{"properties":{"keyframe_prompt":{"type":"string","title":"Keyframe Prompt"},"motion_prompt":{"type":"string","title":"Motion Prompt"},"negative_prompt":{"type":"string","title":"Negative Prompt"}},"type":"object","required":["keyframe_prompt","motion_prompt","negative_prompt"],"title":"ShotPromptsOut","description":"What the compiler will actually send — shown before spending."},"ShotSpecIn":{"properties":{"spec":{"additionalProperties":true,"type":"object","title":"Spec"}},"type":"object","title":"ShotSpecIn","description":"The shot contract, as posted. Free-form dict so the vocabulary can grow\nwithout a schema migration on every new enum member — it is validated by\nstoryboard.spec on the way in, and unknown keys are dropped."},"SocialPostCreate":{"properties":{"platform":{"type":"string","title":"Platform","default":"linkedin"},"product_lane":{"type":"string","enum":["zuga","ludus","spiritus","consulting"],"title":"Product Lane","default":"zuga"},"hook":{"type":"string","title":"Hook","default":""},"body":{"type":"string","title":"Body","default":""},"format":{"type":"string","title":"Format","default":"text"},"media_note":{"type":"string","title":"Media Note","default":""},"theme":{"type":"string","title":"Theme","default":""},"hero_receipt":{"type":"string","title":"Hero Receipt","default":""},"status":{"type":"string","enum":["draft","graded","approved","published"],"title":"Status","default":"draft"}},"type":"object","title":"SocialPostCreate"},"SocialPostUpdate":{"properties":{"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"product_lane":{"anyOf":[{"type":"string","enum":["zuga","ludus","spiritus","consulting"]},{"type":"null"}],"title":"Product Lane"},"hook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hook"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"media_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Note"},"theme":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Theme"},"hero_receipt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hero Receipt"},"status":{"anyOf":[{"type":"string","enum":["draft","graded","approved","published"]},{"type":"null"}],"title":"Status"},"published_post_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published Post Id"}},"type":"object","title":"SocialPostUpdate"},"SourceCardIn":{"properties":{"connector":{"type":"string","title":"Connector"},"claim_text":{"type":"string","title":"Claim Text","default":""},"value":{"type":"string","title":"Value","default":""},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"confidence":{"type":"number","title":"Confidence","default":1.0},"provenance":{"additionalProperties":true,"type":"object","title":"Provenance"}},"type":"object","required":["connector"],"title":"SourceCardIn"},"SourceDetailResponse":{"properties":{"source":{"$ref":"#/components/schemas/SourceOut"},"cards":{"items":{"$ref":"#/components/schemas/CardOut"},"type":"array","title":"Cards"}},"type":"object","required":["source","cards"],"title":"SourceDetailResponse"},"SourceOut":{"properties":{"id":{"type":"integer","title":"Id"},"key":{"type":"string","title":"Key"},"kind":{"type":"string","title":"Kind"},"title":{"type":"string","title":"Title"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"read_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read Url"},"year":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Year"},"blurb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blurb"}},"type":"object","required":["id","key","kind","title"],"title":"SourceOut"},"SourceRequest":{"properties":{"query":{"type":"string","title":"Query"},"connectors":{"items":{"type":"string"},"type":"array","title":"Connectors","default":["manual","hivemind"]},"manual_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Manual Text"},"limit":{"type":"integer","title":"Limit","default":5}},"type":"object","required":["query"],"title":"SourceRequest"},"SourceWithCount":{"properties":{"id":{"type":"integer","title":"Id"},"key":{"type":"string","title":"Key"},"kind":{"type":"string","title":"Kind"},"title":{"type":"string","title":"Title"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cover Url"},"read_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read Url"},"year":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Year"},"blurb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blurb"},"idea_count":{"type":"integer","title":"Idea Count","default":0}},"type":"object","required":["id","key","kind","title"],"title":"SourceWithCount"},"SourcesResponse":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/SourceWithCount"},"type":"array","title":"Sources"}},"type":"object","required":["sources"],"title":"SourcesResponse"},"SpeakRequest":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"SpeakRequest"},"SpendingCapRequest":{"properties":{"cap_tokens":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Cap Tokens"}},"type":"object","title":"SpendingCapRequest"},"SplitCreate":{"properties":{"name":{"type":"string","title":"Name"},"muscle_groups":{"type":"string","title":"Muscle Groups","default":""}},"type":"object","required":["name"],"title":"SplitCreate"},"SplitListResponse":{"properties":{"splits":{"items":{"$ref":"#/components/schemas/SplitResponse"},"type":"array","title":"Splits"}},"type":"object","required":["splits"],"title":"SplitListResponse"},"SplitResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"muscle_groups":{"type":"string","title":"Muscle Groups"},"is_preset":{"type":"boolean","title":"Is Preset"},"template_exercises":{"items":{"$ref":"#/components/schemas/TemplateExerciseResponse"},"type":"array","title":"Template Exercises"}},"type":"object","required":["id","name","muscle_groups","is_preset","template_exercises"],"title":"SplitResponse"},"SplitUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"muscle_groups":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Muscle Groups"}},"type":"object","title":"SplitUpdate"},"StashResponse":{"properties":{"cards":{"items":{"$ref":"#/components/schemas/CardOut"},"type":"array","title":"Cards"}},"type":"object","required":["cards"],"title":"StashResponse"},"StateConfig":{"properties":{"states":{"additionalProperties":{"$ref":"#/components/schemas/StateEntry"},"type":"object","title":"States","default":{}},"transitions":{"items":{"$ref":"#/components/schemas/TransitionRule"},"type":"array","title":"Transitions","default":[]},"initial_state":{"type":"string","title":"Initial State","default":""},"auto_return":{"type":"boolean","title":"Auto Return","default":true},"auto_return_delay_ms":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Auto Return Delay Ms","default":0}},"type":"object","title":"StateConfig"},"StateEntry":{"properties":{"clip_id":{"type":"integer","title":"Clip Id"}},"type":"object","required":["clip_id"],"title":"StateEntry"},"StationarityResult":{"properties":{"raw_p_value":{"type":"number","title":"Raw P Value"},"raw_stationary":{"type":"boolean","title":"Raw Stationary"},"diff_p_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Diff P Value"},"diff_stationary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Diff Stationary"},"recommended_d":{"type":"integer","title":"Recommended D"}},"type":"object","required":["raw_p_value","raw_stationary","recommended_d"],"title":"StationarityResult"},"StatusResponse":{"properties":{"available":{"type":"boolean","title":"Available"},"providers":{"items":{"$ref":"#/components/schemas/ProviderInfo"},"type":"array","title":"Providers"},"default_provider":{"type":"string","title":"Default Provider"},"total_generations":{"type":"integer","title":"Total Generations"},"total_cost_usd":{"type":"number","title":"Total Cost Usd"}},"type":"object","required":["available","providers","default_provider","total_generations","total_cost_usd"],"title":"StatusResponse"},"StockEventRequest":{"properties":{"retailer":{"type":"string","title":"Retailer"},"sku":{"type":"string","title":"Sku"},"ts":{"type":"string","title":"Ts"}},"type":"object","required":["retailer","sku","ts"],"title":"StockEventRequest"},"StudentMessage":{"properties":{"message":{"type":"string","maxLength":4000,"minLength":1,"title":"Message"}},"type":"object","required":["message"],"title":"StudentMessage","description":"A message from the student during a lesson."},"StudioCatalog":{"properties":{"studio":{"type":"string","title":"Studio","description":"Studio slug, e.g. 'life', 'trader', 'code'"},"version":{"type":"string","title":"Version","description":"Catalog schema version, e.g. '1.0.0'"},"commands":{"items":{"$ref":"#/components/schemas/StudioCommand"},"type":"array","title":"Commands"}},"type":"object","required":["studio","version"],"title":"StudioCatalog","description":"A studio's full set of intents + metadata."},"StudioCommand":{"properties":{"intent":{"type":"string","title":"Intent","description":"Dotted slug, e.g. 'life.summary_today'"},"description":{"type":"string","title":"Description","description":"Natural-language description for the intent classifier"},"args_schema":{"additionalProperties":true,"type":"object","title":"Args Schema","description":"JSON schema for the args object"},"requires_auth":{"type":"boolean","title":"Requires Auth","description":"Whether resolved user_id must be passed through","default":true},"estimated_cost_tokens":{"type":"number","title":"Estimated Cost Tokens","description":"Approximate ZugaTokens cost per invocation","default":0.0}},"type":"object","required":["intent","description"],"title":"StudioCommand","description":"One callable intent a studio exposes to ZugaOS.\n\nThe intent slug is dotted as `<studio>.<verb>` (e.g. life.summary_today).\ndescription is what Claude reads when picking which intent matches a\nuser utterance, so write it for an LLM, not a human dev."},"SubmitRequest":{"properties":{"responses":{"additionalProperties":{"type":"integer"},"type":"object","title":"Responses","description":"OEJTS+N answers, 1-5 per item id"},"consent":{"type":"boolean","title":"Consent","description":"Explicit opt-in to take + store the assessment"}},"type":"object","required":["responses","consent"],"title":"SubmitRequest"},"SuggestedExercise":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"equipment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Equipment"},"primary_muscles":{"items":{"type":"string"},"type":"array","title":"Primary Muscles"}},"type":"object","required":["id","name","category","equipment","primary_muscles"],"title":"SuggestedExercise"},"SuggestionOut":{"properties":{"technique":{"type":"string","title":"Technique"},"example":{"type":"string","title":"Example"}},"type":"object","required":["technique","example"],"title":"SuggestionOut","description":"One coaching suggestion — a TECHNIQUE plus a short illustrative\nexample, not a finished message (Part 3.1: coach, don't ghostwrite)."},"SuggestionsResponse":{"properties":{"exercises":{"items":{"$ref":"#/components/schemas/SuggestedExercise"},"type":"array","title":"Exercises"}},"type":"object","required":["exercises"],"title":"SuggestionsResponse"},"SurgicalEditRequest":{"properties":{"clip_id":{"type":"string","title":"Clip Id"},"kind":{"type":"string","enum":["upscale","interpolate","remove","remove_preview"],"title":"Kind"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["clip_id","kind"],"title":"SurgicalEditRequest","description":"Enqueue a surgical clip edit — claimed and executed by a GPU worker\npolling the machine API."},"SurgicalJobOut":{"properties":{"job_uuid":{"type":"string","title":"Job Uuid"},"user_id":{"type":"string","title":"User Id"},"project_id":{"type":"integer","title":"Project Id"},"clip_id":{"type":"string","title":"Clip Id"},"kind":{"type":"string","title":"Kind"},"note":{"type":"string","title":"Note"},"status":{"type":"string","title":"Status"},"progress":{"type":"number","title":"Progress"},"input_url":{"type":"string","title":"Input Url"},"output_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Url"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"claimed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimed By"},"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":["job_uuid","user_id","project_id","clip_id","kind","note","status","progress","input_url","created_at"],"title":"SurgicalJobOut"},"SurgicalRevertOut":{"properties":{"clip_id":{"type":"string","title":"Clip Id"},"restored_url":{"type":"string","title":"Restored Url"}},"type":"object","required":["clip_id","restored_url"],"title":"SurgicalRevertOut"},"TTSRequest":{"properties":{"text":{"type":"string","maxLength":50000,"minLength":1,"title":"Text"},"voice":{"type":"string","pattern":"^(shimmer|nova|alloy|echo|fable|onyx)$","title":"Voice","default":"shimmer"},"model":{"type":"string","pattern":"^(tts-1|tts-1-hd|gpt-4o-mini-tts)$","title":"Model","default":"tts-1-hd"},"speed":{"type":"number","maximum":4.0,"minimum":0.25,"title":"Speed","default":1.0},"instruction":{"type":"string","maxLength":1000,"title":"Instruction","default":""}},"type":"object","required":["text"],"title":"TTSRequest","description":"Request for text-to-speech."},"TTSResponse":{"properties":{"audio_base64":{"type":"string","title":"Audio Base64"},"model":{"type":"string","title":"Model"},"characters":{"type":"integer","title":"Characters"},"tokens_charged":{"type":"number","title":"Tokens Charged"},"tokens_remaining":{"type":"number","title":"Tokens Remaining"}},"type":"object","required":["audio_base64","model","characters","tokens_charged","tokens_remaining"],"title":"TTSResponse"},"TaglinesPayload":{"properties":{"version":{"type":"integer","minimum":1.0,"title":"Version"},"taglines":{"items":{"type":"string"},"type":"array","maxItems":200,"minItems":1,"title":"Taglines"},"generated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated At"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["version","taglines"],"title":"TaglinesPayload"},"TelemetryIngestPayload":{"properties":{"unit":{"type":"string","title":"Unit"},"unit_call_id":{"type":"string","title":"Unit Call Id"},"session_id":{"type":"string","title":"Session Id"},"turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turn Id"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"dims":{"additionalProperties":true,"type":"object","title":"Dims"}},"type":"object","required":["unit","unit_call_id","session_id","dims"],"title":"TelemetryIngestPayload"},"TemplateExerciseResponse":{"properties":{"id":{"type":"integer","title":"Id"},"exercise_id":{"type":"integer","title":"Exercise Id"},"exercise_name":{"type":"string","title":"Exercise Name"},"exercise_type":{"type":"string","title":"Exercise Type"},"order":{"type":"integer","title":"Order"}},"type":"object","required":["id","exercise_id","exercise_name","exercise_type","order"],"title":"TemplateExerciseResponse"},"TestCreditRequest":{"properties":{"amount":{"type":"integer","maximum":100000.0,"exclusiveMinimum":0.0,"title":"Amount"}},"type":"object","required":["amount"],"title":"TestCreditRequest"},"TestGrantAllResponse":{"properties":{"granted":{"type":"integer","title":"Granted"},"owned":{"type":"integer","title":"Owned"}},"type":"object","required":["granted","owned"],"title":"TestGrantAllResponse"},"TestResetResponse":{"properties":{"removed":{"type":"integer","title":"Removed"}},"type":"object","required":["removed"],"title":"TestResetResponse"},"TextContent":{"properties":{"text":{"type":"string","title":"Text","default":"Text"},"font_family":{"type":"string","title":"Font Family","default":"Arial"},"font_size":{"type":"integer","maximum":200.0,"minimum":8.0,"title":"Font Size","default":48},"font_weight":{"type":"string","title":"Font Weight","default":"bold"},"font_style":{"type":"string","title":"Font Style","default":"normal"},"color":{"type":"string","title":"Color","default":"#FFFFFF"},"background_color":{"type":"string","title":"Background Color","default":""},"stroke_color":{"type":"string","title":"Stroke Color","default":"#000000"},"stroke_width":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Stroke Width","default":2},"x":{"type":"number","maximum":100.0,"minimum":0.0,"title":"X","default":50},"y":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Y","default":50},"alignment":{"type":"string","title":"Alignment","default":"center"}},"type":"object","title":"TextContent"},"ThemeCreateRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"preview_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Color"},"rotation_interval_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":1.0},{"type":"null"}],"title":"Rotation Interval Minutes","default":30}},"type":"object","required":["name"],"title":"ThemeCreateRequest"},"ThemeGenerateRequest":{"properties":{"spec":{"type":"string","maxLength":5000,"minLength":1,"title":"Spec"},"studio":{"type":"string","title":"Studio","default":"default"},"scope":{"type":"string","title":"Scope","description":"app (app-wide) or a studio slug","default":"app"}},"type":"object","required":["spec"],"title":"ThemeGenerateRequest"},"ThemeOverrideResponse":{"properties":{"id":{"type":"integer","title":"Id"},"scope":{"type":"string","title":"Scope"},"css_override":{"type":"string","title":"Css Override"},"theme_name":{"type":"string","title":"Theme Name"},"font":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Font"},"preset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preset Id"}},"type":"object","required":["id","scope","css_override","theme_name"],"title":"ThemeOverrideResponse"},"ThemeOverrideUpsert":{"properties":{"css_override":{"type":"string","maxLength":10000,"title":"Css Override"},"theme_name":{"type":"string","maxLength":100,"title":"Theme Name","default":"Custom"},"font":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Font"},"preset_id":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Preset Id"}},"type":"object","required":["css_override"],"title":"ThemeOverrideUpsert"},"ThemeResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"preview_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Color"},"active_wallpaper_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Wallpaper Id"},"rotation_interval_minutes":{"type":"integer","title":"Rotation Interval Minutes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","name","rotation_interval_minutes","created_at","updated_at"],"title":"ThemeResponse"},"ThemeUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"preview_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Color"},"active_wallpaper_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Wallpaper Id"},"rotation_interval_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":1.0},{"type":"null"}],"title":"Rotation Interval Minutes"}},"type":"object","title":"ThemeUpdateRequest"},"ThemeWithCountResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"preview_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Color"},"active_wallpaper_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Wallpaper Id"},"rotation_interval_minutes":{"type":"integer","title":"Rotation Interval Minutes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"wallpaper_count":{"type":"integer","title":"Wallpaper Count"}},"type":"object","required":["id","user_id","name","rotation_interval_minutes","created_at","updated_at","wallpaper_count"],"title":"ThemeWithCountResponse"},"TherapistChatRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/TherapistMessage"},"type":"array","minItems":1,"title":"Messages"}},"type":"object","required":["messages"],"title":"TherapistChatRequest"},"TherapistChatResponse":{"properties":{"content":{"type":"string","title":"Content"},"message_index":{"type":"integer","title":"Message Index"},"session_messages_remaining":{"type":"integer","title":"Session Messages Remaining"},"cost":{"type":"number","title":"Cost"},"crisis_detected":{"type":"boolean","title":"Crisis Detected","default":false},"mood":{"type":"string","enum":["happy","sad","angry","surprised","relaxed","neutral"],"title":"Mood","default":"neutral"},"mood_intensity":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Mood Intensity","default":0.0}},"type":"object","required":["content","message_index","session_messages_remaining","cost"],"title":"TherapistChatResponse"},"TherapistEndSessionRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/TherapistMessage"},"type":"array","minItems":1,"title":"Messages"},"mood_before":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Mood Before"},"mood_after":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Mood After"},"rating":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Rating"}},"type":"object","required":["messages"],"title":"TherapistEndSessionRequest"},"TherapistMessage":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":10000,"title":"Content"}},"type":"object","required":["role","content"],"title":"TherapistMessage","description":"A single message in therapist conversation. Only user/assistant roles allowed."},"TherapistSpeakRequest":{"properties":{"text":{"type":"string","maxLength":2000,"minLength":1,"title":"Text","description":"Assistant text to speak"},"voice":{"type":"string","title":"Voice","description":"Cartesia voice UUID. Empty = use server default.","default":""}},"type":"object","required":["text"],"title":"TherapistSpeakRequest","description":"Request to synthesize an assistant utterance to audio.\n\n`voice` is a Cartesia voice UUID (browse at https://play.cartesia.ai/).\nWhen empty (the default), the BE falls through to settings.cartesia_voice_id\nand then to CARTESIA_DEFAULT_VOICE — the named friendly key \"calm-female\"\nused to be passed through here but Cartesia rejected it because it expects\na real UUID, not a label."},"TherapistStartersResponse":{"properties":{"starters":{"items":{"$ref":"#/components/schemas/ConversationStarter"},"type":"array","title":"Starters"}},"type":"object","required":["starters"],"title":"TherapistStartersResponse"},"TherapistStatusResponse":{"properties":{"sessions_used":{"type":"integer","title":"Sessions Used"},"sessions_limit":{"type":"integer","title":"Sessions Limit"},"sessions_remaining":{"type":"integer","title":"Sessions Remaining"},"is_first_session":{"type":"boolean","title":"Is First Session"}},"type":"object","required":["sessions_used","sessions_limit","sessions_remaining","is_first_session"],"title":"TherapistStatusResponse"},"TherapistTranscribeResponse":{"properties":{"text":{"type":"string","title":"Text","description":"Transcribed text"},"duration_sec":{"type":"number","title":"Duration Sec","description":"Audio duration in seconds (Whisper-reported)"},"cost_usd":{"type":"number","title":"Cost Usd","description":"USD cost of the transcription call"}},"type":"object","required":["text","duration_sec","cost_usd"],"title":"TherapistTranscribeResponse","description":"Whisper STT result. Audio is sent as multipart, not in this schema."},"ThumbnailRequest":{"properties":{"video_url":{"type":"string","title":"Video Url"},"time":{"type":"number","minimum":0.0,"title":"Time","default":0},"width":{"type":"integer","maximum":1920.0,"minimum":32.0,"title":"Width","default":160},"height":{"type":"integer","maximum":1080.0,"minimum":32.0,"title":"Height","default":90}},"type":"object","required":["video_url"],"title":"ThumbnailRequest"},"ThumbnailResponse":{"properties":{"thumbnail_url":{"type":"string","title":"Thumbnail Url"},"time":{"type":"number","title":"Time"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"}},"type":"object","required":["thumbnail_url","time","width","height"],"title":"ThumbnailResponse"},"TimeRange":{"properties":{"start":{"type":"number","title":"Start"},"end":{"type":"number","title":"End"}},"type":"object","required":["start","end"],"title":"TimeRange"},"TodayResponse":{"properties":{"cards":{"items":{"$ref":"#/components/schemas/CardOut"},"type":"array","title":"Cards"},"needs_personality":{"type":"boolean","title":"Needs Personality"}},"type":"object","required":["cards","needs_personality"],"title":"TodayResponse"},"ToggleBookmarkBody":{"properties":{"article_id":{"type":"string","title":"Article Id"},"article_url":{"type":"string","title":"Article Url"},"article_title":{"type":"string","title":"Article Title"},"article_source":{"type":"string","title":"Article Source","default":""},"article_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Article Image Url"},"category":{"type":"string","title":"Category","default":"general"},"list_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"List Id"}},"type":"object","required":["article_id","article_url","article_title"],"title":"ToggleBookmarkBody"},"TokenSummary":{"properties":{"id":{"type":"string","title":"Id"},"source":{"type":"string","title":"Source"},"label":{"type":"string","title":"Label"},"installed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Installed At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","source","label","installed_at","last_used_at","revoked_at","created_at"],"title":"TokenSummary"},"ToolCallWebhook":{"properties":{"tool":{"type":"string","title":"Tool"},"args":{"additionalProperties":true,"type":"object","title":"Args","default":{}},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"session_id":{"type":"string","title":"Session Id","default":""},"machine":{"type":"string","title":"Machine","default":""},"secret":{"type":"string","title":"Secret","default":""}},"type":"object","required":["tool"],"title":"ToolCallWebhook","description":"Webhook payload from Claude Code hooks."},"ToolLookupResponse":{"properties":{"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"cli_pct":{"type":"integer","title":"Cli Pct"},"binary":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Binary"},"headless_flags":{"items":{"type":"string"},"type":"array","title":"Headless Flags"},"key_cli_actions":{"items":{"type":"string"},"type":"array","title":"Key Cli Actions"},"gui_required":{"items":{"type":"string"},"type":"array","title":"Gui Required"},"platform_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform Path"},"notes":{"type":"string","title":"Notes","default":""},"needs_computer_use":{"type":"boolean","title":"Needs Computer Use"}},"type":"object","required":["name","category","cli_pct","binary","headless_flags","key_cli_actions","gui_required","needs_computer_use"],"title":"ToolLookupResponse","description":"What an agent gets back when asking 'how do I do X with tool Y?'"},"ToolSearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"results":{"items":{"$ref":"#/components/schemas/ToolLookupResponse"},"type":"array","title":"Results"},"total_matches":{"type":"integer","title":"Total Matches"}},"type":"object","required":["query","results","total_matches"],"title":"ToolSearchResponse","description":"Search results — multiple tools ranked by relevance."},"TrackEditRequest":{"properties":{"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"suggestion_index":{"type":"integer","title":"Suggestion Index","default":0},"original_example":{"type":"string","title":"Original Example"},"final_text":{"type":"string","title":"Final Text"}},"type":"object","required":["original_example","final_text"],"title":"TrackEditRequest","description":"Reported when the user hits 'done with this one' on a suggestion —\ndrives the self-reliance / personalization metric (Part 3.3)."},"TrackEditResponse":{"properties":{"edit_ratio":{"type":"number","title":"Edit Ratio"},"personalized_pct":{"type":"number","title":"Personalized Pct"},"weekly_personalized_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Weekly Personalized Pct"},"weekly_sample_size":{"type":"integer","title":"Weekly Sample Size","default":0}},"type":"object","required":["edit_ratio","personalized_pct"],"title":"TrackEditResponse"},"TrackType":{"type":"string","enum":["video","audio","text","overlay"],"title":"TrackType"},"TransitionRule":{"properties":{"from":{"type":"string","title":"From"},"trigger":{"type":"string","maxLength":100,"minLength":1,"title":"Trigger"},"to":{"type":"string","title":"To"},"duration_ms":{"type":"integer","maximum":5000.0,"minimum":0.0,"title":"Duration Ms","default":300}},"type":"object","required":["from","trigger","to"],"title":"TransitionRule"},"TransitionType":{"type":"string","enum":["none","fade","dissolve","wipeleft","wiperight","wipeup","wipedown","slideleft","slideright","slideup","slidedown","circlecrop","rectcrop","distance","fadeblack","fadewhite","radial","smoothleft","smoothright"],"title":"TransitionType"},"TrendResult":{"properties":{"slope":{"type":"number","title":"Slope"},"direction":{"type":"string","title":"Direction"},"description":{"type":"string","title":"Description"},"avg_valence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Valence"},"data_points":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Points"}},"type":"object","required":["slope","direction","description"],"title":"TrendResult"},"TruncateBody":{"properties":{"keep_count":{"type":"integer","minimum":0.0,"title":"Keep Count","description":"Keep the first N messages (ordered by id ASC); delete the rest."}},"type":"object","required":["keep_count"],"title":"TruncateBody"},"UpdateListBody":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdateListBody"},"UsageEventBody":{"properties":{"event_type":{"type":"string","title":"Event Type"},"game":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["event_type"],"title":"UsageEventBody"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"is_admin":{"type":"boolean","title":"Is Admin"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"apps":{"items":{"type":"string"},"type":"array","title":"Apps","default":[]}},"type":"object","required":["id","email","role","is_admin"],"title":"UserResponse"},"V1LexiconBody":{"properties":{"pattern":{"type":"string","title":"Pattern"},"direction":{"type":"string","title":"Direction"},"domain":{"type":"string","title":"Domain"}},"type":"object","required":["pattern","direction","domain"],"title":"V1LexiconBody"},"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"},"VariantRequest":{"properties":{"draft":{"type":"string","title":"Draft"},"platforms":{"items":{"type":"string"},"type":"array","title":"Platforms","default":["linkedin","x","substack"]}},"type":"object","required":["draft"],"title":"VariantRequest"},"VaultIngestRequest":{"properties":{"vault_path":{"type":"string","title":"Vault Path","description":"Absolute path to an Obsidian vault folder"},"curriculum_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Curriculum Title","description":"Override title (default: folder name)"},"max_notes":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Max Notes","description":"Max notes to ingest","default":50}},"type":"object","required":["vault_path"],"title":"VaultIngestRequest","description":"Request to ingest a folder of markdown notes into a curriculum."},"VaultIngestResponse":{"properties":{"curriculum_id":{"type":"integer","title":"Curriculum Id"},"title":{"type":"string","title":"Title"},"modules_created":{"type":"integer","title":"Modules Created"},"lessons_created":{"type":"integer","title":"Lessons Created"},"notes_skipped":{"type":"integer","title":"Notes Skipped"}},"type":"object","required":["curriculum_id","title","modules_created","lessons_created","notes_skipped"],"title":"VaultIngestResponse"},"VerifyEmailRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest"},"VideoClip":{"properties":{"id":{"type":"string","title":"Id"},"track_id":{"type":"string","title":"Track Id"},"type":{"$ref":"#/components/schemas/ClipType"},"name":{"type":"string","title":"Name"},"start_time":{"type":"number","title":"Start Time"},"duration":{"type":"number","title":"Duration"},"in_point":{"type":"number","title":"In Point","default":0},"out_point":{"type":"number","title":"Out Point","default":0},"source":{"$ref":"#/components/schemas/ClipSource"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"volume":{"type":"number","maximum":2.0,"minimum":0.0,"title":"Volume","default":1.0},"speed":{"type":"number","maximum":10.0,"minimum":0.1,"title":"Speed","default":1.0},"opacity":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Opacity","default":1.0},"transition":{"anyOf":[{"$ref":"#/components/schemas/ClipTransition"},{"type":"null"}]},"color_grading":{"anyOf":[{"$ref":"#/components/schemas/ColorGrading"},{"type":"null"}]},"text_content":{"anyOf":[{"$ref":"#/components/schemas/TextContent"},{"type":"null"}]},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","track_id","type","name","start_time","duration","source"],"title":"VideoClip"},"VideoRequest":{"properties":{"platform":{"type":"string","title":"Platform"},"brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brief"}},"type":"object","required":["platform"],"title":"VideoRequest"},"VideoTrack":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/TrackType"},"clips":{"items":{"$ref":"#/components/schemas/VideoClip"},"type":"array","title":"Clips","default":[]},"muted":{"type":"boolean","title":"Muted","default":false},"locked":{"type":"boolean","title":"Locked","default":false},"height":{"type":"integer","title":"Height","default":80},"order":{"type":"integer","title":"Order","default":0},"visible":{"type":"boolean","title":"Visible","default":true}},"type":"object","required":["id","name","type"],"title":"VideoTrack"},"VoiceModeUpdate":{"properties":{"voice_mode":{"type":"string","title":"Voice Mode","description":"off | witness | sidekick | coach | hype"}},"type":"object","required":["voice_mode"],"title":"VoiceModeUpdate","description":"POST /api/zugaos/persona body — Overlay/UI flips voice mode."},"VoiceProfileIn":{"properties":{"style_tags":{"items":{"type":"string"},"type":"array","title":"Style Tags"},"sample_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Text"}},"type":"object","title":"VoiceProfileIn"},"VoiceProfileOut":{"properties":{"style_tags":{"items":{"type":"string"},"type":"array","title":"Style Tags"},"sample_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Text"},"voice_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice Summary"},"has_profile":{"type":"boolean","title":"Has Profile","default":false}},"type":"object","title":"VoiceProfileOut"},"VoiceTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"room":{"type":"string","title":"Room"},"url":{"type":"string","title":"Url"}},"type":"object","required":["token","room","url"],"title":"VoiceTokenResponse"},"VoiceType":{"type":"string","enum":["serene","gentle","whisper"],"title":"VoiceType"},"VolatilityResult":{"properties":{"current_volatility":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Volatility"},"previous_volatility":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Previous Volatility"},"change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change"},"direction":{"type":"string","title":"Direction"},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"},"description":{"type":"string","title":"Description"}},"type":"object","required":["current_volatility","direction","description"],"title":"VolatilityResult"},"WaitlistJoinRequest":{"properties":{"email":{"type":"string","title":"Email"},"referral_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referral Code"}},"type":"object","required":["email"],"title":"WaitlistJoinRequest"},"WaitlistRequest":{"properties":{"email":{"type":"string","title":"Email"},"source":{"type":"string","title":"Source","default":"landing"},"referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer"}},"type":"object","required":["email"],"title":"WaitlistRequest"},"WaitlistResponse":{"properties":{"message":{"type":"string","title":"Message"},"position":{"type":"integer","title":"Position"}},"type":"object","required":["message","position"],"title":"WaitlistResponse"},"WaitlistStatsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"pending":{"type":"integer","title":"Pending"},"approved":{"type":"integer","title":"Approved"}},"type":"object","required":["total","pending","approved"],"title":"WaitlistStatsResponse"},"WallpaperBySourceResponse":{"properties":{"id":{"type":"string","title":"Id"},"theme_id":{"type":"string","title":"Theme Id"},"theme_name":{"type":"string","title":"Theme Name"}},"type":"object","required":["id","theme_id","theme_name"],"title":"WallpaperBySourceResponse","description":"Returned by /api/wallpapers/by-source — used by studios for warning UI."},"WallpaperCreateRequest":{"properties":{"source_studio":{"type":"string","enum":["image","video"],"title":"Source Studio"},"source_id":{"type":"string","maxLength":64,"minLength":1,"title":"Source Id"},"kind":{"type":"string","enum":["image","video"],"title":"Kind"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"theme_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Theme Id"},"new_theme_name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"New Theme Name"}},"type":"object","required":["source_studio","source_id","kind"],"title":"WallpaperCreateRequest","description":"Create a wallpaper row directly (no studio generation pipeline).\n\nProvide EITHER theme_id (existing) OR new_theme_name (creates a theme).\nFor still-image wallpapers from saved ZugaImage assets:\n  source_studio='image', source_id=<filename>, kind='image'."},"WallpaperResponse":{"properties":{"id":{"type":"string","title":"Id"},"theme_id":{"type":"string","title":"Theme Id"},"user_id":{"type":"string","title":"User Id"},"source_studio":{"type":"string","enum":["image","video"],"title":"Source Studio"},"source_id":{"type":"string","title":"Source Id"},"kind":{"type":"string","enum":["image","video"],"title":"Kind"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","theme_id","user_id","source_studio","source_id","kind","created_at"],"title":"WallpaperResponse"},"WatchlistAddRequest":{"properties":{"sku":{"type":"string","title":"Sku"},"retailer":{"type":"string","title":"Retailer"},"product_url":{"type":"string","title":"Product Url"},"predict_horizon":{"anyOf":[{"type":"string","enum":["6h","24h"]},{"type":"null"}],"title":"Predict Horizon"}},"type":"object","required":["sku","retailer","product_url"],"title":"WatchlistAddRequest"},"WebhookCreate":{"properties":{"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["url","events"],"title":"WebhookCreate"},"WebhookUpdate":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"WebhookUpdate"},"WeeklyQuestResponse":{"properties":{"quest_key":{"type":"string","title":"Quest Key"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"xp_reward":{"type":"integer","title":"Xp Reward"},"is_completed":{"type":"boolean","title":"Is Completed"}},"type":"object","required":["quest_key","title","description","xp_reward","is_completed"],"title":"WeeklyQuestResponse"},"WeeklyTargetItem":{"properties":{"habit_id":{"type":"integer","title":"Habit Id"},"habit_name":{"type":"string","title":"Habit Name"},"habit_emoji":{"type":"string","title":"Habit Emoji"},"weekly_target":{"type":"integer","title":"Weekly Target"},"this_week_count":{"type":"integer","title":"This Week Count"},"progress_pct":{"type":"number","title":"Progress Pct"}},"type":"object","required":["habit_id","habit_name","habit_emoji","weekly_target","this_week_count","progress_pct"],"title":"WeeklyTargetItem"},"WeeklyTargetsResponse":{"properties":{"habits":{"items":{"$ref":"#/components/schemas/WeeklyTargetItem"},"type":"array","title":"Habits"},"week_start":{"type":"string","format":"date","title":"Week Start"}},"type":"object","required":["habits","week_start"],"title":"WeeklyTargetsResponse"},"WidgetGenerateRequest":{"properties":{"request_id":{"type":"string","title":"Request Id"},"confirmed_spec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirmed Spec"},"studio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio"}},"type":"object","required":["request_id"],"title":"WidgetGenerateRequest","description":"Confirmed — kick off generation."},"WidgetSpecRequest":{"properties":{"prompt":{"type":"string","maxLength":5000,"minLength":1,"title":"Prompt"},"studio":{"type":"string","title":"Studio","description":"Which studio the user is on","default":"default"},"page_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Context","description":"Current page URL or description"}},"type":"object","required":["prompt"],"title":"WidgetSpecRequest","description":"Initial prompt — returns a spec for confirmation."},"WidgetSpecResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"spec":{"type":"string","title":"Spec"},"estimated_complexity":{"type":"string","title":"Estimated Complexity"}},"type":"object","required":["request_id","spec","estimated_complexity"],"title":"WidgetSpecResponse","description":"Quick spec for user to confirm before generation."},"WingmateHistoryItem":{"properties":{"id":{"type":"string","title":"Id"},"tone":{"type":"string","title":"Tone"},"concrete_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Concrete Detail"},"suggestions":{"items":{"$ref":"#/components/schemas/SuggestionOut"},"type":"array","title":"Suggestions"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","tone","created_at"],"title":"WingmateHistoryItem"},"WingmateHistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WingmateHistoryItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"WingmateHistoryResponse"},"WorkbookCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"WorkbookCreate"},"WorkbookOut":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"snap_version":{"type":"integer","title":"Snap Version"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"head_version":{"type":"integer","title":"Head Version"}},"type":"object","required":["id","name","snap_version","data","head_version"],"title":"WorkbookOut"},"WorkbookSummary":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"snap_version":{"type":"integer","title":"Snap Version"}},"type":"object","required":["id","name","updated_at","snap_version"],"title":"WorkbookSummary"},"WorkoutCreate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"exercises":{"items":{"$ref":"#/components/schemas/ExerciseInput"},"type":"array","title":"Exercises","default":[]}},"type":"object","title":"WorkoutCreate"},"WorkoutDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"started_at":{"type":"string","title":"Started At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"exercise_count":{"type":"integer","title":"Exercise Count"},"total_sets":{"type":"integer","title":"Total Sets"},"created_at":{"type":"string","title":"Created At"},"exercises":{"items":{"$ref":"#/components/schemas/WorkoutExerciseResponse"},"type":"array","title":"Exercises"}},"type":"object","required":["id","title","notes","started_at","finished_at","duration_minutes","exercise_count","total_sets","created_at","exercises"],"title":"WorkoutDetailResponse"},"WorkoutExerciseResponse":{"properties":{"id":{"type":"integer","title":"Id"},"exercise_id":{"type":"integer","title":"Exercise Id"},"exercise_name":{"type":"string","title":"Exercise Name"},"exercise_type":{"type":"string","title":"Exercise Type"},"order":{"type":"integer","title":"Order"},"sets":{"items":{"$ref":"#/components/schemas/SetResponse"},"type":"array","title":"Sets"}},"type":"object","required":["id","exercise_id","exercise_name","exercise_type","order","sets"],"title":"WorkoutExerciseResponse"},"WorkoutFinish":{"properties":{"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"WorkoutFinish"},"WorkoutListResponse":{"properties":{"workouts":{"items":{"$ref":"#/components/schemas/WorkoutResponse"},"type":"array","title":"Workouts"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["workouts","total"],"title":"WorkoutListResponse"},"WorkoutResponse":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"started_at":{"type":"string","title":"Started At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finished At"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"exercise_count":{"type":"integer","title":"Exercise Count"},"total_sets":{"type":"integer","title":"Total Sets"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","title","notes","started_at","finished_at","duration_minutes","exercise_count","total_sets","created_at"],"title":"WorkoutResponse"},"WriteFileRequest":{"properties":{"path":{"type":"string","title":"Path"},"content":{"type":"string","title":"Content"}},"type":"object","required":["path","content"],"title":"WriteFileRequest"},"XPGainResponse":{"properties":{"xp_gained":{"type":"integer","title":"Xp Gained"},"new_total":{"type":"integer","title":"New Total"},"level_up":{"type":"boolean","title":"Level Up"},"new_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New Level"},"new_badges":{"items":{"$ref":"#/components/schemas/BadgeResponse"},"type":"array","title":"New Badges"},"bonus_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonus Label"},"bonus_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonus Tier"},"bonus_multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bonus Multiplier"},"streak_freeze_used":{"type":"boolean","title":"Streak Freeze Used","default":false}},"type":"object","required":["xp_gained","new_total","level_up","new_level","new_badges"],"title":"XPGainResponse"},"XPStatusResponse":{"properties":{"total_xp":{"type":"integer","title":"Total Xp"},"level":{"type":"integer","title":"Level"},"level_name":{"type":"string","title":"Level Name"},"xp_for_next_level":{"type":"integer","title":"Xp For Next Level"},"xp_progress_in_level":{"type":"integer","title":"Xp Progress In Level"},"current_streak_days":{"type":"integer","title":"Current Streak Days"},"longest_streak_days":{"type":"integer","title":"Longest Streak Days"},"streak_multiplier":{"type":"number","title":"Streak Multiplier"},"prestige_level":{"type":"integer","title":"Prestige Level","default":0},"prestige_multiplier":{"type":"number","title":"Prestige Multiplier","default":1.0},"can_prestige":{"type":"boolean","title":"Can Prestige","default":false},"streak_freezes":{"type":"integer","title":"Streak Freezes","default":0},"streak_freeze_used":{"type":"boolean","title":"Streak Freeze Used","default":false},"bonus_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonus Label"},"bonus_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bonus Tier"},"consistency_30d":{"type":"integer","title":"Consistency 30D","default":0},"consistency_pct":{"type":"number","title":"Consistency Pct","default":0.0}},"type":"object","required":["total_xp","level","level_name","xp_for_next_level","xp_progress_in_level","current_streak_days","longest_streak_days","streak_multiplier"],"title":"XPStatusResponse"},"YouTubeDownloadRequest":{"properties":{"url":{"type":"string","maxLength":500,"minLength":10,"title":"Url"},"format":{"type":"string","pattern":"^(mp3|wav|flac|ogg|aac)$","title":"Format","default":"mp3"},"bit_rate":{"type":"string","pattern":"^(128k|192k|256k|320k)$","title":"Bit Rate","default":"320k"}},"type":"object","required":["url"],"title":"YouTubeDownloadRequest"},"YouTubeDownloadResponse":{"properties":{"clip_id":{"type":"string","title":"Clip Id"},"title":{"type":"string","title":"Title"},"filename":{"type":"string","title":"Filename"},"duration":{"type":"number","title":"Duration"},"sample_rate":{"type":"integer","title":"Sample Rate"},"channels":{"type":"integer","title":"Channels"},"format":{"type":"string","title":"Format"},"waveform_peaks":{"items":{"type":"number"},"type":"array","title":"Waveform Peaks","default":[]},"spectrogram_url":{"type":"string","title":"Spectrogram Url","default":""}},"type":"object","required":["clip_id","title","filename","duration","sample_rate","channels","format"],"title":"YouTubeDownloadResponse"},"YouTubeInfoRequest":{"properties":{"url":{"type":"string","maxLength":500,"minLength":10,"title":"Url"}},"type":"object","required":["url"],"title":"YouTubeInfoRequest"},"YouTubeInfoResponse":{"properties":{"title":{"type":"string","title":"Title"},"uploader":{"type":"string","title":"Uploader"},"duration":{"type":"number","title":"Duration"},"thumbnail":{"type":"string","title":"Thumbnail"},"view_count":{"type":"integer","title":"View Count"},"url":{"type":"string","title":"Url"}},"type":"object","required":["title","uploader","duration","thumbnail","view_count","url"],"title":"YouTubeInfoResponse"},"ZugaClawStatus":{"properties":{"running":{"type":"boolean","title":"Running"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"machine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine"},"last_seen_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen At"},"stale_threshold_seconds":{"type":"integer","title":"Stale Threshold Seconds"}},"type":"object","required":["running","version","machine","last_seen_at","stale_threshold_seconds"],"title":"ZugaClawStatus"},"_InjectMessagePayload":{"properties":{"content":{"type":"string","maxLength":8000,"minLength":1,"title":"Content"}},"type":"object","required":["content"],"title":"_InjectMessagePayload"},"_MachineBeatSheetCreate":{"properties":{"title":{"type":"string","title":"Title","default":"Untitled"},"platform":{"type":"string","title":"Platform","default":"tiktok"},"aspect":{"type":"string","title":"Aspect","default":"9:16"},"beats":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Beats"},"status":{"type":"string","title":"Status","default":"draft"}},"type":"object","title":"_MachineBeatSheetCreate"},"_MachineBeatSheetUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"aspect":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspect"},"beats":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Beats"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"_MachineBeatSheetUpdate"},"_MachineExportOptions":{"properties":{"format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format"},"quality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality"},"resolution":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolution"},"fps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fps"},"include_audio":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Audio"},"video_codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Codec"},"audio_codec":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Codec"},"video_bitrate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Video Bitrate"},"audio_bitrate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audio Bitrate"}},"type":"object","title":"_MachineExportOptions"},"_RenamePayload":{"properties":{"title":{"type":"string","maxLength":80,"minLength":1,"title":"Title"}},"type":"object","required":["title"],"title":"_RenamePayload"},"_SurgicalClaimBody":{"properties":{"worker":{"type":"string","title":"Worker"}},"type":"object","required":["worker"],"title":"_SurgicalClaimBody"},"_SurgicalFailBody":{"properties":{"error":{"type":"string","title":"Error"}},"type":"object","required":["error"],"title":"_SurgicalFailBody"},"api__gaming__ludus_events__ConsentBody":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"ConsentBody"},"api__infra__node__MintResponse":{"properties":{"token":{"type":"string","title":"Token"},"user_id":{"type":"string","title":"User Id"},"label":{"type":"string","title":"Label"}},"type":"object","required":["token","user_id","label"],"title":"MintResponse"},"api__platform__chat__ChatRequest":{"properties":{"message":{"type":"string","maxLength":2000000,"minLength":1,"title":"Message"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"studio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"},"seed_opener":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Seed Opener"}},"type":"object","required":["message"],"title":"ChatRequest"},"api__platform__minichat__ReactRequest":{"properties":{"version":{"type":"integer","minimum":1.0,"title":"Version","description":"YYYYMMDD of the live tagline"},"reaction":{"type":"string","title":"Reaction","description":"funny | not_me | save"}},"type":"object","required":["version","reaction"],"title":"ReactRequest"},"core__credits__routes__SubscribeRequest":{"properties":{"tier":{"type":"string","maxLength":32,"title":"Tier"}},"type":"object","required":["tier"],"title":"SubscribeRequest"},"core__forge__secrets_routes__MintResponse":{"properties":{"id":{"type":"integer","title":"Id"},"studio_slug":{"type":"string","title":"Studio Slug"},"secret":{"type":"string","title":"Secret"},"secret_hash_prefix":{"type":"string","title":"Secret Hash Prefix"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","studio_slug","secret","secret_hash_prefix","created_at"],"title":"MintResponse"},"core__gateway__routes__ChatRequest":{"properties":{"prompt":{"type":"string","maxLength":100000,"title":"Prompt","default":""},"messages":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Messages","description":"OpenAI-compatible messages array. If provided, prompt is ignored."},"task":{"type":"string","maxLength":64,"title":"Task","description":"Studio/feature identifier for cost tracking","default":"chat"},"max_tokens":{"type":"integer","maximum":16384.0,"minimum":1.0,"title":"Max Tokens","default":4096},"model":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Model","description":"Model override (default: kimi-k2-5)"}},"type":"object","title":"ChatRequest","description":"Request for AI text completion."},"core__notifications__routes__SubscribeRequest":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"p256dh":{"type":"string","title":"P256Dh"},"auth":{"type":"string","title":"Auth"}},"type":"object","required":["endpoint","p256dh","auth"],"title":"SubscribeRequest"},"spiritus__data_management__ConsentBody":{"properties":{"health_collected":{"type":"boolean","title":"Health Collected","default":false},"ai_sharing":{"type":"boolean","title":"Ai Sharing","default":false},"age_confirmed":{"type":"boolean","title":"Age Confirmed","default":false},"zugabot_connection":{"type":"boolean","title":"Zugabot Connection","default":false}},"type":"object","title":"ConsentBody"},"spiritus__discover_routes__ReactRequest":{"properties":{"reaction":{"type":"string","enum":["like","skip","save"],"title":"Reaction","description":"like | skip | save"}},"type":"object","required":["reaction"],"title":"ReactRequest"},"spiritus__gamification__notification_routes__SubscribeRequest":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"p256dh":{"type":"string","title":"P256Dh"},"auth":{"type":"string","title":"Auth"}},"type":"object","required":["endpoint","p256dh","auth"],"title":"SubscribeRequest"},"spiritus__meditation__schemas__GenerateRequest":{"properties":{"type":{"$ref":"#/components/schemas/MeditationType"},"length":{"$ref":"#/components/schemas/MeditationLength","default":"medium"},"ambience":{"$ref":"#/components/schemas/AmbienceType","default":"rain"},"voice":{"$ref":"#/components/schemas/VoiceType","default":"serene"},"focus":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Focus"}},"type":"object","required":["type"],"title":"GenerateRequest"},"spiritus__meditation__schemas__SessionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"type":"string","title":"Type"},"length":{"type":"string","title":"Length","default":"medium"},"duration_seconds":{"type":"integer","title":"Duration Seconds","default":0},"ambience":{"type":"string","title":"Ambience"},"voice":{"type":"string","title":"Voice"},"focus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Focus"},"title":{"type":"string","title":"Title"},"transcript":{"type":"string","title":"Transcript"},"audio_filename":{"type":"string","title":"Audio Filename"},"model_used":{"type":"string","title":"Model Used"},"tts_model":{"type":"string","title":"Tts Model"},"cost":{"type":"number","title":"Cost"},"status":{"type":"string","title":"Status","default":"ready"},"mood_before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood Before"},"mood_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mood After"},"is_favorite":{"type":"boolean","title":"Is Favorite"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","type","ambience","voice","focus","title","transcript","audio_filename","model_used","tts_model","cost","mood_before","mood_after","is_favorite","created_at"],"title":"SessionResponse"},"zugaaudio__schemas__ExportRequest":{"properties":{"format":{"type":"string","pattern":"^(mp3|wav|flac|ogg|aac)$","title":"Format","default":"mp3"},"sample_rate":{"type":"integer","title":"Sample Rate","default":44100},"bit_rate":{"anyOf":[{"type":"string","pattern":"^(128k|192k|256k|320k)$"},{"type":"null"}],"title":"Bit Rate","default":"320k"},"normalize":{"type":"boolean","title":"Normalize","default":true}},"type":"object","title":"ExportRequest"},"zugaaudio__schemas__ProjectCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title","default":"Untitled Project"},"sample_rate":{"type":"integer","title":"Sample Rate","default":44100},"channels":{"type":"integer","title":"Channels","default":2},"bit_depth":{"type":"integer","title":"Bit Depth","default":16}},"type":"object","title":"ProjectCreate"},"zugaaudio__schemas__ProjectOut":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"sample_rate":{"type":"integer","title":"Sample Rate"},"channels":{"type":"integer","title":"Channels"},"bit_depth":{"type":"integer","title":"Bit Depth"},"duration":{"type":"number","title":"Duration"},"timeline":{"additionalProperties":true,"type":"object","title":"Timeline","default":{}},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","sample_rate","channels","bit_depth","duration","created_at","updated_at"],"title":"ProjectOut"},"zugaaudio__schemas__ProjectSummary":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"sample_rate":{"type":"integer","title":"Sample Rate"},"channels":{"type":"integer","title":"Channels"},"bit_depth":{"type":"integer","title":"Bit Depth"},"duration":{"type":"number","title":"Duration"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","sample_rate","channels","bit_depth","duration","created_at","updated_at"],"title":"ProjectSummary"},"zugaaudio__schemas__TimelineUpdate":{"properties":{"tracks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Tracks"}},"type":"object","required":["tracks"],"title":"TimelineUpdate"},"zugaimage__schemas__GenerateRequest":{"properties":{"prompt":{"type":"string","maxLength":4000,"minLength":1,"title":"Prompt","description":"Image description"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Provider: flux, stable_diffusion, openai"},"size":{"type":"string","title":"Size","description":"Image dimensions","default":"1024x1024"},"negative_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Negative Prompt","description":"What to avoid"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed for reproducibility"},"guidance_scale":{"anyOf":[{"type":"number","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Guidance Scale","description":"Prompt adherence"},"quality":{"type":"string","enum":["standard","hd"],"title":"Quality","description":"Image quality","default":"standard"},"enable_fallback":{"type":"boolean","title":"Enable Fallback","description":"Try other providers on failure","default":true}},"type":"object","required":["prompt"],"title":"GenerateRequest"},"zugamotion__schemas__ProjectCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"type":"string","title":"Description","default":""},"width":{"type":"integer","title":"Width","default":512},"height":{"type":"integer","title":"Height","default":512},"frame_rate":{"type":"integer","title":"Frame Rate","default":60},"duration_frames":{"type":"integer","title":"Duration Frames","default":120}},"type":"object","required":["title"],"title":"ProjectCreate"},"zugamotion__schemas__ProjectUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"lottie_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lottie Json"},"state_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"State Config"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"frame_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Frame Rate"},"duration_frames":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Frames"}},"type":"object","title":"ProjectUpdate"},"zugaoperator__schemas__SessionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"requester":{"type":"string","title":"Requester"},"platform":{"type":"string","title":"Platform"},"machine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Machine"},"reason":{"type":"string","title":"Reason"},"target":{"type":"string","title":"Target"},"target_type":{"type":"string","title":"Target Type"},"tier_attempted":{"type":"string","title":"Tier Attempted"},"tier_resolved":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Resolved"},"status":{"type":"string","title":"Status"},"result_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Summary"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"screenshot_count":{"type":"integer","title":"Screenshot Count"},"action_count":{"type":"integer","title":"Action Count"},"cost_usd":{"type":"number","title":"Cost Usd"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"approved":{"type":"boolean","title":"Approved"}},"type":"object","required":["id","created_at","requester","platform","reason","target","target_type","tier_attempted","status","screenshot_count","action_count","cost_usd","approved"],"title":"SessionResponse"},"zugavideo__schemas__ExportRequest":{"properties":{"project_id":{"type":"integer","title":"Project Id"},"options":{"$ref":"#/components/schemas/ExportOptions"}},"type":"object","required":["project_id"],"title":"ExportRequest"},"zugavideo__schemas__GenerateRequest":{"properties":{"prompt":{"type":"string","maxLength":2000,"minLength":1,"title":"Prompt"},"operation":{"type":"string","title":"Operation","default":"generate"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"aspect":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspect"},"quality":{"type":"string","title":"Quality","default":"1080p"},"duration":{"type":"integer","maximum":60.0,"minimum":2.0,"title":"Duration","default":5},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"project_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Project Id"},"clip_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clip Id"},"critique":{"type":"boolean","title":"Critique","default":true},"auto_reroll":{"type":"boolean","title":"Auto Reroll","default":false},"max_reroll_rounds":{"type":"integer","maximum":3.0,"minimum":1.0,"title":"Max Reroll Rounds","default":3}},"type":"object","required":["prompt"],"title":"GenerateRequest","description":"Prompt-driven generation request (P1 generation core)."},"zugavideo__schemas__ProjectCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title","default":"Untitled Project"},"width":{"type":"integer","title":"Width","default":1920},"height":{"type":"integer","title":"Height","default":1080},"fps":{"type":"number","title":"Fps","default":30.0}},"type":"object","title":"ProjectCreate"},"zugavideo__schemas__ProjectOut":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"fps":{"type":"number","title":"Fps"},"duration":{"type":"number","title":"Duration"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"timeline":{"additionalProperties":true,"type":"object","title":"Timeline","default":{}},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","width","height","fps","duration","created_at","updated_at"],"title":"ProjectOut"},"zugavideo__schemas__ProjectSummary":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"fps":{"type":"number","title":"Fps"},"duration":{"type":"number","title":"Duration"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","title","width","height","fps","duration","created_at","updated_at"],"title":"ProjectSummary"},"zugavideo__schemas__ProjectUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"fps":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fps"}},"type":"object","title":"ProjectUpdate"},"zugavideo__schemas__TimelineUpdate":{"properties":{"tracks":{"items":{"$ref":"#/components/schemas/VideoTrack"},"type":"array","title":"Tracks"}},"type":"object","required":["tracks"],"title":"TimelineUpdate"}}}}