{"openapi":"3.1.0","info":{"title":"Tintin API","description":"Control Plane for Tintin AI Virtual MCN Platform","version":"0.1.0"},"paths":{"/api/auth/invite/{token}":{"get":{"tags":["auth"],"summary":"Get Invite Info","description":"Public endpoint to validate an invite token and return its details.","operationId":"get_invite_info_api_auth_invite__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/register":{"post":{"tags":["auth"],"summary":"Register","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/RegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/register/verify":{"post":{"tags":["auth"],"summary":"Register Verify","operationId":"register_verify_api_auth_register_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCodeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/register/resend":{"post":{"tags":["auth"],"summary":"Register Resend","operationId":"register_resend_api_auth_register_resend_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/password/reset/request":{"post":{"tags":["auth"],"summary":"Password Reset Request","description":"Issue a 6-digit password-reset code via email.\n\nAlways returns 200 with the same generic message regardless of whether\nthe email belongs to an account, to avoid leaking which addresses are\nregistered. A pending lockout (`pwd_reset_lock:{email}`) silently\nsuppresses code generation.","operationId":"password_reset_request_api_auth_password_reset_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/password/reset/confirm":{"post":{"tags":["auth"],"summary":"Password Reset Confirm","description":"Verify the code, set the new password, and revoke all existing JWTs.\n\nBumps `user.token_version` so any token issued before this call is\nrejected by `get_current_user` on the next request. Frontend is\nexpected to redirect the user to the login page — no token is\nreturned.","operationId":"password_reset_confirm_api_auth_password_reset_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetConfirm"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordResetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["auth"],"summary":"Login","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/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google":{"post":{"tags":["auth"],"summary":"Google Auth","operationId":"google_auth_api_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleAuthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google/authorize":{"get":{"tags":["auth"],"summary":"Google Authorize","description":"Redirect to Google OAuth consent screen.\n\n`redirect_to` lets an allowlisted standalone app (nail.tintin-x.com) ask\nthe callback to return the user to its own host instead of app_url.\nRejected unless it matches `_ALLOWED_OAUTH_REDIRECT_BASES`.\n\n`signup_source` is the browser's base64url attribution blob. Signing it into\nthe state is the only way it survives the Google round-trip — a Google\nsign-in that turns out to be a first-time user creates the account in the\ncallback, with no further contact with the originating page.","operationId":"google_authorize_api_auth_google_authorize_get","parameters":[{"name":"client","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client"}},{"name":"redirect_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect To"}},{"name":"signup_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google/callback":{"get":{"tags":["auth"],"summary":"Google Callback","description":"Handle Google OAuth callback — exchange code, create/find user, redirect to frontend.","operationId":"google_callback_api_auth_google_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Clear the SSO cookie. Caller is also expected to drop any\nlocalStorage token of its own — this endpoint owns only the\n`Domain=.tintin-x.com` cookie. Unauthenticated to keep idempotent;\na stale call from a logged-out user is a no-op.","operationId":"logout_api_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/api/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","operationId":"get_me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/profile":{"patch":{"tags":["auth"],"summary":"Update Profile","description":"Update user profile and mark onboarding as completed.","operationId":"update_profile_api_auth_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/avatar-upload-url":{"post":{"tags":["auth"],"summary":"Get Avatar Upload Url","description":"Return a presigned PUT URL for uploading a profile avatar.","operationId":"get_avatar_upload_url_api_auth_avatar_upload_url_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/ui-state":{"patch":{"tags":["auth"],"summary":"Update Ui State","description":"Merge values into user.last_ui_state.","operationId":"update_ui_state_api_auth_ui_state_patch","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"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/studio/active-context":{"post":{"tags":["studio-teams"],"summary":"Set Active Context","description":"Switch the signed-in user's active studio context (personal ⇄ a team\nthey belong to). The server is the source of truth; reads (/me, billing)\nresolve from it. Switching to a team requires current membership.","operationId":"set_active_context_api_studio_active_context_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveContextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/studio/teams":{"post":{"tags":["studio-teams"],"summary":"Create Studio Team","description":"Create a studio team (caller becomes owner). One team per owner.","operationId":"create_studio_team_api_studio_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStudioTeamRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/studio/teams/{team_id}/leave":{"post":{"tags":["studio-teams"],"summary":"Leave Studio Team","description":"Leave a studio team (members/admins only — owner must dissolve).","operationId":"leave_studio_team_api_studio_teams__team_id__leave_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}":{"get":{"tags":["studio-teams"],"summary":"Get Studio Team","description":"Team detail (members + pending invitations for owner/admin). Members only.","operationId":"get_studio_team_api_studio_teams__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTeamDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["studio-teams"],"summary":"Dissolve Studio Team","description":"Dissolve a studio team (owner only) — merges team credits into the\nowner's personal wallet, then deletes the team.","operationId":"dissolve_studio_team_api_studio_teams__team_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/members":{"get":{"tags":["studio-teams"],"summary":"List Studio Team Members","description":"List a team's members. Members only.","operationId":"list_studio_team_members_api_studio_teams__team_id__members_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTeamMembersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/invite":{"post":{"tags":["studio-teams"],"summary":"Invite Studio Member","description":"Invite an email to the team (owner/admin only). Sends the invite email\nbest-effort (reusing the legacy SES helper), then returns the invitation.","operationId":"invite_studio_member_api_studio_teams__team_id__invite_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTeamInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/invitations/{token}":{"get":{"tags":["studio-teams"],"summary":"Get Studio Invitation Info","description":"PUBLIC (no auth) — fetch a pending invitation's team name / inviter /\nrole for the accept page. Still under the flag-gated router (so the whole\nfeature is off when the flag is off), but does NOT require a signed-in\nuser.","operationId":"get_studio_invitation_info_api_studio_invitations__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioInvitationInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/invitations/{token}/accept":{"post":{"tags":["studio-teams"],"summary":"Accept Studio Invitation","description":"Accept an invitation — adds a TeamMember row (multi-team, no money move).","operationId":"accept_studio_invitation_api_studio_invitations__token__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/invitations/{invitation_id}":{"delete":{"tags":["studio-teams"],"summary":"Cancel Studio Invitation","description":"Cancel a pending invitation (owner/admin only).","operationId":"cancel_studio_invitation_api_studio_teams__team_id__invitations__invitation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/members/{member_user_id}/role":{"patch":{"tags":["studio-teams"],"summary":"Change Studio Member Role","description":"Change a member's role (owner only).","operationId":"change_studio_member_role_api_studio_teams__team_id__members__member_user_id__role_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioChangeRoleRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/members/{member_user_id}":{"delete":{"tags":["studio-teams"],"summary":"Remove Studio Member","description":"Remove (kick) a member (owner/admin only).","operationId":"remove_studio_member_api_studio_teams__team_id__members__member_user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/studio/teams/{team_id}/transfer-ownership":{"post":{"tags":["studio-teams"],"summary":"Transfer Studio Ownership","description":"Transfer team ownership to another member (current owner only).","operationId":"transfer_studio_ownership_api_studio_teams__team_id__transfer_ownership_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioTransferOwnershipRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/merge-duplicate-folders":{"post":{"tags":["agents"],"summary":"Merge Duplicate Folders","description":"Find and merge duplicate root-level storage folders with the same name.\n\nWhen team members trigger file tracking independently, duplicate folders\ncan be created (same name, different user_id). This merges them by moving\nall files from the smaller folder into the larger one, then deleting the empty folder.","operationId":"merge_duplicate_folders_api_agents_merge_duplicate_folders_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/cleanup-duplicate-media/{agent_id}":{"post":{"tags":["agents"],"summary":"Cleanup Duplicate Media User","description":"Delete duplicate media delivery messages and set Redis dedup flags.","operationId":"cleanup_duplicate_media_user_api_agents_cleanup_duplicate_media__agent_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/media":{"get":{"tags":["agents"],"summary":"List Media","description":"Return media items (images/videos) from chat history, paginated independently.","operationId":"list_media_api_agents__agent_id__media_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/feed":{"post":{"tags":["agents"],"summary":"Agent Feed","description":"Accept heartbeat reports and activity feed items from running agents.","operationId":"agent_feed_api_agents__agent_id__feed_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/doc-upload-urls":{"post":{"tags":["agent-documents"],"summary":"Get Doc Upload Urls","description":"Generate presigned PUT URLs for uploading context documents.","operationId":"get_doc_upload_urls_api_agents_doc_upload_urls_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocUploadUrlsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocUploadUrlsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/process-documents":{"post":{"tags":["agent-documents"],"summary":"Process Documents","description":"Extract text from uploaded documents and analyze with AI.","operationId":"process_documents_api_agents_process_documents_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDocumentsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDocumentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/{agent_id}/update-documents":{"post":{"tags":["agent-documents"],"summary":"Update Agent Documents","description":"Process new documents for an existing agent.\n\nExtracts text, analyzes with AI, merges with existing doc_context and\ncurrent workspace content, updates character_json, and triggers\nworkspace refresh if the agent is active.","operationId":"update_agent_documents_api_agents__agent_id__update_documents_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentDocumentsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentDocumentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/chat-history":{"get":{"tags":["agent-chat-history"],"summary":"Get Chat History","description":"Return recent chat messages for this agent with cursor pagination.","operationId":"get_chat_history_api_agents__agent_id__chat_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before Id"}},{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/refresh-workspace-bulk":{"post":{"tags":["agents"],"summary":"Refresh Workspace Bulk","description":"Regenerate and upload workspace files for all active agents of the current user.","operationId":"refresh_workspace_bulk_api_agents_refresh_workspace_bulk_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/refresh-token":{"post":{"tags":["agents"],"summary":"Refresh Agent Token","description":"Refresh an expired agent JWT. Accepts tokens up to 7 days past expiry.\n\nCalled by long-running agent services to renew their API token\nwithout a full stop/start cycle.","operationId":"refresh_agent_token_api_agents_refresh_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents/{agent_id}/refresh-workspace":{"post":{"tags":["agents"],"summary":"Refresh Workspace","description":"Regenerate and upload workspace files for a single active agent.\n\nReads existing tokens from S3 openclaw.json to avoid token rotation.\nOnly regenerates .md and skill files (not openclaw.json) by default.","operationId":"refresh_workspace_api_agents__agent_id__refresh_workspace_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/memories":{"get":{"tags":["agent-memories"],"summary":"List Memories","description":"List memories for an agent, scoped to what the caller can see.\n\nVisibility rule: caller sees memories where (user_id IS NULL) OR\n(user_id == self). Other users' user-scoped memories are not visible\neven when they share the same agent.","operationId":"list_memories_api_agents__agent_id__memories_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"user_scope","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"'me' = current user only, 'agent' = agent-scoped only, 'all' = both (default)","title":"User Scope"},"description":"'me' = current user only, 'agent' = agent-scoped only, 'all' = both (default)"},{"name":"pinned","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"}},{"name":"include_expired","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Expired"}},{"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/MemoryList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/memories/{memory_id}":{"get":{"tags":["agent-memories"],"summary":"Get Memory","operationId":"get_memory_api_agents__agent_id__memories__memory_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agent-memories"],"summary":"Update Memory","description":"Pin/unpin, edit text, or change kind.\n\nConfidence is admin-only — silently ignored for non-admins (we don't\nraise so the same UI form works for both admin and user). Admin\ndetection: `user.is_admin` flag on the User model.","operationId":"update_memory_api_agents__agent_id__memories__memory_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agent-memories"],"summary":"Delete Memory","description":"Soft delete — sets expires_at = now(). The consolidator hard-deletes later.\n\nSoft delete preserves auditability and lets us recover from accidental\nUI deletes within a window. Pinned memories cannot be soft-deleted via\nthis route; unpin first.","operationId":"delete_memory_api_agents__agent_id__memories__memory_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"memory_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Memory Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/memories":{"post":{"tags":["agent-memories"],"summary":"Create Memory Internal","description":"Internal-key write path.\n\nServer-side writers POST here with `X-Internal-Key` +\n`X-Internal-User-Id`. The route trusts the payload's agent_id but\nvalidates that the agent exists and that the resolved user can\naccess it.","operationId":"create_memory_internal_api_internal_memories_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/generate-persona":{"post":{"tags":["agents"],"summary":"Generate Persona","operationId":"generate_persona_api_agents_generate_persona_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/generate-appearance":{"post":{"tags":["agents"],"summary":"Generate Appearance","operationId":"generate_appearance_api_agents_generate_appearance_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppearanceGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppearanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/generate-voice":{"post":{"tags":["agents"],"summary":"Generate Voice","operationId":"generate_voice_api_agents_generate_voice_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/{agent_id}/generate-appearance":{"post":{"tags":["agents"],"summary":"Generate Agent Appearance","description":"Kick off appearance generation in the background. Returns 202 immediately.\nPoll GET /api/agents/{agent_id} and check character_json.appearance_status\nfor 'generating', 'done', or 'failed'.\n\nWhen skip_headshot=true, keeps the existing headshot and only generates\nfrontview/backview using the headshot as reference.","operationId":"generate_agent_appearance_api_agents__agent_id__generate_appearance_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SkipHeadshotRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/images/{image_type}":{"get":{"tags":["agents"],"summary":"Get Agent Image","description":"Return a presigned S3 URL for the agent's image.","operationId":"get_agent_image_api_agents__agent_id__images__image_type__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"image_type","in":"path","required":true,"schema":{"type":"string","title":"Image Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/upload-image-url":{"post":{"tags":["agents"],"summary":"Get Image Upload Url","description":"Generate a presigned PUT URL for uploading an agent image (delegation mode).","operationId":"get_image_upload_url_api_agents__agent_id__upload_image_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"image_type","in":"query","required":true,"schema":{"type":"string","pattern":"^(headshot|frontview|backview)$","title":"Image Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__agent__UploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/upload-voice-url":{"post":{"tags":["agents"],"summary":"Get Voice Upload Url","description":"Generate a presigned PUT URL for uploading a voice recording (delegation mode).","operationId":"get_voice_upload_url_api_agents__agent_id__upload_voice_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__agent__UploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/channels":{"get":{"tags":["agent-channels"],"summary":"List Agent Channels","operationId":"list_agent_channels_api_agents__agent_id__channels_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentChannelResponse"},"title":"Response List Agent Channels Api Agents  Agent Id  Channels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/channels/{channel_id}":{"delete":{"tags":["agent-channels"],"summary":"Delete Agent Channel","operationId":"delete_agent_channel_api_agents__agent_id__channels__channel_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Channel Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/available-models":{"get":{"tags":["agents"],"summary":"List Available Models","description":"Return available AI models for agent configuration.","operationId":"list_available_models_api_agents_available_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents/role-templates":{"get":{"tags":["agents"],"summary":"List Role Templates","description":"Return available role templates for the creation wizard.","operationId":"list_role_templates_api_agents_role_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents":{"get":{"tags":["agents"],"summary":"List Agents","operationId":"list_agents_api_agents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"program_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents"],"summary":"Create Agent","operationId":"create_agent_api_agents_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}":{"get":{"tags":["agents"],"summary":"Get Agent","operationId":"get_agent_api_agents__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agents"],"summary":"Update Agent","operationId":"update_agent_api_agents__agent_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents"],"summary":"Delete Agent","operationId":"delete_agent_api_agents__agent_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/public":{"patch":{"tags":["agents"],"summary":"Update Agent Public Profile","operationId":"update_agent_public_profile_api_agents__agent_id__public_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPublicProfileUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/build-mode":{"patch":{"tags":["agents"],"summary":"Toggle Build Mode","description":"Toggle build mode on/off for an active agent.\n\nRegenerates workspace files (SOUL.md, AGENTS.md, HEARTBEAT.md, openclaw.json)\nwith build-mode templates and forces Opus as the primary model.","operationId":"toggle_build_mode_api_agents__agent_id__build_mode_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_BuildModeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/move-to-team":{"post":{"tags":["agents"],"summary":"Move Agent To Team","description":"Attach an agent to the current user's team.\n\nCloses the gap where an agent created before its owner joined a team\nhas `agent.team_id IS NULL` and gets routed to the personal wallet by\nthe gateway. Creator-only — team mates who can PATCH the agent normally\ncannot reassign team_id (mirrors agent_transfer.py creator-only access).\nIdempotent: re-running with the agent already on the user's team is a\nno-op success.","operationId":"move_agent_to_team_api_agents__agent_id__move_to_team_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/system-metrics":{"get":{"tags":["agents"],"summary":"Get Agent System Metrics","description":"CloudWatch Container Insights metrics for an agent's ECS service.","operationId":"get_agent_system_metrics_api_agents__agent_id__system_metrics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"integer","maximum":86400,"minimum":60,"default":300,"title":"Period"}},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":4320,"minimum":1,"default":6,"title":"Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/transfer/bulk-preview":{"post":{"tags":["agent-transfer"],"summary":"Preview Bulk Transfer","description":"Build per-agent previews + cross-agent totals for a bulk transfer.","operationId":"preview_bulk_transfer_api_agents_transfer_bulk_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransferPreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransferPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/transfer/bulk-invite":{"post":{"tags":["agent-transfer"],"summary":"Create Bulk Transfer Invites","description":"Create N invitations atomically (per-agent), then send ONE email + notification.\n\nPer-agent failures are surfaced in `failed[]` rather than aborting the\nwhole batch — partial success is friendlier than rolling back invites\nthat already succeeded.","operationId":"create_bulk_transfer_invites_api_agents_transfer_bulk_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransferInviteCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkTransferInviteResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/{agent_id}/transfer/preview":{"post":{"tags":["agent-transfer"],"summary":"Preview Transfer","operationId":"preview_transfer_api_agents__agent_id__transfer_preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/transfer/invite":{"post":{"tags":["agent-transfer"],"summary":"Create Transfer Invite","operationId":"create_transfer_invite_api_agents__agent_id__transfer_invite_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferInviteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agent-transfer"],"summary":"List Transfer Invites For Agent","operationId":"list_transfer_invites_for_agent_api_agents__agent_id__transfer_invite_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferInviteList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/transfer/invite/{invite_id}":{"delete":{"tags":["agent-transfer"],"summary":"Cancel Transfer Invite","operationId":"cancel_transfer_invite_api_agents__agent_id__transfer_invite__invite_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/transfer-invites/incoming":{"get":{"tags":["agent-transfer"],"summary":"List Incoming Invites","description":"Pending invites either resolved to me or matching my email.","operationId":"list_incoming_invites_api_transfer_invites_incoming_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferInviteList"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/transfer-invites/{invite_id}":{"get":{"tags":["agent-transfer"],"summary":"Get Invite Detail","operationId":"get_invite_detail_api_transfer_invites__invite_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/transfer-invites/{invite_id}/accept":{"post":{"tags":["agent-transfer"],"summary":"Accept Invite","operationId":"accept_invite_api_transfer_invites__invite_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/transfer-invites/{invite_id}/decline":{"post":{"tags":["agent-transfer"],"summary":"Decline Invite","operationId":"decline_invite_api_transfer_invites__invite_id__decline_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/fiverr/account":{"post":{"tags":["fiverr"],"summary":"Create Fiverr Account","description":"Register a Fiverr seller account for this agent.\n\nCreator-only: only the agent's creator can own the Fiverr account, since\nthey're the user whose KYC + desktop will execute the bot.","operationId":"create_fiverr_account_api_agents__agent_id__fiverr_account_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrAccountCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["fiverr"],"summary":"Get Fiverr Account","description":"Read the agent's Fiverr account. Team-aware.","operationId":"get_fiverr_account_api_agents__agent_id__fiverr_account_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["fiverr"],"summary":"Update Fiverr Account","description":"Owner-only: only the KYC owner can mutate the account record.","operationId":"update_fiverr_account_api_agents__agent_id__fiverr_account_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrAccountUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["fiverr"],"summary":"Delete Fiverr Account","description":"Owner-only: detach the Fiverr account from the agent.\n\nCascades to gigs, orders, and pending actions per migration ``fv01``.","operationId":"delete_fiverr_account_api_agents__agent_id__fiverr_account_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/fiverr/accounts/{account_id}/gigs":{"post":{"tags":["fiverr"],"summary":"Create Gig","operationId":"create_gig_api_fiverr_accounts__account_id__gigs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrGigCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrGigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["fiverr"],"summary":"List Gigs","operationId":"list_gigs_api_fiverr_accounts__account_id__gigs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrGigList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/fiverr/gigs/{gig_id}":{"get":{"tags":["fiverr"],"summary":"Get Gig","operationId":"get_gig_api_fiverr_gigs__gig_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"gig_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Gig Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrGigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["fiverr"],"summary":"Update Gig","operationId":"update_gig_api_fiverr_gigs__gig_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"gig_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Gig Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrGigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrGigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["fiverr"],"summary":"Delete Gig","operationId":"delete_gig_api_fiverr_gigs__gig_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"gig_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Gig Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/fiverr/accounts/{account_id}/orders":{"post":{"tags":["fiverr"],"summary":"Create Order","description":"Record a new order discovered by inbox poll.\n\nIdempotent on ``fiverr_order_id`` (the platform-issued FO123ABC). Repeated\nPOSTs for the same order_id return the existing row instead of 409 — the\npolling loop is not transactional, so dedup belongs server-side.","operationId":"create_order_api_fiverr_accounts__account_id__orders_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrOrderCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["fiverr"],"summary":"List Orders","operationId":"list_orders_api_fiverr_accounts__account_id__orders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"enum":["inquiry_received","quote_drafted","quote_sent","order_received","order_accepted","in_progress","delivered","revision_requested","completed","canceled","disputed"],"type":"string"},{"type":"null"}],"title":"State"}},{"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/FiverrOrderList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/fiverr/orders/{order_id}":{"patch":{"tags":["fiverr"],"summary":"Update Order","description":"Update order lifecycle fields (state, delivery, revision count, etc.).\n\nOwner-only — the desktop bot's results route through here when the\nscheduler dispatches an action and the desktop callback updates state.","operationId":"update_order_api_fiverr_orders__order_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrOrderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["fiverr"],"summary":"Get Order","operationId":"get_order_api_fiverr_orders__order_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/fiverr/accounts/{account_id}/actions":{"post":{"tags":["fiverr"],"summary":"Create Action","description":"Submit a drafted action for owner approval.\n\nOwner-only — agent-side loops authenticate as the agent's owner, which\nmatches the FiverrAccount's owner_user_id. The ``payload`` shape varies\nby action type and is opaque here; the agent pre-validates against ToS\nrules before calling this route. Created in ``state='pending'``.","operationId":"create_action_api_fiverr_accounts__account_id__actions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrActionPendingCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrActionPendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["fiverr"],"summary":"List Actions","description":"List approval-queue actions. Team-aware (anyone with agent access).","operationId":"list_actions_api_fiverr_accounts__account_id__actions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"enum":["pending","approved","rejected","applied","failed"],"type":"string"},{"type":"null"}],"title":"State"}},{"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/FiverrActionPendingList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/fiverr/actions/{action_id}":{"get":{"tags":["fiverr"],"summary":"Get Action","operationId":"get_action_api_fiverr_actions__action_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrActionPendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/fiverr/actions/{action_id}/decision":{"post":{"tags":["fiverr"],"summary":"Decide Action","description":"Approve or reject a pending action.\n\nOwner-only — the decision dispatches a desktop tool against the owner's\nFiverr session, so team mates cannot decide on the owner's behalf.\n\nState transitions:\n    pending  → approved  (scheduler will dispatch on next 90s tick)\n    pending  → rejected  (terminal — requires reject_reason)","operationId":"decide_action_api_fiverr_actions__action_id__decision_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrActionDecision"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FiverrActionPendingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/official-apps":{"get":{"tags":["official-apps"],"summary":"List Apps","description":"Return apps the user can see, hydrated with their install state.","operationId":"list_apps_api_official_apps_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OfficialAppCatalogEntry"},"type":"array","title":"Response List Apps Api Official Apps Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/official-apps/install":{"post":{"tags":["official-apps"],"summary":"Install","description":"Create or return the active install of an app for this user/team.","operationId":"install_api_official_apps_install_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallAppRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/official-apps/{slug}/install":{"delete":{"tags":["official-apps"],"summary":"Uninstall","description":"Soft-delete the active install. Data is retained for reinstall.","operationId":"uninstall_api_official_apps__slug__install_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/official-apps/{slug}/token":{"post":{"tags":["official-apps"],"summary":"Issue Token","description":"Issue a 15-min token for the iframe to call this app's endpoints.","operationId":"issue_token_api_official_apps__slug__token_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficialAppTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps":{"get":{"tags":["admin-official-apps"],"summary":"List Catalog","description":"All Official Apps, listed and unlisted.","operationId":"list_catalog_api_admin_official_apps_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OfficialAppAdminResponse"},"type":"array","title":"Response List Catalog Api Admin Official Apps Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/{slug}":{"get":{"tags":["admin-official-apps"],"summary":"Get Catalog Entry","operationId":"get_catalog_entry_api_admin_official_apps__slug__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficialAppAdminResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin-official-apps"],"summary":"Update Catalog Entry","operationId":"update_catalog_entry_api_admin_official_apps__slug__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficialAppAdminUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfficialAppAdminResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/{slug}/allowlist":{"get":{"tags":["admin-official-apps"],"summary":"List Allowlist","operationId":"list_allowlist_api_admin_official_apps__slug__allowlist_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AllowlistEntryResponse"},"title":"Response List Allowlist Api Admin Official Apps  Slug  Allowlist Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin-official-apps"],"summary":"Add Allowlist Entry","operationId":"add_allowlist_entry_api_admin_official_apps__slug__allowlist_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowlistAddRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowlistEntryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/{slug}/allowlist/{entry_id}":{"delete":{"tags":["admin-official-apps"],"summary":"Remove Allowlist Entry","operationId":"remove_allowlist_entry_api_admin_official_apps__slug__allowlist__entry_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/{slug}/installations":{"get":{"tags":["admin-official-apps"],"summary":"List Installations","description":"List installs enriched with installer email + team name.\n\nThe admin console renders one row per install and lets operators\nclick through to that user's usage history, so the raw UUIDs need\nhuman-readable handles. Email + team name are batch-fetched to avoid\nN+1 on big install lists.","operationId":"list_installations_api_admin_official_apps__slug__installations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"include_uninstalled","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Uninstalled"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminInstallationResponse"},"title":"Response List Installations Api Admin Official Apps  Slug  Installations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/{slug}/metrics":{"get":{"tags":["admin-official-apps"],"summary":"Get App Metrics","description":"Per-app usage + revenue rollup for the admin Usage & Revenue tab.\n\nReads `ledger_transactions` filtered on `metadata->>'app_slug'=:slug`\nand `action_type IN ('app_charge', 'app_charge_refund', 'app_usage')`.\nReturns total revenue + charge/refund counts + unique users + a\ndaily time-series + per-user table + per-unit-kind breakdown.\n\nPeriod whitelist: 30d | 90d | 365d. Anything else 400s — the\naggregation cost grows linearly so we don't accept arbitrary ranges.","operationId":"get_app_metrics_api_admin_official_apps__slug__metrics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"30d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAppMetricsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/hand-templates":{"get":{"tags":["admin-official-apps-nail-art"],"summary":"List Curated Templates","description":"Forward list. Includes inactive rows when ``include_inactive=true``.","operationId":"list_curated_templates_api_admin_official_apps_nail_art_hand_templates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Curated Templates Api Admin Official Apps Nail Art Hand Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin-official-apps-nail-art"],"summary":"Save Curated Upload","description":"Persist the curated row after a successful S3 PUT.","operationId":"save_curated_upload_api_admin_official_apps_nail_art_hand_templates_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Curated Upload Api Admin Official Apps Nail Art Hand Templates Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/hand-templates/upload/presign":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Presign Curated Upload","description":"Mint a presigned PUT URL via nail-art-api.\n\nNo audit row here — the audit is written by `save_curated_upload`\nonce the resulting key is actually persisted as a curated template.","operationId":"presign_curated_upload_api_admin_official_apps_nail_art_hand_templates_upload_presign_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 Presign Curated Upload Api Admin Official Apps Nail Art Hand Templates Upload Presign Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/nail-art/hand-templates/annotate":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Annotate Curated Upload","description":"Best-effort Gemini suggestions for the upload form. No audit row —\nannotate is read-shaped (no DB mutation on the per-app side).","operationId":"annotate_curated_upload_api_admin_official_apps_nail_art_hand_templates_annotate_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 Annotate Curated Upload Api Admin Official Apps Nail Art Hand Templates Annotate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/nail-art/hand-templates/generate":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Generate Curated Template","description":"Fan out 3 Fal NB2 candidates. Synchronous, ~10-30s wall.","operationId":"generate_curated_template_api_admin_official_apps_nail_art_hand_templates_generate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Generate Curated Template Api Admin Official Apps Nail Art Hand Templates Generate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/nail-art/hand-templates/{template_id}/finalize":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Finalize Curated Template","description":"Promote one or more picked candidates to active curated rows.","operationId":"finalize_curated_template_api_admin_official_apps_nail_art_hand_templates__template_id__finalize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Finalize Curated Template Api Admin Official Apps Nail Art Hand Templates  Template Id  Finalize Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/hand-templates/{template_id}/mask-pixels":{"get":{"tags":["admin-official-apps-nail-art"],"summary":"Get Curated Mask Pixels","description":"Inline base64 SAM3 masks for the admin mask editor canvas.","operationId":"get_curated_mask_pixels_api_admin_official_apps_nail_art_hand_templates__template_id__mask_pixels_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Curated Mask Pixels Api Admin Official Apps Nail Art Hand Templates  Template Id  Mask Pixels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/hand-templates/{template_id}/assignments":{"patch":{"tags":["admin-official-apps-nail-art"],"summary":"Update Curated Assignments","description":"Save a curated template's edited assignments (nail → mask mapping).","operationId":"update_curated_assignments_api_admin_official_apps_nail_art_hand_templates__template_id__assignments_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Curated Assignments Api Admin Official Apps Nail Art Hand Templates  Template Id  Assignments Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/hand-templates/{template_id}/masks":{"patch":{"tags":["admin-official-apps-nail-art"],"summary":"Update Curated Masks","description":"Save a curated template's brushed/erased SAM3 masks.","operationId":"update_curated_masks_api_admin_official_apps_nail_art_hand_templates__template_id__masks_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Curated Masks Api Admin Official Apps Nail Art Hand Templates  Template Id  Masks Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/hand-templates/{template_id}":{"get":{"tags":["admin-official-apps-nail-art"],"summary":"Get Curated Detail","description":"Full curated template detail incl. `hand_preprocess` artifacts.\n\nAdmin console polls this every 5s after upload until\n`hand_preprocess` flips from null to populated, at which point the\neditors become usable. The poll is read-only — no audit row.","operationId":"get_curated_detail_api_admin_official_apps_nail_art_hand_templates__template_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Curated Detail Api Admin Official Apps Nail Art Hand Templates  Template Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-official-apps-nail-art"],"summary":"Delete Curated Template","description":"Soft-delete a curated hand template (flip `is_active=False`).\n\nThe row drops out of the user-facing picker and the default admin\nlist, but stays in storage so past jobs referencing its s3_key still\nresolve. Operator-gated + audit-logged.","operationId":"delete_curated_template_api_admin_official_apps_nail_art_hand_templates__template_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/usage":{"get":{"tags":["admin-official-apps-nail-art"],"summary":"List User Usage","description":"Return paginated job history for one user with presigned URLs.\n\n`user_id` is the Tintin user UUID (matches `nail_art_jobs.user_id`\nset at submit time from the iframe JWT). The proxy passes through\npagination + the optional `include_drafts` toggle verbatim.","operationId":"list_user_usage_api_admin_official_apps_nail_art_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"include_drafts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Drafts"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List User Usage Api Admin Official Apps Nail Art Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/debug/harmonize/layouts":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Create Debug Layout","description":"Build (or reuse) a debug layout from a source (M1: existing job).","operationId":"create_debug_layout_api_admin_official_apps_nail_art_debug_harmonize_layouts_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 Create Debug Layout Api Admin Official Apps Nail Art Debug Harmonize Layouts Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/nail-art/debug/harmonize/layouts/{layout_id}":{"get":{"tags":["admin-official-apps-nail-art"],"summary":"Get Debug Layout","operationId":"get_debug_layout_api_admin_official_apps_nail_art_debug_harmonize_layouts__layout_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"layout_id","in":"path","required":true,"schema":{"type":"string","title":"Layout Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Debug Layout Api Admin Official Apps Nail Art Debug Harmonize Layouts  Layout Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/debug/harmonize/runs":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Create Debug Run","description":"Create + enqueue one harmonize replay with a swapped prompt.","operationId":"create_debug_run_api_admin_official_apps_nail_art_debug_harmonize_runs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Debug Run Api Admin Official Apps Nail Art Debug Harmonize Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin-official-apps-nail-art"],"summary":"List Debug Runs","operationId":"list_debug_runs_api_admin_official_apps_nail_art_debug_harmonize_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"layout_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Layout Id"}},{"name":"batch_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Debug Runs Api Admin Official Apps Nail Art Debug Harmonize Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/debug/harmonize/defaults":{"get":{"tags":["admin-official-apps-nail-art"],"summary":"Debug Defaults","description":"Default harmonize prompts for editor pre-fill.","operationId":"debug_defaults_api_admin_official_apps_nail_art_debug_harmonize_defaults_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Debug Defaults Api Admin Official Apps Nail Art Debug Harmonize Defaults Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/nail-art/debug/harmonize/jobs":{"get":{"tags":["admin-official-apps-nail-art"],"summary":"Debug Search Jobs","description":"Search nail-art jobs by id/label for the 'from existing job' picker.","operationId":"debug_search_jobs_api_admin_official_apps_nail_art_debug_harmonize_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Debug Search Jobs Api Admin Official Apps Nail Art Debug Harmonize Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/debug/harmonize/upload/presign":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Debug Upload Presign","description":"Presign a PUT for an ad-hoc (hand | nail_set) image.","operationId":"debug_upload_presign_api_admin_official_apps_nail_art_debug_harmonize_upload_presign_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 Debug Upload Presign Api Admin Official Apps Nail Art Debug Harmonize Upload Presign Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/nail-art/debug/harmonize/zip/presign":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Debug Zip Presign","description":"Presign a PUT for a batch nail-set zip.","operationId":"debug_zip_presign_api_admin_official_apps_nail_art_debug_harmonize_zip_presign_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Debug Zip Presign Api Admin Official Apps Nail Art Debug Harmonize Zip Presign Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/nail-art/debug/harmonize/zip/expand":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Debug Zip Expand","description":"Unpack an uploaded zip into individual nail-set objects.","operationId":"debug_zip_expand_api_admin_official_apps_nail_art_debug_harmonize_zip_expand_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 Debug Zip Expand Api Admin Official Apps Nail Art Debug Harmonize Zip Expand Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/nail-art/debug/harmonize/batch":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Create Debug Batch","description":"Fan out one harmonize run per nail-set against a fixed hand template.","operationId":"create_debug_batch_api_admin_official_apps_nail_art_debug_harmonize_batch_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 Create Debug Batch Api Admin Official Apps Nail Art Debug Harmonize Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/nail-art/debug/harmonize/runs/{run_id}":{"get":{"tags":["admin-official-apps-nail-art"],"summary":"Get Debug Run","operationId":"get_debug_run_api_admin_official_apps_nail_art_debug_harmonize_runs__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Debug Run Api Admin Official Apps Nail Art Debug Harmonize Runs  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/video-templates":{"get":{"tags":["admin-official-apps-nail-art"],"summary":"List Video Templates","description":"Forward list. Includes inactive rows when ``include_inactive=true``.","operationId":"list_video_templates_api_admin_official_apps_nail_art_video_templates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Video Templates Api Admin Official Apps Nail Art Video Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin-official-apps-nail-art"],"summary":"Create Video Template","description":"Persist the curated video template after a successful S3 PUT.","operationId":"create_video_template_api_admin_official_apps_nail_art_video_templates_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Video Template Api Admin Official Apps Nail Art Video Templates Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/video-templates/upload/presign":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Presign Video Template Upload","description":"Mint a presigned PUT URL for a template clip via nail-art-api.\n\nNo audit row — the audit is written by `create_video_template` once the\nkey is persisted as a catalog row.","operationId":"presign_video_template_upload_api_admin_official_apps_nail_art_video_templates_upload_presign_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 Presign Video Template Upload Api Admin Official Apps Nail Art Video Templates Upload Presign Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/official-apps/nail-art/video-templates/{template_id}":{"patch":{"tags":["admin-official-apps-nail-art"],"summary":"Update Video Template","description":"Rename / re-describe / reorder / (un)hide a curated video template.","operationId":"update_video_template_api_admin_official_apps_nail_art_video_templates__template_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Video Template Api Admin Official Apps Nail Art Video Templates  Template Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-official-apps-nail-art"],"summary":"Delete Video Template","description":"Soft-delete a curated video template (flip ``is_active=False``).","operationId":"delete_video_template_api_admin_official_apps_nail_art_video_templates__template_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/codex-video/runs":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Create Codex Video Run","description":"Trigger one codex directed-flow run (reference video + nail-tip).","operationId":"create_codex_video_run_api_admin_official_apps_nail_art_codex_video_runs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Codex Video Run Api Admin Official Apps Nail Art Codex Video Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin-official-apps-nail-art"],"summary":"List Codex Video Runs","operationId":"list_codex_video_runs_api_admin_official_apps_nail_art_codex_video_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Codex Video Runs Api Admin Official Apps Nail Art Codex Video Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/codex-video/runs/{run_id}":{"get":{"tags":["admin-official-apps-nail-art"],"summary":"Get Codex Video Run","operationId":"get_codex_video_run_api_admin_official_apps_nail_art_codex_video_runs__run_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Codex Video Run Api Admin Official Apps Nail Art Codex Video Runs  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/official-apps/nail-art/codex-video/upload/presign":{"post":{"tags":["admin-official-apps-nail-art"],"summary":"Codex Video Upload Presign","operationId":"codex_video_upload_presign_api_admin_official_apps_nail_art_codex_video_upload_presign_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 Codex Video Upload Presign Api Admin Official Apps Nail Art Codex Video Upload Presign Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/platform/me":{"get":{"tags":["platform-sdk"],"summary":"Me","description":"Identity + wallet + plan for the iframe-JWT-bearing user.\n\nApps call this once on iframe load. Safe to cache server-side for\n~30s; balance staleness is bounded by the next charge attempt\n(which reads the fresh wallet via SELECT FOR UPDATE).","operationId":"me_api_platform_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformMeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/platform/charge":{"post":{"tags":["platform-sdk"],"summary":"Charge Endpoint","description":"Debit the user's wallet by units * meter_unit.cents.\n\nDual-auth — X-Internal-Key (caller identity) + body.token (subject).\nIdempotent on (installation_id, idempotency_key) via DB partial\nunique index.\n\nReturns 402 on insufficient funds with a JSON body the caller can\nsurface to the user verbatim.","operationId":"charge_endpoint_api_platform_charge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChargeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/platform/charge/{charge_id}/refund":{"post":{"tags":["platform-sdk"],"summary":"Refund Endpoint","description":"Reverse a prior charge. Idempotent on charge_id.","operationId":"refund_endpoint_api_platform_charge__charge_id__refund_post","parameters":[{"name":"charge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Charge Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/platform/usage":{"post":{"tags":["platform-sdk"],"summary":"Usage Endpoint","description":"Fire-and-forget non-billing telemetry event. Logs a zero-amount\nledger row with `action_type='app_usage'` and the event details in\nmetadata. Aggregation surfaces in admin Usage tab.","operationId":"usage_endpoint_api_platform_usage_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__platform_sdk__UsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/platform/token/validate":{"post":{"tags":["platform-sdk"],"summary":"Validate Endpoint","description":"Diagnostic endpoint — app backends can use this to verify their\nJWT_SECRET pull from Secrets Manager matches the platform's. Returns\nthe decoded claims on success. Not part of the steady-state hot path\n(apps validate locally via `tintin_platform_sdk.validate_token`).","operationId":"validate_endpoint_api_platform_token_validate_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Validate Endpoint Api Platform Token Validate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/platform/storage/upload-url":{"post":{"tags":["platform-sdk"],"summary":"Storage Upload Url","description":"Mint a presigned PUT URL targeting the user's `Apps/<App Title>/`\nfolder. Quota enforcement runs first — 402 on overflow.\n\nThe iframe PUTs the raw bytes to `upload_url`, then calls\n`/storage/confirm` to flip the file to `is_confirmed=true`.","operationId":"storage_upload_url_api_platform_storage_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageUploadUrlRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/platform/storage/confirm":{"post":{"tags":["platform-sdk"],"summary":"Storage Confirm","description":"Mark a presigned PUT complete after the browser finishes uploading.","operationId":"storage_confirm_api_platform_storage_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/platform/storage/files/{file_id}":{"get":{"tags":["platform-sdk"],"summary":"Storage Get File","description":"Owner+app-scoped lookup. Returns the file + a fresh download URL.","operationId":"storage_get_file_api_platform_storage_files__file_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/platform/storage/files/bulk-get":{"post":{"tags":["platform-sdk"],"summary":"Storage Bulk Get","description":"App-backend → Platform: resolve N file_ids to their s3_keys in\none round-trip. Dual-auth: X-Internal-Key (caller identity) + iframe\nJWT (user attribution + scope). Used by per-app backends on job\nsubmission so they don't trust raw client-supplied s3_keys.","operationId":"storage_bulk_get_api_platform_storage_files_bulk_get_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageBulkGetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageBulkGetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/apps/{slug}/agents":{"get":{"tags":["app-agent-bindings"],"summary":"Get Bindable Agents","operationId":"get_bindable_agents_api_apps__slug__agents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindableAgentList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{slug}/binding":{"get":{"tags":["app-agent-bindings"],"summary":"Get Current Binding","operationId":"get_current_binding_api_apps__slug__binding_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["app-agent-bindings"],"summary":"Put Binding","operationId":"put_binding_api_apps__slug__binding_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__app_agent_bindings__BindRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["app-agent-bindings"],"summary":"Delete Current Binding","operationId":"delete_current_binding_api_apps__slug__binding_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{slug}/binding/preview":{"get":{"tags":["app-agent-bindings"],"summary":"Preview Binding","description":"Skills that bind would install on the chosen agent + whether an\nupdate is available for an existing binding.","operationId":"preview_binding_api_apps__slug__binding_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindingPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/apps/{slug}/chat/open":{"post":{"tags":["app-agent-bindings"],"summary":"Open Chat","description":"Mint a fresh `ChatConversation` against the bound agent.\n\nPer-use semantics: every call creates a new row. The App's frontend\nopens one of these on dialog-open and discards the id on close;\nrolling-summary in Redis keeps token cost bounded if a single\nconversation grows long.\n\nReturns the conversation id + the bound agent id + the WS path the\niframe should connect to. The iframe presents its slug-scoped App\nJWT in `?token=` — `chat_ws.py` resolves the binding and proceeds.","operationId":"open_chat_api_apps__slug__chat_open_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatOpenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatOpenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/apps/{slug}/skills/register":{"post":{"tags":["app-skills-internal"],"summary":"Register Skills","operationId":"register_skills_api_internal_apps__slug__skills_register_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterSkillsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterSkillsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/skills":{"get":{"tags":["agents"],"summary":"List Skills","description":"List all skills for an agent — native + DB-tracked + S3 fallback.","operationId":"list_skills_api_agents__agent_id__skills_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents"],"summary":"Add Skill","description":"Add a custom skill. Body: {name: str, description: str, content: str}.","operationId":"add_skill_api_agents__agent_id__skills_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/skills/install-url":{"post":{"tags":["agents"],"summary":"Install Skill From Url","description":"Install a skill from a ClawHub URL.","operationId":"install_skill_from_url_api_agents__agent_id__skills_install_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/skills/{skill_slug}/upgrade":{"post":{"tags":["agents"],"summary":"Upgrade Skill","description":"Upgrade a skill to the latest version from ClawHub.","operationId":"upgrade_skill_api_agents__agent_id__skills__skill_slug__upgrade_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"skill_slug","in":"path","required":true,"schema":{"type":"string","title":"Skill Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/skills/{skill_slug}":{"patch":{"tags":["agents"],"summary":"Update Skill","description":"Pause, resume, or configure an agent skill.","operationId":"update_skill_api_agents__agent_id__skills__skill_slug__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"skill_slug","in":"path","required":true,"schema":{"type":"string","title":"Skill Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents"],"summary":"Delete Skill","description":"Remove a skill from an agent's workspace and DB.","operationId":"delete_skill_api_agents__agent_id__skills__skill_slug__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"skill_slug","in":"path","required":true,"schema":{"type":"string","title":"Skill Slug"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/skills/{skill_slug}/touch":{"post":{"tags":["agents"],"summary":"Touch Skill","description":"Mark a skill as recently used (updates last_invoked_at for heat tracking).","operationId":"touch_skill_api_agents__agent_id__skills__skill_slug__touch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"skill_slug","in":"path","required":true,"schema":{"type":"string","title":"Skill Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/skills/{skill_slug}/fork":{"post":{"tags":["agents"],"summary":"Fork Agent Skill","description":"Fork a skill into a user/team-owned custom variant.","operationId":"fork_agent_skill_api_agents__agent_id__skills__skill_slug__fork_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"skill_slug","in":"path","required":true,"schema":{"type":"string","title":"Skill Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/skills/{fork_slug}/replace-base":{"post":{"tags":["agents"],"summary":"Replace Base With Fork","description":"Replace a base skill with its fork on this agent.\nUninstalls the base skill (DB + S3) and ensures the fork is installed.","operationId":"replace_base_with_fork_api_agents__agent_id__skills__fork_slug__replace_base_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"fork_slug","in":"path","required":true,"schema":{"type":"string","title":"Fork Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/heartbeat-tasks":{"get":{"tags":["agents"],"summary":"List Heartbeat Tasks","description":"List all heartbeat tasks for an agent.","operationId":"list_heartbeat_tasks_api_agents__agent_id__heartbeat_tasks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["agents"],"summary":"Add Heartbeat Task","description":"Add a new heartbeat task. Uses LLM to clarify the instruction.","operationId":"add_heartbeat_task_api_agents__agent_id__heartbeat_tasks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"skip_refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Skip workspace refresh (agent-side calls)","default":false,"title":"Skip Refresh"},"description":"Skip workspace refresh (agent-side calls)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatTaskAddRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/heartbeat-tasks/{task_id}":{"patch":{"tags":["agents"],"summary":"Toggle Heartbeat Task","description":"Toggle a heartbeat task on/off.","operationId":"toggle_heartbeat_task_api_agents__agent_id__heartbeat_tasks__task_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"skip_refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Skip workspace refresh (agent-side calls)","default":false,"title":"Skip Refresh"},"description":"Skip workspace refresh (agent-side calls)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatTaskToggleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["agents"],"summary":"Delete Heartbeat Task","description":"Remove a heartbeat task.","operationId":"delete_heartbeat_task_api_agents__agent_id__heartbeat_tasks__task_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"skip_refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Skip workspace refresh (agent-side calls)","default":false,"title":"Skip Refresh"},"description":"Skip workspace refresh (agent-side calls)"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/rendered-heartbeat":{"get":{"tags":["agents"],"summary":"Get Rendered Heartbeat","description":"Return the rendered HEARTBEAT.md content without uploading to S3.","operationId":"get_rendered_heartbeat_api_agents__agent_id__rendered_heartbeat_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/heartbeat-history":{"get":{"tags":["agents"],"summary":"Get Heartbeat History","description":"Heartbeat execution history for an agent (app user with access check).","operationId":"get_heartbeat_history_api_agents__agent_id__heartbeat_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"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/billing":{"get":{"tags":["billing"],"summary":"Get Billing Status","description":"Get current billing status. Returns team wallet if user is in a team.","operationId":"get_billing_status_api_billing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/subscribe":{"post":{"tags":["billing"],"summary":"Subscribe","description":"Subscribe to a plan via Stripe Checkout.","operationId":"subscribe_api_billing_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/studio/subscribe":{"post":{"tags":["billing"],"summary":"Studio Subscribe","description":"Subscribe to a studio (consumer) plan — nail / garment try-on / video.\n\nGrants the integer studio_credits pool on payment (via the invoice webhook,\nrouted by price_id). Separate from /subscribe because the studio tier names\ncollide with the agent V2 plan names.","operationId":"studio_subscribe_api_billing_studio_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioSubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/studio/credit-pack":{"post":{"tags":["billing"],"summary":"Studio Credit Pack","description":"One-time studio credit pack checkout (mode=payment, no subscription).\n\nThe insufficient-credits paywall's low-commitment offer. Credits are\ngranted by the `studio_credit_pack` webhook branch into the non-expiring\n`studio_bonus_credits` pool. Personal wallet only.","operationId":"studio_credit_pack_api_billing_studio_credit_pack_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioCreditPackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/studio/cancel":{"post":{"tags":["billing"],"summary":"Studio Cancel","description":"Cancel the studio subscription at period end (keeps access + credits\nuntil the paid period lapses). Reversible via /studio/resume. Optional\nowner_team_id (flag-gated + owner-only) cancels the team subscription.","operationId":"studio_cancel_api_billing_studio_cancel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioCancelRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/studio/resume":{"post":{"tags":["billing"],"summary":"Studio Resume","description":"Undo a scheduled studio cancellation (before the period ends). Optional\nowner_team_id (flag-gated + owner-only) resumes the team subscription.","operationId":"studio_resume_api_billing_studio_resume_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioSubscriptionManageRequest","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/studio/change-plan":{"post":{"tags":["billing"],"summary":"Studio Change Plan","description":"Upgrade / downgrade the active studio subscription (Stripe proration).\nOptional owner_team_id (flag-gated + owner-only) changes the team plan.","operationId":"studio_change_plan_api_billing_studio_change_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioChangePlanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/studio/usage":{"get":{"tags":["billing"],"summary":"Get Studio Usage","description":"Unified studio-credit usage for the signed-in user.\n\nThe studio_credits pool is shared across nail / garment try-on / video and\nis user-scoped (personal wallet), matching the gateway's debit scope.\nReturns the spendable balance (0 once expired — no rollover), the expiry,\nand the recent ledger (charges negative, grants positive) so the account\n/usage page can render one timeline across all products.","operationId":"get_studio_usage_api_billing_studio_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/studio/invoices":{"get":{"tags":["billing"],"summary":"Get Studio Invoices","description":"Recent Stripe invoices (hosted page URL + PDF) for the account billing\nrecords view. Subscription *management* lives on the pricing page, not here.","operationId":"get_studio_invoices_api_billing_studio_invoices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/add-credits":{"post":{"tags":["billing"],"summary":"Add Credits","description":"Purchase credits via Stripe Checkout.","operationId":"add_credits_api_billing_add_credits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCreditsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/auto-reload":{"post":{"tags":["billing"],"summary":"Configure Auto Reload","description":"Configure auto-reload settings.","operationId":"configure_auto_reload_api_billing_auto_reload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoReloadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/usage":{"get":{"tags":["billing"],"summary":"Get Usage","description":"Get credit usage history.","operationId":"get_usage_api_billing_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__billing__UsageResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/credits-received":{"get":{"tags":["billing"],"summary":"Get Credits Received","description":"List positive ledger entries (purchases, admin grants, refunds, etc.)\nacross the caller's accessible wallets.\n\nAggregates the user's personal wallet AND their team wallet (if any),\nso team users see purchases that landed on the team wallet — which is\nwhere credit_purchase actually writes for team members. The\n`target.kind` field disambiguates per-row.\n\nEach row carries `action_type` raw (frontend i18n via\n`billing.creditSource.{action_type}`) and an optional `agent` block\nthat's populated when `ledger_transactions.agent_id` is set — refunds\nissued in response to a complaint about a specific agent should write\nthat agent's ID, so a future \"refund tied to agent\" trail comes for\nfree without schema changes.\n\nPer-user rate-limited (`usage` bucket — same as the agent-scoped\nusage endpoints — heavy refreshing across views counts together).","operationId":"get_credits_received_api_billing_credits_received_get","security":[{"HTTPBearer":[]}],"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/CreditsReceivedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/usage/by-agent":{"get":{"tags":["billing"],"summary":"Get Billing Usage By Agent","description":"Per-agent credits rollup over the last N days (1-365).\n\nPowers the \"Usage by agent\" summary in tintin-app's billing panel —\nreplaces the old per-transaction list. Cached 10 minutes; per-user\nrate-limited (same bucket as `/agents/{id}/usage/*`).","operationId":"get_billing_usage_by_agent_api_billing_usage_by_agent_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingUsageByAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/redeem-coupon":{"post":{"tags":["billing"],"summary":"Redeem Coupon","description":"Redeem a coupon code.","operationId":"redeem_coupon_api_billing_redeem_coupon_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemCouponRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Stripe webhook handler.","operationId":"stripe_webhook_api_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/agents/{agent_id}/usage/summary":{"get":{"tags":["agent-usage"],"summary":"Get Agent Usage Summary","description":"Summary for one agent: totals, action-type bars, model bars, top 5 sessions.\n\nWhen `conversation_id` is set, the same shape is returned but every\naggregation is restricted to that conversation and `top_sessions` is\nempty. Cached 10 minutes (per (user_id, agent_id, days, conversation_id)).","operationId":"get_agent_usage_summary_api_agents__agent_id__usage_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"conversation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Restrict the summary to one conversation. Skips the top-sessions block (it would only contain that one row).","title":"Conversation Id"},"description":"Restrict the summary to one conversation. Skips the top-sessions block (it would only contain that one row)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUsageSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/usage/sessions":{"get":{"tags":["agent-usage"],"summary":"Get Agent Usage Sessions","description":"Per-session breakdown for one agent.\n\nRows where the gateway didn't have an active conversation_id at debit\ntime collapse into a single row with conversation_id=null and\ntitle=null — surface as \"Other\" in the UI.","operationId":"get_agent_usage_sessions_api_agents__agent_id__usage_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"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":100,"minimum":1,"default":20,"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/AgentSessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/content":{"get":{"tags":["content"],"summary":"List Content","description":"List content queue items for user's agents.","operationId":"list_content_api_content_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"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/ContentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["content"],"summary":"Create Content","description":"Create a content queue item (called by agent via API).","operationId":"create_content_api_content_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/content/{item_id}":{"get":{"tags":["content"],"summary":"Get Content Item","description":"Get a single content queue item.","operationId":"get_content_item_api_content__item_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["content"],"summary":"Update Content","description":"Update pending content item.","operationId":"update_content_api_content__item_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/content/{item_id}/approve":{"post":{"tags":["content"],"summary":"Approve Content","description":"Approve content for posting.","operationId":"approve_content_api_content__item_id__approve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApproveRequest"},{"type":"null"}],"title":"Req"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/content/{item_id}/reject":{"post":{"tags":["content"],"summary":"Reject Content","description":"Reject content.","operationId":"reject_content_api_content__item_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/content/{item_id}/posted":{"post":{"tags":["content"],"summary":"Mark Content Posted","description":"Mark approved content as posted with the TikTok post ID.","operationId":"mark_content_posted_api_content__item_id__posted_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentPostedRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/content/{item_id}/media-url":{"get":{"tags":["content"],"summary":"Get Content Media Url","description":"Return a presigned S3 URL for the content media.","operationId":"get_content_media_url_api_content__item_id__media_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications":{"get":{"tags":["notifications"],"summary":"List Notifications","description":"List user's notifications.","operationId":"list_notifications_api_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"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/NotificationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/unread-count":{"get":{"tags":["notifications"],"summary":"Get Unread Count","description":"Get unread notification count.","operationId":"get_unread_count_api_notifications_unread_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/notifications/{notification_id}/read":{"patch":{"tags":["notifications"],"summary":"Mark Read","description":"Mark a notification as read.","operationId":"mark_read_api_notifications__notification_id__read_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/read-all":{"post":{"tags":["notifications"],"summary":"Mark All Read","description":"Mark all notifications as read.","operationId":"mark_all_read_api_notifications_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/upload-urls":{"post":{"tags":["chat"],"summary":"Get Upload Urls","description":"Return presigned PUT URLs for direct S3 upload from the browser.","operationId":"get_upload_urls_api_chat_upload_urls_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/multipart/create":{"post":{"tags":["chat"],"summary":"Chat Multipart Create","description":"Start a chat multipart upload. Validates agent access + file shape,\nmints an S3 key under `assets/chat/{user_id}/{uuid}/{filename}` so\ndownstream chat message rendering already knows how to presign it,\nand opens an S3 MultipartUpload.","operationId":"chat_multipart_create_api_chat_multipart_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMultipartCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMultipartCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/multipart/presign-parts":{"post":{"tags":["chat"],"summary":"Chat Multipart Presign Parts","description":"Mint presigned UploadPart URLs for the requested part numbers.\n\nThe `file_id` field on `MultipartPresignPartsRequest` is unused on the\nchat path (chat has no pre-upload DB row); the s3_key's user-id prefix\nis what scopes access — any attempt to presign a key outside the\ncaller's chat namespace 403s.","operationId":"chat_multipart_presign_parts_api_chat_multipart_presign_parts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartPresignPartsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartPresignPartsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/multipart/complete":{"post":{"tags":["chat"],"summary":"Chat Multipart Complete","description":"Finalize the upload, head_object for real size, mirror the\n`track_file` call that /api/chat/upload-urls does so the file shows up\nin the user's storage inventory like any other chat upload.","operationId":"chat_multipart_complete_api_chat_multipart_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/multipart/abort":{"post":{"tags":["chat"],"summary":"Chat Multipart Abort","description":"Cancel an in-flight chat multipart upload. Idempotent.","operationId":"chat_multipart_abort_api_chat_multipart_abort_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartAbortRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agents/{agent_id}/conversations":{"get":{"tags":["conversations"],"summary":"List Conversations","description":"List conversations for this agent.\n\nShows the user's own conversations plus shared (non-private) conversations\nfrom team members. Newest first (by updated_at) with pagination.","operationId":"list_conversations_api_agents__agent_id__conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":30,"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["conversations"],"summary":"Create Conversation","description":"Create a new conversation for this agent.","operationId":"create_conversation_api_agents__agent_id__conversations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}":{"patch":{"tags":["conversations"],"summary":"Update Conversation","description":"Rename, archive, or toggle privacy of a conversation.\n\nOnly the conversation owner can rename, archive, delete, or toggle privacy.\nTeam members can view and chat in shared conversations but cannot modify them.","operationId":"update_conversation_api_conversations__conversation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["conversations"],"summary":"Delete Conversation","description":"Delete a conversation (messages retain their history, conversation_id set to NULL).","operationId":"delete_conversation_api_conversations__conversation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/delete":{"post":{"tags":["conversations"],"summary":"Delete Conversation Post","description":"Delete a conversation via POST (workaround for Cloudflare blocking DELETE).","operationId":"delete_conversation_post_api_conversations__conversation_id__delete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}":{"get":{"tags":["bitables"],"summary":"Get Bitable","operationId":"get_bitable_api_bitables__table_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["bitables"],"summary":"Update Bitable","operationId":"update_bitable_api_bitables__table_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitableUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["bitables"],"summary":"Delete Bitable","operationId":"delete_bitable_api_bitables__table_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/parent-tables":{"get":{"tags":["bitables"],"summary":"List Parent Tables","description":"List distinct parent tables linking TO this table via any link column.\n\nUsed by the frontend's sub-table panel to render \"Open in parent\"\naffordances. Each result is one {parent_table_id, name, col_id,\ncol_name} tuple; a single parent table with two link columns\npointing at this one shows up twice (once per column).\n\nVisibility: the caller must be able to see THIS table (same check\nas GET /bitables/{id}). Parent tables the caller can't see are\nfiltered out so a shared child doesn't leak parent identities.","operationId":"list_parent_tables_api_bitables__table_id__parent_tables_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/state-summary":{"get":{"tags":["bitables"],"summary":"Get Bitable State Summary","description":"Per-column cell-state breakdown + actionable blockers.\n\nSingle source of truth for \"how's the pipeline doing?\" — consumed by\nthe bitable skill's ``status`` subcommand, the chat-side digest in\n``chat_reply_processor`` (which builds a [SYSTEM] hint from this so\nthe agent answers status questions from data), and the frontend's\nblockers banner. The ``bitable_blocker_notifier`` worker drives off\nthe same projection so a chat ping and an agent reply describe the\nsame reality.\n\nVisibility follows the same rules as ``GET /api/bitables/{id}``.","operationId":"get_bitable_state_summary_api_bitables__table_id__state_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/recipe-graph":{"get":{"tags":["bitables"],"summary":"Get Recipe Graph","description":"Static graph of column dependencies for the FE DAG view.\n\nThe shape (nodes + edges + cross_table_refs) is derived purely from\nthe table's `columns` JSONB. No row data is consulted — this endpoint\nis suitable for an initial schema render before the user picks a\nrow to overlay state on top.","operationId":"get_recipe_graph_api_bitables__table_id__recipe_graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/rows/{row_id}/hook-state":{"get":{"tags":["bitables"],"summary":"Get Row Hook State","description":"Per-row hook state for the DAG overlay.\n\nReturns one entry per versioned column on the table with:\n  - cell_state (state, attempt_count, error, last_attempt)\n  - current version pointer + iteration_note + skill_used\n  - inputs_snapshot (which upstream versions were consumed)\n  - drift list (per-input is_stale flag) — the load-bearing thing\n    the FE renders as a \"stale\" badge on edges.","operationId":"get_row_hook_state_api_bitables__table_id__rows__row_id__hook_state_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/rows":{"get":{"tags":["bitables"],"summary":"List Rows","operationId":"list_rows_api_bitables__table_id__rows_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"order_key from previous page","title":"Cursor"},"description":"order_key from previous page"},{"name":"revision","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Optional revision id; defaults to the table's current HEAD.","title":"Revision"},"description":"Optional revision id; defaults to the table's current HEAD."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["bitables"],"summary":"Insert Rows","operationId":"insert_rows_api_bitables__table_id__rows_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowsInsert"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/by-agent/{agent_id}":{"get":{"tags":["bitables"],"summary":"List By Agent","operationId":"list_by_agent_api_bitables_by_agent__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO created_at from previous page","title":"Cursor"},"description":"ISO created_at from previous page"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/by-conversation/{conversation_id}":{"get":{"tags":["bitables"],"summary":"List By Conversation","operationId":"list_by_conversation_api_bitables_by_conversation__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables":{"get":{"tags":["bitables"],"summary":"List Workspace","operationId":"list_workspace_api_bitables_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"query","required":false,"schema":{"type":"string","pattern":"^(me|team)$","default":"team","title":"Owner"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["bitables"],"summary":"Create Bitable","operationId":"create_bitable_api_bitables_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitableCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/rows/{row_id}":{"patch":{"tags":["bitables"],"summary":"Update Row","operationId":"update_row_api_bitables__table_id__rows__row_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["bitables"],"summary":"Delete Row","operationId":"delete_row_api_bitables__table_id__rows__row_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/rows/bulk-update-cell":{"post":{"tags":["bitables"],"summary":"Bulk Update Cell","description":"Set a single column's value across many rows in one transaction.\n\nPowers the frontend's column-header \"Set value for all rows\" + the\ncell multi-select toolbar's \"Set value\" action. Both surfaces hit\nthis endpoint with the row_ids they want to touch.\n\nWhen the targeted column is the `status_col` of any recipe's\n`row_gate` AND the new value is in the recipe's `allow`, the\nendpoint stamps a one-shot Redis bypass marker for each affected\n(row, recipe_col) pair so the next executor tick dispatches without\nre-gating. This is the load-bearing piece for the v0.19+\n\"user advances row through stages\" flow.\n\nOnly unversioned columns are accepted — versioned cells (recipe\noutputs) must go through the cell-version write path so history is\npreserved. Targeting a versioned column returns 400.","operationId":"bulk_update_cell_api_bitables__table_id__rows_bulk_update_cell_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateCellRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateCellResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/reconcile-row-gates":{"post":{"tags":["bitables"],"summary":"Reconcile Row Gates","description":"Walk every cell_state on this table and reconcile against row_gate.\n\nOne-shot rescue for pre-0.19.1 tables where row_gate-blocked cells\nlanded at `pending_approval` (B3 HITL UI state, triggers the\nReview modal) instead of `row_gated`. Also handles cells whose\nstatus has since advanced past the gate but stayed stuck because\nthe bypass-marker path didn't wake them up.\n\nFor each versioned cell on the table:\n  - If recipe has no `row_gate` → skip\n  - Resolve current status from row.data[status_col]\n  - If status IS in row_gate.allow:\n      * state in {pending_approval, row_gated} → flip to `ready`\n        (executor's next tick dispatches normally)\n  - If status NOT in row_gate.allow:\n      * state == pending_approval → flip to `row_gated` (silent\n        gate, no Review modal)\n      * state == row_gated → leave (already correct)\n  - All other states → leave (running / done / failed / etc.)\n\nOwner / team-member auth via `_load_for_write`. Idempotent — running\ntwice produces the same result. Returns the per-row counts so the\ncaller can verify the rescue actually moved cells.","operationId":"reconcile_row_gates_api_bitables__table_id__reconcile_row_gates_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reconcile Row Gates Api Bitables  Table Id  Reconcile Row Gates Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/columns":{"post":{"tags":["bitables"],"summary":"Add Column","operationId":"add_column_api_bitables__table_id__columns_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__bitable__ColumnCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/columns/{col_id}":{"patch":{"tags":["bitables"],"summary":"Update Column","operationId":"update_column_api_bitables__table_id__columns__col_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"col_id","in":"path","required":true,"schema":{"type":"string","title":"Col Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__bitable__ColumnUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["bitables"],"summary":"Delete Column","operationId":"delete_column_api_bitables__table_id__columns__col_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"col_id","in":"path","required":true,"schema":{"type":"string","title":"Col Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/export":{"get":{"tags":["bitables"],"summary":"Export Bitable","description":"Export the table's rows as xlsx or pdf. Phase 1 is plain format\nexport — every column type renders to a string per\n``bitable_export._cell_to_str`` and the file comes back as a binary\ndownload. Phase 2 (LLM-enhanced export) will add an opt-in query\nflag; not implemented yet.\n\nRead-only (conversation visibility + agent visibility as usual).","operationId":"export_bitable_api_bitables__table_id__export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(xlsx|pdf)$","default":"xlsx","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/exports":{"post":{"tags":["bitables"],"summary":"Start Export","description":"Kick off an async export. Returns a job_id immediately; the\nclient polls ``GET /exports/{job_id}`` until status is ready (or\nfailed) and then downloads from the returned presigned URL.\n\nThree formats:\n  - ``xlsx`` / ``pdf``: legacy whole-table export, no body.\n  - ``zip``: batch attachment export. Body is required and carries\n    the row/column/cell selection + naming + sub-table options.\n    Schema: ``ZipExportRequest`` in ``schemas/bitable_export.py``.\n\nThe ZIP path replaces the per-cell single-file download for users\nwho need to grab attachments in bulk; we lean on the same job\nmachinery so the frontend only has one polling shape to maintain.","operationId":"start_export_api_bitables__table_id__exports_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(xlsx|pdf|zip)$","default":"xlsx","title":"Format"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ZipExportRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/exports/{job_id}":{"get":{"tags":["bitables"],"summary":"Get Export Status","description":"Poll an export job. Returns the job record verbatim — the\nfrontend only needs ``status``, ``download_url``, ``error``,\n``filename``.\n\nAccess check: caller must still be able to read the table (same\nrule as ``/export``); the job_id alone is not a capability.","operationId":"get_export_status_api_bitables__table_id__exports__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"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/bitables/{table_id}/cell-states":{"get":{"tags":["bitables"],"summary":"List Cell States","description":"Read the dep-machine state of versioned cells on a table.\n\nConsumed by the executor (B2.2), the HITL UI (B3), and the bitable\nskill CLI for debugging. Optional filters: `row_id` for one row,\n`state` to narrow by lifecycle (ready / running / pending_approval /\netc.). No pagination — a realistic table has O(rows × versioned_cols)\nstate rows, well under the scan threshold.","operationId":"list_cell_states_api_bitables__table_id__cell_states_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Row Id"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Cell States Api Bitables  Table Id  Cell States Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/rows/{row_id}/cells/{col_id}/versions":{"post":{"tags":["bitables"],"summary":"Create Cell Version","operationId":"create_cell_version_api_bitables__table_id__rows__row_id__cells__col_id__versions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"col_id","in":"path","required":true,"schema":{"type":"string","title":"Col Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellVersionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["bitables"],"summary":"List Cell Versions","operationId":"list_cell_versions_api_bitables__table_id__rows__row_id__cells__col_id__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"col_id","in":"path","required":true,"schema":{"type":"string","title":"Col Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Cell Versions Api Bitables  Table Id  Rows  Row Id  Cells  Col Id  Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/rows/{row_id}/cells/{col_id}/versions/{version_id}":{"patch":{"tags":["bitables"],"summary":"Update Cell Version","operationId":"update_cell_version_api_bitables__table_id__rows__row_id__cells__col_id__versions__version_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"col_id","in":"path","required":true,"schema":{"type":"string","title":"Col Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellVersionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/rows/{row_id}/cells/{col_id}/state":{"patch":{"tags":["bitables"],"summary":"Patch Cell State","description":"Approve, reject, or regenerate a cell.\n\nApprove behavior (requires `pending_approval`):\n  - Cell has a current version (value landed via prior dispatch) →\n    transition to `done` and keep the current value. Cascade\n    downstream so dependent cells can advance.\n  - Cell has no current version (executor gated BEFORE dispatch, the\n    common case) → transition to `ready` and set a short-TTL Redis\n    marker so the next executor tick bypasses the gate and actually\n    dispatches.\n\nReject behavior (requires `pending_approval`):\n  - Write `rejected_reason = iteration_note` on the current version\n    (if one exists) so the next dispatch carries the reviewer's\n    feedback forward via `iteration_note` on the re-fire.\n  - Transition to `ready` and set the same gate-bypass marker so the\n    re-fire passes through the gate without another approval loop.\n\nRegenerate behavior (B8, requires `done` or `failed`):\n  - User-initiated in-place re-do after seeing the value. Same\n    mechanic as reject — write iteration_note onto the current\n    version's rejected_reason, flip to `ready`, stamp gate-bypass.\n  - Also resets `auto_regen_count` so a manual regen restores the\n    validator's retry budget.\n\nStale UI clicks → 409 on any other source state.","operationId":"patch_cell_state_api_bitables__table_id__rows__row_id__cells__col_id__state_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"col_id","in":"path","required":true,"schema":{"type":"string","title":"Col Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellStateAction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Cell State Api Bitables  Table Id  Rows  Row Id  Cells  Col Id  State Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/rows/{row_id}/cells/{col_id}/versions/{version_id}/validation":{"get":{"tags":["bitables"],"summary":"Get Cell Validation","description":"Read the validator annotation for a specific cell version (B8).\n\nReturns null when the version has no validator annotation (column\nhas no validator, validator hasn't fired yet, or validator run\nitself failed and didn't emit). Frontend treats null as \"no\nfindings to show\".","operationId":"get_cell_validation_api_bitables__table_id__rows__row_id__cells__col_id__versions__version_id__validation_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"col_id","in":"path","required":true,"schema":{"type":"string","title":"Col Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CellValidationResponse"},{"type":"null"}],"title":"Response Get Cell Validation Api Bitables  Table Id  Rows  Row Id  Cells  Col Id  Versions  Version Id  Validation Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/revisions":{"post":{"tags":["bitables"],"summary":"Create Revision","operationId":"create_revision_api_bitables__table_id__revisions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__bitable__RevisionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["bitables"],"summary":"List Table Revisions","operationId":"list_table_revisions_api_bitables__table_id__revisions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/revisions/{revision_id}":{"get":{"tags":["bitables"],"summary":"Get Revision","operationId":"get_revision_api_bitables__table_id__revisions__revision_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["bitables"],"summary":"Update Revision","operationId":"update_revision_api_bitables__table_id__revisions__revision_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["bitables"],"summary":"Archive Revision","operationId":"archive_revision_api_bitables__table_id__revisions__revision_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/revisions/{revision_id}/checkout":{"post":{"tags":["bitables"],"summary":"Checkout Revision","operationId":"checkout_revision_api_bitables__table_id__revisions__revision_id__checkout_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/revisions/revert":{"post":{"tags":["bitables"],"summary":"Revert To Revision","operationId":"revert_to_revision_api_bitables__table_id__revisions_revert_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionRevert"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/revisions/{from_id}/diff/{to_id}":{"get":{"tags":["bitables"],"summary":"Diff Revisions","operationId":"diff_revisions_api_bitables__table_id__revisions__from_id__diff__to_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"from_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"From Id"}},{"name":"to_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"To Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/row-sources":{"post":{"tags":["bitables"],"summary":"Create Row Source","operationId":"create_row_source_api_bitables__table_id__row_sources_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowSourceCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Row Source Api Bitables  Table Id  Row Sources Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["bitables"],"summary":"List Row Sources","operationId":"list_row_sources_api_bitables__table_id__row_sources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Row Sources Api Bitables  Table Id  Row Sources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/row-sources/{source_id}":{"patch":{"tags":["bitables"],"summary":"Update Row Source","operationId":"update_row_source_api_bitables__table_id__row_sources__source_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowSourceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Row Source Api Bitables  Table Id  Row Sources  Source Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["bitables"],"summary":"Delete Row Source","operationId":"delete_row_source_api_bitables__table_id__row_sources__source_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Row Source Api Bitables  Table Id  Row Sources  Source Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/row-sources/{source_id}/run":{"post":{"tags":["bitables"],"summary":"Run Row Source","description":"Run a connector synchronously and stage its rows for approval.\n\nIntended as the user-visible \"run now\" action and also as the pattern\nthe scheduler worker (B4 follow-up) uses under the hood. Returns the\nnew batch_id and the count of staged rows so the UI can jump straight\nto the preview.","operationId":"run_row_source_api_bitables__table_id__row_sources__source_id__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"source_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Row Source Api Bitables  Table Id  Row Sources  Source Id  Run Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/pending-rows":{"get":{"tags":["bitables"],"summary":"List Pending Rows","operationId":"list_pending_rows_api_bitables__table_id__pending_rows_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Pending Rows Api Bitables  Table Id  Pending Rows Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/pending-rows/batch-action":{"post":{"tags":["bitables"],"summary":"Batch Action Pending Rows","description":"Approve or reject a set of pending rows.\n\nApproval promotes each to a `bitable_rows` insert (with auto-versioning\nfor versioned columns — same path as `insert_rows`). Rejection just\nmarks `rejected_at` — the pending row stays for audit.","operationId":"batch_action_pending_rows_api_bitables__table_id__pending_rows_batch_action_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchAction"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Batch Action Pending Rows Api Bitables  Table Id  Pending Rows Batch Action Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitables/{table_id}/save-as-template":{"post":{"tags":["bitable-templates"],"summary":"Save As Template","description":"Snapshot an active bitable as a reusable template.\n\nAuth: same write-scope as the bitable (team must own the producing\nagent). Embedding is computed best-effort — failure doesn't abort\nthe capture.","operationId":"save_as_template_api_bitables__table_id__save_as_template_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateSaveAs"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitable-templates/discover":{"get":{"tags":["bitable-templates"],"summary":"Discover Templates","description":"Semantic template search via pgvector cosine similarity.\n\n`scope=\"team\"` (default): own + team + null-owner only. The\n`bittable-planner` skill defaults here so a noisy short query\ncan't snipe a stranger's `is_listed=True` template — the failure\nmode that anchored an unrelated `四则运算计算器` calculator template\ninto a Media Creator's chat (gamma 2026-04-29).\n\n`scope=\"all\"`: also include `is_listed=True` from any team. Used\nby the public templates library UI where browsing across teams is\nthe explicit user intent.\n\nFalls back to ILIKE when embeddings are unavailable (openai key\nmissing, embedding on the template failed at capture, etc.).","operationId":"discover_templates_api_bitable_templates_discover_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":500,"title":"Query"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"default":10,"title":"Limit"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","pattern":"^(team|all)$","default":"team","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitable-templates":{"get":{"tags":["bitable-templates"],"summary":"List Templates","operationId":"list_templates_api_bitable_templates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"owner","in":"query","required":false,"schema":{"type":"string","pattern":"^(me|team|all)$","default":"all","title":"Owner"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO created_at from previous page","title":"Cursor"},"description":"ISO created_at from previous page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitable-templates/{template_id}":{"get":{"tags":["bitable-templates"],"summary":"Get Template","operationId":"get_template_api_bitable_templates__template_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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/bitable-templates/{template_id}/instantiate":{"post":{"tags":["bitable-templates"],"summary":"Instantiate Template Endpoint","description":"Create a new bitable from a stored template.\n\nEnforces credential-slot binding completeness — every slot declared\non the template must be in `body.credential_bindings` or we 400.\nCredential grants themselves are the caller's responsibility: the\nfrontend should call the vault grant endpoint before instantiating.","operationId":"instantiate_template_endpoint_api_bitable_templates__template_id__instantiate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateInstantiate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/bitable-config":{"get":{"tags":["bitable-config"],"summary":"Get Bitable Config","operationId":"get_bitable_config_api_users_bitable_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitableUserConfig"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["bitable-config"],"summary":"Patch Bitable Config","operationId":"patch_bitable_config_api_users_bitable_config_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitableUserConfigPatch"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitableUserConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/conversations/{conversation_id}/interrupt":{"post":{"tags":["execution_state"],"summary":"Interrupt Agent","description":"Request the agent to stop execution in this conversation.\n\nReturns 200 if interrupt was set (idempotent — safe to call multiple times).\nReturns 409 if the agent is not currently busy.","operationId":"interrupt_agent_api_conversations__conversation_id__interrupt_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/execution-state":{"get":{"tags":["execution_state"],"summary":"Get Conversation Execution State","description":"Get the current execution state for a conversation.\n\nCalled by the frontend on reconnect / page load to sync the UI lock state.","operationId":"get_conversation_execution_state_api_conversations__conversation_id__execution_state_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/conversations/{conversation_id}/execution-state":{"get":{"tags":["execution_state"],"summary":"Get Execution State","description":"Read execution state flags for a conversation.\n\nCalled by the agent runtime before each tool call to check for interrupts.","operationId":"get_execution_state_api_internal_conversations__conversation_id__execution_state_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["execution_state"],"summary":"Update Execution State","description":"Update execution state flags for a conversation.\n\nCalled by the agent runtime to:\n- Set agent_busy=True when starting execution\n- Set agent_busy=False when finishing (also clears interrupt_requested)\n- Update status_text with what the agent is currently doing\n\nBroadcasts an agent_execution_state event via Redis so the frontend\nreceives real-time updates through the chat WebSocket.","operationId":"update_execution_state_api_internal_conversations__conversation_id__execution_state_patch","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionStateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/jobs/{job_id}/cancel":{"post":{"tags":["jobs"],"summary":"Cancel One Job","description":"Cancel a single in-flight async job within a conversation.\n\nReturns 404 when the job isn't registered against this conversation\n(TTL expired, never registered, finished, or wrong id) — makes\nrepeat-clicks idempotent without resurrecting stale state.\n\nReturns 200 even when no upstream fal cancel was fired (e.g. the\njob is non-fal, or the worker hasn't mirrored the request_id back\nyet). The cancel sentinel is set in either case so the worker\nshort-circuits on next SQS receive.","operationId":"cancel_one_job_api_conversations__conversation_id__jobs__job_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"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/analytics/overview":{"get":{"tags":["analytics"],"summary":"Get Overview","description":"Get analytics overview for all user's agents (including team agents).","operationId":"get_overview_api_analytics_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"program_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverviewStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/agents/{agent_id}":{"get":{"tags":["analytics"],"summary":"Get Agent Analytics","description":"Get detailed analytics for a specific agent.","operationId":"get_agent_analytics_api_analytics_agents__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"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":{"$ref":"#/components/schemas/AgentAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/revenue":{"get":{"tags":["analytics"],"summary":"Get Revenue Analytics","description":"Get daily revenue/cost breakdown (personal + team wallets).\n\ngroup_by=None: aggregate totals per day\ngroup_by=agent: breakdown per agent per day\ngroup_by=user: breakdown per agent owner per day (useful for teams)","operationId":"get_revenue_analytics_api_analytics_revenue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"group_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(agent|user)$"},{"type":"null"}],"title":"Group By"}},{"name":"program_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/analytics/usage-by-type":{"get":{"tags":["analytics"],"summary":"Get Usage By Type","description":"Get daily credit usage breakdown by operation type.\n\nCategories: Chat, Heartbeat, Image, Video, Voice, Other.\nChat vs Heartbeat is distinguished by comparing the transaction's model\nagainst the agent's heartbeat_model.\nIncludes both debit and whitelisted transactions. Excludes deposits/credits.","operationId":"get_usage_by_type_api_analytics_usage_by_type_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"program_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/promotions":{"get":{"tags":["promotions"],"summary":"List Promotions","description":"List promotion briefs for the current user.","operationId":"list_promotions_api_promotions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["promotions"],"summary":"Create Promotion","description":"Create a new promotion brief for an agent.","operationId":"create_promotion_api_promotions_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/promotions/{brief_id}":{"get":{"tags":["promotions"],"summary":"Get Promotion","description":"Get a single promotion brief.","operationId":"get_promotion_api_promotions__brief_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"brief_id","in":"path","required":true,"schema":{"type":"string","title":"Brief Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["promotions"],"summary":"Update Promotion","description":"Update a promotion brief.","operationId":"update_promotion_api_promotions__brief_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"brief_id","in":"path","required":true,"schema":{"type":"string","title":"Brief Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromotionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["promotions"],"summary":"Delete Promotion","description":"Delete a promotion brief.","operationId":"delete_promotion_api_promotions__brief_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"brief_id","in":"path","required":true,"schema":{"type":"string","title":"Brief Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/grant-credits":{"post":{"tags":["admin"],"summary":"Grant Credits","description":"Grant credits to an agent's owner (admin API key required).","operationId":"grant_credits_api_admin_grant_credits_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGrantCreditsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGrantCreditsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/grant-studio-credits":{"post":{"tags":["admin"],"summary":"Grant Studio Credits Admin","description":"Grant studio credits to a user's PERSONAL wallet, or to the TEAM that\nuser OWNS (admin API key required).\n\nBody: ``{user_id? | email?, credits, expires_in_days?, target?}``.\n``target`` is ``\"personal\"`` (default) or ``\"team\"``. For ``\"team\"`` we\nresolve the team this user is the OWNER of (a user owns at most one — spec\n2.2) and grant into that team's studio wallet instead; 400 if they own no\nteam. Used for testing and manual top-ups before the Stripe flow. SETs the\npool (no rollover) like a fresh grant.","operationId":"grant_studio_credits_admin_api_admin_grant_studio_credits_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Req"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/grant-studio-subscription":{"post":{"tags":["admin"],"summary":"Grant Studio Subscription Admin","description":"Attach (or cancel) a COMP studio subscription — no Stripe (admin API key).\n\nBody: ``{user_id? | email?, plan, billing_period?='monthly', months?}`` to\nattach, or ``{user_id?|email?, cancel: true}`` to cancel. A comp subscription\nsets the wallet's studio_* fields to an active subscription with\n``studio_subscription_id = NULL`` (the marker for manual/non-Stripe), and\ngrants the plan's credit allotment with a matching expiry — mirroring exactly\nwhat the invoice webhook does for a paid subscription, so the consumed amount\nand scale stay identical. Lets support comp a plan without a card.","operationId":"grant_studio_subscription_admin_api_admin_grant_studio_subscription_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Req"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/set-plan":{"post":{"tags":["admin"],"summary":"Set User Plan","description":"Change a user's subscription plan (admin API key required).","operationId":"set_user_plan_api_admin_set_plan_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSetPlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSetPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/set-agent-tier":{"post":{"tags":["admin"],"summary":"Set Agent Tier","description":"Change an agent's tier (admin API key required).","operationId":"set_agent_tier_api_admin_set_agent_tier_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSetAgentTierRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSetAgentTierResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/global-config":{"get":{"tags":["admin"],"summary":"Get Global Config","description":"Get global config updates since a version. For agent consumption at boot.","operationId":"get_global_config_api_admin_global_config_get","parameters":[{"name":"since_version","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Since Version"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/compute-summary":{"get":{"tags":["admin"],"summary":"Get Compute Summary","description":"Count agents by launch type (Fargate vs EC2).","operationId":"get_compute_summary_api_admin_agents_compute_summary_get","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputeSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{agent_id}/migrate-ec2":{"post":{"tags":["admin"],"summary":"Migrate Agent To Ec2","description":"Migrate a single agent from Fargate to EC2+EBS.","operationId":"migrate_agent_to_ec2_api_admin_agents__agent_id__migrate_ec2_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrateEc2Response"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/migrate-batch":{"post":{"tags":["admin"],"summary":"Migrate Batch","description":"Migrate a batch of agents from Fargate to EC2+EBS.","operationId":"migrate_batch_api_admin_agents_migrate_batch_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MigrateBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assets/presign":{"get":{"tags":["assets"],"summary":"Presign Asset","description":"Return a presigned S3 URL for the given asset key.","operationId":"presign_asset_api_assets_presign_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"S3 object key, e.g. assets/9cc4.../headshot.png","title":"Key"},"description":"S3 object key, e.g. assets/9cc4.../headshot.png"},{"name":"variant","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Downscaled read-variant: 'thumb' (256 px) or 'preview' (1280 px). Omit for the original, which is what download/edit/export use.","title":"Variant"},"description":"Downscaled read-variant: 'thumb' (256 px) or 'preview' (1280 px). Omit for the original, which is what download/edit/export use."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assets/presign/batch":{"post":{"tags":["assets"],"summary":"Presign Assets Batch","description":"Return presigned URLs for a batch of keys in one round-trip.\n\nInvalid keys are reported per-key in `errors` so one bad entry doesn't\nfail the whole batch — callers are usually resolving independent\nthumbnails and would rather render N-1 correctly than none at all.\nDuplicate keys in the input dedupe naturally via the output map.","operationId":"presign_assets_batch_api_assets_presign_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignBatchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/assets/redirect":{"get":{"tags":["assets"],"summary":"Redirect Asset","description":"Generate a fresh presigned URL and redirect to it.\n\nNo auth required — the S3 key is the secret (UUID-based, non-guessable).\nUsed by Excel export: hyperlink cells point here so clicking them\nalways gets a fresh, working URL regardless of when the file was\ngenerated or how long the original presigned URL would have lasted.\nAlso used as a forced-download hook (``download=1``) by product UIs.","operationId":"redirect_asset_api_assets_redirect_get","parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"S3 object key","title":"Key"},"description":"S3 object key"},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"When true, presign with Content-Disposition: attachment so the browser saves the file instead of displaying it inline. Lets a plain <a href> download cross-origin without a fetch/CORS hop.","default":false,"title":"Download"},"description":"When true, presign with Content-Disposition: attachment so the browser saves the file instead of displaying it inline. Lets a plain <a href> download cross-origin without a fetch/CORS hop."},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Suggested download filename (only used when download=true).","title":"Filename"},"description":"Suggested download filename (only used when download=true)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/assets/proxy":{"get":{"tags":["assets"],"summary":"Proxy Asset","description":"Stream an S3 object through the API.\n\nFallback for clients that cannot reach S3 directly (e.g. China / GFW).\nThe frontend tries the presigned URL first and falls back to this proxy.\n\nAuth: query-param token preferred (so <img src> works); falls back to\nthe ``tintin_token`` cookie set by the login endpoints. Gamma\n2026-05-22 — prod tryon users without a localStorage token were 401'd\nhere, which silently broke the painter / adjust canvases.\n\nDo NOT take `db: AsyncSession = Depends(get_db)` here. FastAPI keeps the\ndependency context alive for the entire response lifetime, so a slow\nstreaming client would hold a DB session for many seconds and starve the\npool. We open a short-lived session manually for the auth check, close\nit before streaming starts.","operationId":"proxy_asset_api_assets_proxy_get","parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"S3 object key to stream","title":"Key"},"description":"S3 object key to stream"},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JWT token. Required for plain <img src> requests that cannot carry the SSO cookie (preview / pages.dev domains). Optional for fetch() callers on .tintin-x.com prod custom domains where the ``tintin_token`` cookie covers auth.","title":"Token"},"description":"JWT token. Required for plain <img src> requests that cannot carry the SSO cookie (preview / pages.dev domains). Optional for fetch() callers on .tintin-x.com prod custom domains where the ``tintin_token`` cookie covers auth."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/credentials":{"get":{"tags":["vault"],"summary":"List Credentials","operationId":"list_credentials_api_vault_credentials_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["vault"],"summary":"Create Credential","operationId":"create_credential_api_vault_credentials_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/vault/credentials/by-slug/{slug}":{"get":{"tags":["vault"],"summary":"Read Credential By Slug","description":"Read a credential by slug, verifying the agent has a grant.","operationId":"read_credential_by_slug_api_vault_credentials_by_slug__slug__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/credentials/{credential_id}":{"get":{"tags":["vault"],"summary":"Get Credential","operationId":"get_credential_api_vault_credentials__credential_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credential Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["vault"],"summary":"Update Credential","operationId":"update_credential_api_vault_credentials__credential_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credential Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["vault"],"summary":"Delete Credential","operationId":"delete_credential_api_vault_credentials__credential_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credential Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/credentials/{credential_id}/reveal":{"post":{"tags":["vault"],"summary":"Reveal Credential","operationId":"reveal_credential_api_vault_credentials__credential_id__reveal_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credential Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialRevealResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/credentials/{credential_id}/grants":{"post":{"tags":["vault"],"summary":"Grant Access","operationId":"grant_access_api_vault_credentials__credential_id__grants_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credential Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__vault__GrantRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__vault__GrantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/credentials/{credential_id}/grants/{agent_id}":{"delete":{"tags":["vault"],"summary":"Revoke Access","operationId":"revoke_access_api_vault_credentials__credential_id__grants__agent_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Credential Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/rotate-key":{"post":{"tags":["vault"],"summary":"Rotate Key","operationId":"rotate_key_api_vault_rotate_key_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/vault/audit-log":{"get":{"tags":["vault"],"summary":"Get Audit Log","operationId":"get_audit_log_api_vault_audit_log_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/available":{"get":{"tags":["integrations"],"summary":"Get Available Services","description":"List all available service integrations.","operationId":"get_available_services_api_integrations_available_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ServiceDefinitionResponse"},"type":"array","title":"Response Get Available Services Api Integrations Available Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations":{"get":{"tags":["integrations"],"summary":"List Connections","description":"List connected services visible to the user (includes team members' services).","operationId":"list_connections_api_integrations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConnectedServiceResponse"},"type":"array","title":"Response List Connections Api Integrations Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/{connection_id}":{"delete":{"tags":["integrations"],"summary":"Delete Connection","description":"Disconnect a service.","operationId":"delete_connection_api_integrations__connection_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/{service_id}/connect":{"get":{"tags":["integrations"],"summary":"Start Oauth","description":"Initiate OAuth flow for a service. Returns {authorize_url}.","operationId":"start_oauth_api_integrations__service_id__connect_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","title":"Service Id"}},{"name":"scope_level","in":"query","required":false,"schema":{"type":"string","default":"read_only","title":"Scope Level"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},{"name":"agent_ids","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Ids"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/callback":{"get":{"tags":["integrations"],"summary":"Oauth Callback","description":"Handle OAuth callback — exchange code, store tokens, redirect to frontend.","operationId":"oauth_callback_api_integrations_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/integrations/{service_id}/api-key":{"post":{"tags":["integrations"],"summary":"Connect Api Key","description":"Connect a service using an API key (e.g. SEMRush).","operationId":"connect_api_key_api_integrations__service_id__api_key_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyConnectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedServiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/{connection_id}/rotate-key":{"put":{"tags":["integrations"],"summary":"Rotate Connection Key","description":"Rotate the API key for an existing connection.\n\nRe-encrypts the new key, syncs services.json to S3 for all granted\nagents so they pick up the new key without a restart.","operationId":"rotate_connection_key_api_integrations__connection_id__rotate_key_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateApiKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedServiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/plaid/link-token":{"post":{"tags":["integrations"],"summary":"Plaid Link Token","description":"Create a Plaid Link token for the client-side widget.","operationId":"plaid_link_token_api_integrations_plaid_link_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidLinkTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidLinkTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/plaid/exchange-token":{"post":{"tags":["integrations"],"summary":"Plaid Exchange Token","description":"Exchange a Plaid public_token for an access_token and store the connection.","operationId":"plaid_exchange_token_api_integrations_plaid_exchange_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaidExchangeTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedServiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/integrations/{connection_id}/grants":{"post":{"tags":["integrations"],"summary":"Add Grants","description":"Grant agents access to a connected service.","operationId":"add_grants_api_integrations__connection_id__grants_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__integration__GrantRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceGrantResponse"},"title":"Response Add Grants Api Integrations  Connection Id  Grants Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/{connection_id}/grants/{agent_id}":{"delete":{"tags":["integrations"],"summary":"Remove Grant","description":"Revoke an agent's access to a connected service.","operationId":"remove_grant_api_integrations__connection_id__grants__agent_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/{connection_id}/scopes":{"put":{"tags":["integrations"],"summary":"Update Scopes","description":"Re-authorize with new scopes — initiates a new OAuth flow.","operationId":"update_scopes_api_integrations__connection_id__scopes_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScopesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups":{"post":{"tags":["groups"],"summary":"Create Group","operationId":"create_group_api_groups_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["groups"],"summary":"List Groups","operationId":"list_groups_api_groups_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"program_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupResponse"},"title":"Response List Groups Api Groups Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups/{group_id}":{"get":{"tags":["groups"],"summary":"Get Group","operationId":"get_group_api_groups__group_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["groups"],"summary":"Update Group","operationId":"update_group_api_groups__group_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["groups"],"summary":"Archive Group","operationId":"archive_group_api_groups__group_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups/{group_id}/members":{"post":{"tags":["groups"],"summary":"Add Member","operationId":"add_member_api_groups__group_id__members_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupAddMemberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups/{group_id}/members/{agent_id}":{"delete":{"tags":["groups"],"summary":"Remove Member","operationId":"remove_member_api_groups__group_id__members__agent_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Member Api Groups  Group Id  Members  Agent Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups/{group_id}/user-members":{"post":{"tags":["groups"],"summary":"Add User Member","operationId":"add_user_member_api_groups__group_id__user_members_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupAddUserMemberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupUserMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups/{group_id}/user-members/{user_id}":{"delete":{"tags":["groups"],"summary":"Remove User Member","operationId":"remove_user_member_api_groups__group_id__user_members__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove User Member Api Groups  Group Id  User Members  User Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups/{group_id}/messages":{"get":{"tags":["groups"],"summary":"List Messages","operationId":"list_messages_api_groups__group_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedMessages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["groups"],"summary":"Send Message","operationId":"send_message_api_groups__group_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendGroupMessageRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups/{group_id}/achieve":{"post":{"tags":["groups"],"summary":"Mark Goal Achieved","operationId":"mark_goal_achieved_api_groups__group_id__achieve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/groups/{group_id}/reset-mission":{"post":{"tags":["groups"],"summary":"Reset Mission","operationId":"reset_mission_api_groups__group_id__reset_mission_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetMissionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/integrations/slack/events":{"post":{"tags":["slack_events"],"summary":"Slack Events","description":"Slack Events API webhook endpoint.\n\nHandles:\n- url_verification challenge (Slack setup handshake)\n- event_callback with app_mention events → routed to agents\n\nThis is a public endpoint authenticated by Slack request signing.","operationId":"slack_events_api_integrations_slack_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/integrations/lark/events":{"post":{"tags":["lark_events"],"summary":"Lark Events","description":"Lark Events API webhook endpoint.\n\nHandles:\n- url_verification challenge (Lark setup handshake)\n- im.message.receive_v1 events → routed to agents\n\nThis is a public endpoint authenticated by Lark verification token.","operationId":"lark_events_api_integrations_lark_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/teams":{"post":{"tags":["teams"],"summary":"Create Team","description":"Create a team and migrate personal plan + agents.","operationId":"create_team_api_teams_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/teams/members":{"get":{"tags":["teams"],"summary":"List My Team Members","description":"List members of the current user's team. Used by group chat add-user picker.","operationId":"list_my_team_members_api_teams_members_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/teams/{team_id}":{"get":{"tags":["teams"],"summary":"Get Team","description":"Get team details. Must be a member.","operationId":"get_team_api_teams__team_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["teams"],"summary":"Update Team","description":"Update team settings. Owner or admin only.","operationId":"update_team_api_teams__team_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["teams"],"summary":"Dissolve Team","description":"Dissolve the team. Owner only.","operationId":"dissolve_team_api_teams__team_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/profile":{"patch":{"tags":["teams"],"summary":"Update Team Profile","description":"Update team profile. Owner or admin only. Changes only affect newly created agents.","operationId":"update_team_profile_api_teams__team_id__profile_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/invite":{"post":{"tags":["teams"],"summary":"Invite Member","description":"Invite a user to the team. Admin or owner only.","operationId":"invite_member_api_teams__team_id__invite_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/invitations/{token}":{"get":{"tags":["teams"],"summary":"Get Invitation Info","description":"Public endpoint to get invitation details for the accept page.","operationId":"get_invitation_info_api_teams_invitations__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/invitations/{token}/accept":{"post":{"tags":["teams"],"summary":"Accept Invitation","description":"Accept a team invitation.","operationId":"accept_invitation_api_teams_invitations__token__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInvitationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/invitations/{invitation_id}":{"delete":{"tags":["teams"],"summary":"Cancel Invitation","description":"Cancel a pending team invitation. Owner or admin only.","operationId":"cancel_invitation_api_teams__team_id__invitations__invitation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/invitations/{invitation_id}/resend":{"post":{"tags":["teams"],"summary":"Resend Invitation","description":"Resend a pending team invitation email and refresh its expiry. Owner or admin only.","operationId":"resend_invitation_api_teams__team_id__invitations__invitation_id__resend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/leave":{"post":{"tags":["teams"],"summary":"Leave Team","description":"Leave the team.","operationId":"leave_team_api_teams__team_id__leave_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveTeamRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/members/{member_user_id}/role":{"patch":{"tags":["teams"],"summary":"Change Member Role","description":"Change a member's role. Owner only.","operationId":"change_member_role_api_teams__team_id__members__member_user_id__role_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeMemberRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/members/{member_user_id}":{"delete":{"tags":["teams"],"summary":"Remove Member","description":"Remove a member from the team. Admin or owner only.","operationId":"remove_member_api_teams__team_id__members__member_user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/teams/{team_id}/transfer-ownership":{"post":{"tags":["teams"],"summary":"Transfer Ownership","description":"Transfer team ownership to another member.","operationId":"transfer_ownership_api_teams__team_id__transfer_ownership_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Team Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferOwnershipRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/skills":{"get":{"tags":["skills"],"summary":"Browse Catalog","description":"Browse the skill catalog (marketplace). Includes global + user's own + team custom skills.","operationId":"browse_catalog_api_skills_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"archetype","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by agent archetype: strategist, executor, controller","title":"Archetype"},"description":"Filter by agent archetype: strategist, executor, controller"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/skills/discover":{"get":{"tags":["skills"],"summary":"Discover Skills Endpoint","description":"Semantic skill discovery — tiered search with pgvector embeddings.","operationId":"discover_skills_endpoint_api_skills_discover_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":500,"title":"Query"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}},{"name":"include_clawhub","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Clawhub"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/skills/custom":{"post":{"tags":["skills"],"summary":"Create Custom Skill","description":"Upload a SKILL.md to create a user/team-scoped custom skill.\n\nThe skill is owned by the user (or their team if they belong to one).\nIt appears in the catalog only for the owner / team members and can\nbe installed on any of their agents.","operationId":"create_custom_skill_api_skills_custom_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomSkillRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/skills/{slug}":{"get":{"tags":["skills"],"summary":"Get Skill","description":"Get skill detail + install count.","operationId":"get_skill_api_skills__slug__get","security":[{"HTTPBearer":[]}],"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/skills/{slug}/agents":{"get":{"tags":["skills"],"summary":"Get Skill Agents","description":"Which of my agents have this skill installed.\n\nFor native skills: all agents are considered installed.\nFor other skills: checks DB records + S3 workspace presence.","operationId":"get_skill_agents_api_skills__slug__agents_get","security":[{"HTTPBearer":[]}],"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/skills/{slug}/fork-tree":{"get":{"tags":["skills"],"summary":"Get Fork Tree","description":"Get the fork tree for a skill — root + all descendants, team-scoped.","operationId":"get_fork_tree_api_skills__slug__fork_tree_get","security":[{"HTTPBearer":[]}],"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/skills/{slug}/files":{"get":{"tags":["skills"],"summary":"List Skill Files App","description":"List file tree for a skill's S3 directory (app-level, team-scoped).","operationId":"list_skill_files_app_api_skills__slug__files_get","security":[{"HTTPBearer":[]}],"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/skills/{slug}/files/{file_path}":{"get":{"tags":["skills"],"summary":"Read Skill File App","description":"Read a single file from a skill's S3 directory (app-level).","operationId":"read_skill_file_app_api_skills__slug__files__file_path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["skills"],"summary":"Write Skill File App","description":"Write (create or update) a skill file (owner only, not for built-in/official).","operationId":"write_skill_file_app_api_skills__slug__files__file_path__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteSkillFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["skills"],"summary":"Delete Skill File App","description":"Delete a file from a skill's S3 directory (owner only, not for built-in/official).","operationId":"delete_skill_file_app_api_skills__slug__files__file_path__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/skills/{slug}/install":{"post":{"tags":["skills"],"summary":"Install Skill To Agent","description":"Install a catalog skill to an agent.","operationId":"install_skill_to_agent_api_skills__slug__install_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallFromCatalogRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/media/jobs":{"post":{"tags":["media"],"summary":"Submit Media Job","description":"Submit a media job to the SQS media worker.","operationId":"submit_media_job_api_media_jobs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__routes__media__JobSubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/media/jobs/{job_id}":{"get":{"tags":["media"],"summary":"Get Media Job","description":"Check media job status by reading the S3 manifest.","operationId":"get_media_job_api_media_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/media/download":{"get":{"tags":["media"],"summary":"Download Media","description":"Alias for /api/assets/redirect — agents reflexively invent this path\nwhen asked to fetch chat media. 302 to a fresh presigned URL, no auth\n(the S3 key is the secret). Forwards to assets.redirect_asset so the\nkey validation regex stays single-sourced.","operationId":"download_media_api_media_download_get","parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"S3 object key, e.g. assets/.../foo.mp4","title":"Key"},"description":"S3 object key, e.g. assets/.../foo.mp4"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/media/upload":{"post":{"tags":["media"],"summary":"Upload From Url","description":"Download from URL and upload to S3.","operationId":"upload_from_url_api_media_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tasks":{"get":{"tags":["tasks"],"summary":"List Tasks","description":"Master board — all tasks across user's agents. Returns top-level tasks only, with sub_tasks nested.","operationId":"list_tasks_api_tasks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tasks"],"summary":"Create Task","description":"Create a manual task.","operationId":"create_task_api_tasks_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/agent/{agent_id}":{"get":{"tags":["tasks"],"summary":"List Agent Tasks","description":"Tasks for a single agent. Returns top-level tasks only, with sub_tasks nested.","operationId":"list_agent_tasks_api_tasks_agent__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/{task_id}":{"patch":{"tags":["tasks"],"summary":"Update Task","description":"Update a task.","operationId":"update_task_api_tasks__task_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tasks"],"summary":"Delete Task","description":"Delete a task.","operationId":"delete_task_api_tasks__task_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tasks/agent/{agent_id}/check-async":{"post":{"tags":["tasks"],"summary":"Check Async Tasks","description":"Generic server-side check of all in_progress async tasks.\n\nReads each task's structured check recipe and executes it:\n1. Call check.url with check.method (GET/POST with check.body)\n2. If POST returns job_id, wait poll_delay_s then poll the result\n3. If response has check.success_key → deliver to conversation, mark done\n4. If generating/pending → skip\n5. If error → deliver error, mark done\n\nThis endpoint is fully generic — it doesn't know what the check URLs do.\nThe recipes are written by the job submission layer (media.py, etc).\nCalled by heartbeat: `curl -s -X POST \"$API_BASE_URL/api/tasks/agent/$AGENT_ID/check-async\"\n  -H \"Authorization: Bearer $API_TOKEN\"`","operationId":"check_async_tasks_api_tasks_agent__agent_id__check_async_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/storage/files":{"get":{"tags":["storage"],"summary":"List Files","description":"List files in storage. Optionally filter by folder, agent, type, or search.","operationId":"list_files_api_storage_files_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"}},{"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":50,"title":"Per Page"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}},{"name":"content_type_prefix","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type Prefix"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"all_folders","in":"query","required":false,"schema":{"type":"boolean","description":"If true, list files across all folders","default":false,"title":"All Folders"},"description":"If true, list files across all folders"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/storage/files/{file_id}":{"get":{"tags":["storage"],"summary":"Get File","description":"Get file details and a presigned download URL.","operationId":"get_file_api_storage_files__file_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["storage"],"summary":"Delete File","description":"Soft-delete a file.","operationId":"delete_file_api_storage_files__file_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["storage"],"summary":"Update File","description":"Move or rename a file.","operationId":"update_file_api_storage_files__file_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/storage/usage":{"get":{"tags":["storage"],"summary":"Get Usage","description":"Get storage usage and quota.","operationId":"get_usage_api_storage_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageUsageResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/track":{"post":{"tags":["storage"],"summary":"Track File Endpoint","description":"Track a file from an agent or skill. Used via internal auth.","operationId":"track_file_endpoint_api_storage_track_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Req"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/upload-url":{"post":{"tags":["storage"],"summary":"Get Upload Url","description":"Get a presigned PUT URL for uploading a file to storage.","operationId":"get_upload_url_api_storage_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__storage__UploadUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__storage__UploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/confirm":{"post":{"tags":["storage"],"summary":"Confirm Upload","description":"Confirm that a file has been uploaded to S3.","operationId":"confirm_upload_api_storage_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmUploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/multipart/create":{"post":{"tags":["storage"],"summary":"Multipart Create","description":"Start a multipart upload: quota check, mint a pending StorageFile\nrow, and open an S3 multipart upload. Returns upload_id + the server-\nchosen part_size / part_count so the browser can drive the chunk loop\ndeterministically (no ambiguity over how many parts to produce).","operationId":"multipart_create_api_storage_multipart_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/multipart/presign-parts":{"post":{"tags":["storage"],"summary":"Multipart Presign Parts","description":"Mint presigned PUT URLs for the requested part numbers. Safe to\ncall multiple times — clients may request all parts up front or as\ntheir concurrency queue drains. URLs expire after 1 hour (enough for\nany reasonably-sized file on a household uplink).","operationId":"multipart_presign_parts_api_storage_multipart_presign_parts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartPresignPartsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartPresignPartsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/multipart/complete":{"post":{"tags":["storage"],"summary":"Multipart Complete","description":"Finalize the multipart upload. S3 validates every part's ETag and\nrejects gaps or out-of-order sequences — the server-side sort is a\ndefensive belt-and-braces (browser concurrent queue may finish parts\nout of order and hand them back in that order).","operationId":"multipart_complete_api_storage_multipart_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/multipart/abort":{"post":{"tags":["storage"],"summary":"Multipart Abort","description":"Cancel an in-flight multipart upload — user pressed Stop or the tab\nclosed. Idempotent; a second abort on the same upload_id is a no-op.\nDoes NOT touch already-confirmed uploads.","operationId":"multipart_abort_api_storage_multipart_abort_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MultipartAbortRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/write-document":{"post":{"tags":["storage"],"summary":"Write Document","description":"Write a text document to storage. Upserts on filename + agent_id.","operationId":"write_document_api_storage_write_document_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__storage__WriteDocumentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/read-document":{"get":{"tags":["storage"],"summary":"Read Document","description":"Read a text document's content from storage.","operationId":"read_document_api_storage_read_document_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},{"name":"file_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/storage/folders":{"post":{"tags":["storage"],"summary":"Create Folder","operationId":"create_folder_api_storage_folders_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["storage"],"summary":"List Folders","operationId":"list_folders_api_storage_folders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"parent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FolderResponse"},"title":"Response List Folders Api Storage Folders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/storage/folders/{folder_id}":{"patch":{"tags":["storage"],"summary":"Update Folder","operationId":"update_folder_api_storage_folders__folder_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["storage"],"summary":"Delete Folder","operationId":"delete_folder_api_storage_folders__folder_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/storage/files/{file_id}/sharing":{"patch":{"tags":["storage"],"summary":"Update Sharing","operationId":"update_sharing_api_storage_files__file_id__sharing_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSharingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/storage/files/{file_id}/grants":{"get":{"tags":["storage"],"summary":"List Grants","operationId":"list_grants_api_storage_files__file_id__grants_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/src__schemas__storage__GrantResponse"},"title":"Response List Grants Api Storage Files  File Id  Grants Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["storage"],"summary":"Add Grant","operationId":"add_grant_api_storage_files__file_id__grants_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddGrantRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__storage__GrantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/storage/files/{file_id}/grants/{grant_id}":{"delete":{"tags":["storage"],"summary":"Remove Grant","operationId":"remove_grant_api_storage_files__file_id__grants__grant_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"grant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Grant Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/storage/shared/{share_token}":{"get":{"tags":["storage"],"summary":"Access Shared File","description":"Access a shared file. No auth required for link mode; auth required for restricted mode.","operationId":"access_shared_file_api_storage_shared__share_token__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/storage/backfill":{"post":{"tags":["storage-backfill"],"summary":"Backfill Storage","description":"Backfill existing agent media into storage. Creates per-agent folders.\n\nRequires internal service auth (X-Internal-Key). Iterates all agents\nowned by the calling user (or all if superadmin/internal).","operationId":"backfill_storage_api_storage_backfill_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/backfill-chat-and-assets":{"post":{"tags":["storage-backfill"],"summary":"Backfill Chat And Assets","description":"Backfill chat uploads and agent appearance assets into storage.\n\nScans:\n1. S3 assets/chat/{user_id}/ — chat file uploads, placed in \"Chat Uploads\" folder per user\n2. S3 assets/{character_id}/ — agent headshots/appearances, placed in agent folder","operationId":"backfill_chat_and_assets_api_storage_backfill_chat_and_assets_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/backfill-folders":{"post":{"tags":["storage-backfill"],"summary":"Backfill Orphan Files Into Agent Folders","description":"Move files that have agent_id but no folder_id into the correct agent folder.","operationId":"backfill_orphan_files_into_agent_folders_api_storage_backfill_folders_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/backfill-resolve-agents":{"post":{"tags":["storage-backfill"],"summary":"Backfill Resolve Agent For Orphan Files","description":"Resolve agent_id for storage files that have none, then assign to agent folder.\n\nFor chat uploads: match filename in feed messages to find agent.\nFor users with a single agent: assign all their files to that agent.\nThen move all resolved files into agent folders.","operationId":"backfill_resolve_agent_for_orphan_files_api_storage_backfill_resolve_agents_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/storage/reorganize-into-subfolders":{"post":{"tags":["storage-backfill"],"summary":"Reorganize Into Subfolders","description":"Move files from agent root folders into Media/Images, Media/Videos, Documents sub-folders.\n\nOnly moves files that are directly in an agent root folder (not already in a sub-folder).","operationId":"reorganize_into_subfolders_api_storage_reorganize_into_subfolders_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/atoms/execute":{"post":{"tags":["atoms"],"summary":"Execute Atom","description":"Execute an atom — dispatches to the worker via SQS, awaits result.\n\nAuth: JWT Bearer token OR X-Internal-Key + X-Internal-User-Id headers.","operationId":"execute_atom_api_atoms_execute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtomExecuteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtomResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/atoms/{job_id}":{"get":{"tags":["atoms"],"summary":"Get Atom Result","description":"Poll for an async atom's result by reading the S3 manifest.","operationId":"get_atom_result_api_atoms__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtomResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/automation-settings":{"get":{"tags":["tryon"],"summary":"Get Automation Settings","description":"User-level tryon automation toggles. Reads the single\n``tryon_user_settings`` row (missing → defaults). The same row is\nwritable by an admin via the Tryon Standalone page (mutual override).","operationId":"get_automation_settings_api_tryon_automation_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Automation Settings Api Tryon Automation Settings Get"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["tryon"],"summary":"Update Automation Settings","description":"Upsert the caller's tryon automation toggles. Partial — only the keys\npresent in the body are touched. ``neutralize_garment_enabled`` (bool),\n``qa_auto_regen_enabled`` (bool) and ``recipes``\n([{recipe_key, enabled?, trigger?}]) are all user-level. ``updated_by``\nrecords the last writer (user or admin).","operationId":"update_automation_settings_api_tryon_automation_settings_put","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 Update Automation Settings Api Tryon Automation Settings Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/programs":{"get":{"tags":["tryon"],"summary":"List Programs","operationId":"list_programs_api_tryon_programs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProgramListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tryon"],"summary":"Create Program","operationId":"create_program_api_tryon_programs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProgramCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProgramResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/programs/{program_id}":{"patch":{"tags":["tryon"],"summary":"Update Program","operationId":"update_program_api_tryon_programs__program_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"program_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Program Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProgramUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProgramResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tryon"],"summary":"Delete Program","operationId":"delete_program_api_tryon_programs__program_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"program_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Program Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects":{"post":{"tags":["tryon"],"summary":"Create Project","operationId":"create_project_api_tryon_projects_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProjectCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tryon"],"summary":"List Projects","description":"List the caller's projects.\n\n``settings.surface`` isolates non-bulk product surfaces that reuse the\nproject model but must NEVER appear in — or be deletable from — the bulk\nworkspace. The single-image (\"quick\") entry stores its per-generation\nhistory in its own ``surface=\"quick\"`` project. The default (no ``surface``)\nlist therefore EXCLUDES hidden surfaces; pass ``?surface=quick`` to fetch\nthat project explicitly (how the quick UI finds its own project).","operationId":"list_projects_api_tryon_projects_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"surface","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProjectListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}/workspace":{"get":{"tags":["tryon"],"summary":"Get Workspace","operationId":"get_workspace_api_tryon_projects__project_id__workspace_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonWorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}/export-xlsx":{"get":{"tags":["tryon"],"summary":"Export Project Xlsx","description":"Download the project as an xlsx workbook with images embedded for\nattachment columns. Matches the user's historical workflow (\"我之前\n一直做的都是导出 xlsx\") of handing off a single self-contained file.\n\nThe first thumbnail per attachment cell is embedded at ~120px wide;\nthe user can still click through to original-resolution via the\ncell metadata's S3 key (kept as a comment on the cell).","operationId":"export_project_xlsx_api_tryon_projects__project_id__export_xlsx_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"include_images","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Images"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}":{"get":{"tags":["tryon"],"summary":"Get Project","operationId":"get_project_api_tryon_projects__project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tryon"],"summary":"Update Project","operationId":"update_project_api_tryon_projects__project_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tryon"],"summary":"Delete Project","operationId":"delete_project_api_tryon_projects__project_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/upload-urls":{"post":{"tags":["tryon"],"summary":"Create Upload Urls","operationId":"create_upload_urls_api_tryon_upload_urls_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonUploadUrlsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonUploadUrlsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/upload-files":{"post":{"tags":["tryon"],"summary":"Upload Files","operationId":"upload_files_api_tryon_upload_files_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_files_api_tryon_upload_files_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonUploadedFilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/multipart/create":{"post":{"tags":["tryon"],"summary":"Create Multipart Tryon Upload","operationId":"create_multipart_tryon_upload_api_tryon_multipart_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonMultipartCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonMultipartCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/multipart/presign-parts":{"post":{"tags":["tryon"],"summary":"Presign Tryon Multipart Parts","description":"Mint presigned PUT URLs so the browser uploads each part DIRECT\nto S3 in parallel. Replaces the legacy /multipart/upload-part proxy\n(which round-tripped every byte through the API). Mirrors the\ntintin-app storage flow at /api/storage/multipart/presign-parts.\nURLs expire after 1 hour — clients usually request all parts up\nfront but can also stream-request them as the concurrency queue\ndrains.","operationId":"presign_tryon_multipart_parts_api_tryon_multipart_presign_parts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonMultipartPresignPartsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonMultipartPresignPartsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/multipart/upload-part":{"post":{"tags":["tryon"],"summary":"Upload Tryon Multipart Part","operationId":"upload_tryon_multipart_part_api_tryon_multipart_upload_part_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_tryon_multipart_part_api_tryon_multipart_upload_part_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonMultipartPartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/multipart/complete":{"post":{"tags":["tryon"],"summary":"Complete Tryon Multipart Upload","operationId":"complete_tryon_multipart_upload_api_tryon_multipart_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonMultipartCompleteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonUploadedFileItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/multipart/abort":{"post":{"tags":["tryon"],"summary":"Abort Tryon Multipart Upload","operationId":"abort_tryon_multipart_upload_api_tryon_multipart_abort_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonMultipartAbortRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/ingest":{"post":{"tags":["tryon"],"summary":"Ingest Tryon Resources","operationId":"ingest_tryon_resources_api_tryon_ingest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonIngestRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/run":{"post":{"tags":["tryon"],"summary":"Run Tryon Jobs","operationId":"run_tryon_jobs_api_tryon_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/qa/backfill":{"post":{"tags":["tryon"],"summary":"Backfill Tryon Qa","operationId":"backfill_tryon_qa_api_tryon_qa_backfill_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonQaBackfillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonQaBackfillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/jobs":{"post":{"tags":["tryon"],"summary":"Create Job","operationId":"create_job_api_tryon_jobs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tryon"],"summary":"List Jobs","operationId":"list_jobs_api_tryon_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/rows":{"post":{"tags":["tryon"],"summary":"Create Row","operationId":"create_row_api_tryon_rows_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRowCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tryon"],"summary":"List Rows","operationId":"list_rows_api_tryon_rows_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRowListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/rows/{row_id}":{"patch":{"tags":["tryon"],"summary":"Update Row","operationId":"update_row_api_tryon_rows__row_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRowUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/rows/{row_id}/cells/{cell_key}":{"patch":{"tags":["tryon"],"summary":"Update Cell","operationId":"update_cell_api_tryon_rows__row_id__cells__cell_key__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"cell_key","in":"path","required":true,"schema":{"type":"string","title":"Cell Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonCellPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/rows/{row_id}/identify-garment-category":{"post":{"tags":["tryon"],"summary":"Identify Garment Category","description":"Fire an async classification of the row's garment images into the\nspecial clothing category (swimwear/underwear/kids/normal) that decides\nthe tryon model branch.\n\nFire-and-forget: dispatches the `identify_garment_category` worker atom\nwith a callback that backfills `row.garment_category`. The cell-image\ndialog calls this after the user picks garments into a garment cell, so\nthe category is resolved up front instead of relying solely on the\ngenerate-time fallback. Returns immediately; the result lands via the\n`/api/internal/tryon/rows/{id}/garment-category-result` callback.","operationId":"identify_garment_category_api_tryon_rows__row_id__identify_garment_category_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Identify Garment Category Api Tryon Rows  Row Id  Identify Garment Category Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/rows/{row_id}/listing-copy":{"post":{"tags":["tryon"],"summary":"Generate Row Listing Copy","description":"Listing Pack v2: publish-ready copy for ONE platform, generated from\nthe row's FINAL try-on image (one GPT vision call, free — \"随图出\").\n\nThe FE contract (tintin-web ``lib/tryon/listing-client.ts``): the pack\nenvelope keys copy by platform; v2 generates the REQUESTED platform\n(default: the user's connected Radar shop's platform, else shopify) and\nthe FE re-requests per platform tab. Shop Radar context (brand, store\ntag vocabulary, a reference listing) is folded into the task prompt when\nthe user has an active shop — ``shop_context`` in the response says so.\n\nPrompts are registry-managed (``tryon.listing_copy`` system +\n``tryon.listing_copy.task`` template); published versions take effect\nhere immediately, no deploy. 404/405/501 keep meaning \"coming soon\" to\nthe FE — the dark-launch flag below returns 501 until rollout.","operationId":"generate_row_listing_copy_api_tryon_rows__row_id__listing_copy_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingCopyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/rows/{row_id}/cells/{cell_key}/free-generate":{"post":{"tags":["tryon"],"summary":"Free Generate Cell","description":"Free-form generate for cells without a static recipe.\n\nDriver: user feedback 2026-05-20 — clicking \"Generate\" on a cell like\n`scene` (no recipe defined) used to either 400 with \"unsupported\ntryon recipe\" or fall back to chat-the-agent, which then refused.\nThis endpoint accepts a natural-language prompt + optional\nreference S3 keys and dispatches the smart_edit atom with\n`_target_cell_key` stamped so the deliver handler writes the\nresult back to the chosen cell — no recipe registration required.","operationId":"free_generate_cell_api_tryon_rows__row_id__cells__cell_key__free_generate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"cell_key","in":"path","required":true,"schema":{"type":"string","title":"Cell Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonFreeGenerateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/recipes":{"post":{"tags":["tryon"],"summary":"Create Recipe","operationId":"create_recipe_api_tryon_recipes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRecipeCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRecipeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/recipes/{recipe_id}":{"patch":{"tags":["tryon"],"summary":"Update Recipe","operationId":"update_recipe_api_tryon_recipes__recipe_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Recipe Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRecipeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonRecipeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/resources":{"post":{"tags":["tryon"],"summary":"Create Resource","operationId":"create_resource_api_tryon_resources_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonResourceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tryon"],"summary":"List Resources","operationId":"list_resources_api_tryon_resources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonResourceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/resources/{resource_id}":{"patch":{"tags":["tryon"],"summary":"Update Resource","operationId":"update_resource_api_tryon_resources__resource_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonResourceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonResourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/rows/{row_id}/versions":{"get":{"tags":["tryon"],"summary":"List Row Versions","operationId":"list_row_versions_api_tryon_rows__row_id__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"cell_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cell Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonCellVersionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}/versions":{"get":{"tags":["tryon"],"summary":"List Table Versions","operationId":"list_table_versions_api_tryon_projects__project_id__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableVersionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tryon"],"summary":"Create Table Version","operationId":"create_table_version_api_tryon_projects__project_id__versions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableVersionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}/versions/branches":{"post":{"tags":["tryon"],"summary":"Create Table Branch","operationId":"create_table_branch_api_tryon_projects__project_id__versions_branches_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableBranchCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}/versions/{from_version_id}/diff/{to_version_id}":{"get":{"tags":["tryon"],"summary":"Diff Table Versions","operationId":"diff_table_versions_api_tryon_projects__project_id__versions__from_version_id__diff__to_version_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"from_version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"From Version Id"}},{"name":"to_version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"To Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableVersionDiffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}/versions/checkout":{"post":{"tags":["tryon"],"summary":"Checkout Table Version","operationId":"checkout_table_version_api_tryon_projects__project_id__versions_checkout_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableCheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}/versions/merge":{"post":{"tags":["tryon"],"summary":"Merge Table Branch","operationId":"merge_table_branch_api_tryon_projects__project_id__versions_merge_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableMergeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableMergeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}/versions/revert":{"post":{"tags":["tryon"],"summary":"Revert Table Version","operationId":"revert_table_version_api_tryon_projects__project_id__versions_revert_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableRevertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonTableVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/agent/plans/catalog":{"get":{"tags":["tryon"],"summary":"List Agent Plan Catalog","description":"List the registered table primitives + their JSON schemas.\n\nThe frontend uses this to render the \"what can the agent do\" hint\npanel and to validate plans client-side before posting.","operationId":"list_agent_plan_catalog_api_tryon_agent_plans_catalog_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonAgentPlanCatalogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/agent/plans/propose":{"post":{"tags":["tryon"],"summary":"Propose Agent Plan","operationId":"propose_agent_plan_api_tryon_agent_plans_propose_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonAgentPlanCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonAgentPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/agent/plans/{plan_id}/confirm":{"post":{"tags":["tryon"],"summary":"Confirm Agent Plan","operationId":"confirm_agent_plan_api_tryon_agent_plans__plan_id__confirm_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Plan Id"}},{"name":"Accept-Language","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept-Language"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonAgentPlanConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonAgentPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/logs":{"post":{"tags":["tryon"],"summary":"Create Log","operationId":"create_log_api_tryon_logs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonExecutionLogCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonExecutionLogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tryon"],"summary":"List Logs","operationId":"list_logs_api_tryon_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"row_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Row Id"}},{"name":"event_kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonExecutionLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/jobs/by-atom/{atom_job_id}":{"get":{"tags":["tryon"],"summary":"Get Job By Atom","operationId":"get_job_by_atom_api_tryon_jobs_by_atom__atom_job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"atom_job_id","in":"path","required":true,"schema":{"type":"string","title":"Atom Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/jobs/by-atom/{atom_job_id}/deliver":{"post":{"tags":["tryon"],"summary":"Deliver Job By Atom","operationId":"deliver_job_by_atom_api_tryon_jobs_by_atom__atom_job_id__deliver_post","parameters":[{"name":"atom_job_id","in":"path","required":true,"schema":{"type":"string","title":"Atom Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobDeliver"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/jobs/{job_id}":{"get":{"tags":["tryon"],"summary":"Get Job","operationId":"get_job_api_tryon_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tryon"],"summary":"Update Job","operationId":"update_job_api_tryon_jobs__job_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/jobs/{job_id}/deliver":{"post":{"tags":["tryon"],"summary":"Deliver Job","operationId":"deliver_job_api_tryon_jobs__job_id__deliver_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobDeliver"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/jobs/{job_id}/critic-deliver":{"post":{"tags":["tryon"],"summary":"Deliver Critic For Tryon","description":"smart_edit_critic callback for tryon validation. Writes the\ncritic's verdict into row.data (qa_score / qa_pass / qa_notes /\nqa_suggested_regen_note), flips the tryon output cell from\n``validating`` back to ``done`` (or ``failed`` when the critic\ncouldn't run), and triggers the pose/video cascade with the fresh\nQA in hand so the auto-regen loop operates on real critic\nfeedback.\n\nFailure-mode policy: a critic that errors out still releases the\ngate (cell flips to done, cascade fires) so a flaky validator\ncan't block the user. Same shape as the bitable\n/cell-validation handler.","operationId":"deliver_critic_for_tryon_api_tryon_jobs__job_id__critic_deliver_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonCriticDeliver"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/pose-variants":{"get":{"tags":["tryon"],"summary":"List Pose Variants","description":"Visible pose variants for the current user. Pass `project_id`\nto also include that project's table-scope rows. Presets always\nsurface; global rows the user owns always surface; table rows\nonly when project_id matches.","operationId":"list_pose_variants_api_tryon_pose_variants_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonPoseVariantListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tryon"],"summary":"Create Pose Variant","description":"Create a user-scoped variant. Table-scope requires `project_id`\npointing to a project the user can access. Sketch is auto-\ngenerated when a `source_photo_s3_key` is provided; otherwise\nthe caller must pass `sketch_url`. Empty sketch payloads are\nrejected — there's no point creating a variant the picker can't\nrender.","operationId":"create_pose_variant_api_tryon_pose_variants_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonPoseVariantCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonPoseVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/pose-variants/{variant_id}":{"patch":{"tags":["tryon"],"summary":"Update Pose Variant","description":"Edit label / description / prompt / category tags. Presets\nare immutable; ownership is enforced via owner_user_id\n(tryon is single-user scoped).","operationId":"update_pose_variant_api_tryon_pose_variants__variant_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonPoseVariantUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonPoseVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tryon"],"summary":"Archive Pose Variant","description":"Soft-delete (sets archived_at). Presets and other users'\nvariants are rejected with 403.","operationId":"archive_pose_variant_api_tryon_pose_variants__variant_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/pose-variants/{variant_id}/regenerate-sketch":{"post":{"tags":["tryon"],"summary":"Regenerate Pose Sketch","description":"Re-dispatch the sketch atom against the current source photo +\nrefinement prompt. Useful when the user wants a second take\nwithout editing fields. Clears the existing sketch so callers\nsee `sketch_status=pending` immediately.","operationId":"regenerate_pose_sketch_api_tryon_pose_variants__variant_id__regenerate_sketch_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonPoseVariantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/pose-variants/analyze":{"post":{"tags":["tryon"],"summary":"Analyze Pose Photo","description":"Take a person photo, return a draft variant spec — slug,\nlabel, description, product_types, model_categories. The Create\nVariant modal calls this right after upload so the user reviews\nand tweaks an LLM-suggested form instead of filling it from\nscratch. Failures degrade to a 422 so the FE can render blank\nfields rather than blocking creation.","operationId":"analyze_pose_photo_api_tryon_pose_variants_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonPoseVariantAnalyzeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonPoseVariantAnalyzeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/pose-variants/preview-sketch":{"post":{"tags":["tryon"],"summary":"Preview Pose Sketch","description":"Synchronously turn a user-uploaded person photo into a line\nsketch. Same nano-banana edit prompt the async worker handler\nuses, just invoked direct from the API so the Create modal can\nshow a preview before the user commits the variant.\n\nReuses the FE upload's `source_photo_s3_key`. Returns the\ngenerated sketch's S3 key + a presigned URL the FE can render\nimmediately. Failures raise 422 with a typed reason so the FE\ncan surface a \"couldn't generate sketch — try a different photo\nor rewrite the prompt\" affordance.","operationId":"preview_pose_sketch_api_tryon_pose_variants_preview_sketch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonPoseVariantPreviewSketchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonPoseVariantPreviewSketchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/guest/upload-url":{"post":{"tags":["tryon-guest"],"summary":"Guest Upload Url","operationId":"guest_upload_url_api_tryon_guest_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestUploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/guest/run":{"post":{"tags":["tryon-guest"],"summary":"Guest Run","operationId":"guest_run_api_tryon_guest_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/guest/jobs/{job_id}":{"get":{"tags":["tryon-guest"],"summary":"Guest Job Status","operationId":"guest_job_status_api_tryon_guest_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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/tryon/guest/claim":{"post":{"tags":["tryon-guest"],"summary":"Guest Claim","operationId":"guest_claim_api_tryon_guest_claim_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestClaimRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/preset-models":{"get":{"tags":["tryon"],"summary":"List Preset Models","description":"Active catalog for the pickers, curated order within each category.","operationId":"list_preset_models_api_tryon_preset_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/chat/{project_id}/history":{"get":{"tags":["tryon-chat"],"summary":"Get History","operationId":"get_history_api_tryon_chat__project_id__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"after_sequence","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"After Sequence"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonChatHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/chat/{project_id}/cancel":{"post":{"tags":["tryon-chat"],"summary":"Cancel","operationId":"cancel_api_tryon_chat__project_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonChatCancelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/chat/{project_id}/proposal/{message_id}/resolve":{"post":{"tags":["tryon-chat"],"summary":"Resolve Proposal","description":"Persist a cell_fill_proposal's resolution (applied/rejected) so it does\nNOT re-show as actionable after a page refresh / history replay. Without\nthis the card's resolution was local-only, so a refresh re-armed Apply and\nrisked a double-apply.","operationId":"resolve_proposal_api_tryon_chat__project_id__proposal__message_id__resolve_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resolve Proposal Api Tryon Chat  Project Id  Proposal  Message Id  Resolve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects":{"post":{"tags":["tryon-editing"],"summary":"Create Editing Project From Upload","operationId":"create_editing_project_from_upload_api_tryon_editing_projects_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingProjectCreateFromUpload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tryon-editing"],"summary":"List Editing Projects","operationId":"list_editing_projects_api_tryon_editing_projects_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pagination_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Pagination Token"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(upload|from_cell)$"},{"type":"null"}],"title":"Source"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(active|archived)$"},{"type":"null"}],"title":"Status"}},{"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":{"$ref":"#/components/schemas/TryonEditingProjectListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/from-cell":{"post":{"tags":["tryon-editing"],"summary":"Create Editing Project From Cell","operationId":"create_editing_project_from_cell_api_tryon_editing_projects_from_cell_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingProjectCreateFromCell"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tryon/editing/projects/by-cell":{"get":{"tags":["tryon-editing"],"summary":"Get Editing Project By Cell","description":"Single-row lookup: is there an active from-cell editing project for\nthis exact (project, row, cell, source image) tuple owned by the\ncaller's scope? Drives the frontend's \"reopen instead of recreate\"\nflow — without this, clicking Edit on a cell that already has an\nin-flight editing project mints a fresh project every time and the\nprior edit history is orphaned.\n\nReturns the same response shape as ``GET /projects/{id}``. 404 when\nno active project exists for the tuple (caller should fall through\nto ``POST /projects/from-cell``).","operationId":"get_editing_project_by_cell_api_tryon_editing_projects_by_cell_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Source tryon project id","title":"Project Id"},"description":"Source tryon project id"},{"name":"row_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Source tryon row id","title":"Row Id"},"description":"Source tryon row id"},{"name":"cell_key","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Cell Key"}},{"name":"source_image_s3_key","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"description":"S3 key of the cell image being edited. Must match the editing project's snapshotted source_s3_key so we only reopen a project anchored on the same image the user is looking at now.","title":"Source Image S3 Key"},"description":"S3 key of the cell image being edited. Must match the editing project's snapshotted source_s3_key so we only reopen a project anchored on the same image the user is looking at now."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}":{"get":{"tags":["tryon-editing"],"summary":"Get Editing Project","operationId":"get_editing_project_api_tryon_editing_projects__editing_project_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tryon-editing"],"summary":"Update Editing Project","operationId":"update_editing_project_api_tryon_editing_projects__editing_project_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tryon-editing"],"summary":"Delete Editing Project","operationId":"delete_editing_project_api_tryon_editing_projects__editing_project_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests":{"get":{"tags":["tryon-editing"],"summary":"List Editing Requests","operationId":"list_editing_requests_api_tryon_editing_projects__editing_project_id__requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}},{"name":"pagination_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Pagination Token"}},{"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":{"$ref":"#/components/schemas/TryonEditingRequestListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/{request_id}":{"get":{"tags":["tryon-editing"],"summary":"Get Editing Request","operationId":"get_editing_request_api_tryon_editing_projects__editing_project_id__requests__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/download":{"get":{"tags":["tryon-editing"],"summary":"Get Editing Download Url","description":"Mint a short-lived download URL for the source image or one output.\n\nThe display URLs handed out elsewhere are CloudFront-signed (or plain\npresigned) for *inline* rendering, so the browser just opens them in a\ntab — there's no way to bolt ``Content-Disposition`` onto a CloudFront\nURL after the fact. This endpoint instead returns a **direct S3**\npresigned GET carrying ``ResponseContentDisposition=attachment``, so\nnavigating to it downloads the file (works cross-origin — a top-level\nnavigation needs no CORS). Ownership is enforced by loading the project\nunder the caller's scope and resolving the key from owned rows only, so\na raw S3 key can't be guessed/enumerated.","operationId":"get_editing_download_url_api_tryon_editing_projects__editing_project_id__download_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}},{"name":"request_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Output to download. Omit to download the project source.","title":"Request Id"},"description":"Output to download. Omit to download the project source."},{"name":"output_index","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Output Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Get Editing Download Url Api Tryon Editing Projects  Editing Project Id  Download Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/remove_background":{"post":{"tags":["tryon-editing"],"summary":"Request Remove Background","operationId":"request_remove_background_api_tryon_editing_projects__editing_project_id__requests_remove_background_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingRemoveBackgroundRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/remove_foreground":{"post":{"tags":["tryon-editing"],"summary":"Request Remove Foreground","operationId":"request_remove_foreground_api_tryon_editing_projects__editing_project_id__requests_remove_foreground_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingRemoveForegroundRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/image_edit":{"post":{"tags":["tryon-editing"],"summary":"Request Image Edit","operationId":"request_image_edit_api_tryon_editing_projects__editing_project_id__requests_image_edit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingImageEditRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/inpaint":{"post":{"tags":["tryon-editing"],"summary":"Request Inpaint","operationId":"request_inpaint_api_tryon_editing_projects__editing_project_id__requests_inpaint_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingInpaintRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/change_background_prompt":{"post":{"tags":["tryon-editing"],"summary":"Request Change Background Prompt","operationId":"request_change_background_prompt_api_tryon_editing_projects__editing_project_id__requests_change_background_prompt_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingChangeBackgroundPromptRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/change_background_reference":{"post":{"tags":["tryon-editing"],"summary":"Request Change Background Reference","operationId":"request_change_background_reference_api_tryon_editing_projects__editing_project_id__requests_change_background_reference_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingChangeBackgroundReferenceRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/hand_fix":{"post":{"tags":["tryon-editing"],"summary":"Request Hand Fix","operationId":"request_hand_fix_api_tryon_editing_projects__editing_project_id__requests_hand_fix_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingHandFootFixRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/foot_fix":{"post":{"tags":["tryon-editing"],"summary":"Request Foot Fix","operationId":"request_foot_fix_api_tryon_editing_projects__editing_project_id__requests_foot_fix_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingHandFootFixRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/face_swap":{"post":{"tags":["tryon-editing"],"summary":"Request Face Swap","operationId":"request_face_swap_api_tryon_editing_projects__editing_project_id__requests_face_swap_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingFaceSwapRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/upscale":{"post":{"tags":["tryon-editing"],"summary":"Request Upscale","operationId":"request_upscale_api_tryon_editing_projects__editing_project_id__requests_upscale_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingUpscaleRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/logo_transfer":{"post":{"tags":["tryon-editing"],"summary":"Request Logo Transfer","operationId":"request_logo_transfer_api_tryon_editing_projects__editing_project_id__requests_logo_transfer_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingLogoTransferRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/accessory_tryon":{"post":{"tags":["tryon-editing"],"summary":"Request Accessory Tryon","operationId":"request_accessory_tryon_api_tryon_editing_projects__editing_project_id__requests_accessory_tryon_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingAccessoryTryonRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/accessory_tryon_inpaint":{"post":{"tags":["tryon-editing"],"summary":"Request Accessory Tryon Inpaint","operationId":"request_accessory_tryon_inpaint_api_tryon_editing_projects__editing_project_id__requests_accessory_tryon_inpaint_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingAccessoryTryonInpaintRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/crop":{"post":{"tags":["tryon-editing"],"summary":"Request Crop","operationId":"request_crop_api_tryon_editing_projects__editing_project_id__requests_crop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingCropRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/requests/adjust":{"post":{"tags":["tryon-editing"],"summary":"Request Adjust","operationId":"request_adjust_api_tryon_editing_projects__editing_project_id__requests_adjust_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingAdjustRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/requests/{request_id}/deliver":{"post":{"tags":["tryon-editing"],"summary":"Deliver Editing Request","description":"Worker callback. Updates request status + outputs, clears any\nediting badge on the source cell.\n\nBody shape matches the media-worker's ``_send_callback()`` flat\npayload — ``{job_id, atom_type, **result}`` with the result fields\n(``s3_key``, ``s3_keys``, ``image_url``, ``width``, ``height``,\noptional ``outputs[]``, optional ``status``/``error``) at the top\nlevel. ``s3_key`` is the canonical single-output case;\n``s3_keys``/``outputs`` carry multi-shot variants.","operationId":"deliver_editing_request_api_tryon_editing_requests__request_id__deliver_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingDeliverBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/editing/projects/{editing_project_id}/commit-to-cell":{"post":{"tags":["tryon-editing"],"summary":"Commit Editing Output To Cell","description":"Write the chosen output back to the source cell.\n\nOnly valid when ``source_kind='from_cell'``. The output_s3_key must\nbelong to one of this project's done requests.","operationId":"commit_editing_output_to_cell_api_tryon_editing_projects__editing_project_id__commit_to_cell_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingCommitToCellRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonEditingProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}/exports":{"post":{"tags":["tryon"],"summary":"Start Tryon Export","description":"Kick off an async ZIP export. Returns a ``job_id`` immediately;\nclient polls ``GET /api/tryon/projects/{id}/exports/{job_id}`` until\n``status`` is ``ready`` (or ``failed``) and then downloads from the\npresigned URL.\n\nToday only ZIP is supported through this path — the xlsx export at\n``/api/tryon/projects/{id}/export.xlsx`` stays synchronous (small\npayload, in-process build is fine).","operationId":"start_tryon_export_api_tryon_projects__project_id__exports_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonZipExportRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonExportJobCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tryon/projects/{project_id}/exports/{job_id}":{"get":{"tags":["tryon"],"summary":"Get Tryon Export Status","description":"Poll an export job. Returns the job record so the FE can render\nits loading / ready / failed states off one shape.\n\nAccess check: caller must still be able to read the project; the\njob_id alone isn't a capability.","operationId":"get_tryon_export_status_api_tryon_projects__project_id__exports__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonExportJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/provision-user":{"post":{"tags":["internal"],"summary":"Provision User","description":"Idempotently provision a headless platform account (User + Wallet) for an\nexternal first-party surface — currently the Shopify app bridge, which maps\neach shop to one Tintin user so it can reuse the studio-credit REST APIs\n(nail-art / try-on) with a self-minted user JWT.\n\nIdempotent on `email`: re-provisioning an existing shop returns the same\n``user_id`` (``created=False``) and does NOT re-grant credits. A Wallet row\nis ALWAYS ensured — the gateway's studio-credit debit 404s without one — but\nit starts empty unless ``bonus_credits`` is passed (granted once, on\ncreation).\n\nDeliberately does NOT reuse ``auth._create_user_with_wallet``: that path\nfires a welcome email + attaches transfer invites, neither of which is\nwanted for a synthetic shop address. X-Internal-Key gated (VPC-internal),\nsame as the other internal endpoints.","operationId":"provision_user_api_internal_provision_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/user-lookup":{"get":{"tags":["internal"],"summary":"User Lookup","description":"Read-only email → user_id resolution for internal ops tooling.\n\nThe create-or-get sibling above (provision-user) provisions a headless\naccount when the email is unknown, which makes it unsafe as a lookup.\nThis endpoint never writes: 404 when no user carries that email.\nX-Internal-Key gated like the rest of this router; returns only the\nid for an email the caller already holds — no enumeration surface.","operationId":"user_lookup_api_internal_user_lookup_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response User Lookup Api Internal User Lookup Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/shopify-credits-sync":{"post":{"tags":["internal"],"summary":"Shopify Credits Sync","description":"Ensure the shop's headless user + wallet, apply the plan's credit\ngrant, and return the current balance. The Shopify app calls this on\nevery load (cheap). Grant shape depends on the plan:\n\n- ``free``: a ONE-TIME signup grant into the non-expiring bonus pool\n  (``add_studio_bonus_credits``, action_type ``shopify_signup_free``) —\n  fired only if this shop has never received a free grant (neither the\n  signup grant nor a legacy ``shopify_free_monthly`` from the pre-billing\n  era). Never refilled: once spent, the merchant upgrades or stops.\n- ``starter``: a monthly lazy reset of the subscription\n  ``studio_credits`` pool via ``grant_studio_credits`` (SET + expiry on\n  the 1st) — fires when the current grant has lapsed, so mid-month\n  consumption is preserved. On upgrade the app passes ``force=true``\n  once so the paid allotment takes effect immediately; downgrades don't\n  force, so a paid month's balance survives until the 1st, after which\n  the free plan grants nothing further.\n\nA Shopify shop account never has a Stripe studio subscription (synthetic\nemail, no login), so the subscription pool isn't contended. Idempotent on\n``email`` (like provision-user). X-Internal-Key gated.","operationId":"shopify_credits_sync_api_internal_shopify_credits_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopifyCreditsSyncRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopifyCreditsSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/prompt/call":{"post":{"tags":["internal"],"summary":"Record Prompt Call","description":"Record a real (production) use of a published prompt version — the\nPrompt Debug call-tracking association table. Best-effort from the worker;\nfailures must never break generation, so the worker fires this fire-and-\nforget.","operationId":"record_prompt_call_api_internal_prompt_call_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptCallRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/prompt/effective/{key}":{"get":{"tags":["internal"],"summary":"Get Effective Prompt","description":"Return the effective (published → code-default → unseeded) prompt for\na registry key. Read-only; consumed by per-app backends (e.g. nail-art)\nso an admin-published prompt can take effect in production. Fail-open is\nthe caller's responsibility — this returns 404 only for unknown keys.","operationId":"get_effective_prompt_api_internal_prompt_effective__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/deliver":{"post":{"tags":["internal"],"summary":"Deliver To Conversation","description":"Deliver a message to a conversation.\n\nGeneric endpoint — knows nothing about media, jobs, or tasks.\nAny internal service can push a message into any agent conversation.\n\n- Resolves conversation_id from Redis if not provided\n- Inserts AgentFeedMessage to DB\n- Publishes to Redis for real-time WebSocket delivery","operationId":"deliver_to_conversation_api_internal_deliver_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliverRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/workflow-progress":{"post":{"tags":["internal"],"summary":"Workflow Progress","description":"Update progress metadata on an active workflow atom.\n\nGeneric endpoint — any internal service can report progress on any\natom type. Used for real-time parallel task progress (e.g. sub-tasks\ncompleting during a parallel execution step).\n\nResolves conversation_id from Redis if not provided.","operationId":"workflow_progress_api_internal_workflow_progress_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowProgressRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/track-file":{"post":{"tags":["internal"],"summary":"Track File Internal","description":"Register an S3 file in the storage system.\n\nGeneric endpoint — any internal service can register files produced for\nan agent. Auto-determines content type from key, places into the correct\nstorage folder (Media/Images, Media/Videos, etc.).\n\nThis is an internal, idempotent, fire-and-forget endpoint — callers\n(media-worker's ``_auto_track_result`` / ``_track_in_storage``) never\ninspect the response. A missing agent means \"no host to attach this\nfile to\" — a normal no-op for callers dispatching studio-product\n(tryon/video) jobs under a synthetic agent_id that was never a real\nAgent row, NOT an error condition. Historically this raised 404,\nwhich is unhandled-exception noise for a case that happens on every\ncompleted studio job (fixed 2026-08-24 — see the worker-side skip in\n``_auto_track_result`` for the belt-and-suspenders companion fix that\navoids the call in the first place for the two known synthetic shapes;\nthis 200 response is what makes the fix safe for every OTHER caller /\nshape we haven't enumerated).","operationId":"track_file_internal_api_internal_track_file_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackFileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/write-document":{"post":{"tags":["internal"],"summary":"Write Document Internal","description":"Write a text document on behalf of an agent. Used by analyzer-worker\natoms that produce markdown / JSON / YAML the agent needs to read back\nvia `storage.py read-document` (same StorageFile rows the agent's own\n`storage.py write-document` creates).\n\nMirrors track-file's auth + agent-resolution shape; delegates to\n`storage_document_service.write_document` so upsert-on-filename, quota\ncheck, and team-scope semantics match the agent's CLI path.","operationId":"write_document_internal_api_internal_write_document_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__routes__internal__WriteDocumentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/platform/storage/track-existing":{"post":{"tags":["internal"],"summary":"Platform Storage Track Existing","description":"Register a pre-existing S3 object as a `storage_files` row under\nthe user's `Apps/<App Title>[/<kind>]/` folder, WITHOUT re-uploading.\n\nBackfill path. The old per-app `/api/uploads/presign` flow wrote\nobjects to S3 with no Storage row; this endpoint adopts those keys\nso they show up in the workspace Storage UI alongside everything\nelse. Idempotent on (s3_key) — re-running won't create duplicates.\n\nInternal-key only — the worker / backfill script reaches it from\ninside the VPC and supplies the installation_id + s3_key directly.","operationId":"platform_storage_track_existing_api_internal_platform_storage_track_existing_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/internal/platform/storage/move-to-kind":{"post":{"tags":["internal"],"summary":"Platform Storage Move To Kind","description":"Reparent an existing `storage_files` row into a different\n`Apps/<App Title>[/<new_kind>]/` folder, WITHOUT moving the S3 object.\n\nUsed by per-app backends that want to reorganize files after upload —\ne.g. nail-art's `/submit` route moves user-uploaded `hand` / `nail_set`\nfiles into a `job-{id}/inputs/` folder once a job_id is known.\n\nThe S3 key stays put (so presigned URLs already minted against it\nkeep working through the move); only `storage_files.folder_id` +\n`storage_files.metadata_.kind` change. `new_kind` may contain `/`\nso apps can move into a nested per-job tree in one call.\n\nIdempotent — if the file is already in the target folder, returns\n`moved=false`. Otherwise creates the destination folder chain (if\nneeded) and updates the row in one transaction.\n\nInternal-key auth. Caller supplies `app_slug` + `installation_id`\nso we can scope-check ownership (file must belong to the install's\nuser / team).","operationId":"platform_storage_move_to_kind_api_internal_platform_storage_move_to_kind_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/internal/platform/storage/upload-from-bytes":{"post":{"tags":["internal"],"summary":"Platform Storage Upload From Bytes","description":"Write a file into the user's `Apps/<App Title>/` folder on behalf\nof a worker (e.g. nail-art's harmonized image output, garment-bulk's\nrendered try-on). Internal-key auth — the App backend / worker\nmints + sends this from the same VPC.\n\n`installation_id` identifies the workspace scope (resolves to user,\nteam scope handled by the existing storage filter). `app_slug` is\ncross-checked against the install so apps can't write into each\nother's Storage folders.","operationId":"platform_storage_upload_from_bytes_api_internal_platform_storage_upload_from_bytes_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/internal/ws-probe/{agent_id}":{"get":{"tags":["internal"],"summary":"Ws Probe","description":"Test whether OpenClaw WS chat.send works from the API container.\n\nTemporary diagnostic endpoint — tests the WS scope bug fix on 3.22.","operationId":"ws_probe_api_internal_ws_probe__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/datahub-complete":{"post":{"tags":["internal"],"summary":"Datahub Complete","description":"Receive completion callbacks from media-worker datahub atoms.\n\nHandles three result types:\n- scrape_complete: insert raw records, optionally dispatch data.enrich,\n  evaluate active triggers and fire matching actions.\n- enrich_complete: update structured_data on existing records,\n  optionally dispatch data.summarize.\n- summary_complete: store summary markdown in S3 under the agent's\n  documents folder.","operationId":"datahub_complete_api_internal_datahub_complete_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/internal/data/register":{"post":{"tags":["internal"],"summary":"Register Data Table","description":"Register a DataTable record from an internal service (e.g. media worker).\n\nCalled after a data ingest atom completes to persist metadata about\nthe ingested file (S3 key, row count, column schema, etc.).","operationId":"register_data_table_api_internal_data_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/internal/data/query":{"post":{"tags":["internal"],"summary":"Internal Data Query","description":"Execute a data query from an agent (internal VPC-only).\n\nBody: {agent_id, action, sql?, table?, name?, limit?, backend?, config?}","operationId":"internal_data_query_api_internal_data_query_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/internal/data/analyze-report":{"post":{"tags":["internal"],"summary":"Dispatch Analyze Report","description":"Dispatch async data analysis report to the media worker.\n\nThe agent calls this to fire-and-forget a deep analysis job that:\n1. Loads Parquet data via DuckDB\n2. Fetches URLs found in the data\n3. Generates a structured report via Claude Sonnet\n4. Auto-delivers the report to chat","operationId":"dispatch_analyze_report_api_internal_data_analyze_report_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeReportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/bitable/build-child-rows":{"post":{"tags":["internal"],"summary":"Bitable Build Child Rows","description":"Atomically create N child rows + append their ids to a parent link cell.\n\nCalled by skill workers that fan out a 1→N split (e.g. video_split\nturns a reference video into clip rows). Runs under a single\ntransaction so a caller failure leaves the parent cell unchanged\nand the child rows either all created or none.\n\nBody (JSON, matching `BuildChildRows` schema):\n  parent_table_id  uuid\n  parent_row_id    uuid\n  parent_col_id    str     — must be a link column on the parent table\n  child_rows       [{data: dict, order_key?: str}, ...]  (1..200)\n\nResponse: {child_row_ids: [uuid, ...]}","operationId":"bitable_build_child_rows_api_internal_bitable_build_child_rows_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Bitable Build Child Rows Api Internal Bitable Build Child Rows Post"}}}}}}},"/api/internal/bitable/cell-result":{"post":{"tags":["internal"],"summary":"Bitable Cell Result","description":"Receive a worker's result for a bittable cell dispatch.\n\nQuery params:\n  - version_id: the placeholder BitableCellVersion.id the executor created.\n\nBody (flexible):\n  - status: \"ok\" | \"failed\"\n  - value: the shaped cell value (dict for attachment {\"s3_keys\": [...]},\n           scalar for text/number, etc.). Required when status='ok'.\n  - error: error_msg when status='failed'.\n  - job_id / type: informational, logged only.\n\nIdempotency: if the version already has a non-null value, we log and\nreturn 200 with state='done' — re-entrancy is fine since the worker\nmay retry the callback on transient network failures.","operationId":"bitable_cell_result_api_internal_bitable_cell_result_post","parameters":[{"name":"version_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Bitable Cell Result Api Internal Bitable Cell Result Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/bitable/cell-validation":{"post":{"tags":["internal"],"summary":"Bitable Cell Validation","description":"Receive a validator worker's score for a bittable cell version.\n\nQuery params:\n  - version_id: the BitableCellVersion.id the executor dispatched against.\n\nBody (pydantic: CellValidationCreate):\n  - score: float in [0, 1] | null (findings-only validator).\n  - findings: list of {code, severity, message, evidence?}.\n  - suggested_regen_note: user-addressable correction text; populates\n    the next version's iteration_note when auto-regen fires.\n  - raw: opaque full validator response (debugging / future miner).\n  - validator_skill: slug of the validator (echoed for audit).\n\nIdempotency: UNIQUE(version_id) on bitable_cell_validations lets us\ndetect re-delivery. The handler upserts on conflict by short-circuiting\nwhen a row already exists.","operationId":"bitable_cell_validation_api_internal_bitable_cell_validation_post","parameters":[{"name":"version_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Bitable Cell Validation Api Internal Bitable Cell Validation Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/tryon/rows/{row_id}/garment-category-result":{"post":{"tags":["internal"],"summary":"Tryon Garment Category Result","description":"Worker → API: persist the identified special clothing category back\nto the row (the cell-dialog identify path).\n\nThe atom reports value ∈ {swimwear|underwear|kids|null}. A successful\nnull means \"normal garment\" → store the explicit \"normal\" sentinel so\nwe never re-classify a confirmed-normal row. OVERWRITE on success: this\ncallback only fires from an explicit user re-pick of the garment cell,\nso it reflects the latest intent. Failures leave the column untouched\n(the generate-time fallback gets another shot).","operationId":"tryon_garment_category_result_api_internal_tryon_rows__row_id__garment_category_result_post","parameters":[{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/tryon/pose-variant/sketch-result":{"post":{"tags":["internal"],"summary":"Tryon Pose Variant Sketch Result","description":"Worker → API: persist a generated sketch back to its variant.","operationId":"tryon_pose_variant_sketch_result_api_internal_tryon_pose_variant_sketch_result_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/internal/radar/ingest":{"post":{"tags":["internal"],"summary":"Radar Ingest","description":"Push a storefront catalog for a watched shop from an external collector.\n\nBoth marketplaces refuse this platform's egress — Shopify 429s\n(`local_rate_limited`) and Etsy 403s every storefront request from our AWS\nranges, on a first touch, from any User-Agent, while the same URLs answer\n200 from a residential IP (measured 2026-07-31). Until the scanner has an\naccepted egress (`radar_fetch_proxy`), a collector that does have one can\npush the raw payload here.\n\nThe payload runs through the SAME upsert + signal code as a direct scan\n(`apply_listings`), so there is exactly one signal implementation — a\ncollector-fed shop and a self-scanned shop are indistinguishable\ndownstream.\n\nBody: ``{shop_id, platform_payload}`` — the raw Shopify products.json\nobject. Etsy is API-fetched in-process and is rejected here.\nX-Internal-Key gated, like every other internal endpoint.","operationId":"radar_ingest_api_internal_radar_ingest_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 Radar Ingest Api Internal Radar Ingest Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/radar/connect-shopify-official":{"post":{"tags":["internal"],"summary":"Radar Connect Shopify Official","description":"Attach an offline Shopify Admin token to a user's own RadarShop.\n\nCalled by the embedded Shopify app (tintin-shopify-radar) after install:\nits own OAuth already produced an offline token, so instead of sending the\nmerchant through Radar's second OAuth it hands the token over here. Writes\nthrough the same upsert as the OAuth callback\n(radar_shopify.store_official_connection) — encrypted token, scanning\nstatus, next scheduler cycle picks it up.\n\nBody: ``{user_id, shop_domain, access_token, scopes?}``.\nX-Internal-Key gated, like every other internal endpoint.","operationId":"radar_connect_shopify_official_api_internal_radar_connect_shopify_official_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 Radar Connect Shopify Official Api Internal Radar Connect Shopify Official Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/radar/metrics":{"get":{"tags":["internal"],"summary":"Radar Metrics","description":"Standalone view of the radar funnel — same body as the pulse block.","operationId":"radar_metrics_api_internal_radar_metrics_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Radar Metrics Api Internal Radar Metrics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/vault/tool/get":{"post":{"tags":["vault-tool-abi"],"summary":"Vault Tool Get","description":"Resolve a credential by (team_id == X-Business-Id, slug) for the agent.\n\nStep-by-step:\n  1. Resolve agent_id from token claim, else X-Agent-Id header fallback.\n  2. Confirm token.team_id == X-Business-Id (CLEAR-on-reassignment guard).\n  3. Confirm DB.agent.team_id == header.business_id (runtime backstop).\n  4. Resolve credential by (team_id, slug) — grant must exist for this agent.\n  5. Decrypt + (optional) filter fields + audit-log + return.","operationId":"vault_tool_get_api_internal_vault_tool_get_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Business-Id","in":"header","required":true,"schema":{"type":"string","title":"X-Business-Id"}},{"name":"X-Conversation-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Conversation-Id"}},{"name":"X-Agent-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultGetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultGetResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultGetError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultGetError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultGetError"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/storage/tool/write":{"post":{"tags":["storage-tool-abi"],"summary":"Storage Tool Write","description":"Upsert a text/code/JSON document on (filename, agent_id) for the agent's owner.","operationId":"storage_tool_write_api_internal_storage_tool_write_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Business-Id","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Business-Id"}},{"name":"X-Conversation-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Conversation-Id"}},{"name":"X-Agent-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageWriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageWriteResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Not Found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Unprocessable Entity"}}}},"/api/internal/storage/tool/read":{"post":{"tags":["storage-tool-abi"],"summary":"Storage Tool Read","description":"Read a previously-persisted document by filename (preferred) or file_id.","operationId":"storage_tool_read_api_internal_storage_tool_read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Business-Id","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Business-Id"}},{"name":"X-Conversation-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Conversation-Id"}},{"name":"X-Agent-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageReadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageReadResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Unprocessable Entity"}}}},"/api/internal/storage/tool/list":{"post":{"tags":["storage-tool-abi"],"summary":"Storage Tool List","description":"List the agent's (or team's) persisted documents, newest-first, with optional filters.","operationId":"storage_tool_list_api_internal_storage_tool_list_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Business-Id","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Business-Id"}},{"name":"X-Conversation-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Conversation-Id"}},{"name":"X-Agent-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Agent-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageListRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageListResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageError"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/incidents/{incident_id}/codex-callback":{"post":{"tags":["internal-incidents"],"summary":"Codex Callback","description":"Receive the gamma remediation result from the Codex workflow.","operationId":"codex_callback_api_internal_incidents__incident_id__codex_callback_post","parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodexIncidentCallback"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/incidents/{incident_id}/session-debug":{"get":{"tags":["internal-incidents"],"summary":"Incident Session Debug","description":"Return a read-only Session Debug snapshot scoped to one incident conversation.\n\nThis endpoint lets Codex incident runners inspect the exact conversation\ntranscript without granting the GitHub/AWS incident role direct prod DB or\nSecrets Manager access. It accepts only the incident callback token and\nonly for conversation IDs already embedded in that incident signal.","operationId":"incident_session_debug_api_internal_incidents__incident_id__session_debug_get","parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"conversation_id","in":"query","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"msg_limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Msg Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/incidents/{incident_id}/approve-prod":{"get":{"tags":["internal-incidents"],"summary":"Approve Prod","description":"Email approval link: dispatch gamma-to-prod promotion.","operationId":"approve_prod_api_internal_incidents__incident_id__approve_prod_get","parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}},{"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/internal/incidents/{incident_id}/reject-prod":{"get":{"tags":["internal-incidents"],"summary":"Reject Prod Form","description":"Email rejection link: collect a reason before re-dispatching Codex.","operationId":"reject_prod_form_api_internal_incidents__incident_id__reject_prod_get","parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-incidents"],"summary":"Reject Prod","description":"Email rejection form submit: send Codex back through gamma.","operationId":"reject_prod_api_internal_incidents__incident_id__reject_prod_post","parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reject_prod_api_internal_incidents__incident_id__reject_prod_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/codex-tasks/{task_id}/codex-callback":{"post":{"tags":["internal-codex-tasks"],"summary":"Codex Task Callback","description":"Receive a Codex operational task result.","operationId":"codex_task_callback_api_internal_codex_tasks__task_id__codex_callback_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodexIncidentCallback"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/codex-tasks/{task_id}/approve-prod":{"get":{"tags":["internal-codex-tasks"],"summary":"Approve Codex Task Prod","description":"Email approval link for non-incident Codex tasks.","operationId":"approve_codex_task_prod_api_internal_codex_tasks__task_id__approve_prod_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"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/internal/codex-tasks/{task_id}/reject-prod":{"get":{"tags":["internal-codex-tasks"],"summary":"Reject Codex Task Prod Form","description":"Email rejection link for non-incident Codex tasks.","operationId":"reject_codex_task_prod_form_api_internal_codex_tasks__task_id__reject_prod_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-codex-tasks"],"summary":"Reject Codex Task Prod","description":"Email rejection form submit for non-incident Codex tasks.","operationId":"reject_codex_task_prod_api_internal_codex_tasks__task_id__reject_prod_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_reject_codex_task_prod_api_internal_codex_tasks__task_id__reject_prod_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/pulse":{"get":{"tags":["internal-pulse"],"summary":"Pulse Export","description":"Per-product daily metrics for the asset-pulse collector.\n\n``days`` is clamped to 1..120 (never rejected — the external\ncollector should always get a payload back). Aggregates only —\ndays with no activity are omitted from ``days``.","operationId":"pulse_export_api_internal_pulse_get","parameters":[{"name":"product","in":"query","required":true,"schema":{"type":"string","pattern":"^(nail|tryon)$","title":"Product"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":35,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pulse Export Api Internal Pulse Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/mcp":{"post":{"tags":["mcp"],"summary":"Mcp Endpoint","operationId":"mcp_endpoint_api_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/mcp/keys":{"get":{"tags":["mcp"],"summary":"List Keys","operationId":"list_keys_api_mcp_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Keys Api Mcp Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["mcp"],"summary":"Create Key","operationId":"create_key_api_mcp_keys_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Key Api Mcp Keys Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/mcp/keys/{key_id}":{"delete":{"tags":["mcp"],"summary":"Revoke Key","operationId":"revoke_key_api_mcp_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/delete":{"post":{"tags":["account-deletion"],"summary":"Delete My Account","operationId":"delete_my_account_api_account_delete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfDeleteRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/users/{user_id}/delete":{"post":{"tags":["account-deletion"],"summary":"Admin Delete User","operationId":"admin_delete_user_api_admin_users__user_id__delete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminDeleteRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/account-deletions":{"get":{"tags":["account-deletion"],"summary":"Admin List Deletions","operationId":"admin_list_deletions_api_admin_account_deletions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","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/internal/account-deletions/pending-suppress":{"get":{"tags":["account-deletion"],"summary":"Pending Suppress","operationId":"pending_suppress_api_internal_account_deletions_pending_suppress_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/internal/account-deletions/{request_id}/suppressed":{"post":{"tags":["account-deletion"],"summary":"Ack Suppressed","operationId":"ack_suppressed_api_internal_account_deletions__request_id__suppressed_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/outreach-hook":{"post":{"tags":["outreach-hook"],"summary":"Outreach Hook","operationId":"outreach_hook_api_internal_outreach_hook_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutreachEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/orchestrator/chains":{"post":{"tags":["orchestrator"],"summary":"Create Chain","description":"Register a chain and dispatch its no-dependency steps.\n\nIdempotent within 30s: caller may retry on transient failure\n(504, network drop) without producing duplicate chains. Implicit\ndedup key uses (user_id, body JSON); explicit Idempotency-Key\nheader overrides.","operationId":"create_chain_api_orchestrator_chains_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/orchestrator/atom-completed":{"post":{"tags":["orchestrator"],"summary":"Atom Completed","description":"Internal-only. Called by ``/api/internal/deliver`` after the feed\nwrite. Forwards an atom-completion event to the state machine; the\norchestrator decides what (if anything) to dispatch next.","operationId":"atom_completed_api_orchestrator_atom_completed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtomCompletedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtomCompletedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/orchestrator/chains/{chain_id}":{"get":{"tags":["orchestrator"],"summary":"Get Chain State","operationId":"get_chain_state_api_orchestrator_chains__chain_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"chain_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/orchestrator/conversations/{conversation_id}/chains":{"get":{"tags":["orchestrator"],"summary":"List Chains","description":"Replaces PR #377's /async-tasks endpoint conceptually — but as a\nchain-level view rather than per-task.","operationId":"list_chains_api_orchestrator_conversations__conversation_id__chains_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChainView"},"title":"Response List Chains Api Orchestrator Conversations  Conversation Id  Chains Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/stripe-invoice":{"post":{"tags":["webhooks"],"summary":"Receive Stripe Invoice Webhook","description":"Mark concierge requests paid from Stripe invoice webhooks.\n\nManual invoices should set either metadata.concierge_request_id or the\nadmin-entered stripe_invoice_id before payment. Unknown invoices are\nacknowledged so Stripe does not retry unrelated billing events forever.","operationId":"receive_stripe_invoice_webhook_api_webhooks_stripe_invoice_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/webhooks/{provider}/{job_id}":{"post":{"tags":["webhooks"],"summary":"Receive Provider Webhook","description":"Receive a completion webhook from an external provider.\n\nRoutes the provider payload to SQS as a process_async_result job.\nThe media worker picks it up, downloads/validates/delivers the result.\n\nURL format: /api/webhooks/{provider}/{job_id}?meta={s3_meta_key}","operationId":"receive_provider_webhook_api_webhooks__provider___job_id__post","parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"meta","in":"query","required":true,"schema":{"type":"string","description":"S3 key for job metadata","title":"Meta"},"description":"S3 key for job metadata"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/track/o.gif":{"get":{"tags":["track"],"summary":"Open Pixel","description":"Open-tracking pixel embedded in outreach emails.","operationId":"open_pixel_api_track_o_gif_get","parameters":[{"name":"cid","in":"query","required":false,"schema":{"type":"string","default":"","title":"Cid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/track/c.gif":{"get":{"tags":["track"],"summary":"Click Beacon","description":"Click beacon fired by the marketing site on a ?cid= landing.","operationId":"click_beacon_api_track_c_gif_get","parameters":[{"name":"cid","in":"query","required":false,"schema":{"type":"string","default":"","title":"Cid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/track/r":{"get":{"tags":["track"],"summary":"Click Redirect","description":"Click-tracking redirect for EDM body links.\n\nThe HMAC over (cid, u) means only URLs we ourselves wrapped at send\ntime pass — this can never be used as an open redirect. An invalid\nsignature is a hard 400, never a redirect: losing a click beats\nlaundering an attacker's URL through our domain.","operationId":"click_redirect_api_track_r_get","parameters":[{"name":"cid","in":"query","required":false,"schema":{"type":"string","default":"","title":"Cid"}},{"name":"u","in":"query","required":false,"schema":{"type":"string","default":"","title":"U"}},{"name":"s","in":"query","required":false,"schema":{"type":"string","default":"","title":"S"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/track/events":{"get":{"tags":["track"],"summary":"List Events","description":"Incremental event feed. Filter is inclusive (created_at >= since):\nthe poller cursors on the last event's ts, and re-reading boundary rows\nis harmless because applying events is idempotent on its side.","operationId":"list_events_api_track_events_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/email/unsubscribe":{"get":{"tags":["email"],"summary":"Unsubscribe","description":"Opt a user out of lifecycle email. Idempotent.\n\nWith a valid signed link: one-click opt-out. Without one (bare URL,\nmissing or bad params): the self-serve email form — same page for\nevery invalid shape, so nothing about existing ids leaks. ?email=\nonly prefills the form; unsubscribing still takes the explicit POST.","operationId":"unsubscribe_api_email_unsubscribe_get","parameters":[{"name":"u","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"user id","title":"U"},"description":"user id"},{"name":"t","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HMAC token","title":"T"},"description":"HMAC token"},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["email"],"summary":"Unsubscribe One Click","description":"RFC 8058 one-click opt-out, POSTed by the mailbox provider (Gmail's\n\"Unsubscribe\" button) to the URL in our List-Unsubscribe header with the\nbody `List-Unsubscribe=One-Click`. Same signed link as the GET page, so\nthe body is not needed to authorize it. No HTML: nobody sees this\nresponse. An invalid link answers 400 without touching anything.","operationId":"unsubscribe_one_click_api_email_unsubscribe_post","parameters":[{"name":"u","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"user id","title":"U"},"description":"user id"},{"name":"t","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HMAC token","title":"T"},"description":"HMAC token"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/email/unsubscribe/request":{"post":{"tags":["email"],"summary":"Unsubscribe Request","description":"Self-serve opt-out by email address (from the published form).\n\nThe response is IDENTICAL whether or not the address exists — this\nendpoint must never confirm which emails are in our system. Rate\nlimited per IP so it can't be used to bulk-suppress a mailing list.","operationId":"unsubscribe_request_api_email_unsubscribe_request_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_unsubscribe_request_api_email_unsubscribe_request_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/email/resubscribe":{"post":{"tags":["email"],"summary":"Resubscribe","description":"Undo a marketing opt-out. Same HMAC as unsubscribe; idempotent.","operationId":"resubscribe_api_email_resubscribe_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_resubscribe_api_email_resubscribe_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/greeting/pending":{"get":{"tags":["greeting"],"summary":"List Pending Users","description":"Users registered >= 3 days ago and newer than ``since``, oldest first.\n\nThe poller cursors on the last returned ``created_at`` (strict ``>``) and\ndedups by email on its side, so boundary re-reads are harmless. Eligibility\nis monotonic in created_at (a user becomes eligible exactly 3 days after\nsignup), so the cursor never skips a user. Internal/test domains are\nexcluded so the drip never mails the team.","operationId":"list_pending_users_api_internal_greeting_pending_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/agents/{user_handle}/{slug}":{"get":{"tags":["public-agents"],"summary":"Get Public Agent","operationId":"get_public_agent_api_public_agents__user_handle___slug__get","parameters":[{"name":"user_handle","in":"path","required":true,"schema":{"type":"string","title":"User Handle"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/concierge/request":{"post":{"tags":["public-agents"],"summary":"Create Concierge Request","operationId":"create_concierge_request_api_public_concierge_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConciergeRequestCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConciergeRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/messages/{message_id}/reactions":{"post":{"tags":["reactions"],"summary":"Upsert Reaction","description":"Add or update a reaction on an agent message.\n\nUpsert: if the user already reacted, update the type/comment.\nOnly agent messages can be reacted to.","operationId":"upsert_reaction_api_messages__message_id__reactions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["reactions"],"summary":"Remove Reaction","description":"Remove the current user's reaction from a message.","operationId":"remove_reaction_api_messages__message_id__reactions_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["reactions"],"summary":"Get Message Reaction","description":"Get the current user's reaction on a message (if any).","operationId":"get_message_reaction_api_messages__message_id__reactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/reactions":{"get":{"tags":["reactions"],"summary":"List Agent Reactions","description":"List recent reactions for an agent's messages.\n\nUsed by agents during heartbeat to learn from feedback.\nReturns reactions with the original message content for context.","operationId":"list_agent_reactions_api_agents__agent_id__reactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"ISO timestamp — only return reactions after this time","title":"Since"},"description":"ISO timestamp — only return reactions after this time"},{"name":"reaction_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(up|down)$"},{"type":"null"}],"title":"Reaction Type"}},{"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/elements":{"post":{"tags":["elements"],"summary":"Create Element","operationId":"create_element_api_elements_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateElementRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["elements"],"summary":"List Elements","operationId":"list_elements_api_elements_get","security":[{"HTTPBearer":[]}],"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"}},{"name":"element_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Type"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/elements/resolve":{"get":{"tags":["elements"],"summary":"Resolve Element","description":"Resolve a natural language reference to an element (agent-facing).","operationId":"resolve_element_api_elements_resolve_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Natural language query","title":"Q"},"description":"Natural language query"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/elements/{element_id}":{"get":{"tags":["elements"],"summary":"Get Element","operationId":"get_element_api_elements__element_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["elements"],"summary":"Update Element","operationId":"update_element_api_elements__element_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateElementRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["elements"],"summary":"Delete Element","operationId":"delete_element_api_elements__element_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/elements/{element_id}/files":{"post":{"tags":["elements"],"summary":"Add File To Element","operationId":"add_file_to_element_api_elements__element_id__files_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddFileRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/elements/{element_id}/files/{element_file_id}":{"patch":{"tags":["elements"],"summary":"Update Element File","operationId":"update_element_file_api_elements__element_id__files__element_file_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}},{"name":"element_file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["elements"],"summary":"Remove File From Element","operationId":"remove_file_from_element_api_elements__element_id__files__element_file_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}},{"name":"element_file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element File Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/elements/{element_id}/vault-refs":{"post":{"tags":["elements"],"summary":"Add Vault Reference","operationId":"add_vault_reference_api_elements__element_id__vault_refs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddVaultRefRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/elements/{element_id}/vault-refs/{ref_id}":{"delete":{"tags":["elements"],"summary":"Remove Vault Reference","operationId":"remove_vault_reference_api_elements__element_id__vault_refs__ref_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}},{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ref Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/elements/{element_id}/permissions":{"put":{"tags":["elements"],"summary":"Set Permissions","operationId":"set_permissions_api_elements__element_id__permissions_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPermissionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/elements/{element_id}/usage":{"get":{"tags":["elements"],"summary":"Get Element Usage","operationId":"get_element_usage_api_elements__element_id__usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"element_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Element Id"}},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/programs":{"get":{"tags":["programs"],"summary":"List Programs","description":"List programs for the current user's team.","operationId":"list_programs_api_programs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProgramResponse"},"type":"array","title":"Response List Programs Api Programs Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["programs"],"summary":"Create Program","description":"Create a new program within the current user's team.","operationId":"create_program_api_programs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/programs/{program_id}":{"patch":{"tags":["programs"],"summary":"Update Program","description":"Update a program's name or description. Cannot rename the Default program.","operationId":"update_program_api_programs__program_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"program_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Program Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["programs"],"summary":"Delete Program","description":"Delete a program. Moves its agents to the Default program. Cannot delete Default.","operationId":"delete_program_api_programs__program_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"program_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Program Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/programs/agents/{agent_id}/program":{"patch":{"tags":["programs"],"summary":"Set Agent Program","description":"Transfer an agent to a different program.","operationId":"set_agent_program_api_programs_agents__agent_id__program_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProgramUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/canvases":{"get":{"tags":["canvas"],"summary":"List Canvases","description":"List canvases. Optionally filter by program_id.","operationId":"list_canvases_api_canvases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"program_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CanvasResponse"},"title":"Response List Canvases Api Canvases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["canvas"],"summary":"Create Canvas","description":"Create a new canvas and store its HTML via the team storage system.","operationId":"create_canvas_api_canvases_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/canvases/{canvas_id}":{"get":{"tags":["canvas"],"summary":"Get Canvas","description":"Get a single canvas with a presigned HTML URL.","operationId":"get_canvas_api_canvases__canvas_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Canvas Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["canvas"],"summary":"Update Canvas","description":"Update canvas name, description, or HTML. Only the creator can edit.","operationId":"update_canvas_api_canvases__canvas_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Canvas Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["canvas"],"summary":"Delete Canvas","description":"Delete a canvas. Only the creator can delete.","operationId":"delete_canvas_api_canvases__canvas_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Canvas Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/canvases/{canvas_id}/token":{"post":{"tags":["canvas"],"summary":"Issue Canvas Token","description":"Issue a short-lived JWT for Canvas iframe authentication.","operationId":"issue_canvas_token_api_canvases__canvas_id__token_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"canvas_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Canvas Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/canvas/data/analytics/credits":{"get":{"tags":["canvas-data"],"summary":"Get Credit Analytics","description":"Daily credit usage for a program, optionally filtered by agent.","operationId":"get_credit_analytics_api_canvas_data_analytics_credits_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/canvas/data/analytics/activity":{"get":{"tags":["canvas-data"],"summary":"Get Activity Analytics","description":"Agent roster for the program with status and heartbeat info.","operationId":"get_activity_analytics_api_canvas_data_analytics_activity_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/canvas/data/agents/{agent_id}/storage":{"get":{"tags":["canvas-data"],"summary":"List Agent Storage","description":"List confirmed storage files for an agent in the program.","operationId":"list_agent_storage_api_canvas_data_agents__agent_id__storage_get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/canvas/data/agents/{agent_id}/storage/{file_id}":{"get":{"tags":["canvas-data"],"summary":"Get Agent Storage File","description":"Return a presigned GET URL for a specific storage file.","operationId":"get_agent_storage_file_api_canvas_data_agents__agent_id__storage__file_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/canvas/data/integrations/{service}/metrics":{"get":{"tags":["canvas-data"],"summary":"Get Integration Metrics","description":"Proxy external API metrics using the canvas creator's OAuth tokens.","operationId":"get_integration_metrics_api_canvas_data_integrations__service__metrics_get","parameters":[{"name":"service","in":"path","required":true,"schema":{"type":"string","title":"Service"}},{"name":"authorization","in":"header","required":true,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/agents/{agent_id}/apps":{"post":{"tags":["agent-apps"],"summary":"Create Agent App","description":"Create an App from an agent in build mode or engineer type.\n\nThe App is scoped to the agent's program. Auth: JWT or X-Internal-Key\n(agents use internal auth via api_client).","operationId":"create_agent_app_api_agents__agent_id__apps_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAppCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanvasResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agent-apps"],"summary":"List Agent Apps","description":"List Apps in the agent's program scope.","operationId":"list_agent_apps_api_agents__agent_id__apps_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CanvasResponse"},"title":"Response List Agent Apps Api Agents  Agent Id  Apps Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/plan":{"post":{"tags":["workflows-exec"],"summary":"Plan Workflow","description":"Create a tracked workflow from the agent's plan.\n\nUses the workflow interpreter (Sonnet) to decompose the agent's\ndescribed plan into specific atoms, then creates a WorkflowExecution\n+ AgentTask for tracking.","operationId":"plan_workflow_api_workflows_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowPlanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/workflows/{execution_id}/atoms/{atom_id}/complete":{"post":{"tags":["workflows-exec"],"summary":"Complete Atom","description":"Report an agent-executed atom step as completed.\n\nFor dispatched atoms (media jobs, etc.), completion is tracked\nautomatically. This endpoint is for steps the agent performs itself\n(general.* atoms).","operationId":"complete_atom_api_workflows__execution_id__atoms__atom_id__complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}},{"name":"atom_id","in":"path","required":true,"schema":{"type":"string","title":"Atom Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AtomCompleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{execution_id}/cancel":{"post":{"tags":["workflows-exec"],"summary":"Cancel Workflow","description":"Cancel a running workflow.","operationId":"cancel_workflow_api_workflows__execution_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workflows/{execution_id}":{"get":{"tags":["workflows-exec"],"summary":"Get Workflow","description":"Get workflow execution status.","operationId":"get_workflow_api_workflows__execution_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/manager/history":{"get":{"tags":["manager"],"summary":"Get Manager History","description":"Return the most recent manager chat messages for the current user.\n\nWhen program_id is provided, only messages from that program are returned.","operationId":"get_manager_history_api_manager_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"program_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/manager/suggestions":{"get":{"tags":["manager"],"summary":"Get Manager Suggestions","description":"Return program-scoped suggestion bubbles for the Manager empty state.","operationId":"get_manager_suggestions_api_manager_suggestions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"program_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/manager/upload-urls":{"post":{"tags":["manager"],"summary":"Get Manager Upload Urls","description":"Return presigned PUT URLs for direct S3 upload from the browser (Manager chat).","operationId":"get_manager_upload_urls_api_manager_upload_urls_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagerUploadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/data/sources":{"get":{"tags":["datahub"],"summary":"List Sources","description":"List all registered data sources, optionally filtered by status.","operationId":"list_sources_api_data_sources_get","security":[{"HTTPBearer":[]}],"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/src__schemas__datahub__DataSourceResponse"},"title":"Response List Sources Api Data Sources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data/sources/discover":{"get":{"tags":["datahub"],"summary":"Discover Sources","description":"Discover configured data sources matching a natural language query.\n\nProvider capabilities are useful only after the corresponding\n`data_sources` row exists. Returning bare `source_type` values caused\nagents to attempt job creation without a UUID and then improvise around\n400s. Include `source_id` when configured, and suppress unconfigured\ncapabilities so \"no sources\" is unambiguous.","operationId":"discover_sources_api_data_sources_discover_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","description":"Natural language query to discover sources","title":"Q"},"description":"Natural language query to discover sources"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataSourceDiscoverResponse"},"title":"Response Discover Sources Api Data Sources Discover Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data/jobs":{"get":{"tags":["datahub"],"summary":"List Jobs","description":"List data jobs for the current user/team.","operationId":"list_jobs_api_data_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent 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/DataJobResponse"},"title":"Response List Jobs Api Data Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["datahub"],"summary":"Create Job","description":"Create a new data job.\n\nAccepts either an explicit `source_id` UUID, or — when `source_id` is\nomitted — auto-resolves the source from `config.source_type` (and\noptional `config.provider`). The latter shape lets agents fire one POST\ninstead of querying `/api/data/sources` first.","operationId":"create_job_api_data_jobs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJobCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data/jobs/{job_id}":{"get":{"tags":["datahub"],"summary":"Get Job","description":"Get a single data job by ID.","operationId":"get_job_api_data_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["datahub"],"summary":"Update Job","description":"Update a data job.","operationId":"update_job_api_data_jobs__job_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJobUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["datahub"],"summary":"Delete Job","description":"Soft-delete a data job.","operationId":"delete_job_api_data_jobs__job_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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/data/jobs/{job_id}/run":{"post":{"tags":["datahub"],"summary":"Run Job","description":"Trigger immediate execution of a data job.","operationId":"run_job_api_data_jobs__job_id__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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/data/jobs/{job_id}/records":{"get":{"tags":["datahub"],"summary":"List Records","description":"Return paginated records for a data job.","operationId":"list_records_api_data_jobs__job_id__records_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"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":200,"minimum":1,"default":50,"title":"Per Page"}},{"name":"run_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Run Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search query","title":"Q"},"description":"Search query"},{"name":"view","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"raw | structured | both","title":"View"},"description":"raw | structured | both"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"scraped_at","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","default":"desc","title":"Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRecordPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data/jobs/{job_id}/runs":{"get":{"tags":["datahub"],"summary":"List Runs","description":"List runs for a data job with record counts.","operationId":"list_runs_api_data_jobs__job_id__runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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/data/triggers":{"post":{"tags":["datahub"],"summary":"Create Trigger","description":"Create a new data trigger.","operationId":"create_trigger_api_data_triggers_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTriggerCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["datahub"],"summary":"List Triggers","description":"List data triggers, optionally filtered by job_id.","operationId":"list_triggers_api_data_triggers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataTriggerResponse"},"title":"Response List Triggers Api Data Triggers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data/triggers/{trigger_id}":{"patch":{"tags":["datahub"],"summary":"Update Trigger","description":"Update a data trigger.","operationId":"update_trigger_api_data_triggers__trigger_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTriggerUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["datahub"],"summary":"Delete Trigger","description":"Delete a data trigger.","operationId":"delete_trigger_api_data_triggers__trigger_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Trigger Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/radar/shops":{"post":{"tags":["radar"],"summary":"Connect Shop","description":"Register a shop and queue its first scan (worker picks it up <60s).","operationId":"connect_shop_api_radar_shops_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/radar/overview":{"get":{"tags":["radar"],"summary":"Overview","description":"One payload for the whole radar page — shop, counts, signals, grid.","operationId":"overview_api_radar_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/radar/badge":{"get":{"tags":["radar"],"summary":"Badge","description":"Cheap header-chip payload: is radar on, and how many open signals.","operationId":"badge_api_radar_badge_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/radar/listings/{listing_id}/signal":{"post":{"tags":["radar"],"summary":"Signal Action","description":"Snooze, dismiss, or restore one listing's signal.","operationId":"signal_action_api_radar_listings__listing_id__signal_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Listing Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalActionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/radar/listings/{listing_id}/import-garment":{"post":{"tags":["radar"],"summary":"Import Garment","description":"Pull a listing's photo into the user's try-on project as a garment.\n\nThe reshoot deep-link needs the listing image as a generation input, but\nthe browser can't fetch it (marketplace CDNs don't hand out CORS), so we\ndownload it server-side — through the scanner's SSRF-guarded fetch — and\nstore it under the same s3 key convention as a normal tryon upload.\nImporting is free; the charge happens at generation like any other run.","operationId":"import_garment_api_radar_listings__listing_id__import_garment_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Listing Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGarmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/radar/listings/{listing_id}/fix-title":{"post":{"tags":["radar"],"summary":"Fix Listing Title","description":"One-click title rewrite → saved to the listing's kit. Free.\n\nWe can't write the fix back to the storefront (radar is permission-free\nby design) — the seller copies it or downloads the kit. The quality\nchecks intentionally keep failing until the storefront itself changes.","operationId":"fix_listing_title_api_radar_listings__listing_id__fix_title_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Listing Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/radar/listings/{listing_id}/kit/assets":{"post":{"tags":["radar"],"summary":"Register Kit Assets","description":"Attach reshoot outputs to the listing's kit (called by the studio\nafter a radar-context generation lands). Keys must be the caller's own\ntryon outputs — anything else is rejected unseen.","operationId":"register_kit_assets_api_radar_listings__listing_id__kit_assets_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Listing Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KitAssetsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/radar/listings/{listing_id}/kit/download":{"post":{"tags":["radar"],"summary":"Download Kit","description":"Build the kit zip and hand back a presigned URL.","operationId":"download_kit_api_radar_listings__listing_id__kit_download_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"listing_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Listing Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/radar/shops/current":{"delete":{"tags":["radar"],"summary":"Disconnect Shop","operationId":"disconnect_shop_api_radar_shops_current_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/radar/notify-email":{"post":{"tags":["radar"],"summary":"Set Notify Email","description":"Set (or clear) the shop's radar email delivery address.\n\nnotify_email is a DELIVERY address only — it never touches users.email\nor login identity. Primary consumer is the embedded Shopify app, whose\nheadless accounts own a no-MX synthetic address that hard-bounces\n(2026-08-15 audit); see tintin-shopify-radar docs/EMAIL-CAPTURE-DESIGN.md.","operationId":"set_notify_email_api_radar_notify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyEmailBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/radar/competitors":{"get":{"tags":["radar"],"summary":"List Competitors","description":"Everything the Competitor watch card + Competitors section render.","operationId":"list_competitors_api_radar_competitors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["radar"],"summary":"Add Competitor","description":"Watch a competitor storefront. The slot gate lives HERE, not in the\nschema — 402 carries the slot state so the FE can render the upgrade\nmodal without a second round-trip.","operationId":"add_competitor_api_radar_competitors_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/radar/competitors/{competitor_id}":{"delete":{"tags":["radar"],"summary":"Remove Competitor","description":"Stop watching. The slot frees immediately; listings + activity history\nare deleted (DB-level cascade) — exactly what the confirm copy says.","operationId":"remove_competitor_api_radar_competitors__competitor_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"competitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Competitor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/radar/competitors/{competitor_id}/events":{"get":{"tags":["radar"],"summary":"Competitor Events","description":"The activity feed — last 30 days, newest first, day-grouped by the FE.","operationId":"competitor_events_api_radar_competitors__competitor_id__events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"competitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Competitor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/radar/competitors/{competitor_id}/listings":{"get":{"tags":["radar"],"summary":"Competitor Listings","description":"The All-listings grid: active catalog plus recently-delisted rows.\n\nNo health checks, no fix surface — competitor listings carry watch-only\nfields and the only action is the outbound link.","operationId":"competitor_listings_api_radar_competitors__competitor_id__listings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"competitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Competitor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/radar/benchmarks":{"get":{"tags":["radar"],"summary":"Benchmarks","description":"You-vs-competitors: cadence, season mix, category mix, keyword gaps.\n\nEvery number in the payload can be opened into the listings behind it —\nthe same no-black-box rule as the quality layer.","operationId":"benchmarks_api_radar_benchmarks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/radar/shopify/connect":{"post":{"tags":["radar"],"summary":"Shopify Connect Start","description":"Start the OAuth flow — answer with the Shopify authorize URL.\n\nDeliberately does NOT create the RadarShop row: until the seller\napproves in Shopify admin nothing has changed, and abandoning the\nconsent page must leave no trace. The callback does all the writes.","operationId":"shopify_connect_start_api_radar_shopify_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopifyConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/radar/shopify/callback":{"get":{"tags":["radar"],"summary":"Shopify Oauth Callback","description":"OAuth landing — verify, exchange, store, bounce back to the radar page.\n\nNo session here (top-level redirect from Shopify admin): the signed\nsingle-use `state` is the whole authentication. Every failure path\nredirects with ?official=error so the user never strands on a JSON page.","operationId":"shopify_oauth_callback_api_radar_shopify_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/radar/etsy/connect":{"post":{"tags":["radar"],"summary":"Etsy Connect Start","description":"Start the Etsy OAuth flow — no input at all.\n\nThe authorize URL is account-generic: the seller logs into Etsy and\napproves; the callback learns which shop is theirs from the token.\nNothing is written here (same contract as the Shopify starter).","operationId":"etsy_connect_start_api_radar_etsy_connect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/radar/etsy/callback":{"get":{"tags":["radar"],"summary":"Etsy Oauth Callback","description":"Etsy OAuth landing — exchange with PKCE, resolve the shop, store.\n\nSingle-use is enforced by consuming the PKCE verifier (GETDEL): a\nreplayed callback finds no verifier and cannot exchange. Every failure\nredirects with ?official=error, same contract as the Shopify callback.","operationId":"etsy_oauth_callback_api_radar_etsy_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/radar/woo/connect":{"post":{"tags":["radar"],"summary":"Woo Connect Start","description":"Start the wc-auth flow — answer with the store's approval URL.\n\nThe store URL is typed (self-hosted WordPress has no central session\nto resolve it from). Nothing is written here; the key-delivery\ncallback does all the writes.","operationId":"woo_connect_start_api_radar_woo_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WooConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/radar/woo/callback":{"post":{"tags":["radar"],"summary":"Woo Key Callback","description":"Server-to-server key delivery from the store (wc-auth POST).\n\nBody: {key_id, user_id, consumer_key, consumer_secret, key_permissions}\nwhere user_id is OUR signed state (Woo's opaque passthrough field).\nThe state is consumed here — this is the write the flow protects.\nWoo only checks for a 2xx; the JSON body is for our own logs.","operationId":"woo_key_callback_api_radar_woo_callback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/radar/woo/return":{"get":{"tags":["radar"],"summary":"Woo Return","description":"Browser landing after the store's approval screen.\n\nWoo appends ?success=0|1&user_id=<our state>. The success flag isn't\ntrusted — the DB is: keys either landed via the callback or they\ndidn't. The state is only READ here (the callback consumed it).","operationId":"woo_return_api_radar_woo_return_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/work-email/status":{"get":{"tags":["work-email"],"summary":"Work Email Status","description":"State for the invite modal: nothing bound / pending / verified.","operationId":"work_email_status_api_work_email_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/work-email/bind":{"post":{"tags":["work-email"],"summary":"Bind Work Email","description":"Store the (unverified) work email and send the verification link.\n\nCalling again with the same address is the resend path — cooldown-gated\nper user, not per address, so switching addresses can't dodge it.","operationId":"bind_work_email_api_work_email_bind_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__routes__work_email__BindRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/work-email/verify":{"post":{"tags":["work-email"],"summary":"Verify Work Email","description":"Public: consume the emailed token — stamp, grant once, queue scan.","operationId":"verify_work_email_api_work_email_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data/tables/query":{"post":{"tags":["data"],"summary":"Query Data","description":"Route a data action for an agent's dataset.\n\nActions:\n- ``list_tables``: return all tables registered for the agent\n- ``sample``: return N sample rows from a table (requires ``body.table``)\n- ``query``: execute a SQL statement (requires ``body.sql``)\n- ``save``: execute SQL and save result as a new Parquet table (requires ``body.sql`` + ``body.name``)\n- ``register_source``: create a bare DataTable record (requires ``body.name`` + ``body.backend``)","operationId":"query_data_api_data_tables_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/data/tables/sources":{"get":{"tags":["data"],"summary":"List Data Sources","description":"List all DataTable records registered for *agent_id*.","operationId":"list_data_sources_api_data_tables_sources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Agent UUID","title":"Agent Id"},"description":"Agent UUID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/src__schemas__data__DataSourceResponse"},"title":"Response List Data Sources Api Data Tables Sources Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["data"],"summary":"Create Data Source","description":"Create a DataTable record for the given agent.","operationId":"create_data_source_api_data_tables_sources_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataSourceCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__data__DataSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/data/tables/sources/{table_id}":{"delete":{"tags":["data"],"summary":"Delete Data Source","description":"Delete a DataTable record and its associated S3 files.","operationId":"delete_data_source_api_data_tables_sources__table_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devices/push-token":{"post":{"tags":["devices"],"summary":"Register Push Token","description":"Register or update a device push token.","operationId":"register_push_token_api_devices_push_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterPushTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["devices"],"summary":"Deregister Push Token","description":"Deactivate a device push token (soft delete).","operationId":"deregister_push_token_api_devices_push_token_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterPushTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/desktop/activate":{"post":{"tags":["desktop"],"summary":"Activate Desktop Tools","description":"Master switch ON. Just sets the flag. No config, no permissions.","operationId":"activate_desktop_tools_api_desktop_activate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/desktop/deactivate":{"post":{"tags":["desktop"],"summary":"Deactivate Desktop Tools","description":"Master switch OFF. Clears all agent configs + uninstalls all skills.","operationId":"deactivate_desktop_tools_api_desktop_deactivate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/desktop/register":{"post":{"tags":["desktop"],"summary":"Register Desktop","description":"Desktop heartbeat. Requires client_id for multi-device support.","operationId":"register_desktop_api_desktop_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopRegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/desktop/unregister":{"post":{"tags":["desktop"],"summary":"Unregister Desktop","description":"Desktop going offline — immediately remove manifest.","operationId":"unregister_desktop_api_desktop_unregister_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"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/desktop/status":{"get":{"tags":["desktop"],"summary":"Get Desktop Status","description":"Check desktop online status and available tools for an agent.","operationId":"get_desktop_status_api_desktop_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/config/{agent_id}":{"get":{"tags":["desktop"],"summary":"Get Agent Config Endpoint","description":"Get per-agent Desktop Tools config. Returns empty if not configured.","operationId":"get_agent_config_endpoint_api_desktop_config__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopToolConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["desktop"],"summary":"Update Agent Config Endpoint","description":"Update per-agent config. Enabling installs skill. Disabling clears all permissions + uninstalls skill.","operationId":"update_agent_config_endpoint_api_desktop_config__agent_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopToolConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopToolConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/tool-request":{"post":{"tags":["desktop"],"summary":"Submit Tool Request","description":"Submit a tool execution request.","operationId":"submit_tool_request_api_desktop_tool_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopToolRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopToolRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/desktop/tool-result/{request_id}":{"get":{"tags":["desktop"],"summary":"Get Tool Result","description":"Poll for tool execution result.","operationId":"get_tool_result_api_desktop_tool_result__request_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopToolResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/desktop/tool-response":{"post":{"tags":["desktop"],"summary":"Submit Tool Response","description":"Desktop submits execution result.","operationId":"submit_tool_response_api_desktop_tool_response_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopToolResponseSubmit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/desktop/upload-url":{"post":{"tags":["desktop"],"summary":"Get Upload Url","operationId":"get_upload_url_api_desktop_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopUploadUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesktopUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/desktop/tools":{"get":{"tags":["desktop"],"summary":"List Tools","operationId":"list_tools_api_desktop_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DesktopToolDefinition"},"type":"array","title":"Response List Tools Api Desktop Tools Get"}}}}}}},"/api/admin/auth/google":{"post":{"tags":["admin-auth"],"summary":"Admin Google Login","description":"Verify Google ID token and return admin JWT.","operationId":"admin_google_login_api_admin_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGoogleLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/auth/me":{"get":{"tags":["admin-auth"],"summary":"Admin Me","description":"Get current admin user info.","operationId":"admin_me_api_admin_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/users":{"get":{"tags":["admin-users"],"summary":"List Users","description":"List users with search and filtering.","operationId":"list_users_api_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter"}},{"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":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}":{"get":{"tags":["admin-users"],"summary":"Get User Detail","description":"Get detailed user info.","operationId":"get_user_detail_api_admin_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin-users"],"summary":"Update User","description":"Update user plan, agent slots, or add credits.","operationId":"update_user_api_admin_users__user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/studio-subscription/cancel":{"post":{"tags":["admin-users"],"summary":"Cancel User Studio Subscription","description":"Cancel a user's (or their owned team's) studio subscription.\n\n``mode=\"period_end\"`` keeps access + credits until the paid period lapses;\n``mode=\"immediate\"`` cancels in Stripe now (pair with ``zero_credits`` to\nalso empty the subscription pool). Safe for both real Stripe subscriptions\nand admin comp subscriptions — see\n``billing_service.admin_cancel_studio_subscription``.","operationId":"cancel_user_studio_subscription_api_admin_users__user_id__studio_subscription_cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioSubscriptionCancelRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/whitelist":{"post":{"tags":["admin-users"],"summary":"Whitelist User","description":"Whitelist a user (bypass credit checks).","operationId":"whitelist_user_api_admin_users__user_id__whitelist_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin-users"],"summary":"Update Whitelist Note","description":"Edit the note on an existing whitelist grant.\n\nDeliberately note-only. Before this existed the sole way to correct a note\nwas remove-then-re-add, which reset `whitelisted_at` / `whitelisted_by`\nand destroyed the record of when the exemption started and who approved it\n— exactly the provenance a 2B contract exemption needs to keep.\n\nNothing about the exemption's SCOPE changes here: expiry, no_expiration\nand the is_whitelisted flag itself are untouched, so editing a note can\nnever accidentally extend or revoke someone's access.","operationId":"update_whitelist_note_api_admin_users__user_id__whitelist_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistNoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-users"],"summary":"Remove Whitelist","description":"Remove whitelist from a user.","operationId":"remove_whitelist_api_admin_users__user_id__whitelist_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","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/admin/invites":{"get":{"tags":["admin-invites"],"summary":"List Invites","description":"List all invites (pending and redeemed).","operationId":"list_invites_api_admin_invites_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin-invites"],"summary":"Create Invite","description":"Create a whitelist invite and send email.","operationId":"create_invite_api_admin_invites_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/invites/{invite_id}":{"delete":{"tags":["admin-invites"],"summary":"Revoke Invite","description":"Revoke a pending invite.","operationId":"revoke_invite_api_admin_invites__invite_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/coupons":{"get":{"tags":["admin-coupons"],"summary":"List Coupons","description":"List all coupons.","operationId":"list_coupons_api_admin_coupons_get","security":[{"HTTPBearer":[]}],"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":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin-coupons"],"summary":"Create Coupon","description":"Create a new coupon.","operationId":"create_coupon_api_admin_coupons_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/coupons/{coupon_id}":{"put":{"tags":["admin-coupons"],"summary":"Update Coupon","description":"Update a coupon.","operationId":"update_coupon_api_admin_coupons__coupon_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"coupon_id","in":"path","required":true,"schema":{"type":"string","title":"Coupon Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/coupons/{coupon_id}/redemptions":{"get":{"tags":["admin-coupons"],"summary":"List Redemptions","description":"List redemptions for a coupon.","operationId":"list_redemptions_api_admin_coupons__coupon_id__redemptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"coupon_id","in":"path","required":true,"schema":{"type":"string","title":"Coupon Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/dashboard/overview":{"get":{"tags":["admin-dashboard"],"summary":"Get Overview","description":"Key metrics cards with period-over-period change.\n\nUsers and subscribers are live-computed from the users/wallets tables\n(unified-auth registration store); credits from studio_credit_ledger.\nDailyMetrics (agent-era snapshots) only backs the MRR card now.","operationId":"get_overview_api_admin_dashboard_overview_get","security":[{"HTTPBearer":[]}],"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":{"$ref":"#/components/schemas/OverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/dashboard/growth":{"get":{"tags":["admin-dashboard"],"summary":"Get Growth","description":"User growth time series, live from the users table (unified auth).\n\nPer UTC day: cumulative total users + that day's signups. Agent metrics\nwere dropped with the AI-employee product retirement.","operationId":"get_growth_api_admin_dashboard_growth_get","security":[{"HTTPBearer":[]}],"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/admin/dashboard/revenue":{"get":{"tags":["admin-dashboard"],"summary":"Get Revenue","description":"Revenue time series.","operationId":"get_revenue_api_admin_dashboard_revenue_get","security":[{"HTTPBearer":[]}],"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/admin/dashboard/usage":{"get":{"tags":["admin-dashboard"],"summary":"Get Usage","description":"Studio-credits usage time series, live from studio_credit_ledger.\n\nPer UTC day: charge count, credits consumed (gross), credits refunded,\nand a per-unit_kind consumption breakdown. Whitelisted users' personal\nwallets are excluded. Credit values are human credits (÷100 boundary).","operationId":"get_usage_api_admin_dashboard_usage_get","security":[{"HTTPBearer":[]}],"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/admin/dashboard/top-users":{"get":{"tags":["admin-dashboard"],"summary":"Get Top Users","description":"Top users by generate-job count in a day/range — the usage reverse-lookup.\n\nCounts job rows in the same per-app source tables the activation tracker\nreads (tryon / editing / video / 4× nail), so the numbers match what the\nApp Debug drill-down will show for that user. Credits are supplementary\n(personal-wallet net consumption; team-wallet charges aren't attributable\nto a member). Defaults to today (UTC).","operationId":"get_top_users_api_admin_dashboard_top_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Window start (UTC date, inclusive)","title":"Start"},"description":"Window start (UTC date, inclusive)"},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Window end (UTC date, inclusive)","title":"End"},"description":"Window end (UTC date, inclusive)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/dashboard/health":{"get":{"tags":["admin-dashboard"],"summary":"Get Health","description":"System health: per-hour studio activity (24h) + infra probe summary.\n\nActivity comes live from studio_credit_ledger (the old HourlyMetrics rows\nonly counted the retired agent-platform ledger). The `monitor` block\nmirrors /api/admin/health-monitor/summary's overall status.","operationId":"get_health_api_admin_dashboard_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/dashboard/internal-usage":{"get":{"tags":["admin-dashboard"],"summary":"Get Internal Usage","description":"Whitelisted user usage breakdown.","operationId":"get_internal_usage_api_admin_dashboard_internal_usage_get","security":[{"HTTPBearer":[]}],"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/admin/config":{"get":{"tags":["admin-config"],"summary":"List Config","description":"List current config values.","operationId":"list_config_api_admin_config_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/config/{category}/{key}":{"put":{"tags":["admin-config"],"summary":"Update Config","description":"Update a config value (creates new version).","operationId":"update_config_api_admin_config__category___key__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"path","required":true,"schema":{"type":"string","title":"Category"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/config/history":{"get":{"tags":["admin-config"],"summary":"Get Config History","description":"Config change history from audit log.","operationId":"get_config_history_api_admin_config_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"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/admin/config/manager-knowledge":{"get":{"tags":["admin-config"],"summary":"Get Manager Knowledge","description":"Get the current Manager Agent knowledge base from S3.","operationId":"get_manager_knowledge_api_admin_config_manager_knowledge_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["admin-config"],"summary":"Update Manager Knowledge","description":"Update the Manager Agent knowledge base in S3. Takes effect within 5 minutes (Redis cache TTL).","operationId":"update_manager_knowledge_api_admin_config_manager_knowledge_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagerKnowledgeUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/codex-connector":{"get":{"tags":["admin-codex-connector"],"summary":"Get Codex Connector","description":"Return connector status without exposing auth material.","operationId":"get_codex_connector_api_admin_codex_connector_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["admin-codex-connector"],"summary":"Update Codex Connector","description":"Update connector preference and fallback behavior.","operationId":"update_codex_connector_api_admin_codex_connector_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodexConnectorUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/codex-connector/auth-json":{"post":{"tags":["admin-codex-connector"],"summary":"Upload Codex Auth Json","description":"Store a ChatGPT-managed Codex auth.json in Secrets Manager.","operationId":"upload_codex_auth_json_api_admin_codex_connector_auth_json_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodexAuthUpload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/codex-connector/disconnect":{"post":{"tags":["admin-codex-connector"],"summary":"Disconnect Codex Connector","description":"Disable subscription auth preference without deleting the stored secret.","operationId":"disconnect_codex_connector_api_admin_codex_connector_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/codex-connector/maintenance":{"put":{"tags":["admin-codex-connector"],"summary":"Update Codex Maintenance","description":"Update weekly repository maintenance settings.\n\nThe runtime still requires CODEX_MAINTENANCE_ENABLED=true and prod unless\nproduction_only is explicitly disabled for local testing.","operationId":"update_codex_maintenance_api_admin_codex_connector_maintenance_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodexMaintenanceUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/incidents":{"get":{"tags":["admin-incidents"],"summary":"List Incidents","description":"Return recent incident automation states from Redis.","operationId":"list_incidents_api_admin_incidents_get","security":[{"HTTPBearer":[]}],"parameters":[{"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/admin/incidents/{incident_id}":{"get":{"tags":["admin-incidents"],"summary":"Get Incident","description":"Return one incident with full signal, Codex result, and timeline.","operationId":"get_incident_api_admin_incidents__incident_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/codex-tasks":{"get":{"tags":["admin-codex-tasks"],"summary":"List Codex Tasks","description":"Return recent Codex task states, including incidents and maintenance.","operationId":"list_codex_tasks_api_admin_codex_tasks_get","security":[{"HTTPBearer":[]}],"parameters":[{"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/admin/codex-tasks/{task_id}":{"get":{"tags":["admin-codex-tasks"],"summary":"Get Codex Task","description":"Return one Codex task with full signal, result, and timeline.","operationId":"get_codex_task_api_admin_codex_tasks__task_id__get","security":[{"HTTPBearer":[]}],"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/admin/codex-tasks/{task_id}/approve-prod":{"post":{"tags":["admin-codex-tasks"],"summary":"Approve Codex Task Prod From Admin","description":"Admin fallback for prod approval when the operator email is not delivered.","operationId":"approve_codex_task_prod_from_admin_api_admin_codex_tasks__task_id__approve_prod_post","security":[{"HTTPBearer":[]}],"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/admin/codex-tasks/{task_id}/reject-prod":{"post":{"tags":["admin-codex-tasks"],"summary":"Reject Codex Task Prod From Admin","description":"Admin rejection when the gamma fix should iterate again before prod.","operationId":"reject_codex_task_prod_from_admin_api_admin_codex_tasks__task_id__reject_prod_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectProdRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/codex-tasks/{task_id}/force-advance":{"post":{"tags":["admin-codex-tasks"],"summary":"Force Advance Codex Task","description":"Operator recovery for wedged incidents.\n\nFlips a stuck incident (codex_needs_attention, codex_failed,\ngamma_validation_failed_codex_dispatched, gamma_fix_validating,\ncodex_dispatched, codex_retry_dispatched, manual_triage_required)\nto `gamma_fixed_pending_prod_approval` and sends the approval email.\n\nUse when the state machine got stuck but a verified gamma fix landed —\ne.g. a workflow wait-step timed out before CI completed (the\n2026-05-11 50665877dea0e3dd cycle). Requires a reason in the body for\nthe audit trail; pass `gamma_validation_run` / `gamma_validation_url`\nwhen you've verified the Deploy run yourself.\n\nReturns 409 if the incident is already at `gamma_fixed_pending_prod_approval`\n(use approve-prod instead) or past it (prod_promotion_dispatched / stable).","operationId":"force_advance_codex_task_api_admin_codex_tasks__task_id__force_advance_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForceAdvanceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/concierge":{"get":{"tags":["admin-concierge"],"summary":"List Concierge Requests","operationId":"list_concierge_requests_api_admin_concierge_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/concierge/{request_id}":{"patch":{"tags":["admin-concierge"],"summary":"Update Concierge Request","operationId":"update_concierge_request_api_admin_concierge__request_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConciergeAdminUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConciergeRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/homepage/sections":{"get":{"tags":["admin-homepage"],"summary":"List Sections","description":"List all homepage sections with their current content.","operationId":"list_sections_api_admin_homepage_sections_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/homepage/sections/{key}":{"get":{"tags":["admin-homepage"],"summary":"Get Section","description":"Get a single homepage section by key.","operationId":"get_section_api_admin_homepage_sections__key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin-homepage"],"summary":"Update Section","description":"Create or update a homepage section's content.","operationId":"update_section_api_admin_homepage_sections__key__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/homepage/export":{"get":{"tags":["admin-homepage"],"summary":"Export All","description":"Export all homepage sections as a single JSON object (matching landing.json schema).","operationId":"export_all_api_admin_homepage_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/audit":{"get":{"tags":["admin-audit"],"summary":"List Audit Log","description":"List audit log entries with filtering.","operationId":"list_audit_log_api_admin_audit_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"admin_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Email"}},{"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":200,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/team":{"get":{"tags":["admin-team"],"summary":"List Team Members","description":"List all admin users.","operationId":"list_team_members_api_admin_team_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTeamListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin-team"],"summary":"Invite Member","description":"Pre-create an admin user with a given role.","operationId":"invite_member_api_admin_team_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTeamMember"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/team/{user_id}/role":{"patch":{"tags":["admin-team"],"summary":"Update Member Role","description":"Change an admin user's role.","operationId":"update_member_role_api_admin_team__user_id__role_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRoleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/team/{user_id}":{"delete":{"tags":["admin-team"],"summary":"Remove Member","description":"Remove an admin user.","operationId":"remove_member_api_admin_team__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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/admin/agents/ci/{agent_id}/dreaming":{"patch":{"tags":["admin-agents-ci"],"summary":"Toggle Agent Dreaming","description":"Toggle enable_dreaming flag on an agent. X-Admin-Key auth.","operationId":"toggle_agent_dreaming_api_admin_agents_ci__agent_id__dreaming_patch","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/bulk-redeploy":{"post":{"tags":["admin-agents-ci"],"summary":"Bulk Redeploy Agents","description":"Full redeploy of ALL active agents.\n\nAuth: Admin JWT (superadmin) OR ADMIN_API_KEY header.\n\nPerforms the complete deploy pipeline for each active agent:\n1. Re-read existing tokens from S3 (or generate new ones)\n2. Regenerate workspace files (SOUL.md, AGENTS.md, etc.) + openclaw.json\n3. Fetch vault env vars\n4. Register new ECS task definition with fresh env vars\n5. Update ECS service with new task def + force new deployment\n\nThis is the safe way to roll out agent image updates or config changes.\nUnlike raw ECS force-new-deployment, this ensures openclaw.json and\ntask definitions are properly regenerated.","operationId":"bulk_redeploy_agents_api_admin_agents_bulk_redeploy_post","responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/agents/ci/{agent_id}/status":{"patch":{"tags":["admin-agents-ci"],"summary":"Ci Set Agent Status","description":"Force-set agent status (DB only, no deploy). X-Admin-Key auth.","operationId":"ci_set_agent_status_api_admin_agents_ci__agent_id__status_patch","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/fleet-versions":{"get":{"tags":["admin-agents-ci"],"summary":"Fleet Versions","description":"Fleet-wide OpenClaw version summary from Redis.\n\nReturns version distribution across all running agents and per-agent detail.\nAuth: X-Admin-Key.","operationId":"fleet_versions_api_admin_agents_fleet_versions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/agents/oc-version":{"get":{"tags":["admin-agents-ci"],"summary":"Get Oc Target Version","description":"Get current OpenClaw target version pointers for each environment.\n\nAuth: X-Admin-Key.","operationId":"get_oc_target_version_api_admin_agents_oc_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["admin-agents-ci"],"summary":"Set Oc Target Version","description":"Set OpenClaw target version for an environment.\n\nBody: {\n    \"version\": \"2026.4.10\",\n    \"environment\": \"gamma\"|\"prod\",\n    \"stagger_seconds\": 300  // optional, default 300 (5 min)\n}\n\nAgents upgrade via Redis pub/sub broadcast. Each agent applies a random\ndelay within stagger_seconds before restarting, so the fleet doesn't\nrestart all at once.\n\nAuth: X-Admin-Key.","operationId":"set_oc_target_version_api_admin_agents_oc_version_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/agents/oc-version/rollback":{"post":{"tags":["admin-agents-ci"],"summary":"Rollback Oc Target Version","description":"Remove the OpenClaw target version pointer for an environment.\n\nBody: { \"environment\": \"gamma\"|\"prod\" }\n\nAgents will continue running their current version. On next restart,\nthey fall back to the baked-in Docker image version.\n\nAuth: X-Admin-Key.","operationId":"rollback_oc_target_version_api_admin_agents_oc_version_rollback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/agents/ci/{agent_id}/deploy":{"post":{"tags":["admin-agents-ci"],"summary":"Ci Deploy Agent","description":"Full deploy (start) an agent. X-Admin-Key auth.","operationId":"ci_deploy_agent_api_admin_agents_ci__agent_id__deploy_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/ci/{agent_id}/stop":{"post":{"tags":["admin-agents-ci"],"summary":"Ci Stop Agent","description":"Full stop (pause) an agent. X-Admin-Key auth.","operationId":"ci_stop_agent_api_admin_agents_ci__agent_id__stop_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/memories/heal-decay-bug":{"post":{"tags":["admin-memories"],"summary":"Heal Decay Bug","description":"Restore rows soft-deleted by the pre-fix consolidator decay bug.\n\nBefore 2026-04-26, `_decay_stale_rows` halved confidence on any row\nwhere `last_recalled_at IS NULL`, treating freshly-inserted rows\nidentically to 30-day-stale ones. Within a few 6h cycles new\nmemory_dir / memory_md rows decayed below the 0.1 floor and were\nsoft-deleted via `expires_at = now()`.\n\nThis endpoint reverses that for rows that were unfairly decayed:\nrows where `expires_at IS NOT NULL AND last_recalled_at IS NULL`.\nA genuine 30-day-stale row would have `last_recalled_at` set (or\n`created_at` predating the threshold and last_recalled_at NULL,\nwhich we guard with a created_at floor).\n\nRestores `expires_at = NULL` and resets confidence to the source's\ninitial value (0.9 for memory_md, 0.5 for memory_dir, else 0.4).\nIdempotent — re-running on already-restored rows is a no-op.","operationId":"heal_decay_bug_api_admin_memories_heal_decay_bug_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Heal Decay Bug Api Admin Memories Heal Decay Bug Post"}}}}}}},"/api/admin/agents/availability":{"get":{"tags":["admin-agents-availability"],"summary":"Get Availability","description":"Agent availability events with agent details, grouped by agent.","operationId":"get_availability_api_admin_agents_availability_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"default":24,"title":"Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/availability/events":{"get":{"tags":["admin-agents-availability"],"summary":"Get Availability Events","description":"Recent availability events (most recent first).","operationId":"get_availability_events_api_admin_agents_availability_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"default":24,"title":"Hours"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/availability/summary":{"get":{"tags":["admin-agents-availability"],"summary":"Get Availability Summary","description":"Aggregated summary: counts by event_type, top offenders.","operationId":"get_availability_summary_api_admin_agents_availability_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"default":24,"title":"Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents":{"get":{"tags":["admin-agents"],"summary":"List All Agents","description":"List all agents with key operational info.","operationId":"list_all_agents_api_admin_agents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/cleanup-created":{"post":{"tags":["admin-agents"],"summary":"Cleanup Created Agents","description":"Delete all agents with status='created' (incomplete wizard records).","operationId":"cleanup_created_agents_api_admin_agents_cleanup_created_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/agents/{agent_id}":{"get":{"tags":["admin-agents"],"summary":"Get Agent Detail","description":"Full agent detail for admin panel: basic info, workspace files, skills.","operationId":"get_agent_detail_api_admin_agents__agent_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{agent_id}/heartbeat-history":{"get":{"tags":["admin-agents"],"summary":"Get Heartbeat History","description":"Heartbeat execution history for an agent (admin).","operationId":"get_heartbeat_history_api_admin_agents__agent_id__heartbeat_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"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/admin/agents/{agent_id}/cleanup-duplicate-media":{"post":{"tags":["admin-agents"],"summary":"Cleanup Duplicate Media","description":"Delete duplicate media delivery messages and set Redis dedup flags.","operationId":"cleanup_duplicate_media_api_admin_agents__agent_id__cleanup_duplicate_media_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{agent_id}/deploy":{"post":{"tags":["admin-agents"],"summary":"Admin Deploy Agent","description":"Deploy (start) an agent. Admin JWT auth.","operationId":"admin_deploy_agent_api_admin_agents__agent_id__deploy_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{agent_id}/stop":{"post":{"tags":["admin-agents"],"summary":"Admin Stop Agent","description":"Stop (pause) an agent. Admin JWT auth.","operationId":"admin_stop_agent_api_admin_agents__agent_id__stop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{agent_id}/runtime":{"patch":{"tags":["admin-agents"],"summary":"Admin Update Agent Runtime","description":"Update an agent runtime and restart active agents onto the matching pool.","operationId":"admin_update_agent_runtime_api_admin_agents__agent_id__runtime_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{agent_id}/promote":{"post":{"tags":["admin-agents"],"summary":"Admin Promote Agent","description":"Mark an agent as promoted to gamma or prod in admin metadata.","operationId":"admin_promote_agent_api_admin_agents__agent_id__promote_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/agents/{agent_id}/memories":{"get":{"tags":["admin-agents"],"summary":"Admin List Agent Memories","description":"Read-only memory browser for any agent — admin JWT auth.\n\nBypasses the user-scoping that the user-facing route applies. Returns\nEVERY memory for the agent regardless of which user owns it (admin\ncan inspect a teammate's user-scoped facts to debug \"agent doesn't\nremember X\" tickets).","operationId":"admin_list_agent_memories_api_admin_agents__agent_id__memories_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"pinned","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"}},{"name":"include_expired","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Expired"}},{"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/MemoryList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/user-teams":{"get":{"tags":["admin-user-teams"],"summary":"List User Teams","description":"List all user-facing teams with summary stats and members.","operationId":"list_user_teams_api_admin_user_teams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/skills/statistics":{"get":{"tags":["admin-skills-statistics"],"summary":"Get Skill Statistics","description":"Per-skill invocation totals for unused-skill audits.\n\nReturns all skills (or only non-zero skills) ranked by total calls in the window.\nFor each skill: total_calls, daily_avg, active_agents (distinct callers), last_invoked_at.\nSkills with zero calls sort to the end and are the candidates for retirement.","operationId":"get_skill_statistics_api_admin_skills_statistics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Lookback window in days","default":30,"title":"Days"},"description":"Lookback window in days"},{"name":"include_unused","in":"query","required":false,"schema":{"type":"boolean","description":"Include skills with zero calls in window","default":true,"title":"Include Unused"},"description":"Include skills with zero calls in window"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/statistics/timeseries":{"get":{"tags":["admin-skills-statistics"],"summary":"Get Skill Timeseries","description":"Daily call count for a single skill, filling zero-days in the window.","operationId":"get_skill_timeseries_api_admin_skills_statistics_timeseries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"query","required":true,"schema":{"type":"string","description":"Skill slug","title":"Slug"},"description":"Skill slug"},{"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/admin/skills/statistics/by-agent":{"get":{"tags":["admin-skills-statistics"],"summary":"Get Skill By Agent","description":"Per-agent call counts for one skill, to see who actually relies on it.","operationId":"get_skill_by_agent_api_admin_skills_statistics_by_agent_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"query","required":true,"schema":{"type":"string","description":"Skill slug","title":"Slug"},"description":"Skill slug"},{"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/admin/skills/ci/register":{"post":{"tags":["admin-skills-ci"],"summary":"Ci Register Skill","description":"Register a new skill definition — CI/CD auth via X-Admin-Key.\n\nIdempotent: returns existing skill if slug already exists.","operationId":"ci_register_skill_api_admin_skills_ci_register_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/ci/by-slug/{slug}":{"get":{"tags":["admin-skills-ci"],"summary":"Ci Get Skill By Slug","description":"Look up skill by slug — CI/CD auth via X-Admin-Key.","operationId":"ci_get_skill_by_slug_api_admin_skills_ci_by_slug__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/ci/{skill_id}":{"patch":{"tags":["admin-skills-ci"],"summary":"Ci Update Skill Version","description":"Update skill version — CI/CD auth via X-Admin-Key.\n\nAlso bulk-updates AgentSkill.installed_version for all agents that have\nthis skill, since CI/CD already pushed the new SKILL.md to S3.","operationId":"ci_update_skill_version_api_admin_skills_ci__skill_id__patch","parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/ci/extract-dags":{"post":{"tags":["admin-skills-ci"],"summary":"Ci Extract All Dags","description":"Backfill atom DAGs for all existing skills. CI/CD auth.","operationId":"ci_extract_all_dags_api_admin_skills_ci_extract_dags_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/ci/by-slug/{slug}/bulk-uninstall":{"delete":{"tags":["admin-skills-ci"],"summary":"Ci Bulk Uninstall Skill","description":"Uninstall a skill from ALL agents — CI/CD auth via X-Admin-Key.\n\nReturns list of agents uninstalled from. Also removes S3 files.","operationId":"ci_bulk_uninstall_skill_api_admin_skills_ci_by_slug__slug__bulk_uninstall_delete","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/ci/quality-score":{"post":{"tags":["admin-skills-ci"],"summary":"Ci Post Quality Score","description":"Ingest a per-skill quality scorecard from the rate-skills CI job.\n\nAccepts the rater's per-skill JSON shape directly (the file\n`.rater-out/<slug>.json` produced by `scripts/rate_skill.py`):\n\n    {\n      \"slug\": \"bittable-planner\",\n      \"scores\": {\"description\": 9, \"body\": 8, ...},\n      \"na\": [\"safety\"],\n      \"composite\": 8.6,\n      \"band\": \"excellent\",\n      \"strengths\": \"...\",\n      \"weaknesses\": \"...\",\n      \"top_fixes\": [\"...\", \"...\"],\n      \"blocking_issues\": [],\n      // optional:\n      \"evaluated_at\": \"2026-05-07T20:17:30Z\",\n      \"source\": \"ci-rater\",\n      \"metadata\": {...}\n    }\n\nBehavior:\n  - 404 if the skill's `slug` doesn't match a SkillDefinition row.\n  - Appends a row to skill_quality_evaluations (idempotent on\n    UNIQUE(skill_definition_id, evaluated_at) — re-runs of the same\n    workflow run upsert).\n  - Updates SkillDefinition.quality_{score,band,rated_at,findings} to\n    match the latest evaluation for fast list-page rendering.\n\nAuth: X-Admin-Key (same secret used by other CI endpoints).","operationId":"ci_post_quality_score_api_admin_skills_ci_quality_score_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/ci/quality-trigger":{"post":{"tags":["admin-skills-ci"],"summary":"Ci Trigger Quality Remediation","description":"One-shot trigger for the skill quality optimizer.\n\nBypasses the daily 18:00 UTC tick. With no body, picks the worst LISTED\nskill below the threshold (same logic as the worker). With\n`{\"slug\": \"<slug>\"}` it remediates that specific skill regardless of\nscore (useful for E2E testing).\n\nAuth: X-Admin-Key. Side effects:\n  - Reads current threshold from Redis config (does NOT require enabled=true)\n  - Calls trigger_incident with source=skill_quality_remediation\n  - Returns the resulting incident dict, including incident_id + status","operationId":"ci_trigger_quality_remediation_api_admin_skills_ci_quality_trigger_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"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/admin/skills/{skill_id}/files":{"get":{"tags":["admin-skills-files"],"summary":"List Skill Files Endpoint","description":"List file tree for a skill's S3 directory.","operationId":"list_skill_files_endpoint_api_admin_skills__skill_id__files_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/{skill_id}/files/{file_path}":{"get":{"tags":["admin-skills-files"],"summary":"Read Skill File Endpoint","description":"Read a single file from a skill's S3 directory.","operationId":"read_skill_file_endpoint_api_admin_skills__skill_id__files__file_path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}},{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin-skills-files"],"summary":"Write Skill File Endpoint","description":"Write (create or update) a file in a skill's S3 directory.","operationId":"write_skill_file_endpoint_api_admin_skills__skill_id__files__file_path__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}},{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteSkillFileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-skills-files"],"summary":"Delete Skill File Endpoint","description":"Delete a file from a skill's S3 directory.","operationId":"delete_skill_file_endpoint_api_admin_skills__skill_id__files__file_path__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}},{"name":"file_path","in":"path","required":true,"schema":{"type":"string","title":"File Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/{skill_id}/install-agent/{agent_id}":{"post":{"tags":["admin-skills-agents"],"summary":"Install Skill To Agent","description":"Install a skill to a specific agent.","operationId":"install_skill_to_agent_api_admin_skills__skill_id__install_agent__agent_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/{skill_id}/uninstall-agent/{agent_id}":{"delete":{"tags":["admin-skills-agents"],"summary":"Uninstall Skill From Agent","description":"Uninstall a skill from a specific agent.","operationId":"uninstall_skill_from_agent_api_admin_skills__skill_id__uninstall_agent__agent_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}},{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/quality-config":{"get":{"tags":["admin-skills-management"],"summary":"Get Skill Quality Config","description":"Read the skill-quality optimization config (threshold + enabled flag).\n\nStored in Redis at `pyraflow:settings:skill_quality`. The daily\n`skill_quality_optimizer` worker reads this same key.","operationId":"get_skill_quality_config_api_admin_skills_quality_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["admin-skills-management"],"summary":"Put Skill Quality Config","description":"Update the skill-quality optimization config.\n\nBody shape: `{\"threshold\": <float 0-10>, \"enabled\": <bool>}`. Either field\nis optional and falls back to the existing value.","operationId":"put_skill_quality_config_api_admin_skills_quality_config_put","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"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/skills":{"post":{"tags":["admin-skills-management"],"summary":"Create Skill","description":"Create a new skill definition.","operationId":"create_skill_api_admin_skills_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin-skills-catalog"],"summary":"List Skills","description":"List all skill definitions with install counts.","operationId":"list_skills_api_admin_skills_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source (e.g. 'workspace', 'clawhub', 'custom')","title":"Source"},"description":"Filter by source (e.g. 'workspace', 'clawhub', 'custom')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/sync-issues":{"get":{"tags":["admin-skills-management"],"summary":"List Sync Issues","description":"List non-dismissed skill sync issues (S3/DB discrepancies).","operationId":"list_sync_issues_api_admin_skills_sync_issues_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/skills/sync-issues/{slug}/register":{"post":{"tags":["admin-skills-management"],"summary":"Register Sync Issue Skill","description":"Register a skill from a sync issue (orphaned S3 skill → DB record).","operationId":"register_sync_issue_skill_api_admin_skills_sync_issues__slug__register_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/sync-issues/{slug}/dismiss":{"delete":{"tags":["admin-skills-management"],"summary":"Dismiss Sync Issue","description":"Dismiss a sync issue without registering the skill.","operationId":"dismiss_sync_issue_api_admin_skills_sync_issues__slug__dismiss_delete","security":[{"HTTPBearer":[]}],"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/admin/skills/backfill-embeddings":{"post":{"tags":["admin-skills-management"],"summary":"Backfill Skill Embeddings","description":"Compute embeddings for all skills that don't have one yet. Idempotent. X-Admin-Key auth.","operationId":"backfill_skill_embeddings_api_admin_skills_backfill_embeddings_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/{skill_id}/fork-tree":{"get":{"tags":["admin-skills-management"],"summary":"Get Fork Tree","description":"Build the full fork tree for a skill (walks up to root, then down).","operationId":"get_fork_tree_api_admin_skills__skill_id__fork_tree_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/{skill_id}":{"patch":{"tags":["admin-skills-management"],"summary":"Update Skill","description":"Update a skill definition. Auto-manages Stripe Product+Price when pricing changes.","operationId":"update_skill_api_admin_skills__skill_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin-skills-catalog"],"summary":"Get Skill Detail","description":"Full skill detail: definition + SKILL.md content + install list.","operationId":"get_skill_detail_api_admin_skills__skill_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/{skill_id}/push-to-all":{"post":{"tags":["admin-skills-management"],"summary":"Push Skill To All Agents","description":"Install a skill to ALL active agents that don't already have it.","operationId":"push_skill_to_all_agents_api_admin_skills__skill_id__push_to_all_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/{skill_id}/upgrade":{"post":{"tags":["admin-skills-management"],"summary":"Upgrade Skill","description":"Upgrade a skill to a new version across all agents that have it.\n\nFor ClawHub skills: fetches latest SKILL.md from ClawHub.\nBody: {version?: str}  — optional target version, defaults to latest.","operationId":"upgrade_skill_api_admin_skills__skill_id__upgrade_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/{skill_id}/uninstall-all":{"delete":{"tags":["admin-skills-management"],"summary":"Uninstall From All Agents","description":"Uninstall a skill from ALL agents (removes S3 files + DB records).\n\nWorks for both built-in and non-built-in skills.\nIf the skill is built-in, also clears the is_builtin flag.","operationId":"uninstall_from_all_agents_api_admin_skills__skill_id__uninstall_all_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/by-slug/{slug}":{"get":{"tags":["admin-skills-catalog"],"summary":"Get Skill By Slug","description":"Look up skill definition by slug (used by CI/CD pipelines).","operationId":"get_skill_by_slug_api_admin_skills_by_slug__slug__get","security":[{"HTTPBearer":[]}],"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/admin/skills/by-slug/{slug}/installs":{"get":{"tags":["admin-skills-catalog"],"summary":"Get Skill Installs By Slug","description":"All agent installs for a skill by slug — includes character_id for S3 paths.","operationId":"get_skill_installs_by_slug_api_admin_skills_by_slug__slug__installs_get","security":[{"HTTPBearer":[]}],"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/admin/skills/{skill_id}/installs":{"get":{"tags":["admin-skills-catalog"],"summary":"Get Skill Installs","description":"All agent installs for a skill (includes implicit built-in installs).","operationId":"get_skill_installs_api_admin_skills__skill_id__installs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/skills/{skill_id}/quality-history":{"get":{"tags":["admin-skills-catalog"],"summary":"Get Skill Quality History","description":"Return up to `limit` most-recent quality evaluations for a skill.\n\nUsed by the admin Skills page drawer to render the rating history sparkline.","operationId":"get_skill_quality_history_api_admin_skills__skill_id__quality_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skill_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Skill Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"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/admin/metering":{"get":{"tags":["admin-metering"],"summary":"Get Metering Config","description":"Get current metering configuration.\n\nReturns _DEFAULTS deep-merged with whatever's stashed in Redis: stored\nvalues win, but newly-added default keys (e.g. when a provider lands)\nauto-appear without forcing the operator to hit Reset and lose their\ncustom rates.","operationId":"get_metering_config_api_admin_metering_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["admin-metering"],"summary":"Update Metering Config","description":"Update metering configuration. Merges with current config.\n\nAccepts partial updates:\n- {\"markup\": {\"anthropic_haiku\": 0.60}} — update one markup\n- {\"pricing\": {\"fal\": {\"image_generation\": 100000}}} — update one price\n- {\"rate_limits\": {\"free\": 30}} — update one rate limit","operationId":"update_metering_config_api_admin_metering_patch","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"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/metering/reset":{"post":{"tags":["admin-metering"],"summary":"Reset Metering Config","description":"Reset metering configuration to defaults.","operationId":"reset_metering_config_api_admin_metering_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/metrics/cache-hit-rate":{"get":{"tags":["admin-metrics"],"summary":"Cache Hit Rate","description":"Per-provider prompt cache hit rate snapshot.","operationId":"cache_hit_rate_api_admin_metrics_cache_hit_rate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Cache Hit Rate Api Admin Metrics Cache Hit Rate Get"}}}}}}},"/api/admin/metrics/cache-hit-rate/timeseries":{"get":{"tags":["admin-metrics"],"summary":"Cache Hit Rate Timeseries","description":"Time-bucketed prompt cache hit rate for charting.","operationId":"cache_hit_rate_timeseries_api_admin_metrics_cache_hit_rate_timeseries_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Cache Hit Rate Timeseries Api Admin Metrics Cache Hit Rate Timeseries Get"}}}}}}},"/api/admin/storage/overview":{"get":{"tags":["admin-storage"],"summary":"Storage Overview","description":"Get global storage usage overview.","operationId":"storage_overview_api_admin_storage_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StorageOverviewResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/storage/users":{"get":{"tags":["admin-storage"],"summary":"List User Storage","description":"List per-user storage breakdown.","operationId":"list_user_storage_api_admin_storage_users_get","security":[{"HTTPBearer":[]}],"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":50,"title":"Per Page"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","pattern":"^(used_bytes|file_count|email)$","default":"used_bytes","title":"Sort By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStorageListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/storage/users/{user_id}":{"get":{"tags":["admin-storage"],"summary":"Get User Storage Detail","description":"Get detailed storage info for a specific user (team-aware).","operationId":"get_user_storage_detail_api_admin_storage_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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/admin/storage/users/{user_id}/quota":{"patch":{"tags":["admin-storage"],"summary":"Override User Quota","description":"Override storage quota for a user. Stored as metadata on the user profile.","operationId":"override_user_quota_api_admin_storage_users__user_id__quota_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotaOverrideRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/storage/files/{file_id}":{"delete":{"tags":["admin-storage"],"summary":"Admin Delete File","description":"Admin force-delete a storage file.","operationId":"admin_delete_file_api_admin_storage_files__file_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/storage/backfill":{"post":{"tags":["admin-storage"],"summary":"Backfill Existing Media","description":"Backfill existing media into the storage system.\n\nScans two sources:\n1. content_queue_items with s3_media_key (DB)\n2. S3 objects under media/{character_id}/ for each agent\n\nCreates per-agent folders and storage_files rows. Idempotent — skips\nfiles already tracked (unique on s3_key).","operationId":"backfill_existing_media_api_admin_storage_backfill_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/storage/merge-duplicate-folders":{"post":{"tags":["admin-storage"],"summary":"Merge Duplicate Folders","description":"Find and merge duplicate folders (same parent + same name) caused by\nteam members creating separate folders.\n\nKeeps the folder with the most files, moves files and subfolders from\nduplicates into it, then deletes the empty duplicates.","operationId":"merge_duplicate_folders_api_admin_storage_merge_duplicate_folders_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","description":"If true, only report duplicates without merging","default":true,"title":"Dry Run"},"description":"If true, only report duplicates without merging"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/blog/posts":{"get":{"tags":["admin-blog"],"summary":"List Posts","description":"List all blog posts from GitHub.","operationId":"list_posts_api_admin_blog_posts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin-blog"],"summary":"Create Post","description":"Create a new blog post.","operationId":"create_post_api_admin_blog_posts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/blog/posts/{slug}":{"get":{"tags":["admin-blog"],"summary":"Get Post","description":"Get a single blog post by slug.","operationId":"get_post_api_admin_blog_posts__slug__get","security":[{"HTTPBearer":[]}],"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"}}}}}},"put":{"tags":["admin-blog"],"summary":"Update Post","description":"Update an existing blog post.","operationId":"update_post_api_admin_blog_posts__slug__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-blog"],"summary":"Delete Post","description":"Delete a blog post.","operationId":"delete_post_api_admin_blog_posts__slug__delete","security":[{"HTTPBearer":[]}],"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/admin/blog/ai/research-topics":{"post":{"tags":["admin-blog"],"summary":"Ai Research Topics","description":"Use Gemini + Google Search to suggest blog topics based on SERP research.","operationId":"ai_research_topics_api_admin_blog_ai_research_topics_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicResearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/blog/ai/generate-post":{"post":{"tags":["admin-blog"],"summary":"Ai Generate Post","description":"Generate a full GEO-optimized blog post from a topic using Gemini.","operationId":"ai_generate_post_api_admin_blog_ai_generate_post_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePostRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/blog/ai/from-conversation":{"post":{"tags":["admin-blog"],"summary":"Ai From Conversation","description":"Generate a GEO-optimized blog post from a real agent conversation.","operationId":"ai_from_conversation_api_admin_blog_ai_from_conversation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FromConversationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/blog/ai/generate-illustrations":{"post":{"tags":["admin-blog"],"summary":"Ai Generate Illustrations","description":"Generate blog illustrations via Fal.ai Nano Banana 2.","operationId":"ai_generate_illustrations_api_admin_blog_ai_generate_illustrations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateIllustrationsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/blog/authors":{"get":{"tags":["admin-blog"],"summary":"List Authors","description":"List all blog authors.","operationId":"list_authors_api_admin_blog_authors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/data/sources":{"get":{"tags":["admin-datahub"],"summary":"List Sources","description":"List all data sources.","operationId":"list_sources_api_admin_data_sources_get","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/src__schemas__datahub__DataSourceResponse"},"title":"Response List Sources Api Admin Data Sources Get"}}}}}},"post":{"tags":["admin-datahub"],"summary":"Create Source","description":"Create a new data source.","operationId":"create_source_api_admin_data_sources_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"query","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"source_type","in":"query","required":true,"schema":{"type":"string","title":"Source Type"}},{"name":"name","in":"query","required":true,"schema":{"type":"string","title":"Name"}},{"name":"description","in":"query","required":false,"schema":{"type":"string","default":"","title":"Description"}},{"name":"credit_cost","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Credit Cost"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__datahub__DataSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/data/sources/{source_id}":{"patch":{"tags":["admin-datahub"],"summary":"Update Source","description":"Update a data source. Returns 404 if not found.","operationId":"update_source_api_admin_data_sources__source_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"credit_cost","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Cost"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__schemas__datahub__DataSourceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/data/jobs":{"get":{"tags":["admin-datahub"],"summary":"List Jobs","description":"List all data jobs across users with optional filters.","operationId":"list_jobs_api_admin_data_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User 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/DataJobResponse"},"title":"Response List Jobs Api Admin Data Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/data/triggers":{"get":{"tags":["admin-datahub"],"summary":"List Triggers","description":"List all data triggers with optional job_id filter.","operationId":"list_triggers_api_admin_data_triggers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataTriggerResponse"},"title":"Response List Triggers Api Admin Data Triggers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/data/stats":{"get":{"tags":["admin-datahub"],"summary":"Get Stats","description":"Get platform-wide stats.","operationId":"get_stats_api_admin_data_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/roles":{"get":{"tags":["roles"],"summary":"List Roles","operationId":"list_roles_api_roles_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"archetype","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by archetype: strategist, executor, controller","title":"Archetype"},"description":"Filter by archetype: strategist, executor, controller"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/onboarding-status":{"get":{"tags":["onboarding"],"summary":"Onboarding Status","operationId":"onboarding_status_api_users_onboarding_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/users/onboarding":{"post":{"tags":["onboarding"],"summary":"Complete Onboarding","operationId":"complete_onboarding_api_users_onboarding_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/roles":{"get":{"tags":["admin-roles"],"summary":"List Roles","description":"List all roles with agent counts.","operationId":"list_roles_api_admin_roles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["admin-roles"],"summary":"Create Role","description":"Create a new role.","operationId":"create_role_api_admin_roles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRoleRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/roles/{role_id}":{"get":{"tags":["admin-roles"],"summary":"Get Role","description":"Get a single role with agent count.","operationId":"get_role_api_admin_roles__role_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin-roles"],"summary":"Update Role","description":"Update role metadata.","operationId":"update_role_api_admin_roles__role_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/roles/{role_id}/skills":{"get":{"tags":["admin-roles"],"summary":"Get Role Skills","description":"List skill bundle for a role.","operationId":"get_role_skills_api_admin_roles__role_id__skills_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin-roles"],"summary":"Replace Role Skills","description":"Replace the skill bundle for a role.","operationId":"replace_role_skills_api_admin_roles__role_id__skills_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSkillBundleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/roles/{role_id}/templates/{filename}":{"get":{"tags":["admin-roles"],"summary":"Get Role Template","description":"Read a Jinja2 template from S3 for a role.","operationId":"get_role_template_api_admin_roles__role_id__templates__filename__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role 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"}}}}}},"put":{"tags":["admin-roles"],"summary":"Write Role Template","description":"Write a Jinja2 template to S3 for a role.","operationId":"write_role_template_api_admin_roles__role_id__templates__filename__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteTemplateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/roles/{role_id}/templates/{filename}/reset":{"post":{"tags":["admin-roles"],"summary":"Reset Role Template Cache","description":"Invalidate the Redis cache for a role template.","operationId":"reset_role_template_cache_api_admin_roles__role_id__templates__filename__reset_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role 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/admin/roles/ci/seed-bundles":{"post":{"tags":["admin-roles"],"summary":"Ci Seed Bundles","description":"Seed role_skill_bundles from slug mappings. CI/CD auth via X-Admin-Key.\n\nBody: {\"bundles\": {\"engineer\": [[\"task-executor\", true], ...], ...}}","operationId":"ci_seed_bundles_api_admin_roles_ci_seed_bundles_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/health-monitor/summary":{"get":{"tags":["admin-health-monitor"],"summary":"Get Health Summary","description":"Full health summary with all components grouped by category.","operationId":"get_health_summary_api_admin_health_monitor_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthSummaryResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/health-monitor/history/{component}":{"get":{"tags":["admin-health-monitor"],"summary":"Get Component History","description":"Time-series history for a specific component.","operationId":"get_component_history_api_admin_health_monitor_history__component__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"component","in":"path","required":true,"schema":{"type":"string","title":"Component"}},{"name":"minutes","in":"query","required":false,"schema":{"type":"integer","maximum":1440,"minimum":1,"default":60,"title":"Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/health-monitor/report":{"get":{"tags":["admin-health-monitor"],"summary":"Get Health Report","description":"Agent-friendly health report — structured for automated consumption.\n\nReturns only anomalies. Healthy components are counted but not listed.\nThis is what the ops agent calls during heartbeat. Zero tokens wasted\non healthy-state data.","operationId":"get_health_report_api_admin_health_monitor_report_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthReportResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/health-monitor/history-all":{"get":{"tags":["admin-health-monitor"],"summary":"Get All Component History","description":"Time-series history for all components (for overlay charts).","operationId":"get_all_component_history_api_admin_health_monitor_history_all_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"minutes","in":"query","required":false,"schema":{"type":"integer","maximum":1440,"minimum":1,"default":60,"title":"Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/health-monitor/check-now":{"post":{"tags":["admin-health-monitor"],"summary":"Trigger Health Check","description":"Trigger an immediate health check (operator+ only).","operationId":"trigger_health_check_api_admin_health_monitor_check_now_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/pool/status":{"get":{"tags":["admin-pool"],"summary":"Pool Status","description":"Return pool utilization metrics.","operationId":"pool_status_api_admin_pool_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/pool/workers":{"get":{"tags":["admin-pool"],"summary":"List Workers","description":"List all workers and their assignments.","operationId":"list_workers_api_admin_pool_workers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/pool/agents":{"get":{"tags":["admin-pool"],"summary":"List Pool Agents","description":"List all agents with their current status.","operationId":"list_pool_agents_api_admin_pool_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/debug/presign":{"get":{"tags":["admin-debug"],"summary":"Admin Presign Asset","description":"Return a presigned S3 URL for an asset key (admin auth).\n\nIf `download=true`, the URL will include ResponseContentDisposition=attachment\nso the browser triggers a download instead of rendering inline.","operationId":"admin_presign_asset_api_admin_debug_presign_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"S3 object key","title":"Key"},"description":"S3 object key"},{"name":"download","in":"query","required":false,"schema":{"type":"boolean","description":"Force Content-Disposition: attachment","default":false,"title":"Download"},"description":"Force Content-Disposition: attachment"},{"name":"filename","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional filename for download","title":"Filename"},"description":"Optional filename for download"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/debug/session/{conversation_id}":{"get":{"tags":["admin-debug"],"summary":"Debug Session","description":"Aggregate all data related to a conversation for debugging.","operationId":"debug_session_api_admin_debug_session__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"msg_range","in":"query","required":false,"schema":{"enum":["latest","earliest"],"type":"string","description":"Which side of the conversation message timeline to return","default":"latest","title":"Msg Range"},"description":"Which side of the conversation message timeline to return"},{"name":"msg_limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":50,"title":"Msg Limit"}},{"name":"msg_all","in":"query","required":false,"schema":{"type":"boolean","description":"Return all conversation messages","default":false,"title":"Msg All"},"description":"Return all conversation messages"},{"name":"msg_offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Msg Offset"}},{"name":"hb_limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Hb Limit"}},{"name":"hb_offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Hb Offset"}},{"name":"media_limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Media Limit"}},{"name":"media_offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Media Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/debug/lookup":{"get":{"tags":["admin-debug"],"summary":"Admin Debug Lookup","description":"Search agents and sessions by team name, user email, or agent identity.\n\nReturns two parallel lists (agents and sessions) plus totals, for the\nSession Debug admin UI to render as tabs. At least one of `team_name`,\n`user_email`, `agent_id`, or `agent_name` must be provided. Multiple\nfilters AND together.","operationId":"admin_debug_lookup_api_admin_debug_lookup_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"team_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partial team name match (ilike)","title":"Team Name"},"description":"Partial team name match (ilike)"},{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partial user email match (ilike)","title":"User Email"},"description":"Partial user email match (ilike)"},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Exact match on agents.id","title":"Agent Id"},"description":"Exact match on agents.id"},{"name":"agent_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partial agent name match (ilike)","title":"Agent Name"},"description":"Partial agent name match (ilike)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/bitables/{bitable_id}":{"get":{"tags":["admin-debug"],"summary":"Admin Debug Get Bitable","description":"Admin read-only view of a bitable — no team / ownership check.\n\nReturns the same shape as `GET /api/bitables/{bitable_id}`.","operationId":"admin_debug_get_bitable_api_admin_bitables__bitable_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bitable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bitable Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/bitables/{bitable_id}/rows":{"get":{"tags":["admin-debug"],"summary":"Admin Debug List Bitable Rows","description":"Admin read-only view of bitable rows — no team / ownership check.\n\nReturns the same shape as `GET /api/bitables/{bitable_id}/rows`.","operationId":"admin_debug_list_bitable_rows_api_admin_bitables__bitable_id__rows_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"bitable_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Bitable Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"order_key from previous page","title":"Cursor"},"description":"order_key from previous page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/lookup":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Lookup","description":"Find tryon projects by owner email (ilike) or exact project id.\n\nAt least one of `user_email` / `project_id` is required. Returns\nprojects newest-first with live row/job counts and owner email.\nOptional `surface` filters on `settings.surface` (e.g. \"quick\").","operationId":"tryon_lookup_api_admin_app_debug_tryon_lookup_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partial owner email (ilike)","title":"User Email"},"description":"Partial owner email (ilike)"},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Exact project id","title":"Project Id"},"description":"Exact project id"},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"surface","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by settings.surface (e.g. 'quick'). Omit for all.","title":"Surface"},"description":"Filter by settings.surface (e.g. 'quick'). Omit for all."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/projects/{project_id}/workspace":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Workspace","description":"Full read-only workspace snapshot (project, columns, recipes, rows,\ncell_states, resources, jobs, logs) — same shape as the customer\n`GET /api/tryon/projects/{id}/workspace`.","operationId":"tryon_workspace_api_admin_app_debug_tryon_projects__project_id__workspace_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/projects/{project_id}/resources":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Resources","description":"Project asset library — uploads, classify outputs, generated outputs,\nmodel/pose libraries. Defaults to including archived for debugging.","operationId":"tryon_resources_api_admin_app_debug_tryon_projects__project_id__resources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Archived"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/rows/{row_id}/versions":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Cell Versions","description":"Immutable per-cell version history for a row (the version-switch\ndata). Optionally filtered to one cell_key.","operationId":"tryon_cell_versions_api_admin_app_debug_tryon_rows__row_id__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"cell_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cell Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/projects/{project_id}/jobs":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Jobs","description":"Generation jobs for the project, incl. input_payload/output_payload.\nFilter `atom_type=classify_and_group_images` to inspect upload&classify\nruns (parse_report lives in output_payload).","operationId":"tryon_jobs_api_admin_app_debug_tryon_projects__project_id__jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"atom_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Atom Type"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"row_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Row Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/jobs/{job_id}":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Job Detail","description":"Single job with full input/output payloads (for deep dives when the\nlist view truncates large JSON).","operationId":"tryon_job_detail_api_admin_app_debug_tryon_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/projects/{project_id}/table-versions":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Table Versions","description":"Project-level table version snapshots (operation history).","operationId":"tryon_table_versions_api_admin_app_debug_tryon_projects__project_id__table_versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/projects/{project_id}/logs":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Logs","description":"Read-only execution/audit log for the project.","operationId":"tryon_logs_api_admin_app_debug_tryon_projects__project_id__logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"row_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Row Id"}},{"name":"job_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"}},{"name":"event_kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/projects/{project_id}/editing-projects":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Editing Projects","description":"Image-editing projects anchored on this tryon project's cells\n(`source_kind='from_cell'`, `source_project_id == project_id`).","operationId":"tryon_editing_projects_api_admin_app_debug_tryon_projects__project_id__editing_projects_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/editing-projects/{editing_project_id}/requests":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Editing Requests","description":"Edit requests for an editing project — tool_name, status, input\nimage, outputs, and linked job.","operationId":"tryon_editing_requests_api_admin_app_debug_tryon_editing_projects__editing_project_id__requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"editing_project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Editing Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/editing-lookup":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Editing Lookup","description":"Find image-editing projects by owner email / id, or by exact\nediting-project id — INCLUDING standalone uploads\n(`source_kind='upload'`) that no per-project view can reach. Reuses\nthe customer `_build_project_response` (presigns the source image +\njoins parent-table context), adding the owner email. Newest-first.","operationId":"tryon_editing_lookup_api_admin_app_debug_tryon_editing_lookup_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partial owner email (ilike)","title":"User Email"},"description":"Partial owner email (ilike)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Exact owner user id","title":"User Id"},"description":"Exact owner user id"},{"name":"editing_project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Exact editing project id","title":"Editing Project Id"},"description":"Exact editing project id"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditingLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/tryon/single-history":{"get":{"tags":["admin-app-debug"],"summary":"Tryon Single History","description":"Flattened single-image (\"Quick\") generation history for a user.\n\nResolves the user's hidden `settings.surface='quick'` project(s) and\nreturns one item per generation row, newest-first, with input +\noutput s3_keys. Versioned output cells (`row.data[cell]` holds a\n`{current_version_id}` pointer, not `{s3_keys}`) are resolved to\ntheir current version's keys — the same trap the single-image\nfrontend hit. Mirrors the customer `listQuickHistory`.","operationId":"tryon_single_history_api_admin_app_debug_tryon_single_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partial owner email (ilike)","title":"User Email"},"description":"Partial owner email (ilike)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Exact owner user id","title":"User Id"},"description":"Exact owner user id"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SingleHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/nail/lookup":{"get":{"tags":["admin-app-debug"],"summary":"Nail Lookup","description":"Resolve users for nail debug. Nail jobs are keyed by tintin user_id;\nthis service holds the users table, so we map email→user(s) here and\nthe detail view forwards user_id to the nail backend.\n\n`job_id` is the reverse path: nail jobs live in the nail-art service, so\nwe forward `/jobs/{job_id}` to read the job's `user_id`, then map that\nback to the local users table — letting an operator paste a bare job id\nand land on the owning user's history. Upstream 404 (unknown job)\npropagates verbatim.","operationId":"nail_lookup_api_admin_app_debug_nail_lookup_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Partial email (ilike)","title":"User Email"},"description":"Partial email (ilike)"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Exact tintin user id","title":"User Id"},"description":"Exact tintin user id"},{"name":"job_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Exact nail job id — resolves to the owning user","title":"Job Id"},"description":"Exact nail job id — resolves to the owning user"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NailLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/nail/jobs":{"get":{"tags":["admin-app-debug"],"summary":"Nail Jobs","description":"Proxy: full nail job history for a user (config + per-hand\nintermediates), from the nail-art service debug surface. Optional\n``kind`` (try_on | thumbnail_gen) filters to a single feature.","operationId":"nail_jobs_api_admin_app_debug_nail_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"include_drafts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Drafts"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/app-debug/nail/jobs/{job_id}":{"get":{"tags":["admin-app-debug"],"summary":"Nail Job Detail","description":"Proxy: single nail job + hands (config + intermediates).","operationId":"nail_job_detail_api_admin_app_debug_nail_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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/admin/prompt-debug/prompts":{"get":{"tags":["admin-prompt-debug"],"summary":"List Prompts","operationId":"list_prompts_api_admin_prompt_debug_prompts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/prompt-debug/prompts/{key}":{"get":{"tags":["admin-prompt-debug"],"summary":"Get Prompt Detail","operationId":"get_prompt_detail_api_admin_prompt_debug_prompts__key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompt-debug/prompts/{key}/versions":{"get":{"tags":["admin-prompt-debug"],"summary":"List Versions","operationId":"list_versions_api_admin_prompt_debug_prompts__key__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompt-debug/prompts/{key}/diff":{"get":{"tags":["admin-prompt-debug"],"summary":"Diff Versions","operationId":"diff_versions_api_admin_prompt_debug_prompts__key__diff_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"from_version","in":"query","required":true,"schema":{"type":"integer","description":"0 = code default / effective","title":"From Version"},"description":"0 = code default / effective"},{"name":"to_version","in":"query","required":true,"schema":{"type":"integer","description":"0 = code default / effective","title":"To Version"},"description":"0 = code default / effective"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompt-debug/prompts/{key}/publish":{"post":{"tags":["admin-prompt-debug"],"summary":"Publish Prompt","operationId":"publish_prompt_api_admin_prompt_debug_prompts__key__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__routes__admin_prompt_debug__PublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompt-debug/prompts/{key}/rollback":{"post":{"tags":["admin-prompt-debug"],"summary":"Rollback Prompt","operationId":"rollback_prompt_api_admin_prompt_debug_prompts__key__rollback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompt-debug/prompts/{key}/debug":{"post":{"tags":["admin-prompt-debug"],"summary":"Run Debug","operationId":"run_debug_api_admin_prompt_debug_prompts__key__debug_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompt-debug/prompts/{key}/debug/presign":{"post":{"tags":["admin-prompt-debug"],"summary":"Debug Presign","description":"Mint a presigned PUT for a video_ref debug input (template video or\nreference image). The admin PUTs the file straight to a short-lived temp\nkey, then passes the key in the debug run — keeps big clips out of the JSON\nrequest body.","operationId":"debug_presign_api_admin_prompt_debug_prompts__key__debug_presign_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebugUploadPresignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/prompt-debug/prompts/{key}/debug/{job_id}":{"get":{"tags":["admin-prompt-debug"],"summary":"Poll Debug Job","description":"Poll a video_ref debug job. While ``running`` with fal queue handles,\ncheck the queue; flip to ``done`` (with ``output_video_url``) or ``error``\nwhen terminal. Other kinds are already terminal — returns as-is.","operationId":"poll_debug_job_api_admin_prompt_debug_prompts__key__debug__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"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/admin/prompt-debug/prompts/{key}/calls":{"get":{"tags":["admin-prompt-debug"],"summary":"List Calls","operationId":"list_calls_api_admin_prompt_debug_prompts__key__calls_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tryon-agent/access":{"get":{"tags":["admin-tryon-agent"],"summary":"Get Access","operationId":"get_access_api_admin_tryon_agent_access_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonAgentAccess"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/tryon-agent/access/everyone":{"put":{"tags":["admin-tryon-agent"],"summary":"Set Everyone","operationId":"set_everyone_api_admin_tryon_agent_access_everyone_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EveryoneToggle"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonAgentAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/tryon-agent/access/users":{"post":{"tags":["admin-tryon-agent"],"summary":"Add User","operationId":"add_user_api_admin_tryon_agent_access_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__routes__admin_tryon_agent__AddUser"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonAgentAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/tryon-agent/access/users/{user_id}":{"delete":{"tags":["admin-tryon-agent"],"summary":"Remove User","operationId":"remove_user_api_admin_tryon_agent_access_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TryonAgentAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tryon-agent/user-settings/{user_id}":{"get":{"tags":["admin-tryon-agent"],"summary":"Get User Automation","operationId":"get_user_automation_api_admin_tryon_agent_user_settings__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAutomationSettings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin-tryon-agent"],"summary":"Set User Automation","operationId":"set_user_automation_api_admin_tryon_agent_user_settings__user_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetUserAutomation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAutomationSettings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tryon-agent/user-recipes/{user_id}":{"get":{"tags":["admin-tryon-agent"],"summary":"List User Recipes","description":"A user's GLOBAL recipe-automation list (applies to all their projects).","operationId":"list_user_recipes_api_admin_tryon_agent_user_recipes__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserRecipe"},"title":"Response List User Recipes Api Admin Tryon Agent User Recipes  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin-tryon-agent"],"summary":"Patch User Recipe","description":"Upsert one global recipe-automation row for a user, return the full list.","operationId":"patch_user_recipe_api_admin_tryon_agent_user_recipes__user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchUserRecipe"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserRecipe"},"title":"Response Patch User Recipe Api Admin Tryon Agent User Recipes  User Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tryon-agent/user-projects/{user_id}":{"get":{"tags":["admin-tryon-agent"],"summary":"List User Projects","operationId":"list_user_projects_api_admin_tryon_agent_user_projects__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminTryonProject"},"title":"Response List User Projects Api Admin Tryon Agent User Projects  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tryon-agent/projects/{project_id}/recipes":{"get":{"tags":["admin-tryon-agent"],"summary":"List Project Recipes","operationId":"list_project_recipes_api_admin_tryon_agent_projects__project_id__recipes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminTryonRecipe"},"title":"Response List Project Recipes Api Admin Tryon Agent Projects  Project Id  Recipes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tryon-agent/recipes/{recipe_id}":{"patch":{"tags":["admin-tryon-agent"],"summary":"Patch Recipe","operationId":"patch_recipe_api_admin_tryon_agent_recipes__recipe_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"recipe_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Recipe Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchRecipe"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTryonRecipe"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/feature-flags":{"get":{"tags":["admin-feature-flags"],"summary":"List Flags","operationId":"list_flags_api_admin_feature_flags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FlagSummary"},"type":"array","title":"Response List Flags Api Admin Feature Flags Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/feature-flags/{key}/access":{"get":{"tags":["admin-feature-flags"],"summary":"Get Access","operationId":"get_access_api_admin_feature_flags__key__access_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/feature-flags/{key}/everyone":{"put":{"tags":["admin-feature-flags"],"summary":"Set Everyone","operationId":"set_everyone_api_admin_feature_flags__key__everyone_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EveryoneToggle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/feature-flags/{key}/users":{"post":{"tags":["admin-feature-flags"],"summary":"Add User","operationId":"add_user_api_admin_feature_flags__key__users_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__routes__admin_feature_flags__AddUser"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/feature-flags/{key}/users/{user_id}":{"delete":{"tags":["admin-feature-flags"],"summary":"Remove User","operationId":"remove_user_api_admin_feature_flags__key__users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/feature-flags/{key}/domains":{"post":{"tags":["admin-feature-flags"],"summary":"Add Domain","operationId":"add_domain_api_admin_feature_flags__key__domains_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDomain"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/feature-flags/{key}/domains/{domain_id}":{"delete":{"tags":["admin-feature-flags"],"summary":"Remove Domain","operationId":"remove_domain_api_admin_feature_flags__key__domains__domain_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagAccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me":{"get":{"summary":"Get Me","operationId":"get_me_api_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Me Api Me Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/jobs/draft":{"post":{"summary":"Create Draft","description":"Mint a NailArtJob in 'draft' status with no inputs yet.\n\nReturned `id` becomes the upload key prefix for the presign route\n(`apps/nail-art/{id}/inputs/...`). The frontend then calls\n`/api/jobs/{id}/submit` once all inputs are in place.","operationId":"create_draft_api_jobs_draft_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobDraftResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/jobs/{job_id}/submit":{"post":{"summary":"Submit Draft","description":"Pin inputs onto a draft + run the charge fan-out + enqueue.\n\nThe draft must belong to the caller (scope-checked) and still be in\n'draft' status. Returns the same shape as `POST /api/jobs` so the\nfrontend can route through either path interchangeably.","operationId":"submit_draft_api_jobs__job_id__submit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__nail_art__schemas__jobs__JobSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs":{"post":{"summary":"Create Job","description":"Single-shot draft+submit. Kept for the existing Platform-Storage\nupload flow (inputs already exist in workspace before the user clicks\nGenerate). The two-phase `/draft` + `/submit` flow is preferred for\nnew clients — see `project_nail_art_storage_layout.md` memory.","operationId":"create_job_api_jobs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Jobs","description":"List collapsed by series — same nail-set + same hands set folds\ninto one row even across multiple runs. Pagination is at the series\nlevel. See `services.jobs.list_series_for_scope` for the query plan.","operationId":"list_jobs_api_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}":{"get":{"summary":"Get Job","operationId":"get_job_api_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Job","description":"Soft-delete a job (and thus its History series run) for the caller.\nA job not visible to their scope, or already deleted, returns 404. The\nrow + hand results + ledger charges stay readable for the admin\nusage/debug surfaces until a hard-purge job sweeps them.","operationId":"delete_job_api_jobs__job_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/series/{series_id}":{"delete":{"summary":"Delete Series","description":"Soft-delete a whole History card — every run sharing this series_id\nthat the caller owns. 404 if the series isn't visible to their scope\n(or is already fully deleted). Two path segments after `/api/jobs`, so\nno collision with `/api/jobs/{job_id}`.","operationId":"delete_series_api_jobs_series__series_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"series_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Series Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/hands/{hand_idx}/retry":{"post":{"summary":"Retry Hand","operationId":"retry_hand_api_jobs__job_id__hands__hand_idx__retry_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"hand_idx","in":"path","required":true,"schema":{"type":"integer","title":"Hand Idx"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/uploads/presign":{"post":{"summary":"Presign Upload","operationId":"presign_upload_api_uploads_presign_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__nail_art__routes__uploads__PresignRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/uploads/standalone-presign":{"post":{"summary":"Standalone Presign Upload","operationId":"standalone_presign_upload_api_uploads_standalone_presign_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandalonePresignRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/hand-templates":{"get":{"summary":"List Templates","description":"Picker payload — admin catalog + caller's own templates.","operationId":"list_templates_api_hand_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/hand-templates/{template_id}":{"get":{"summary":"Get Template Detail","description":"Detail payload — base picker fields + cached preprocess artifacts.\n\nReturns 404 on unknown id, or when the template is not visible to\nthe caller (foreign user's row, or inactive admin row). Mirrors the\nvisibility rules from `list_visible_templates`.","operationId":"get_template_detail_api_hand_templates__template_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Template Metadata","description":"Edit pose / skin_tone on a user-owned template.\n\nThe auto-annotator misses occasionally; users surface the wrong\npose or skin tone in the detail view and want to fix it without\nre-uploading. Aspect / background / source are intentionally not\neditable: aspect was baked into the source image dims at upload\ntime, background is unused by the runtime, and source is system-\nmanaged.\n\nSame auth contract as the assignments editor — admin rows are\nread-only catalog entries; only the owner of a user/ai_gen row\ncan mutate it.","operationId":"update_template_metadata_api_hand_templates__template_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateMetadataUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Template","description":"Soft-delete a user-owned template (flip `is_active=False`).\n\nAdmin-curated rows can't be deleted via this route — that's an\nadmin-side concern. 404 on missing-or-unauthorized so the route\nnever leaks the existence of someone else's template id.","operationId":"delete_template_api_hand_templates__template_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/hand-templates/{template_id}/assignments":{"patch":{"summary":"Update Template Assignments","description":"Manually overwrite the cached VLM-derived nail → mask mapping.\n\nUse case: the VLM occasionally mis-labels a finger; the user opens\nthe detail-view editor, swaps two mask IDs, hits Save. We re-render\n`01_hand_assigned.png` with the new mapping + rewrite\n`assignments.json` at the same S3 keys. The next try-on against\nthis template hydrates the new mapping via the existing cache path\nand the warp uses the corrected assignments.\n\nValidation:\n- Template must be visible to the caller AND non-admin (admin rows\n  are global; we don't let one user mutate the shared catalog).\n- Cache must already be populated (`hand_preprocess` non-null).\n- Submitted mask_ids must form a permutation of the currently-\n  cached `assigned` mask_ids (no new masks, no missing ones).\n- Submitted (hand, finger) pairs must be unique.","operationId":"update_template_assignments_api_hand_templates__template_id__assignments_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateAssignmentsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/hand-templates/{template_id}/mask-pixels":{"get":{"summary":"Get Template Mask Pixels","description":"Return each cached SAM3 mask as inline base64 PNG bytes.\n\nThe masks editor needs to read mask pixel data into JS-side\n`Uint8Array`s, which a direct `<img>`-from-S3 load can't do when\nthe bucket's CORS config doesn't include the caller's origin\n(`getImageData` then throws SecurityError on the tainted canvas).\nServing the bytes through this API endpoint puts them on the\nsame origin as the rest of the SDK traffic, side-stepping CORS\nentirely. ~50-200 KB per mask × 5-10 masks per template — small\nenough to be fine on demand from the editor.","operationId":"get_template_mask_pixels_api_hand_templates__template_id__mask_pixels_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Template Mask Pixels Api Hand Templates  Template Id  Mask Pixels Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/hand-templates/{template_id}/masks":{"patch":{"summary":"Update Template Masks","description":"Overwrite cached SAM3 masks with user-tuned versions from the\nmask editor.\n\nSame access rules as the assignments editor (`PATCH .../assignments`)\n— non-admin templates only, must have a populated preprocess cache.\n\nOn success: uploads each submitted mask PNG, recomputes\n`mask_centroids`, auto-removes any `(hand, finger)` assignment whose\ntarget mask got fully erased, and re-renders `labeled_overlay` +\n`assignment_viz` against the (possibly trimmed) `assigned` dict.","operationId":"update_template_masks_api_hand_templates__template_id__masks_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateMasksUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/hand-templates/upload":{"post":{"summary":"Upload Template","description":"Promote a Platform-Storage file_id into a permanent template.\n\nCaller uploads the hand photo via the regular `/api/uploads/presign`\npath first (or via Platform Storage `uploadFile()`), gets a\n`file_id`, then posts it here with the structured discriminators.\n\nReturns 404 when the file_id is unknown to the SDK or owned by a\ndifferent user. Returns the freshly-persisted template row so the\nfrontend can drop it into the picker without re-fetching the list.\n\nStandalone callers post a raw `hand_s3_key` (from\n/api/uploads/standalone-presign) instead of a file_id — see\n`_resolve_hand_image`.","operationId":"upload_template_api_hand_templates_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateUploadRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/hand-templates/annotate":{"post":{"summary":"Annotate Template","description":"Suggest pose / skin / aspect / background for an uploaded hand\nphoto. Used by the upload modal to auto-fill the form so the user\ntypically only needs to confirm + click Save.\n\nThe endpoint is **best-effort**: Gemini outages don't 5xx — the\nannotator falls back to the form defaults (single_hand / light /\n1:1 / white) so the upload still works. Confidence rides in the\nresponse so the UI can dim low-confidence suggestions.\n\nLatency: 1-3s typical (Gemini Pro Vision on a single 4K-or-smaller\nimage), 30s ceiling via the genai HTTP timeout.","operationId":"annotate_template_api_hand_templates_annotate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateAnnotateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateAnnotateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/hand-templates/generate":{"post":{"summary":"Generate Template","description":"Fire 3 Fal NB2 text-to-image candidates for an in-app hand template.\n\nSequence: compose prompt → charge $0.20 via Platform SDK → spawn N\nparallel NB2 calls + anatomy stub → upload candidates to S3 → persist\ndraft row with the candidate list → return presigned candidate URLs.\n\nRefund on Fal/Platform-Storage failure mid-flight: if ALL N\ncandidates fail to produce bytes, we refund the charge and return\n502. Partial failures (1-2 candidates succeed) keep the charge —\nthe user can still finalize one of the surviving candidates.\n\nLatency: ~10-30s wall (dominated by NB2). Sync response; no SQS.\nThe frontend renders a \"Generating…\" state while the request hangs.","operationId":"generate_template_api_hand_templates_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateGenerateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateGenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/hand-templates/{template_id}/finalize":{"post":{"summary":"Finalize Template","description":"Promote one or more chosen candidates from a draft to live templates.\n\nThe first picked index finalizes the draft row in place. Each\nremaining picked index is cloned into a fresh ai_gen row so the\ngallery shows N independent entries.\n\nRejects:\n- 404: template id missing / owned by someone else / not an\n  ai_gen draft.\n- 409: draft already finalized (``is_active=true`` already).\n- 422: any picked index is out of range, duplicated, OR points at a\n  candidate whose anatomy gate failed.","operationId":"finalize_template_api_hand_templates__template_id__finalize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateFinalizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandTemplateFinalizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/thumbnails/generate":{"post":{"summary":"Generate Thumbnail Route","description":"Charge + enqueue one NB2-edit catalog thumbnail (async, SQS worker).\n\nSequence: resolve reference → fingerprint → series_id lookup → create\njob + hand_result rows → charge 1 studio credit → enqueue → return a\n`running` JobCreateResponse. The worker (`_process_thumbnail_gen`) runs\nNB2 (nano-pro fallback) + uploads, and the frontend polls `getJob`.\nWas synchronous; moved async to remove the multi-second request hold +\nbring it onto the same charge/refund path as try-on.","operationId":"generate_thumbnail_route_api_thumbnails_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThumbnailGenerateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lifestyle/generate":{"post":{"summary":"Generate Lifestyle Route","description":"Charge + enqueue one lifestyle job (1 hand → `num_images` variants).","operationId":"generate_lifestyle_route_api_lifestyle_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifestyleGenerateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/nail-sets/preflight":{"post":{"summary":"Preflight Nail Set","description":"判定甲片图是否达 thumbnail 标准。best-effort:读图或 VLM 失败一律\nfail-open(usable=true),绝不因预检故障挡住上传。","operationId":"preflight_nail_set_api_nail_sets_preflight_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NailSetPreflightRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NailSetPreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/nail-video/templates":{"get":{"summary":"List Nail Video Templates","description":"Return the active nail-video template catalog (admin-managed).\n\n`id` is the template slug (the value sent back as `template_id`). Each\nentry carries a presigned `video_url` (and `preview_url` when a poster is\nset) so the picker can preview the clip — the raw `video_s3_key` is never\nsurfaced.","operationId":"list_nail_video_templates_api_nail_video_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NailVideoTemplateListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/nail-video/generate":{"post":{"summary":"Generate Nail Video Route","description":"Charge + enqueue one nail-video job (1 hand → `num_videos` MP4 variants).","operationId":"generate_nail_video_route_api_nail_video_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NailVideoGenerateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/tryon/preset-models":{"get":{"tags":["admin-tryon-preset-models"],"summary":"Admin List Preset Models","operationId":"admin_list_preset_models_api_admin_tryon_preset_models_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Archived"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin-tryon-preset-models"],"summary":"Admin Create Preset Models","description":"Batch-register uploaded images as catalog entries.\n\nKeys already in the catalog are skipped (reported back as ``skipped``)\nso a retried batch is idempotent. Missing ``sort_order`` appends to the\nend of the item's category (max + 10).","operationId":"admin_create_preset_models_api_admin_tryon_preset_models_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresetModelBatchCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tryon/preset-models/{preset_id}":{"patch":{"tags":["admin-tryon-preset-models"],"summary":"Admin Update Preset Model","operationId":"admin_update_preset_model_api_admin_tryon_preset_models__preset_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Preset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresetModelPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-tryon-preset-models"],"summary":"Admin Delete Preset Model","description":"Remove the catalog row. The S3 object is deliberately left in place —\nold jobs reference preset keys as inputs, and mcp_service pins two keys.","operationId":"admin_delete_preset_model_api_admin_tryon_preset_models__preset_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Preset Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/tryon/preset-models/upload/presign":{"post":{"tags":["admin-tryon-preset-models"],"summary":"Admin Presign Upload","description":"Mint a presigned PUT for one preset model photo. The admin PUTs the\nfile straight to its final catalog key, then registers it via the batch\ncreate endpoint.","operationId":"admin_presign_upload_api_admin_tryon_preset_models_upload_presign_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresetUploadPresignRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/tryon/preset-models/zip/presign":{"post":{"tags":["admin-tryon-preset-models"],"summary":"Admin Presign Zip","description":"Mint a presigned PUT for a zip of preset model photos (short-lived\nintake key; the expand step fans the images out to final catalog keys).","operationId":"admin_presign_zip_api_admin_tryon_preset_models_zip_presign_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PresetZipPresignRequest"},{"type":"null"}],"title":" Req"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/tryon/preset-models/zip/expand":{"post":{"tags":["admin-tryon-preset-models"],"summary":"Admin Expand Zip","operationId":"admin_expand_zip_api_admin_tryon_preset_models_zip_expand_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresetZipExpandRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/task-evals/summary":{"get":{"tags":["admin-task-evals"],"summary":"Get Summary","description":"Headline numbers for the chosen cohort + window.","operationId":"get_summary_api_admin_task_evals_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort","in":"query","required":false,"schema":{"type":"string","default":"external","title":"Cohort"}},{"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":{"type":"object","additionalProperties":true,"title":"Response Get Summary Api Admin Task Evals Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/task-evals/remediations":{"get":{"tags":["admin-task-evals"],"summary":"List Quality Remediations","description":"Recent daily Codex remediation tasks created from Agent Quality picks.","operationId":"list_quality_remediations_api_admin_task_evals_remediations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Quality Remediations Api Admin Task Evals Remediations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/task-evals/remediations/e2e":{"post":{"tags":["admin-task-evals"],"summary":"Trigger Quality Remediation E2E","description":"Trigger the quality remediation workflow for a known conversation.\n\nIntended for gamma E2E validation; authenticated with the static admin\nAPI key so CI/ops can call it without a short-lived admin JWT.","operationId":"trigger_quality_remediation_e2e_api_admin_task_evals_remediations_e2e_post","parameters":[{"name":"conversation_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Conversation Id"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Trigger Quality Remediation E2E Api Admin Task Evals Remediations E2E Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/task-evals/remediations/{incident_id}/codex-result":{"post":{"tags":["admin-task-evals"],"summary":"Backfill Quality Remediation Result","description":"Backfill a Codex remediation result after an authenticated ops action.","operationId":"backfill_quality_remediation_result_api_admin_task_evals_remediations__incident_id__codex_result_post","parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}},{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityRemediationBackfill"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Backfill Quality Remediation Result Api Admin Task Evals Remediations  Incident Id  Codex Result Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/task-evals/per-agent":{"get":{"tags":["admin-task-evals"],"summary":"Get Per Agent","description":"One row per agent — strict + lenient + avg nudges + counts.","operationId":"get_per_agent_api_admin_task_evals_per_agent_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort","in":"query","required":false,"schema":{"type":"string","default":"external","title":"Cohort"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}},{"name":"min_tasks","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":1,"title":"Min Tasks"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Per Agent Api Admin Task Evals Per Agent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/task-evals/per-domain":{"get":{"tags":["admin-task-evals"],"summary":"Get Per Domain","description":"Aggregate by user email domain. Most useful for external cohort\n(e.g. unifi3d.co vs qq.com vs gmail.com).","operationId":"get_per_domain_api_admin_task_evals_per_domain_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort","in":"query","required":false,"schema":{"type":"string","default":"external","title":"Cohort"}},{"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":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Per Domain Api Admin Task Evals Per Domain Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/task-evals/episodes":{"get":{"tags":["admin-task-evals"],"summary":"List Episodes","description":"Episode list with optional filters. Default sort: most-recent first.","operationId":"list_episodes_api_admin_task_evals_episodes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort","in":"query","required":false,"schema":{"type":"string","default":"external","title":"Cohort"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":7,"title":"Days"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},{"name":"agent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}},{"name":"is_task","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Task"}},{"name":"min_nudges","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":0,"default":0,"title":"Min Nudges"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Episodes Api Admin Task Evals Episodes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/task-evals/conversations/{conversation_id}/episodes":{"get":{"tags":["admin-task-evals"],"summary":"List Conversation Episodes","description":"Drill-down: all episodes for a single conversation, ordered.","operationId":"list_conversation_episodes_api_admin_task_evals_conversations__conversation_id__episodes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Conversation Episodes Api Admin Task Evals Conversations  Conversation Id  Episodes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/activation/summary":{"get":{"tags":["admin-activation"],"summary":"Get Summary","description":"Funnel for users who registered within the window.","operationId":"get_summary_api_admin_activation_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":3650,"minimum":1},{"type":"null"}],"description":"Signup cohort window; omit for all-time","default":30,"title":"Days"},"description":"Signup cohort window; omit for all-time"},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Summary Api Admin Activation Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/activation/unactivated":{"get":{"tags":["admin-activation"],"summary":"Get Unactivated","description":"Users with zero generate calls across all apps — who to reach out to.","operationId":"get_unactivated_api_admin_activation_unactivated_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":3650,"minimum":1},{"type":"null"}],"description":"Signup window; omit for all registered users","default":3,"title":"Days"},"description":"Signup window; omit for all registered users"},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Unactivated Api Admin Activation Unactivated Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/activation/by-source":{"get":{"tags":["admin-activation"],"summary":"Get By Source","description":"Which marketing pages/channels drove these signups, and did they activate.\n\nThree groupings over one cohort: `sources` (CTA page), `channels`\n(self-tagged utm_source), and `referrers` (channel derived from the\nfirst-touch referrer host — the only view where untagged organic traffic\nlike Google/Bing/ChatGPT is readable instead of collapsing into NULL).\n\nReads `users.signup_source`. The NULL bucket means \"no source recorded\",\nwhich for accounts predating the attribution rollout is unattributable\nrather than direct — `instrumented_since` in the response marks the cutoff.","operationId":"get_by_source_api_admin_activation_by_source_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":3650,"minimum":1},{"type":"null"}],"description":"Signup cohort window; omit for all-time","default":30,"title":"Days"},"description":"Signup cohort window; omit for all-time"},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get By Source Api Admin Activation By Source Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/activation/recent":{"get":{"tags":["admin-activation"],"summary":"Get Recent","description":"Most recent first-time generate calls.","operationId":"get_recent_api_admin_activation_recent_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}},{"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":{"type":"object","additionalProperties":true,"title":"Response Get Recent Api Admin Activation Recent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/activation/refresh":{"post":{"tags":["admin-activation"],"summary":"Refresh","description":"Recompute the derived table now instead of waiting for the hourly worker.\n\nIdempotent: existing first_used_at values are never rewritten.","operationId":"refresh_api_admin_activation_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Refresh Api Admin Activation Refresh Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/conversion":{"get":{"tags":["admin-conversion"],"summary":"Conversion Report","operationId":"conversion_report_api_admin_conversion_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Conversion Report Api Admin Conversion Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/conversion/blocked-users":{"get":{"tags":["admin-conversion"],"summary":"Blocked Users","description":"Users whose try-on was refused by the provider (content_policy) in\n[since, until), for the sales/growth recall mail (ev-e7d15be9).\n\n`succeeded_after` = any successful generation after their last refusal,\nat any time, so the recall can skip people who already got a result.\nMarketing opt-outs and pending account deletions are always excluded\n(counted in `excluded`), internal domains unless include_internal.","operationId":"blocked_users_api_admin_conversion_blocked_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"since","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"ISO date/time, inclusive (UTC)","title":"Since"},"description":"ISO date/time, inclusive (UTC)"},{"name":"until","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"ISO date/time, exclusive (UTC)","title":"Until"},"description":"ISO date/time, exclusive (UTC)"},{"name":"include_internal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Internal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Blocked Users Api Admin Conversion Blocked Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/abuse/summary":{"get":{"tags":["admin-abuse"],"summary":"Get Summary","description":"Guard effectiveness at a glance: how much was flagged, how much withheld.","operationId":"get_summary_api_admin_abuse_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Signup window","default":30,"title":"Days"},"description":"Signup window"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Summary Api Admin Abuse Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/abuse/top-ips":{"get":{"tags":["admin-abuse"],"summary":"Get Top Ips","description":"IPs ranked by accounts created in the window, flagged share included.","operationId":"get_top_ips_api_admin_abuse_top_ips_get","security":[{"HTTPBearer":[]}],"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":"min_signups","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Hide single-signup IPs by default","default":2,"title":"Min Signups"},"description":"Hide single-signup IPs by default"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Top Ips Api Admin Abuse Top Ips Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/abuse/flagged":{"get":{"tags":["admin-abuse"],"summary":"Get Flagged Users","description":"Accounts whose free signup credits were withheld, newest first.","operationId":"get_flagged_users_api_admin_abuse_flagged_get","security":[{"HTTPBearer":[]}],"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":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Flagged Users Api Admin Abuse Flagged Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/radar/summary":{"get":{"tags":["admin-radar"],"summary":"Get Summary","operationId":"get_summary_api_admin_radar_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Window for new-connection/event counts","default":30,"title":"Days"},"description":"Window for new-connection/event counts"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Summary Api Admin Radar Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/radar/shops":{"get":{"tags":["admin-radar"],"summary":"List Shops","description":"Every radar shop with its owner, pasted URL, platform, and binding state.","operationId":"list_shops_api_admin_radar_shops_get","security":[{"HTTPBearer":[]}],"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":200,"minimum":1,"default":50,"title":"Page Size"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Matches shop URL, display name, or owner email","title":"Search"},"description":"Matches shop URL, display name, or owner email"},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(shopify|etsy|woo)$"},{"type":"null"}],"title":"Platform"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(own|competitor)$"},{"type":"null"}],"title":"Role"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Status"}},{"name":"connected","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter on official credentials on file","title":"Connected"},"description":"Filter on official credentials on file"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Shops Api Admin Radar Shops Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/edm/template/parse":{"post":{"tags":["admin-edm"],"summary":"Parse Template","description":"Scan an uploaded HTML template: default subject + resource audit.","operationId":"parse_template_api_admin_edm_template_parse_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateParseRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Parse Template Api Admin Edm Template Parse Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/edm/upload/presign":{"post":{"tags":["admin-edm"],"summary":"Presign Upload","description":"Presigned PUT for a replacement image/video asset.","operationId":"presign_upload_api_admin_edm_upload_presign_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__routes__admin_edm__PresignRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Presign Upload Api Admin Edm Upload Presign Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/edm/fetch-asset":{"post":{"tags":["admin-edm"],"summary":"Fetch Asset","description":"One-click replace: server-side download of a template's external\nresource onto our S3 (image/video only, 20 MB cap, SSRF-guarded).","operationId":"fetch_asset_api_admin_edm_fetch_asset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchAssetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Fetch Asset Api Admin Edm Fetch Asset Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/edm/test-send":{"post":{"tags":["admin-edm"],"summary":"Wizard Test Send","description":"Preview send from the create wizard, BEFORE any campaign exists.\n\n1-5 @tintin-x.com addresses only; no campaign row, no ledger claim, no\ncounters — it can never contaminate the real send list.","operationId":"wizard_test_send_api_admin_edm_test_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WizardTestSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Wizard Test Send Api Admin Edm Test Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/edm/lists":{"get":{"tags":["admin-edm"],"summary":"Get Lists","operationId":"get_lists_api_admin_edm_lists_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string","pattern":"^(black|white)$","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Lists Api Admin Edm Lists Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin-edm"],"summary":"Add List Entries","description":"Bulk add. Emails are lowercased/deduped; existing entries are skipped.","operationId":"add_list_entries_api_admin_edm_lists_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add List Entries Api Admin Edm Lists Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/edm/lists/{entry_id}":{"delete":{"tags":["admin-edm"],"summary":"Delete List Entry","operationId":"delete_list_entry_api_admin_edm_lists__entry_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete List Entry Api Admin Edm Lists  Entry Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/edm/campaigns":{"post":{"tags":["admin-edm"],"summary":"Create Campaign","operationId":"create_campaign_api_admin_edm_campaigns_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Campaign Api Admin Edm Campaigns Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["admin-edm"],"summary":"List Campaigns","operationId":"list_campaigns_api_admin_edm_campaigns_get","security":[{"HTTPBearer":[]}],"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":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Campaigns Api Admin Edm Campaigns Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/edm/campaigns/{campaign_id}":{"get":{"tags":["admin-edm"],"summary":"Get Campaign","operationId":"get_campaign_api_admin_edm_campaigns__campaign_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Campaign Api Admin Edm Campaigns  Campaign Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/edm/campaigns/{campaign_id}/cancel":{"post":{"tags":["admin-edm"],"summary":"Cancel Campaign","operationId":"cancel_campaign_api_admin_edm_campaigns__campaign_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Campaign Api Admin Edm Campaigns  Campaign Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/edm/campaigns/{campaign_id}/test-send":{"post":{"tags":["admin-edm"],"summary":"Test Send","description":"Preview delivery to one address — no ledger row, no counters.","operationId":"test_send_api_admin_edm_campaigns__campaign_id__test_send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Send Api Admin Edm Campaigns  Campaign Id  Test Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/edm/campaigns/{campaign_id}/recipients":{"get":{"tags":["admin-edm"],"summary":"List Recipients","description":"The actual send list from the ledger — who got (or failed) this campaign.","operationId":"list_recipients_api_admin_edm_campaigns__campaign_id__recipients_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(sent|failed)$"},{"type":"null"}],"title":"Status"}},{"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":1000,"minimum":1,"default":100,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Recipients Api Admin Edm Campaigns  Campaign Id  Recipients Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/edm/campaigns/{campaign_id}/resend":{"post":{"tags":["admin-edm"],"summary":"Resend Campaign","description":"Re-open a finished campaign for users who joined since it ran.\n\nThe send-once ledger guarantees everyone already mailed is skipped, so\na resend only ever reaches NEW audience members.","operationId":"resend_campaign_api_admin_edm_campaigns__campaign_id__resend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Resend Campaign Api Admin Edm Campaigns  Campaign Id  Resend Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/drip/steps":{"get":{"tags":["admin-drip"],"summary":"List Steps","description":"The six steps with their live template state and send counts.","operationId":"list_steps_api_admin_drip_steps_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Steps Api Admin Drip Steps Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/drip/email-stats":{"get":{"tags":["admin-drip"],"summary":"Email Stats","description":"Every lifecycle_email_sends campaign over the window: sent / failed,\nplus unique open / click for the tracked drip steps. Bounces and\ncomplaints are not stored per message (no SES event ingestion); the\naccount-level rates AWS keeps come back under `ses` (ses_health).","operationId":"email_stats_api_admin_drip_email_stats_get","security":[{"HTTPBearer":[]}],"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 Email Stats Api Admin Drip Email Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/drip/steps/{slug}":{"get":{"tags":["admin-drip"],"summary":"Get Step","description":"Full template HTML + resource audit, for preview and re-upload.","operationId":"get_step_api_admin_drip_steps__slug__get","security":[{"HTTPBearer":[]}],"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 Step Api Admin Drip Steps  Slug  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin-drip"],"summary":"Upload Step","description":"Replace one step's template. Same intake contract as an EDM campaign:\nthe HTML is rewritten with `asset_map`, then re-scanned, and creation is\nrefused while anything still points off our domain (an inbox can't load\na relative path, and a third-party host can vanish mid-campaign).","operationId":"upload_step_api_admin_drip_steps__slug__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Upload Step Api Admin Drip Steps  Slug  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-drip"],"summary":"Reset Step","description":"Drop the override and go back to the shipped file.","operationId":"reset_step_api_admin_drip_steps__slug__delete","security":[{"HTTPBearer":[]}],"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 Reset Step Api Admin Drip Steps  Slug  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/drip/users/search":{"get":{"tags":["admin-drip"],"summary":"Search Users","description":"Find real accounts to aim the time machine at.","operationId":"search_users_api_admin_drip_users_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":255,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Search Users Api Admin Drip Users Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/drip/simulate":{"post":{"tags":["admin-drip"],"summary":"Simulate","description":"Dry run: which steps would each recipient receive, and why not.\n\nNothing is sent and nothing is written. The verdicts come from the same\n`Predicate` objects the sender uses, so a rule that passes here is the\nrule that will fire in production.","operationId":"simulate_api_admin_drip_simulate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Simulate Api Admin Drip Simulate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/drip/simulate/send":{"post":{"tags":["admin-drip"],"summary":"Simulate Send","description":"Deliver the chosen steps to the chosen addresses, for real.\n\nBypasses every audience rule on purpose — the point is to see the mail.\n`write_ledger` stays false by default so this never consumes a real\nuser's one send of that campaign.","operationId":"simulate_send_api_admin_drip_simulate_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Simulate Send Api Admin Drip Simulate Send Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/drip/seed/outreach":{"post":{"tags":["admin-drip"],"summary":"Seed Outreach","description":"Send one founder-outreach sample (tq@tintin-x.com) to a seed inbox.\n\nFor deliverability checks only (ask-077ead3a): recipients are limited to\nour own domains, so this can never mail a customer.","operationId":"seed_outreach_api_admin_drip_seed_outreach_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutreachSeedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Seed Outreach Api Admin Drip Seed Outreach Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/cms/spaces":{"get":{"tags":["cms"],"summary":"List Spaces","description":"List all registered CMS spaces.","operationId":"list_spaces_api_cms_spaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["cms-spaces"],"summary":"Create Space","description":"Create a new CMS space.","operationId":"create_space_api_cms_spaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSpaceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/cms/spaces/{name}":{"put":{"tags":["cms-spaces"],"summary":"Update Space","description":"Update an existing space.","operationId":"update_space_api_cms_spaces__name__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSpaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["cms-spaces"],"summary":"Delete Space","description":"Delete a space. Does NOT delete associated schemas or content.","operationId":"delete_space_api_cms_spaces__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cms/spaces/seed":{"post":{"tags":["cms-spaces"],"summary":"Seed Spaces","description":"Seed spaces from code-defined defaults.","operationId":"seed_spaces_api_cms_spaces_seed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/cms/{space}/schemas":{"post":{"tags":["cms-schemas"],"summary":"Create Schema","description":"Create a new document type schema.","operationId":"create_schema_api_cms__space__schemas_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSchemaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["cms"],"summary":"Get Schemas","description":"Return schema definitions + locale config for a space.","operationId":"get_schemas_api_cms__space__schemas_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cms/{space}/schemas/{doc_type}":{"put":{"tags":["cms-schemas"],"summary":"Update Schema","description":"Update an existing document type schema.","operationId":"update_schema_api_cms__space__schemas__doc_type__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}},{"name":"doc_type","in":"path","required":true,"schema":{"type":"string","title":"Doc Type"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSchemaRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["cms-schemas"],"summary":"Delete Schema","description":"Delete a document type schema. Does NOT delete associated content.","operationId":"delete_schema_api_cms__space__schemas__doc_type__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}},{"name":"doc_type","in":"path","required":true,"schema":{"type":"string","title":"Doc Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cms/{space}/schemas/seed":{"post":{"tags":["cms-schemas"],"summary":"Seed Schemas","description":"Seed schemas from code-defined defaults. Only creates missing schemas.","operationId":"seed_schemas_api_cms__space__schemas_seed_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cms/upload-url":{"post":{"tags":["cms"],"summary":"Get Upload Url","description":"Get a presigned S3 upload URL for a CMS image.","operationId":"get_upload_url_api_cms_upload_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__routes__cms__UploadUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/cms/{space}/documents":{"get":{"tags":["cms"],"summary":"List Documents","description":"List all documents in a space with per-locale status summary.","operationId":"list_documents_api_cms__space__documents_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cms/{space}/documents/{doc_type}/{locale}":{"get":{"tags":["cms"],"summary":"Get Document","description":"Get a single document's draft content.","operationId":"get_document_api_cms__space__documents__doc_type___locale__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}},{"name":"doc_type","in":"path","required":true,"schema":{"type":"string","title":"Doc Type"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string","title":"Locale"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["cms"],"summary":"Save Document","description":"Save a document as draft.","operationId":"save_document_api_cms__space__documents__doc_type___locale__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}},{"name":"doc_type","in":"path","required":true,"schema":{"type":"string","title":"Doc Type"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string","title":"Locale"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cms/{space}/publish":{"post":{"tags":["cms"],"summary":"Publish","description":"Publish drafts to make them live. Optionally trigger site rebuild.","operationId":"publish_api_cms__space__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__api__routes__cms__PublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cms/{space}/content/{locale}":{"get":{"tags":["cms"],"summary":"Get Content","description":"Export all published content for a locale. Used by website SSG builds.\n\nPerforms field-level fallback merge: missing locale fields fall back to\nthe default locale (en).","operationId":"get_content_api_cms__space__content__locale__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}},{"name":"locale","in":"path","required":true,"schema":{"type":"string","title":"Locale"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cms/tokens":{"get":{"tags":["cms-tokens"],"summary":"List Tokens","description":"List all CMS tokens (no plaintext values).","operationId":"list_tokens_api_cms_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["cms-tokens"],"summary":"Create Token","description":"Create a new CMS token. Returns the plaintext value ONCE.","operationId":"create_token_api_cms_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/cms/tokens/{token_id}":{"delete":{"tags":["cms-tokens"],"summary":"Revoke Token","description":"Revoke (delete) a CMS token.","operationId":"revoke_token_api_cms_tokens__token_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"integer","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/cms/{space}/export-bundle":{"get":{"tags":["cms-migration"],"summary":"Export Bundle","description":"Export a content bundle for migration to another environment.","operationId":"export_bundle_api_cms__space__export_bundle_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","pattern":"^(draft|published)$","default":"published","title":"Status"}},{"name":"locales","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locales"}},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Types"}},{"name":"include_assets","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Assets"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cms/{space}/import-bundle":{"post":{"tags":["cms-migration"],"summary":"Import Bundle","description":"Import a content bundle from another environment.","operationId":"import_bundle_api_cms__space__import_bundle_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string","title":"Space"}},{"name":"strategy","in":"query","required":false,"schema":{"type":"string","pattern":"^(draft|published|overwrite)$","default":"draft","title":"Strategy"}},{"name":"skip_assets","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Skip Assets"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Bundle"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/health":{"get":{"tags":["tableflow"],"summary":"Health","description":"Liveness probe — unauthenticated.","operationId":"health_api_tf_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/tf/plugins":{"get":{"tags":["tableflow"],"summary":"List Plugins","description":"List every loaded plugin manifest.","operationId":"list_plugins_api_tf_plugins_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PluginManifest"},"type":"array","title":"Response List Plugins Api Tf Plugins Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tf/workspaces":{"get":{"tags":["tableflow"],"summary":"List Workspaces","operationId":"list_workspaces_api_tf_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["tableflow"],"summary":"Create Workspace","operationId":"create_workspace_api_tf_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tf/tables":{"post":{"tags":["tableflow"],"summary":"Create Table","operationId":"create_table_api_tf_tables_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tableflow"],"summary":"List Tables","operationId":"list_tables_api_tf_tables_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}":{"get":{"tags":["tableflow"],"summary":"Get Table","operationId":"get_table_api_tf_tables__table_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/columns":{"post":{"tags":["tableflow"],"summary":"Create Column","operationId":"create_column_api_tf_tables__table_id__columns_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__tableflow__schemas__ColumnCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColumnResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/columns/{column_id}":{"patch":{"tags":["tableflow"],"summary":"Update Column","operationId":"update_column_api_tf_tables__table_id__columns__column_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"column_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Column Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__tableflow__schemas__ColumnUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColumnResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["tableflow"],"summary":"Archive Column","operationId":"archive_column_api_tf_tables__table_id__columns__column_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"column_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Column Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/columns/{column_id}/convert-preview":{"get":{"tags":["tableflow"],"summary":"Preview Column Conversion","description":"Preview a type conversion before commit.\n\nReturns whether the transition is allowed and how many existing\ncell values would drop to null. The FE shows this in the confirm\nmodal so the user knows what they're losing.","operationId":"preview_column_conversion_api_tf_tables__table_id__columns__column_id__convert_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"column_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Column Id"}},{"name":"target","in":"query","required":true,"schema":{"type":"string","title":"Target"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColumnConversionPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/rows":{"post":{"tags":["tableflow"],"summary":"Create Row","operationId":"create_row_api_tf_tables__table_id__rows_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["tableflow"],"summary":"List Rows","operationId":"list_rows_api_tf_tables__table_id__rows_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableRowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/rows/{row_id}":{"delete":{"tags":["tableflow"],"summary":"Archive Row","operationId":"archive_row_api_tf_tables__table_id__rows__row_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/cells/{row_id}/{column_id}":{"patch":{"tags":["tableflow"],"summary":"Write Cell","operationId":"write_cell_api_tf_tables__table_id__cells__row_id___column_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"column_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Column Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/rows/{row_id}/cells/{column_id}/versions":{"get":{"tags":["tableflow"],"summary":"List Cell Versions","description":"History of every write to a single cell, most recent first.\n\nBacks the grid's per-cell history drawer. The data lives in the\nimmutable `tf_cell_versions` table — every PATCH appends; nothing\nis mutated in place. `version_num` is monotonic per `(row, col)`.","operationId":"list_cell_versions_api_tf_tables__table_id__rows__row_id__cells__column_id__versions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"row_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Row Id"}},{"name":"column_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Column Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CellVersionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/import":{"post":{"tags":["tableflow"],"summary":"Import Rows","description":"Bulk-create rows from a parsed CSV / Excel payload.\n\nThe frontend parses the file client-side and POSTs the column-\nmapped rows here. Per-row validation errors land in `errors[]`\ninstead of aborting the import — partial imports are a feature\nfor paste-from-spreadsheet flows where some rows have bad data.\n\n`dry_run=True` returns the same shape without committing, so the\nuser can see how many rows + cells would land + any validation\nerrors before clicking Import.","operationId":"import_rows_api_tf_tables__table_id__import_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRowsRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/revisions":{"get":{"tags":["tableflow"],"summary":"List Revisions","operationId":"list_revisions_api_tf_tables__table_id__revisions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["tableflow"],"summary":"Commit Revision","operationId":"commit_revision_api_tf_tables__table_id__revisions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__tableflow__schemas__RevisionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/revisions/{revision_id}/revert":{"post":{"tags":["tableflow"],"summary":"Revert Revision","operationId":"revert_revision_api_tf_tables__table_id__revisions__revision_id__revert_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/upload-url":{"post":{"tags":["tableflow"],"summary":"Get Upload Url","description":"Mint a presigned S3 PUT for an image / video / attachment cell.\n\nThe FE flow is:\n  1. POST here with {filename, content_type, size_bytes} →\n     {upload_url, s3_key, max_size_bytes}\n  2. PUT the file bytes directly to upload_url (sends\n     Content-Type matching `content_type`)\n  3. PATCH the cell with `{value: {s3_key, content_type, ...metadata}}`\n\nThe cell-write validator pins the s3_key to the\n`assets/tableflow/` prefix so a leaked URL can't be redirected.","operationId":"get_upload_url_api_tf_tables__table_id__upload_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__tableflow__schemas__UploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/src__tableflow__schemas__UploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tf/tables/{table_id}/columns/{column_id}/reorder":{"post":{"tags":["tableflow"],"summary":"Reorder Column","description":"Move a column to a new position.\n\n`after_column_id` (in body) is the column the moving one should\nland just after; `null` moves it to the head. Server rewrites\nevery active column's order_key and returns the full list in\nnew order so the FE can patch its state without a refetch.","operationId":"reorder_column_api_tf_tables__table_id__columns__column_id__reorder_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Table Id"}},{"name":"column_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Column Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColumnReorder"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ColumnResponse"},"title":"Response Reorder Column Api Tf Tables  Table Id  Columns  Column Id  Reorder Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health Check","description":"Liveness probe — always returns ok.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Check Health Get"}}}}}}},"/health/ready":{"get":{"summary":"Readiness Check","description":"Readiness probe — verifies DB and Redis connectivity.","operationId":"readiness_check_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Readiness Check Health Ready Get"}}}}}}}},"components":{"schemas":{"AcceptInvitationRequest":{"properties":{"merge_preference":{"type":"string","pattern":"^(move_agents|keep_separate)$","title":"Merge Preference","default":"move_agents"}},"type":"object","title":"AcceptInvitationRequest"},"ActiveContextRequest":{"properties":{"owner_type":{"type":"string","enum":["user","team"],"title":"Owner Type"},"owner_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Id"}},"type":"object","required":["owner_type"],"title":"ActiveContextRequest"},"ActiveContextResponse":{"properties":{"owner_type":{"type":"string","enum":["user","team"],"title":"Owner Type"},"owner_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Id"}},"type":"object","required":["owner_type"],"title":"ActiveContextResponse"},"AddCreditsRequest":{"properties":{"amount_cents":{"type":"integer","maximum":100000.0,"minimum":500.0,"title":"Amount Cents"}},"type":"object","required":["amount_cents"],"title":"AddCreditsRequest","description":"Purchase credits."},"AddDomain":{"properties":{"domain":{"type":"string","title":"Domain"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["domain"],"title":"AddDomain"},"AddFileRequest":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"role":{"type":"string","title":"Role","default":"reference"},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["file_id"],"title":"AddFileRequest"},"AddGrantRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"AddGrantRequest"},"AddVaultRefRequest":{"properties":{"credential_id":{"type":"string","format":"uuid","title":"Credential Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["credential_id"],"title":"AddVaultRefRequest"},"AdminAppMetricsByUnitKind":{"properties":{"kind":{"type":"string","title":"Kind"},"count":{"type":"integer","title":"Count"},"total_cents":{"type":"integer","title":"Total Cents"},"refund_count":{"type":"integer","title":"Refund Count"}},"type":"object","required":["kind","count","total_cents","refund_count"],"title":"AdminAppMetricsByUnitKind"},"AdminAppMetricsByUser":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"charge_count":{"type":"integer","title":"Charge Count"},"total_cents":{"type":"integer","title":"Total Cents"},"refund_count":{"type":"integer","title":"Refund Count"},"last_action_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Action At"}},"type":"object","required":["user_id","charge_count","total_cents","refund_count"],"title":"AdminAppMetricsByUser"},"AdminAppMetricsPoint":{"properties":{"date":{"type":"string","title":"Date"},"charge_cents":{"type":"integer","title":"Charge Cents"},"refund_cents":{"type":"integer","title":"Refund Cents"},"charge_count":{"type":"integer","title":"Charge Count"},"refund_count":{"type":"integer","title":"Refund Count"}},"type":"object","required":["date","charge_cents","refund_cents","charge_count","refund_count"],"title":"AdminAppMetricsPoint"},"AdminAppMetricsResponse":{"properties":{"period":{"type":"string","title":"Period"},"revenue_cents":{"type":"integer","title":"Revenue Cents"},"charge_count":{"type":"integer","title":"Charge Count"},"refund_count":{"type":"integer","title":"Refund Count"},"unique_users":{"type":"integer","title":"Unique Users"},"series":{"items":{"$ref":"#/components/schemas/AdminAppMetricsPoint"},"type":"array","title":"Series"},"by_user":{"items":{"$ref":"#/components/schemas/AdminAppMetricsByUser"},"type":"array","title":"By User"},"by_unit_kind":{"items":{"$ref":"#/components/schemas/AdminAppMetricsByUnitKind"},"type":"array","title":"By Unit Kind"}},"type":"object","required":["period","revenue_cents","charge_count","refund_count","unique_users","series","by_user","by_unit_kind"],"title":"AdminAppMetricsResponse"},"AdminDeleteRequest":{"properties":{"reason":{"type":"string","maxLength":1000,"minLength":3,"title":"Reason"}},"type":"object","required":["reason"],"title":"AdminDeleteRequest"},"AdminGoogleLoginRequest":{"properties":{"id_token":{"type":"string","title":"Id Token"}},"type":"object","required":["id_token"],"title":"AdminGoogleLoginRequest","description":"Google ID token exchange."},"AdminGrantCreditsRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent ID to look up the owning user"},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount","description":"Credits to add"}},"type":"object","required":["agent_id","amount"],"title":"AdminGrantCreditsRequest"},"AdminGrantCreditsResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"agent_id":{"type":"string","title":"Agent Id"},"amount_granted":{"type":"integer","title":"Amount Granted"},"new_balance":{"type":"integer","title":"New Balance"}},"type":"object","required":["user_id","agent_id","amount_granted","new_balance"],"title":"AdminGrantCreditsResponse"},"AdminInstallationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_slug":{"type":"string","title":"App Slug"},"installed_by":{"type":"string","format":"uuid","title":"Installed By"},"installed_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Installed By Email"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"config_json":{"additionalProperties":true,"type":"object","title":"Config Json"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"uninstalled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Uninstalled At"}},"type":"object","required":["id","app_slug","installed_by","installed_by_email","team_id","team_name","config_json","created_at","uninstalled_at"],"title":"AdminInstallationResponse","description":"Admin-side install row enriched with user email + team name so the\nconsole can avoid a per-row N+1 lookup. Returned by\n`GET /api/admin/official-apps/{slug}/installations`."},"AdminInviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","title":"Role","default":"viewer"}},"type":"object","required":["email"],"title":"AdminInviteRequest","description":"Pre-create an admin user with a role."},"AdminRoleUpdateRequest":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"AdminRoleUpdateRequest","description":"Update an admin user's role."},"AdminSetAgentTierRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id","description":"Agent UUID"},"tier":{"type":"string","title":"Tier","description":"Tier name: starter, growth, viral, enterprise"}},"type":"object","required":["agent_id","tier"],"title":"AdminSetAgentTierRequest"},"AdminSetAgentTierResponse":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"tier":{"type":"string","title":"Tier"}},"type":"object","required":["agent_id","tier"],"title":"AdminSetAgentTierResponse"},"AdminSetPlanRequest":{"properties":{"user_id":{"type":"string","title":"User Id","description":"User UUID"},"plan":{"type":"string","title":"Plan","description":"Plan name: starter, growth, viral, enterprise"}},"type":"object","required":["user_id","plan"],"title":"AdminSetPlanRequest"},"AdminSetPlanResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"plan":{"type":"string","title":"Plan"},"max_agent_slots":{"type":"integer","title":"Max Agent Slots"}},"type":"object","required":["user_id","plan","max_agent_slots"],"title":"AdminSetPlanResponse"},"AdminTeamListResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/AdminTeamMember"},"type":"array","title":"Members"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["members","total"],"title":"AdminTeamListResponse","description":"List of admin team members."},"AdminTeamMember":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","name","role","last_login_at","created_at"],"title":"AdminTeamMember","description":"Admin team member response."},"AdminTryonProject":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"AdminTryonProject"},"AdminTryonRecipe":{"properties":{"id":{"type":"string","title":"Id"},"recipe_key":{"type":"string","title":"Recipe Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"step_order":{"type":"integer","title":"Step Order"},"enabled":{"type":"boolean","title":"Enabled"},"trigger":{"type":"string","title":"Trigger"}},"type":"object","required":["id","recipe_key","name","step_order","enabled","trigger"],"title":"AdminTryonRecipe"},"AdminUserRecipe":{"properties":{"recipe_key":{"type":"string","title":"Recipe Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"step_order":{"type":"integer","title":"Step Order"},"enabled":{"type":"boolean","title":"Enabled"},"trigger":{"type":"string","title":"Trigger"}},"type":"object","required":["recipe_key","name","step_order","enabled","trigger"],"title":"AdminUserRecipe"},"AdminUserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","name","role","last_login_at","created_at"],"title":"AdminUserResponse","description":"Admin user info."},"AgentAnalyticsResponse":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"agent_name":{"type":"string","title":"Agent Name"},"metrics":{"items":{"$ref":"#/components/schemas/MetricDataPoint"},"type":"array","title":"Metrics"}},"type":"object","required":["agent_id","agent_name","metrics"],"title":"AgentAnalyticsResponse"},"AgentAppCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"html_content":{"type":"string","minLength":1,"title":"Html Content"},"source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Source"}},"type":"object","required":["name","html_content"],"title":"AgentAppCreateRequest"},"AgentChannelResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"provider":{"type":"string","title":"Provider"},"label":{"type":"string","title":"Label"},"status":{"type":"string","title":"Status"},"external_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Account Id"},"external_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Account Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"}},"type":"object","required":["id","agent_id","provider","label","status","created_at","updated_at"],"title":"AgentChannelResponse"},"AgentCreateRequest":{"properties":{"character_json":{"additionalProperties":true,"type":"object","title":"Character Json"},"creation_mode":{"type":"string","title":"Creation Mode"},"iq_tier":{"type":"integer","title":"Iq Tier","default":120},"heartbeat_minutes":{"type":"integer","title":"Heartbeat Minutes","default":240},"heartbeat_steps":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Heartbeat Steps"},"primary_model":{"type":"string","title":"Primary Model","default":"deepseek-v4-pro"},"agent_runtime":{"type":"string","title":"Agent Runtime","default":"openclaw"},"agent_type":{"type":"string","title":"Agent Type","default":"standard"},"archetype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archetype"},"role_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Id"},"custom_role_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Role Name"}},"type":"object","required":["character_json","creation_mode"],"title":"AgentCreateRequest"},"AgentListResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/AgentResponse"},"type":"array","title":"Agents"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["agents","total"],"title":"AgentListResponse"},"AgentProgramUpdateRequest":{"properties":{"program_id":{"type":"string","format":"uuid","title":"Program Id"}},"type":"object","required":["program_id"],"title":"AgentProgramUpdateRequest"},"AgentPublicProfileUpdate":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"owner_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Handle"},"bio":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Bio"},"samples":{"items":{"$ref":"#/components/schemas/PublicSample"},"type":"array","maxItems":3,"title":"Samples"},"visible":{"type":"boolean","title":"Visible","default":false}},"type":"object","title":"AgentPublicProfileUpdate"},"AgentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"character_id":{"type":"string","title":"Character Id"},"character_json":{"additionalProperties":true,"type":"object","title":"Character Json"},"creation_mode":{"type":"string","title":"Creation Mode"},"tier":{"type":"string","title":"Tier"},"iq_tier":{"type":"integer","title":"Iq Tier"},"primary_model":{"type":"string","title":"Primary Model"},"heartbeat_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Heartbeat Model"},"agent_runtime":{"type":"string","title":"Agent Runtime","default":"openclaw"},"heartbeat_minutes":{"type":"integer","title":"Heartbeat Minutes"},"heartbeat_steps":{"additionalProperties":true,"type":"object","title":"Heartbeat Steps","default":{}},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"creator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Email"},"role_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Label"},"role_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Role Id"},"custom_role_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Role Name"},"public_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Slug"},"public_owner_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Owner Handle"},"public_bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Bio"},"public_samples":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Public Samples"},"public_visible":{"type":"boolean","title":"Public Visible","default":false},"role":{"anyOf":[{"$ref":"#/components/schemas/RoleInfo"},{"type":"null"}]},"program_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"},"build_mode":{"type":"boolean","title":"Build Mode","default":false},"enable_dreaming":{"type":"boolean","title":"Enable Dreaming","default":false},"dreaming_auto_managed":{"type":"boolean","title":"Dreaming Auto Managed","default":true},"heartbeat_auto_managed":{"type":"boolean","title":"Heartbeat Auto Managed","default":true},"heartbeat_minutes_user_set":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Heartbeat Minutes User Set"},"agent_type":{"type":"string","title":"Agent Type","default":"standard"},"archetype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archetype"},"endpoint_registered":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Endpoint Registered"}},"type":"object","required":["id","character_id","character_json","creation_mode","tier","iq_tier","primary_model","heartbeat_minutes","status","created_at"],"title":"AgentResponse"},"AgentRollupRow":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"agent_name":{"type":"string","title":"Agent Name"},"credits_cents":{"type":"integer","title":"Credits Cents"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["agent_id","agent_name","credits_cents","calls"],"title":"AgentRollupRow"},"AgentSessionsResponse":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"days":{"type":"integer","title":"Days"},"sessions":{"items":{"$ref":"#/components/schemas/SessionUsageRow"},"type":"array","title":"Sessions"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"cache_hit":{"type":"boolean","title":"Cache Hit"}},"type":"object","required":["agent_id","days","sessions","has_more","next_offset","generated_at","cache_hit"],"title":"AgentSessionsResponse"},"AgentSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"type":"string","title":"Status"},"iq_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Iq Tier"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","status","iq_tier","created_at"],"title":"AgentSummary","description":"Agent info for user detail."},"AgentUpdateRequest":{"properties":{"character_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Character Json"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"iq_tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Iq Tier"},"heartbeat_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Heartbeat Minutes"},"heartbeat_steps":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Heartbeat Steps"},"role_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Label"},"primary_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Model"},"heartbeat_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Heartbeat Model"},"agent_runtime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Runtime"},"enable_dreaming":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Dreaming"},"reset_dreaming_to_auto":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reset Dreaming To Auto"},"reset_heartbeat_to_auto":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reset Heartbeat To Auto"}},"type":"object","title":"AgentUpdateRequest"},"AgentUsageSummaryResponse":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"days":{"type":"integer","title":"Days"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"total_credits_cents":{"type":"integer","title":"Total Credits Cents"},"total_actually_charged_cents":{"type":"integer","title":"Total Actually Charged Cents","default":0},"has_whitelisted_rows":{"type":"boolean","title":"Has Whitelisted Rows","default":false},"total_calls":{"type":"integer","title":"Total Calls"},"by_action_type":{"items":{"$ref":"#/components/schemas/UsageBucketRow"},"type":"array","title":"By Action Type"},"by_model":{"items":{"$ref":"#/components/schemas/UsageBucketRow"},"type":"array","title":"By Model"},"top_sessions":{"items":{"$ref":"#/components/schemas/SessionUsageRow"},"type":"array","title":"Top Sessions"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"cache_hit":{"type":"boolean","title":"Cache Hit"}},"type":"object","required":["agent_id","days","total_credits_cents","total_calls","by_action_type","by_model","top_sessions","generated_at","cache_hit"],"title":"AgentUsageSummaryResponse"},"AllowlistAddRequest":{"properties":{"scope_kind":{"type":"string","enum":["user_id","team_id","everyone"],"title":"Scope Kind"},"scope_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scope Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["scope_kind"],"title":"AllowlistAddRequest","description":"Add a visibility entry. Exactly one of (user_id, team_id) is set\nwhen scope_kind != 'everyone'; both are null when 'everyone'."},"AllowlistEntryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_slug":{"type":"string","title":"App Slug"},"scope_kind":{"type":"string","title":"Scope Kind"},"scope_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scope Id"},"added_by":{"type":"string","format":"uuid","title":"Added By"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","app_slug","scope_kind","scope_id","added_by","note","created_at"],"title":"AllowlistEntryResponse"},"AnalyzeReportRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"table_ids":{"items":{"type":"string"},"type":"array","title":"Table Ids","default":[]},"urls":{"items":{"type":"string"},"type":"array","title":"Urls","default":[]},"domain_hint":{"type":"string","title":"Domain Hint","default":""},"user_query":{"type":"string","title":"User Query","default":""}},"type":"object","required":["agent_id"],"title":"AnalyzeReportRequest"},"ApiKeyConfigResponse":{"properties":{"key_field_label":{"type":"string","title":"Key Field Label"},"key_field_placeholder":{"type":"string","title":"Key Field Placeholder"},"docs_url":{"type":"string","title":"Docs Url"},"setup_instructions":{"type":"string","title":"Setup Instructions","default":""}},"type":"object","required":["key_field_label","key_field_placeholder","docs_url"],"title":"ApiKeyConfigResponse"},"ApiKeyConnectRequest":{"properties":{"api_key":{"type":"string","maxLength":512,"minLength":1,"title":"Api Key"},"scope_level":{"type":"string","maxLength":20,"title":"Scope Level","default":"read_only"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"},"agent_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Agent Ids","default":[]}},"type":"object","required":["api_key"],"title":"ApiKeyConnectRequest"},"AppearanceGenerateRequest":{"properties":{"character_json":{"additionalProperties":true,"type":"object","title":"Character Json"}},"type":"object","required":["character_json"],"title":"AppearanceGenerateRequest"},"AppearanceResponse":{"properties":{"headshot_s3_key":{"type":"string","title":"Headshot S3 Key"},"frontview_s3_key":{"type":"string","title":"Frontview S3 Key"},"backview_s3_key":{"type":"string","title":"Backview S3 Key"},"validation_scores":{"items":{"type":"number"},"type":"array","title":"Validation Scores"}},"type":"object","required":["headshot_s3_key","frontview_s3_key","backview_s3_key","validation_scores"],"title":"AppearanceResponse"},"ApproveRequest":{"properties":{"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hashtags"},"scheduled_post_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Post Time"}},"type":"object","title":"ApproveRequest","description":"Approve content with optional edits."},"AtomCompleteRequest":{"properties":{"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"}},"type":"object","title":"AtomCompleteRequest"},"AtomCompletedRequest":{"properties":{"job_id":{"type":"string","minLength":1,"title":"Job Id"},"status":{"type":"string","pattern":"^(ok|error)$","title":"Status"},"result":{"additionalProperties":true,"type":"object","title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["job_id","status"],"title":"AtomCompletedRequest"},"AtomCompletedResponse":{"properties":{"chain_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Chain Id"},"advanced":{"type":"boolean","title":"Advanced","default":false},"next_dispatched":{"items":{"$ref":"#/components/schemas/NextDispatched"},"type":"array","title":"Next Dispatched"},"chain_done":{"type":"boolean","title":"Chain Done","default":false},"chain_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chain Status"},"deduped":{"type":"boolean","title":"Deduped","default":false}},"type":"object","title":"AtomCompletedResponse"},"AtomExecuteRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"atom_type":{"type":"string","title":"Atom Type"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"},"wait_timeout":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wait Timeout"},"submit_mode":{"anyOf":[{"type":"string","enum":["sync","async"]},{"type":"null"}],"title":"Submit Mode"},"ack_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ack Message"},"next_step":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Next Step"},"post_process":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Post Process"}},"additionalProperties":true,"type":"object","required":["agent_id","atom_type"],"title":"AtomExecuteRequest","description":"Request body for POST /api/atoms/execute.\n\nExtra fields (url, s3_key, etc.) are merged into params so skills can\npass atom-specific args at the top level without wrapping in params."},"AtomResponse":{"properties":{"status":{"type":"string","enum":["ok","pending","error"],"title":"Status"},"atom_type":{"type":"string","title":"Atom Type"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Path"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status","atom_type"],"title":"AtomResponse","description":"Unified response for all atoms — sync and async."},"AuditLogEntry":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"credential_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Credential Id"},"action":{"type":"string","title":"Action"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","credential_id","action","ip_address","details","created_at"],"title":"AuditLogEntry"},"AuditLogResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/AuditLogEntry"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entries","total"],"title":"AuditLogResponse"},"AutoReloadRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"reload_amount_cents":{"anyOf":[{"type":"integer","minimum":500.0},{"type":"null"}],"title":"Reload Amount Cents"},"threshold_cents":{"anyOf":[{"type":"integer","minimum":100.0},{"type":"null"}],"title":"Threshold Cents"}},"type":"object","required":["enabled"],"title":"AutoReloadRequest","description":"Configure auto-reload."},"BatchAction":{"properties":{"action":{"type":"string","enum":["approve","reject"],"title":"Action"},"batch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Batch Id"},"pending_row_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Pending Row Ids"}},"type":"object","required":["action"],"title":"BatchAction","description":"Batch approve or reject a set of pending rows.\n\nScope options (pick one):\n- `batch_id`: all unresolved rows sharing this batch_id\n- `pending_row_ids`: specific ids\n- If neither: all unresolved rows on the table (nuclear option)"},"BillingResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"credit_balance_cents":{"type":"integer","title":"Credit Balance Cents"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Subscription Id"},"auto_reload_enabled":{"type":"boolean","title":"Auto Reload Enabled"},"auto_reload_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Reload Amount Cents"},"auto_reload_threshold_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Reload Threshold Cents"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"rollover_credits_cents":{"type":"integer","title":"Rollover Credits Cents","default":0},"spending_cap_multiplier":{"type":"number","title":"Spending Cap Multiplier","default":2.0},"monthly_included_credits":{"type":"integer","title":"Monthly Included Credits","default":0},"overage_rate_per_1k":{"type":"integer","title":"Overage Rate Per 1K","default":0},"studio_credits":{"type":"number","title":"Studio Credits","default":0},"studio_credits_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Studio Credits Expires At"},"studio_bonus_credits":{"type":"number","title":"Studio Bonus Credits","default":0},"studio_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Subscription Id"},"studio_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Plan"},"studio_billing_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Billing Period"},"studio_subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Subscription Status"},"studio_current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Studio Current Period End"},"studio_cancel_at_period_end":{"type":"boolean","title":"Studio Cancel At Period End","default":false}},"type":"object","required":["plan","credit_balance_cents","stripe_customer_id","stripe_subscription_id","auto_reload_enabled","auto_reload_amount_cents","auto_reload_threshold_cents"],"title":"BillingResponse","description":"Billing status response."},"BillingUsageByAgentResponse":{"properties":{"days":{"type":"integer","title":"Days"},"total_credits_cents":{"type":"integer","title":"Total Credits Cents"},"agents":{"items":{"$ref":"#/components/schemas/AgentRollupRow"},"type":"array","title":"Agents"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"cache_hit":{"type":"boolean","title":"Cache Hit"}},"type":"object","required":["days","total_credits_cents","agents","generated_at","cache_hit"],"title":"BillingUsageByAgentResponse"},"BindableAgent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"character_id":{"type":"string","title":"Character Id"},"character_json":{"additionalProperties":true,"type":"object","title":"Character Json"},"role_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Label"},"custom_role_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Role Name"},"archetype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archetype"},"agent_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Type"},"primary_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Model"},"status":{"type":"string","title":"Status"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["id","character_id","character_json","status"],"title":"BindableAgent","description":"Compact agent row for the binding picker — same shape as tryon's."},"BindableAgentList":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/BindableAgent"},"type":"array","title":"Agents"}},"type":"object","required":["agents"],"title":"BindableAgentList"},"BindingPreviewResponse":{"properties":{"app_slug":{"type":"string","title":"App Slug"},"skills_to_install":{"items":{"$ref":"#/components/schemas/BindingPreviewSkill"},"type":"array","title":"Skills To Install"},"update_available":{"type":"boolean","title":"Update Available","default":false}},"type":"object","required":["app_slug","skills_to_install"],"title":"BindingPreviewResponse","description":"Preview shown in the UI before the user confirms a bind: which\nskills this binding would install on the agent + whether an upgrade\nis available for an existing binding."},"BindingPreviewSkill":{"properties":{"skill_slug":{"type":"string","title":"Skill Slug"},"version":{"type":"string","title":"Version"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"}},"type":"object","required":["skill_slug","version","display_name","description","tools"],"title":"BindingPreviewSkill"},"BindingResponse":{"properties":{"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"bound_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bound At"}},"type":"object","required":["agent_id"],"title":"BindingResponse","description":"Current binding for the calling (install, user). `agent_id=None` =\nno binding."},"BitableCreate":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"},"columns":{"items":{"$ref":"#/components/schemas/src__schemas__bitable__ColumnCreate"},"type":"array","maxItems":40,"title":"Columns"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"policies":{"anyOf":[{"$ref":"#/components/schemas/TablePolicies"},{"type":"null"}]},"creator_kind":{"anyOf":[{"type":"string","enum":["skill","agent"]},{"type":"null"}],"title":"Creator Kind"},"creator_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Creator Id"}},"type":"object","required":["agent_id","name"],"title":"BitableCreate"},"BitableUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"},"policies":{"anyOf":[{"$ref":"#/components/schemas/TablePolicies"},{"type":"null"}]}},"type":"object","title":"BitableUpdate"},"BitableUserConfig":{"properties":{"density":{"anyOf":[{"type":"string","enum":["compact","regular","relaxed"]},{"type":"null"}],"title":"Density"}},"type":"object","title":"BitableUserConfig"},"BitableUserConfigPatch":{"properties":{"density":{"anyOf":[{"type":"string","enum":["compact","regular","relaxed"]},{"type":"null"}],"title":"Density"}},"type":"object","title":"BitableUserConfigPatch"},"BlogPostFrontmatter":{"properties":{"title":{"type":"string","title":"Title"},"slug":{"type":"string","title":"Slug"},"description":{"type":"string","title":"Description"},"author":{"type":"string","title":"Author","default":"tintin-team"},"datePublished":{"type":"string","title":"Datepublished"},"dateModified":{"type":"string","title":"Datemodified"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"category":{"type":"string","title":"Category","default":"General"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"imageAlt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imagealt"},"featured":{"type":"boolean","title":"Featured","default":false},"draft":{"type":"boolean","title":"Draft","default":false},"faqs":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"Faqs"}},"type":"object","required":["title","slug","description","datePublished","dateModified"],"title":"BlogPostFrontmatter"},"Body_reject_codex_task_prod_api_internal_codex_tasks__task_id__reject_prod_post":{"properties":{"token":{"type":"string","title":"Token"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["token","reason"],"title":"Body_reject_codex_task_prod_api_internal_codex_tasks__task_id__reject_prod_post"},"Body_reject_prod_api_internal_incidents__incident_id__reject_prod_post":{"properties":{"token":{"type":"string","title":"Token"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["token","reason"],"title":"Body_reject_prod_api_internal_incidents__incident_id__reject_prod_post"},"Body_resubscribe_api_email_resubscribe_post":{"properties":{"u":{"type":"string","title":"U"},"t":{"type":"string","title":"T"}},"type":"object","required":["u","t"],"title":"Body_resubscribe_api_email_resubscribe_post"},"Body_unsubscribe_request_api_email_unsubscribe_request_post":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"Body_unsubscribe_request_api_email_unsubscribe_request_post"},"Body_upload_files_api_tryon_upload_files_post":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"}},"type":"object","required":["project_id","files"],"title":"Body_upload_files_api_tryon_upload_files_post"},"Body_upload_tryon_multipart_part_api_tryon_multipart_upload_part_post":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"upload_id":{"type":"string","title":"Upload Id"},"s3_key":{"type":"string","title":"S3 Key"},"part_number":{"type":"integer","title":"Part Number"},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["project_id","upload_id","s3_key","part_number","file"],"title":"Body_upload_tryon_multipart_part_api_tryon_multipart_upload_part_post"},"BulkTransferInviteCreate":{"properties":{"to_email":{"type":"string","format":"email","title":"To Email"},"agent_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"Agent Ids"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"},"include_all_resources":{"type":"boolean","title":"Include All Resources","default":true}},"type":"object","required":["to_email","agent_ids"],"title":"BulkTransferInviteCreate","description":"Send invitations for multiple agents to the same recipient.\n\n`include_all_resources=True` means every transferable resource the\nsender owns and the agent depends on travels with it. To opt out of\nspecific resources, use the per-agent flow instead."},"BulkTransferInviteFailure":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"error":{"type":"string","title":"Error"}},"type":"object","required":["agent_id","error"],"title":"BulkTransferInviteFailure"},"BulkTransferInviteResult":{"properties":{"invites":{"items":{"$ref":"#/components/schemas/TransferInviteResponse"},"type":"array","title":"Invites","default":[]},"failed":{"items":{"$ref":"#/components/schemas/BulkTransferInviteFailure"},"type":"array","title":"Failed","default":[]},"to_email":{"type":"string","title":"To Email"}},"type":"object","required":["to_email"],"title":"BulkTransferInviteResult"},"BulkTransferPreview":{"properties":{"to_email":{"type":"string","title":"To Email"},"recipient_exists":{"type":"boolean","title":"Recipient Exists"},"recipient_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Recipient Team Id"},"same_user":{"type":"boolean","title":"Same User","default":false},"agents":{"items":{"$ref":"#/components/schemas/BulkTransferPreviewItem"},"type":"array","title":"Agents","default":[]},"totals":{"additionalProperties":{"type":"integer"},"type":"object","title":"Totals"}},"type":"object","required":["to_email","recipient_exists"],"title":"BulkTransferPreview"},"BulkTransferPreviewItem":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"preview":{"anyOf":[{"$ref":"#/components/schemas/TransferPreview"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["agent_id"],"title":"BulkTransferPreviewItem","description":"Per-agent slot in the bulk preview."},"BulkTransferPreviewRequest":{"properties":{"to_email":{"type":"string","format":"email","title":"To Email"},"agent_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"Agent Ids"}},"type":"object","required":["to_email","agent_ids"],"title":"BulkTransferPreviewRequest"},"BulkUpdateCellRequest":{"properties":{"row_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500,"minItems":1,"title":"Row Ids"},"col_id":{"type":"string","maxLength":50,"minLength":1,"title":"Col Id"},"value":{"title":"Value"},"set_row_gate_bypass":{"type":"boolean","title":"Set Row Gate Bypass","default":true}},"type":"object","required":["row_ids","col_id"],"title":"BulkUpdateCellRequest","description":"Set a single column's value across N rows in one transaction.\n\nPowers the frontend's \"Set value for all rows in this column\" column-\nheader affordance + the cell multi-select toolbar's \"Set value\" action.\nBoth surfaces converge here so the agent / user has a single endpoint\nto drive batch status flips (smart-bulk-tryon's awaiting_tryon →\nawaiting_pose → awaiting_video advances).\n\nWhen `set_row_gate_bypass` is True (default) AND the targeted column\nis the `status_col` of one or more recipes' `row_gate` AND the new\n`value` is in that recipe's `allow` list, the endpoint stamps the\nper-(row, recipe_col) bypass marker so the next executor tick\ndispatches without re-gating.\n\nValidation:\n  - row_ids: 1..500 rows (server-side cap to bound the txn size)\n  - col_id: column must exist on the table; cannot target the system\n    `_meta` keys (none today, future-proofing).\n  - value: validated against the column's type via the existing\n    `validate_row_data` path — same constraints as PATCH .../rows/{rid}."},"BulkUpdateCellResult":{"properties":{"updated":{"type":"integer","title":"Updated"},"skipped":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Skipped"},"bypass_marks":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Bypass Marks"}},"type":"object","required":["updated"],"title":"BulkUpdateCellResult","description":"Response from POST .../rows/bulk-update-cell."},"CampaignCreateRequest":{"properties":{"html":{"type":"string","minLength":1,"title":"Html"},"asset_map":{"additionalProperties":{"type":"string"},"type":"object","title":"Asset Map"},"subject":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Subject"},"feedback_email":{"type":"string","maxLength":255,"minLength":3,"title":"Feedback Email"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"mode":{"type":"string","title":"Mode","default":"blacklist"},"sender_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Sender Email"},"sender_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sender Name"}},"type":"object","required":["html","feedback_email"],"title":"CampaignCreateRequest"},"CanvasCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"program_id":{"type":"string","format":"uuid","title":"Program Id"},"html_content":{"type":"string","title":"Html Content"}},"type":"object","required":["name","program_id","html_content"],"title":"CanvasCreateRequest"},"CanvasResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"program_id":{"type":"string","format":"uuid","title":"Program Id"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_agent":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Agent"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"html_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html Url"}},"type":"object","required":["id","program_id","created_by","name","description","created_at"],"title":"CanvasResponse"},"CanvasTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds","default":900}},"type":"object","required":["token"],"title":"CanvasTokenResponse"},"CanvasUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"html_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html Content"}},"type":"object","title":"CanvasUpdateRequest"},"CategorySummary":{"properties":{"status":{"type":"string","title":"Status"},"components":{"items":{"$ref":"#/components/schemas/ComponentStatus"},"type":"array","title":"Components"}},"type":"object","required":["status","components"],"title":"CategorySummary","description":"Summary of a category of components."},"CellPointer":{"properties":{"value":{"title":"Value"},"version_num":{"type":"integer","title":"Version Num"},"cell_version_id":{"type":"string","format":"uuid","title":"Cell Version Id"}},"type":"object","required":["value","version_num","cell_version_id"],"title":"CellPointer"},"CellResponse":{"properties":{"cell_version_id":{"type":"string","format":"uuid","title":"Cell Version Id"},"version_num":{"type":"integer","title":"Version Num"},"value":{"title":"Value"},"row_id":{"type":"string","format":"uuid","title":"Row Id"},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"written_by":{"type":"string","format":"uuid","title":"Written By"},"written_by_kind":{"type":"string","title":"Written By Kind"},"written_at":{"type":"string","format":"date-time","title":"Written At"}},"type":"object","required":["cell_version_id","version_num","value","row_id","column_id","written_by","written_by_kind","written_at"],"title":"CellResponse"},"CellStateAction":{"properties":{"action":{"type":"string","enum":["approve","reject","regenerate"],"title":"Action"},"iteration_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Iteration Note"}},"type":"object","required":["action"],"title":"CellStateAction","description":"Input for the approve/reject/regenerate endpoint.\n\n`iteration_note` is the reviewer's feedback. Stored on the current\nversion's `rejected_reason` on reject/regenerate, so the LLM picking\nup the re-fire has the reviewer's context in the inputs snapshot.\n\nSource-state contract:\n  - approve / reject: requires `pending_approval` (HITL flow).\n  - regenerate: requires `done` or `failed` (in-place re-do, B8)."},"CellValidationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"version_id":{"type":"string","format":"uuid","title":"Version Id"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"findings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Findings"},"suggested_regen_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Regen Note"},"validator_skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validator Skill"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","version_id","score","findings","suggested_regen_note","validator_skill","created_at"],"title":"CellValidationResponse"},"CellVersionCreate":{"properties":{"value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"type":"null"}],"title":"Value"},"iteration_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Iteration Note"},"skill_used":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Skill Used"},"skill_version_used":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Skill Version Used"},"inputs_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Inputs Snapshot"},"parent_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Version Id"},"error_msg":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Error Msg"}},"type":"object","title":"CellVersionCreate"},"CellVersionListResponse":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/CellResponse"},"type":"array","title":"Versions"}},"type":"object","required":["versions"],"title":"CellVersionListResponse","description":"GET /cells/{cid}/versions — full version history for one cell.\n\nReturned ordered by `version_num DESC` so the most recent write is\nfirst. Capped server-side at 200 entries; deeper history requires\npaginating off the smallest returned `version_num`."},"CellVersionUpdate":{"properties":{"pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"},"make_current":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Make Current"},"rejected_reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Rejected Reason"},"iteration_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Iteration Note"}},"type":"object","title":"CellVersionUpdate","description":"Patch for an existing version.\n\n`pinned` flips the pinned flag (exempts this version from retention\npruning). `make_current` re-points row.data[col_id] at this version\n(for rollback or history-pinning). `rejected_reason` annotates the\nversion the user regenerated away from. All fields use field-absent =\nunchanged semantics; check via `model_fields_set`."},"CellWrite":{"properties":{"value":{"title":"Value"},"version_num_seen":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Num Seen"}},"type":"object","required":["value"],"title":"CellWrite","description":"Body for `PATCH /tables/{id}/cells/{row_id}/{col_id}`.\n\n`version_num_seen` powers LWW with optimistic concurrency: client\nsends the version_num it just read, server fails 409 if a newer\nversion landed in between. None ⇒ always write (matches the\nintentional \"Last Writer Wins\" mode for casual edits).\n\n`value` is loosely typed at the schema layer; the cell-write service\nvalidates it against the column's `cell_type` and rejects on\nmismatch with a typed error."},"ChainCreateRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"steps":{"items":{"$ref":"#/components/schemas/ChainStep"},"type":"array","maxItems":20,"minItems":1,"title":"Steps"}},"type":"object","required":["agent_id","steps"],"title":"ChainCreateRequest"},"ChainCreateResponse":{"properties":{"chain_id":{"type":"string","format":"uuid","title":"Chain Id"},"first_steps":{"items":{"type":"string"},"type":"array","title":"First Steps"},"first_jobs":{"items":{"$ref":"#/components/schemas/FirstJobInfo"},"type":"array","title":"First Jobs"},"idempotent_replay":{"type":"boolean","title":"Idempotent Replay","default":false}},"type":"object","required":["chain_id","first_steps","first_jobs"],"title":"ChainCreateResponse"},"ChainStep":{"properties":{"step_id":{"type":"string","maxLength":64,"minLength":1,"title":"Step Id"},"atom_type":{"type":"string","maxLength":128,"minLength":1,"title":"Atom Type"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"depends_on":{"items":{"type":"string"},"type":"array","title":"Depends On"},"input_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input From"},"input_param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Param"},"input_result_key":{"type":"string","title":"Input Result Key","default":"s3_key"}},"type":"object","required":["step_id","atom_type"],"title":"ChainStep","description":"One node in the chain DAG."},"ChainStepView":{"properties":{"step_id":{"type":"string","title":"Step Id"},"atom_type":{"type":"string","title":"Atom Type"},"status":{"type":"string","title":"Status"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"dispatched_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatched At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["step_id","atom_type","status"],"title":"ChainStepView"},"ChainView":{"properties":{"chain_id":{"type":"string","format":"uuid","title":"Chain Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"steps":{"items":{"$ref":"#/components/schemas/ChainStepView"},"type":"array","title":"Steps"}},"type":"object","required":["chain_id","agent_id","status","created_at","updated_at","steps"],"title":"ChainView"},"ChangeMemberRoleRequest":{"properties":{"role":{"type":"string","pattern":"^(admin|member)$","title":"Role"}},"type":"object","required":["role"],"title":"ChangeMemberRoleRequest"},"ChargeRequest":{"properties":{"token":{"type":"string","minLength":10,"title":"Token","description":"iframe JWT"},"idempotency_key":{"type":"string","maxLength":128,"minLength":1,"title":"Idempotency Key"},"unit_kind":{"type":"string","maxLength":64,"minLength":1,"title":"Unit Kind"},"units":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Units"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["token","idempotency_key","unit_kind","units"],"title":"ChargeRequest","description":"Body of POST /api/platform/charge.\n\nDual-auth contract: the *caller* proves it's a legitimate app backend\nvia X-Internal-Key; the *subject* (user being charged) is carried by\nthe iframe JWT inside `token`. The app's user-supplied\n`idempotency_key` makes the call safe to retry — replays return the\nsame charge_id without writing a new ledger row."},"ChargeResponse":{"properties":{"charge_id":{"type":"string","format":"uuid","title":"Charge Id"},"cents_debited":{"type":"integer","title":"Cents Debited"},"wallet_balance_cents_after":{"type":"integer","title":"Wallet Balance Cents After"},"idempotent_replay":{"type":"boolean","title":"Idempotent Replay","default":false}},"type":"object","required":["charge_id","cents_debited","wallet_balance_cents_after"],"title":"ChargeResponse"},"ChatMultipartCreateRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["agent_id","filename","content_type","size_bytes"],"title":"ChatMultipartCreateRequest"},"ChatMultipartCreateResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"s3_key":{"type":"string","title":"S3 Key"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"part_size":{"type":"integer","title":"Part Size"},"part_count":{"type":"integer","title":"Part Count"}},"type":"object","required":["upload_id","s3_key","filename","content_type","part_size","part_count"],"title":"ChatMultipartCreateResponse"},"ChatOpenRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","title":"ChatOpenRequest","description":"Body for `POST /api/apps/{slug}/chat/open`.\n\n`title` is optional; if omitted, the API stamps `\"App · {slug}\"`.\nA future revision will accept a `context_snapshot` field that gets\npersisted as a system-flavored message — for now the App's frontend\nsends it as the first user turn (the agent treats it as context)."},"ChatOpenResponse":{"properties":{"conversation_id":{"type":"string","format":"uuid","title":"Conversation Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"chat_ws_path":{"type":"string","title":"Chat Ws Path"}},"type":"object","required":["conversation_id","agent_id","chat_ws_path"],"title":"ChatOpenResponse","description":"Returned to the iframe so it can connect to the chat WS.\n\nThe WS endpoint is the existing `/ws/chat/{agent_id}` — the iframe\nJWT is accepted in `?token=` alongside user JWTs as of PR 1b."},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CheckoutResponse","description":"Stripe Checkout Session redirect URL."},"CodexAuthUpload":{"properties":{"auth_json":{"title":"Auth Json"},"account_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Hint"}},"type":"object","required":["auth_json"],"title":"CodexAuthUpload"},"CodexConnectorUpdate":{"properties":{"preferred_auth":{"type":"string","pattern":"^(api_key|chatgpt)$","title":"Preferred Auth"},"subscription_enabled":{"type":"boolean","title":"Subscription Enabled","default":false},"fallback_to_api_key":{"type":"boolean","title":"Fallback To Api Key","default":true},"runner_labels":{"items":{"type":"string"},"type":"array","title":"Runner Labels"}},"type":"object","required":["preferred_auth"],"title":"CodexConnectorUpdate"},"CodexIncidentCallback":{"properties":{"token":{"type":"string","title":"Token"},"status":{"type":"string","title":"Status"},"report":{"type":"string","title":"Report"},"gamma_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gamma Branch"},"gamma_commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gamma Commit"},"pull_request_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pull Request Url"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}}},"type":"object","required":["token","status","report"],"title":"CodexIncidentCallback"},"CodexMaintenanceRepo":{"properties":{"repo":{"type":"string","title":"Repo"},"name":{"type":"string","title":"Name"},"slot_day":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Slot Day"},"slot_hour":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Slot Hour"},"focus":{"type":"string","title":"Focus","default":""},"promote_workflow":{"type":"string","title":"Promote Workflow","default":""}},"type":"object","required":["repo","name","slot_day","slot_hour"],"title":"CodexMaintenanceRepo"},"CodexMaintenanceUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"production_only":{"type":"boolean","title":"Production Only","default":true},"timezone":{"type":"string","title":"Timezone","default":"America/Los_Angeles"},"slot_window_hours":{"type":"integer","maximum":24.0,"minimum":1.0,"title":"Slot Window Hours","default":2},"repos":{"items":{"$ref":"#/components/schemas/CodexMaintenanceRepo"},"type":"array","title":"Repos"}},"type":"object","required":["repos"],"title":"CodexMaintenanceUpdate"},"ColumnConversionPreview":{"properties":{"allowed":{"type":"boolean","title":"Allowed"},"impacted_count":{"type":"integer","title":"Impacted Count"},"will_drop_count":{"type":"integer","title":"Will Drop Count"}},"type":"object","required":["allowed","impacted_count","will_drop_count"],"title":"ColumnConversionPreview","description":"Response for GET /columns/{id}/convert-preview?target=<type>.\n\n`will_drop_count` = cells whose value can't coerce to the target\ntype; they'll become tombstones if the user proceeds."},"ColumnInputRef":{"properties":{"from":{"type":"string","maxLength":50,"minLength":1,"title":"From"},"required":{"type":"boolean","title":"Required","default":true},"use_current":{"type":"boolean","title":"Use Current","default":false},"param":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Param"},"extract":{"anyOf":[{"type":"string","maxLength":60,"minLength":1},{"type":"null"}],"title":"Extract"}},"type":"object","required":["from"],"title":"ColumnInputRef","description":"One upstream input fed into the recipe's skill call.\n\n`param` maps the resolved value to a specific skill-param name\n(defaults to `from`). `extract` pulls a sub-key from a dict-shaped\nvalue — useful for attachment cells whose storage shape is\n`{s3_keys: [...]}` but whose skill consumes just the list.\n\n`extract` grammar:\n  - `\"key\"`       → dict lookup (returns whatever lives at that key)\n  - `\"key[N]\"`    → dict lookup, then list index N (signed int; -1\n                    yields the last element). Used when the skill\n                    wants a scalar and the cell stores a list (e.g.\n                    `smart_edit_critic` takes `output_image_key: str`\n                    from an attachment's `s3_keys[0]`)."},"ColumnRecipe":{"properties":{"skill":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Skill"},"skill_dispatch":{"anyOf":[{"$ref":"#/components/schemas/SkillDispatch"},{"type":"null"}]},"inputs":{"items":{"$ref":"#/components/schemas/ColumnInputRef"},"type":"array","maxItems":20,"title":"Inputs"},"output_to":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Output To"},"also_write":{"items":{"type":"string"},"type":"array","maxItems":10,"title":"Also Write"},"auto_run":{"type":"boolean","title":"Auto Run","default":true},"gate":{"anyOf":[{"$ref":"#/components/schemas/RecipeGate"},{"type":"null"}]},"row_gate":{"anyOf":[{"$ref":"#/components/schemas/RecipeRowGate"},{"type":"null"}]},"row_status_writes":{"anyOf":[{"$ref":"#/components/schemas/RecipeRowStatusWrites"},{"type":"null"}]},"sync":{"anyOf":[{"$ref":"#/components/schemas/RecipeSync"},{"type":"null"}]},"dep_version_mode":{"type":"string","enum":["latest","pinned","branch"],"title":"Dep Version Mode","default":"latest"},"execution_mode":{"type":"string","enum":["fire_and_forget","async_poll","sync"],"title":"Execution Mode","default":"fire_and_forget"},"result_delivery":{"type":"string","enum":["webhook","inline","external"],"title":"Result Delivery","default":"webhook"},"result_merge":{"anyOf":[{"type":"string","const":"append_attachment_on_regen"},{"type":"null"}],"title":"Result Merge"},"learned_constraints":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Learned Constraints"},"skill_version_pin":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Skill Version Pin"},"static_params":{"additionalProperties":true,"type":"object","title":"Static Params"},"validator":{"anyOf":[{"$ref":"#/components/schemas/ColumnValidator"},{"type":"null"}]},"rollup":{"anyOf":[{"$ref":"#/components/schemas/ColumnRollup"},{"type":"null"}]}},"type":"object","title":"ColumnRecipe","description":"Column → skill binding with version + gate config."},"ColumnReorder":{"properties":{"after_column_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"After Column Id"}},"type":"object","title":"ColumnReorder","description":"POST /tables/{id}/columns/{cid}/reorder body.\n\n`after_column_id` is the column the moving column should land\nafter; `null` moves it to the head. Server rewrites the order_key\nfor every active column in one shot (O(N) per reorder, N ≤ ~30\nin practice)."},"ColumnResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"table_id":{"type":"string","format":"uuid","title":"Table Id"},"name":{"type":"string","title":"Name"},"cell_type":{"type":"string","title":"Cell Type"},"cell_config":{"additionalProperties":true,"type":"object","title":"Cell Config"},"order_key":{"type":"string","title":"Order Key"},"width_px":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width Px"},"pinned_side":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pinned Side"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","table_id","name","cell_type","cell_config","order_key","width_px","pinned_side","created_at"],"title":"ColumnResponse"},"ColumnRollup":{"properties":{"link_col":{"type":"string","maxLength":50,"minLength":1,"title":"Link Col"},"source_col":{"type":"string","maxLength":50,"minLength":1,"title":"Source Col"},"op":{"type":"string","enum":["skill","count","first","last","concat_text"],"title":"Op","default":"skill"},"extract":{"anyOf":[{"type":"string","maxLength":60,"minLength":1},{"type":"null"}],"title":"Extract"},"param":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Param"},"require_all_children":{"type":"boolean","title":"Require All Children","default":true}},"type":"object","required":["link_col","source_col"],"title":"ColumnRollup","description":"Cross-table aggregation config for a rollup column (B9).\n\nA rollup column's value is derived from a sibling link column by\nreading a specific column on every linked child row and combining\nthe values via `op`:\n\n  - `skill`       : pass `rollup_values=[v1..vN]` into the recipe's\n                    skill job; the handler produces the final cell\n                    value. Used for video stitch, summarization,\n                    or any N→1 transform that needs a worker.\n  - `count`       : number of non-null child values (inline).\n  - `first`       : first child's value (by child row order_key).\n  - `last`        : last child's value.\n  - `concat_text` : stringified children joined with `\\n\\n` —\n                    handy for markdown rollups.\n\nInline ops (everything but `skill`) compute in the executor tick and\nland via the existing `/cell-result` pipeline — the skill field on\nthe recipe is still used as a label but is not dispatched over SQS."},"ColumnValidator":{"properties":{"skill":{"type":"string","maxLength":100,"minLength":1,"title":"Skill"},"inputs":{"items":{"$ref":"#/components/schemas/ColumnInputRef"},"type":"array","maxItems":10,"title":"Inputs"},"rubric":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rubric"},"auto_regen_threshold":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Auto Regen Threshold"},"auto_regen_cap":{"type":"integer","maximum":3.0,"minimum":0.0,"title":"Auto Regen Cap","default":1},"static_params":{"additionalProperties":true,"type":"object","title":"Static Params"},"summary_write":{"anyOf":[{"$ref":"#/components/schemas/ColumnValidatorSummaryWrite"},{"type":"null"}]}},"type":"object","required":["skill"],"title":"ColumnValidator","description":"AI-critic config for a versioned column (B8).\n\nWhen set, every `done` cell transitions to `validating`; the\nexecutor dispatches `skill` with the declared `inputs` and the\nworker posts back to `/api/internal/bitable/cell-validation`.\nFindings are advisory — the validator NEVER mutates the cell value.\n\nIf `auto_regen_threshold` is set and the returned score falls\nbelow it, the callback enqueues one regen via the existing B3.2\nre-fire path (`iteration_note = suggested_regen_note`). The\nper-cell `auto_regen_count` counter on `BitableCellState` caps\nthis at `auto_regen_cap` — a broken validator cannot loop.\n\n`summary_write` is the optional row-level rollup surface — see\n`ColumnValidatorSummaryWrite`."},"ColumnValidatorSummaryWrite":{"properties":{"pass_col":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Pass Col"},"notes_col":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Notes Col"},"pass_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Pass Threshold","default":0.7},"notes_mode":{"type":"string","enum":["append","replace"],"title":"Notes Mode","default":"append"}},"type":"object","title":"ColumnValidatorSummaryWrite","description":"Sibling-column writes performed automatically by the cell-validation\ncallback after a validator result lands.\n\nThe validator row (`bitable_cell_validations`) is the canonical score\nrecord and the UI renders a per-cell score badge off of it. But that\nrecord isn't visible from the grid's row-level overview — users who\nwant a filterable boolean (\"is this row cleared?\") + a readable log\n(\"what did critic say, over time?\") need the data surfaced into plain\nsibling columns.\n\nThis struct declares those sibling targets. The callback computes:\n  - `pass_col` ← bool(score >= pass_threshold) when score is non-null\n  - `notes_col` ← a markdown fragment (timestamp + score + findings\n    + suggested_regen_note), either appended to the existing text\n    (`notes_mode=\"append\"`) with a `---` horizontal-rule separator,\n    or replacing it (`notes_mode=\"replace\"`).\n\nBoth target columns MUST be unversioned (text/boolean/select) and\nMUST exist on the table. Missing columns are ignored (warn log);\ntype mismatches write and let the cell-value validator reject."},"ComponentStatus":{"properties":{"component":{"type":"string","title":"Component"},"category":{"type":"string","title":"Category"},"display_name":{"type":"string","title":"Display Name"},"status":{"type":"string","title":"Status"},"latency_ms":{"type":"number","title":"Latency Ms"},"threshold_ms":{"type":"integer","title":"Threshold Ms"},"critical_ms":{"type":"integer","title":"Critical Ms"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["component","category","display_name","status","latency_ms","threshold_ms","critical_ms","timestamp"],"title":"ComponentStatus","description":"Status of a single monitored component."},"ComputeSummaryResponse":{"properties":{"fargate_count":{"type":"integer","title":"Fargate Count"},"ec2_count":{"type":"integer","title":"Ec2 Count"},"total_active":{"type":"integer","title":"Total Active"}},"type":"object","required":["fargate_count","ec2_count","total_active"],"title":"ComputeSummaryResponse"},"ConciergeAdminUpdate":{"properties":{"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"stripe_invoice_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Stripe Invoice Id"},"invoice_amount_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Invoice Amount Cents"},"platform_fee_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Platform Fee Cents"},"owner_payout_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Owner Payout Cents"},"invoice_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Invoice Url"},"deliverable_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Deliverable Url"},"notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ConciergeAdminUpdate"},"ConciergeRequestCreate":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"brief":{"type":"string","maxLength":2000,"minLength":20,"title":"Brief"},"budget_cents":{"type":"integer","maximum":100000.0,"minimum":100.0,"title":"Budget Cents"},"buyer_email":{"type":"string","format":"email","title":"Buyer Email"},"buyer_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Buyer Name"}},"type":"object","required":["agent_id","brief","budget_cents","buyer_email"],"title":"ConciergeRequestCreate"},"ConciergeRequestResponse":{"properties":{"request_id":{"type":"string","format":"uuid","title":"Request Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"buyer_email":{"type":"string","title":"Buyer Email"},"buyer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Name"},"brief":{"type":"string","title":"Brief"},"budget_cents":{"type":"integer","title":"Budget Cents"},"state":{"type":"string","title":"State"},"stripe_invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Invoice Id"},"invoice_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Invoice Amount Cents"},"platform_fee_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Platform Fee Cents"},"owner_payout_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Owner Payout Cents"},"invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Url"},"deliverable_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deliverable Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["request_id","agent_id","buyer_email","brief","budget_cents","state","created_at","updated_at"],"title":"ConciergeRequestResponse"},"ConfigUpdateRequest":{"properties":{"value":{"title":"Value"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["value"],"title":"ConfigUpdateRequest","description":"Update a config value."},"ConfirmUploadRequest":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"s3_key":{"type":"string","title":"S3 Key"}},"type":"object","required":["file_id","s3_key"],"title":"ConfirmUploadRequest"},"ConnectRequest":{"properties":{"url":{"type":"string","maxLength":512,"minLength":1,"title":"Url"}},"type":"object","required":["url"],"title":"ConnectRequest"},"ConnectedServiceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"service_id":{"type":"string","title":"Service Id"},"instance_label":{"type":"string","title":"Instance Label"},"scope_level":{"type":"string","title":"Scope Level"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"external_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Account Id"},"external_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Account Name"},"status":{"type":"string","title":"Status"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"grants":{"items":{"$ref":"#/components/schemas/ServiceGrantResponse"},"type":"array","title":"Grants","default":[]}},"type":"object","required":["id","service_id","instance_label","scope_level","status","created_at"],"title":"ConnectedServiceResponse"},"ContentCreateRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"content_type":{"type":"string","maxLength":20,"title":"Content Type"},"s3_media_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Media Key"},"s3_thumbnail_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Thumbnail Key"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hashtags"},"auto_approve_delay_minutes":{"type":"integer","maximum":1440.0,"minimum":0.0,"title":"Auto Approve Delay Minutes","default":15}},"type":"object","required":["agent_id","content_type"],"title":"ContentCreateRequest","description":"Create content item (called by agent)."},"ContentItemResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"content_type":{"type":"string","title":"Content Type"},"status":{"type":"string","title":"Status"},"s3_media_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Media Key"},"s3_thumbnail_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Thumbnail Key"},"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hashtags"},"scheduled_post_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Post Time"},"auto_approve_delay_minutes":{"type":"integer","title":"Auto Approve Delay Minutes"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"},"tiktok_post_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tiktok Post Id"},"approved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved At"},"posted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Posted At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","agent_id","content_type","status","s3_media_key","s3_thumbnail_key","caption","hashtags","scheduled_post_time","auto_approve_delay_minutes","rejection_reason","tiktok_post_id","approved_at","posted_at","created_at"],"title":"ContentItemResponse","description":"Single content queue item."},"ContentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ContentItemResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"ContentListResponse","description":"Paginated content list."},"ContentPostedRequest":{"properties":{"tiktok_post_id":{"type":"string","maxLength":255,"minLength":1,"title":"Tiktok Post Id"}},"type":"object","required":["tiktok_post_id"],"title":"ContentPostedRequest","description":"Mark content as posted."},"ContentUpdateRequest":{"properties":{"caption":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"},"hashtags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hashtags"},"scheduled_post_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled Post Time"},"auto_approve_delay_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"title":"Auto Approve Delay Minutes"}},"type":"object","title":"ContentUpdateRequest","description":"Update pending content."},"ConversationUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"is_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Archived"},"is_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Private"}},"type":"object","title":"ConversationUpdate"},"CouponCreateRequest":{"properties":{"code":{"type":"string","maxLength":50,"minLength":3,"title":"Code"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"coupon_type":{"type":"string","pattern":"^(credit_grant|subscription_discount|subscription_waiver|trial_extension)$","title":"Coupon Type"},"credit_amount":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Credit Amount"},"discount_percent":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Discount Percent"},"discount_months":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Discount Months"},"waiver_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Waiver Plan"},"waiver_months":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Waiver Months"},"trial_extension_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Trial Extension Days"},"max_redemptions":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Redemptions"},"eligible_plans":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Eligible Plans"},"min_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Plan"},"new_users_only":{"type":"boolean","title":"New Users Only","default":false},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["code","coupon_type"],"title":"CouponCreateRequest","description":"Create a new coupon."},"CouponUpdateRequest":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"max_redemptions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Redemptions"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"CouponUpdateRequest","description":"Update a coupon."},"CreateCustomSkillRequest":{"properties":{"name":{"type":"string","maxLength":50,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":512,"title":"Description","default":""},"content":{"type":"string","maxLength":100000,"minLength":10,"title":"Content"}},"type":"object","required":["name","content"],"title":"CreateCustomSkillRequest","description":"Upload a custom SKILL.md to create a user/team-scoped skill."},"CreateElementRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"element_type":{"type":"string","title":"Element Type","description":"One of: product, character, model, scene, brand, document, dataset, custom"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"usage_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usage Instructions"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"visibility":{"type":"string","title":"Visibility","description":"private, team, or specific","default":"team"},"files":{"anyOf":[{"items":{"$ref":"#/components/schemas/InlineFileRef"},"type":"array"},{"type":"null"}],"title":"Files","description":"Files to attach inline (by s3_key or file_id)"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id","description":"Agent creating this element (for auto-tracking files)"}},"type":"object","required":["name","element_type"],"title":"CreateElementRequest"},"CreatePostRequest":{"properties":{"frontmatter":{"$ref":"#/components/schemas/BlogPostFrontmatter"},"content":{"type":"string","title":"Content"}},"type":"object","required":["frontmatter","content"],"title":"CreatePostRequest"},"CreateRoleRequest":{"properties":{"slug":{"type":"string","title":"Slug"},"label":{"type":"string","title":"Label"},"icon":{"type":"string","title":"Icon","default":"User"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_predefined":{"type":"boolean","title":"Is Predefined","default":true},"is_active":{"type":"boolean","title":"Is Active","default":true},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"recommended_services":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recommended Services"},"onboarding_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarding Message"},"archetype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archetype"}},"type":"object","required":["slug","label"],"title":"CreateRoleRequest"},"CreateSchemaRequest":{"properties":{"doc_type":{"type":"string","title":"Doc Type"},"title":{"type":"string","title":"Title"},"singleton":{"type":"boolean","title":"Singleton","default":true},"order":{"type":"integer","title":"Order","default":0},"fields":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Fields","default":[]}},"type":"object","required":["doc_type","title"],"title":"CreateSchemaRequest"},"CreateSpaceRequest":{"properties":{"name":{"type":"string","title":"Name"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description","default":""},"locales":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Locales","default":[{"code":"en","title":"English","is_default":true}]},"order":{"type":"integer","title":"Order","default":0}},"type":"object","required":["name","title"],"title":"CreateSpaceRequest"},"CreateStudioTeamRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateStudioTeamRequest"},"CreateTokenRequest":{"properties":{"name":{"type":"string","title":"Name"},"permission":{"type":"string","title":"Permission","default":"read"},"spaces":{"items":{"type":"string"},"type":"array","title":"Spaces","default":["*"]},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["name"],"title":"CreateTokenRequest"},"CredentialCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"credential_type":{"type":"string","maxLength":50,"minLength":1,"title":"Credential Type"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"fields":{"additionalProperties":{"type":"string"},"type":"object","minProperties":1,"title":"Fields"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"agent_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Agent Ids"}},"type":"object","required":["name","credential_type","fields"],"title":"CredentialCreateRequest"},"CredentialListResponse":{"properties":{"credentials":{"items":{"$ref":"#/components/schemas/CredentialResponse"},"type":"array","title":"Credentials"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["credentials","total"],"title":"CredentialListResponse"},"CredentialResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"credential_type":{"type":"string","title":"Credential Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"field_keys":{"items":{"type":"string"},"type":"array","title":"Field Keys","default":[]},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"grants":{"items":{"$ref":"#/components/schemas/src__schemas__vault__GrantResponse"},"type":"array","title":"Grants","default":[]}},"type":"object","required":["id","name","credential_type","created_at","updated_at"],"title":"CredentialResponse"},"CredentialRevealResponse":{"properties":{"fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Fields"}},"type":"object","required":["fields"],"title":"CredentialRevealResponse"},"CredentialUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"slug":{"anyOf":[{"type":"string","maxLength":255,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"null"}],"title":"Slug"},"credential_type":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Credential Type"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"fields":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Fields"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"CredentialUpdateRequest"},"CreditsReceivedAgent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"CreditsReceivedAgent","description":"Agent attached to a credits entry (refund target)."},"CreditsReceivedItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"action_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Type"},"target":{"$ref":"#/components/schemas/CreditsReceivedTarget"},"agent":{"anyOf":[{"$ref":"#/components/schemas/CreditsReceivedAgent"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","amount_cents","action_type","target","agent","created_at","metadata"],"title":"CreditsReceivedItem","description":"Single positive ledger entry — purchase, admin grant, refund, etc."},"CreditsReceivedResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CreditsReceivedItem"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"total_credits_received_cents":{"type":"integer","title":"Total Credits Received Cents"}},"type":"object","required":["items","has_more","total_credits_received_cents"],"title":"CreditsReceivedResponse","description":"Paginated positive ledger entries across user's accessible wallets."},"CreditsReceivedTarget":{"properties":{"kind":{"type":"string","title":"Kind"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kind","id","name"],"title":"CreditsReceivedTarget","description":"Wallet that received the credits — team or personal."},"DataJobCreateRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"name":{"type":"string","maxLength":255,"title":"Name"},"description":{"type":"string","title":"Description","default":""},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{}},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"schema_hint":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema Hint"},"storage_config":{"additionalProperties":true,"type":"object","title":"Storage Config","default":{}},"created_by":{"type":"string","title":"Created By","default":"user"},"credit_cost_estimate":{"type":"integer","title":"Credit Cost Estimate","default":0}},"type":"object","required":["agent_id","name"],"title":"DataJobCreateRequest","description":"Request schema for creating a data job.\n\n`source_id` is optional. When omitted, the API resolves the data source\nfrom `config.source_type` (and optional `config.provider`) — agents that\nonly know they want e.g. an Apify actor can pass `config={\"source_type\":\n\"actor\", \"actor_id\": \"clockworks/tiktok-scraper\", ...}` without first\nlooking up the source UUID."},"DataJobResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"source_id":{"type":"string","format":"uuid","title":"Source Id"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"schema_hint":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema Hint"},"schema_status":{"type":"string","title":"Schema Status"},"storage_config":{"additionalProperties":true,"type":"object","title":"Storage Config"},"status":{"type":"string","title":"Status"},"created_by":{"type":"string","title":"Created By"},"approved_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Approved By"},"credit_cost_estimate":{"type":"integer","title":"Credit Cost Estimate"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","agent_id","user_id","team_id","name","description","source_id","config","schedule","schema_hint","schema_status","storage_config","status","created_by","approved_by","credit_cost_estimate","last_run_at","created_at"],"title":"DataJobResponse","description":"Response schema for a data job."},"DataJobUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"schema_hint":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema Hint"},"schema_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema Status"},"storage_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Storage Config"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"credit_cost_estimate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credit Cost Estimate"}},"type":"object","title":"DataJobUpdateRequest","description":"Request schema for updating a data job."},"DataQueryRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"action":{"type":"string","title":"Action","description":"query | list_tables | sample | register_source | save"},"sql":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sql"},"table":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","default":5},"backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"credential_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Credential Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"}},"type":"object","required":["agent_id","action"],"title":"DataQueryRequest"},"DataQueryResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns","default":[]},"rows":{"items":{"items":{},"type":"array"},"type":"array","title":"Rows","default":[]},"row_count":{"type":"integer","title":"Row Count","default":0},"total_available":{"type":"integer","title":"Total Available","default":0},"truncated":{"type":"boolean","title":"Truncated","default":false},"execution_ms":{"type":"integer","title":"Execution Ms","default":0},"backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend"},"async_dispatched":{"type":"boolean","title":"Async Dispatched","default":false},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["success"],"title":"DataQueryResponse"},"DataRecordPage":{"properties":{"records":{"items":{"$ref":"#/components/schemas/DataRecordResponse"},"type":"array","title":"Records"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"}},"type":"object","required":["records","total","page","per_page"],"title":"DataRecordPage","description":"Paginated response for data records."},"DataRecordResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"raw_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Raw Data"},"structured_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structured Data"},"schema_version":{"type":"integer","title":"Schema Version"},"source_url":{"type":"string","title":"Source Url"},"scraped_at":{"type":"string","format":"date-time","title":"Scraped At"}},"type":"object","required":["id","job_id","run_id","schema_version","source_url","scraped_at"],"title":"DataRecordResponse","description":"Response schema for a data record."},"DataSourceCreateRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"backend":{"type":"string","title":"Backend","description":"parquet | bigquery | postgres"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"credential_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Credential Id"}},"type":"object","required":["agent_id","name","backend"],"title":"DataSourceCreateRequest"},"DataSourceDiscoverResponse":{"properties":{"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"source_type":{"type":"string","title":"Source Type"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"credit_cost":{"type":"integer","title":"Credit Cost"},"provider":{"type":"string","title":"Provider"},"supported_params":{"items":{"type":"string"},"type":"array","title":"Supported Params","default":[]},"configured":{"type":"boolean","title":"Configured","default":false}},"type":"object","required":["source_type","name","description","credit_cost","provider"],"title":"DataSourceDiscoverResponse","description":"Response schema for discovered data source."},"DataTriggerCreateRequest":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"name":{"type":"string","maxLength":255,"title":"Name"},"condition":{"additionalProperties":true,"type":"object","title":"Condition"},"action":{"additionalProperties":true,"type":"object","title":"Action"},"cooldown_minutes":{"type":"integer","title":"Cooldown Minutes","default":60},"max_chain_depth":{"type":"integer","title":"Max Chain Depth","default":3}},"type":"object","required":["job_id","name","condition","action"],"title":"DataTriggerCreateRequest","description":"Request schema for creating a data trigger."},"DataTriggerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"name":{"type":"string","title":"Name"},"condition":{"additionalProperties":true,"type":"object","title":"Condition"},"action":{"additionalProperties":true,"type":"object","title":"Action"},"cooldown_minutes":{"type":"integer","title":"Cooldown Minutes"},"max_chain_depth":{"type":"integer","title":"Max Chain Depth"},"last_fired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Fired At"},"fire_count":{"type":"integer","title":"Fire Count"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","job_id","name","condition","action","cooldown_minutes","max_chain_depth","last_fired_at","fire_count","status","created_at"],"title":"DataTriggerResponse","description":"Response schema for a data trigger."},"DataTriggerUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Condition"},"action":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Action"},"cooldown_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cooldown Minutes"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"DataTriggerUpdateRequest","description":"Request schema for updating a data trigger."},"DebugRequest":{"properties":{"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"based_on_version_num":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Based On Version Num"},"input":{"additionalProperties":true,"type":"object","title":"Input","default":{}}},"type":"object","title":"DebugRequest"},"DebugUploadPresignRequest":{"properties":{"role":{"type":"string","title":"Role"},"content_type":{"type":"string","title":"Content Type"}},"type":"object","required":["role","content_type"],"title":"DebugUploadPresignRequest"},"DeliverRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"source":{"type":"string","title":"Source","default":"unknown"}},"type":"object","required":["agent_id","content"],"title":"DeliverRequest"},"DesktopClientInfo":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_name":{"type":"string","title":"Client Name","default":""},"platform":{"type":"string","title":"Platform","default":""},"app_version":{"type":"string","title":"App Version","default":""},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","default":[]}},"type":"object","required":["client_id"],"title":"DesktopClientInfo"},"DesktopRegisterRequest":{"properties":{"client_id":{"type":"string","maxLength":100,"title":"Client Id"},"client_name":{"type":"string","maxLength":100,"title":"Client Name","default":""},"platform":{"type":"string","maxLength":20,"title":"Platform"},"app_version":{"type":"string","maxLength":20,"title":"App Version"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","default":[]}},"type":"object","required":["client_id","platform","app_version"],"title":"DesktopRegisterRequest"},"DesktopStatusResponse":{"properties":{"online":{"type":"boolean","title":"Online"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"app_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Version"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools","default":[]},"allowed_domains":{"items":{"type":"string"},"type":"array","title":"Allowed Domains","default":[]},"client_count":{"type":"integer","title":"Client Count","default":0},"clients":{"items":{"$ref":"#/components/schemas/DesktopClientInfo"},"type":"array","title":"Clients","default":[]},"selected_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Client Id"}},"type":"object","required":["online"],"title":"DesktopStatusResponse"},"DesktopToolConfigResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"enabled":{"type":"boolean","title":"Enabled"},"tool_permissions":{"additionalProperties":true,"type":"object","title":"Tool Permissions","default":{}},"allowed_domains":{"items":{"type":"string"},"type":"array","title":"Allowed Domains","default":[]},"blocked_domains":{"items":{"type":"string"},"type":"array","title":"Blocked Domains","default":[]},"selected_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Client Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","user_id","enabled"],"title":"DesktopToolConfigResponse"},"DesktopToolConfigUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"tool_permissions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Permissions"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"blocked_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Blocked Domains"},"selected_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Client Id"}},"type":"object","title":"DesktopToolConfigUpdate"},"DesktopToolDefinition":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"risk_level":{"type":"string","title":"Risk Level","default":"low"},"params_schema":{"additionalProperties":true,"type":"object","title":"Params Schema","default":{}}},"type":"object","required":["name","description"],"title":"DesktopToolDefinition"},"DesktopToolRequest":{"properties":{"tool_name":{"type":"string","maxLength":100,"title":"Tool Name"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}},"timeout":{"type":"integer","maximum":300.0,"minimum":5.0,"title":"Timeout","default":60},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"target_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Client Id"},"target_client_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Client Ids"}},"type":"object","required":["tool_name"],"title":"DesktopToolRequest"},"DesktopToolRequestResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","title":"Status","default":"pending"}},"type":"object","required":["request_id"],"title":"DesktopToolRequestResponse"},"DesktopToolResponseSubmit":{"properties":{"request_id":{"type":"string","maxLength":100,"title":"Request Id"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"}},"type":"object","required":["request_id"],"title":"DesktopToolResponseSubmit"},"DesktopToolResultResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"}},"type":"object","required":["request_id","status"],"title":"DesktopToolResultResponse"},"DesktopUploadUrlRequest":{"properties":{"filename":{"type":"string","maxLength":255,"title":"Filename"},"content_type":{"type":"string","maxLength":100,"title":"Content Type","default":"application/octet-stream"},"request_id":{"type":"string","maxLength":100,"title":"Request Id"}},"type":"object","required":["filename","request_id"],"title":"DesktopUploadUrlRequest"},"DesktopUploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"s3_key":{"type":"string","title":"S3 Key"}},"type":"object","required":["upload_url","s3_key"],"title":"DesktopUploadUrlResponse"},"DocUploadUrlItem":{"properties":{"filename":{"type":"string","title":"Filename"},"upload_url":{"type":"string","title":"Upload Url"},"s3_key":{"type":"string","title":"S3 Key"},"content_type":{"type":"string","title":"Content Type"}},"type":"object","required":["filename","upload_url","s3_key","content_type"],"title":"DocUploadUrlItem"},"DocUploadUrlsRequest":{"properties":{"filenames":{"items":{"type":"string"},"type":"array","title":"Filenames"}},"type":"object","required":["filenames"],"title":"DocUploadUrlsRequest"},"DocUploadUrlsResponse":{"properties":{"uploads":{"items":{"$ref":"#/components/schemas/DocUploadUrlItem"},"type":"array","title":"Uploads"}},"type":"object","required":["uploads"],"title":"DocUploadUrlsResponse"},"DocumentSaveRequest":{"properties":{"content":{"additionalProperties":true,"type":"object","title":"Content"}},"type":"object","required":["content"],"title":"DocumentSaveRequest"},"EditingAccessoryTryonInpaintRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1},"ref_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Ref Image Key"},"mask_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Mask Image Key"},"product_type":{"type":"string","maxLength":64,"minLength":1,"title":"Product Type"}},"type":"object","required":["input_image_key","ref_image_key","mask_image_key","product_type"],"title":"EditingAccessoryTryonInpaintRequest"},"EditingAccessoryTryonRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1},"ref_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Ref Image Key"},"accessory_type":{"type":"string","enum":["shoes","hat","bag","jewelry"],"title":"Accessory Type"},"wear_type":{"anyOf":[{"type":"string","enum":["carry","hold","wear"]},{"type":"null"}],"title":"Wear Type"},"jewelry_type":{"anyOf":[{"type":"string","enum":["ring","necklace","earrings","bracelet","choker"]},{"type":"null"}],"title":"Jewelry Type"}},"type":"object","required":["input_image_key","ref_image_key","accessory_type"],"title":"EditingAccessoryTryonRequest"},"EditingAdjustRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"output_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Output Image Key"},"brightness":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Brightness","default":50},"contrast":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Contrast","default":50},"saturation":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Saturation","default":50}},"type":"object","required":["input_image_key","output_image_key"],"title":"EditingAdjustRequest"},"EditingChangeBackgroundPromptRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1},"prompt":{"type":"string","maxLength":4000,"minLength":1,"title":"Prompt"}},"type":"object","required":["input_image_key","prompt"],"title":"EditingChangeBackgroundPromptRequest"},"EditingChangeBackgroundReferenceRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1},"ref_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Ref Image Key"},"change_background_mode":{"type":"string","enum":["fix_background","fix_model"],"title":"Change Background Mode"}},"type":"object","required":["input_image_key","ref_image_key","change_background_mode"],"title":"EditingChangeBackgroundReferenceRequest"},"EditingCropRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"output_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Output Image Key"},"crop_ratio":{"type":"string","enum":["freeform","original","1:1","2:3","3:4","9:16"],"title":"Crop Ratio"}},"type":"object","required":["input_image_key","output_image_key","crop_ratio"],"title":"EditingCropRequest"},"EditingFaceSwapRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1},"ref_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Ref Image Key"}},"type":"object","required":["input_image_key","ref_image_key"],"title":"EditingFaceSwapRequest"},"EditingHandFootFixRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1},"mask_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Mask Image Key"},"person_type":{"type":"string","enum":["male","female","kid","baby","senior"],"title":"Person Type"}},"type":"object","required":["input_image_key","mask_image_key","person_type"],"title":"EditingHandFootFixRequest"},"EditingImageEditRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1},"prompt":{"type":"string","maxLength":4000,"minLength":1,"title":"Prompt"}},"type":"object","required":["input_image_key","prompt"],"title":"EditingImageEditRequest"},"EditingInpaintRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1},"prompt":{"type":"string","maxLength":4000,"minLength":1,"title":"Prompt"},"mask_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Mask Image Key"}},"type":"object","required":["input_image_key","prompt","mask_image_key"],"title":"EditingInpaintRequest"},"EditingLogoTransferRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1},"logo_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Logo Image Key"},"mask_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Mask Image Key"}},"type":"object","required":["input_image_key","logo_image_key","mask_image_key"],"title":"EditingLogoTransferRequest"},"EditingLookupItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"owner_user_id":{"type":"string","title":"Owner User Id"},"owner_email":{"type":"string","title":"Owner Email"},"status":{"type":"string","title":"Status"},"source_kind":{"type":"string","title":"Source Kind"},"source_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Project Id"},"source_cell_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Cell Key"},"source_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Image Url"},"request_count":{"type":"integer","title":"Request Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","owner_user_id","owner_email","status","source_kind","source_project_id","source_cell_key","source_image_url","request_count","created_at","updated_at"],"title":"EditingLookupItem"},"EditingLookupResponse":{"properties":{"projects":{"items":{"$ref":"#/components/schemas/EditingLookupItem"},"type":"array","title":"Projects"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["projects","total"],"title":"EditingLookupResponse"},"EditingRemoveBackgroundRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1}},"type":"object","required":["input_image_key"],"title":"EditingRemoveBackgroundRequest"},"EditingRemoveForegroundRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1}},"type":"object","required":["input_image_key"],"title":"EditingRemoveForegroundRequest"},"EditingUpscaleRequest":{"properties":{"input_image_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Input Image Key"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":1},"upscale_factor":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Upscale Factor"}},"type":"object","required":["input_image_key","upscale_factor"],"title":"EditingUpscaleRequest"},"EveryoneToggle":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"EveryoneToggle"},"ExecutionStateUpdate":{"properties":{"agent_busy":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Agent Busy"},"interrupt_requested":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Interrupt Requested"},"status_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Text"}},"type":"object","title":"ExecutionStateUpdate"},"FetchAssetRequest":{"properties":{"url":{"type":"string","maxLength":2000,"minLength":8,"title":"Url"}},"type":"object","required":["url"],"title":"FetchAssetRequest"},"FileInfo":{"properties":{"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["filename","content_type","size"],"title":"FileInfo"},"FileListResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/FileResponse"},"type":"array","title":"Files"},"folders":{"items":{"$ref":"#/components/schemas/FolderResponse"},"type":"array","title":"Folders","default":[]},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"current_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Folder Id"}},"type":"object","required":["files","total","page","per_page"],"title":"FileListResponse"},"FileResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"source":{"type":"string","title":"Source"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"share_mode":{"type":"string","title":"Share Mode"},"share_token":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Share Token"},"share_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Url"},"cdn_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cdn Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"is_previewable":{"type":"boolean","title":"Is Previewable","default":false},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"}},"type":"object","required":["id","filename","content_type","size_bytes","agent_id","source","folder_id","share_mode","share_token","created_at"],"title":"FileResponse"},"FileUpdateRequest":{"properties":{"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"filename":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Filename"}},"type":"object","title":"FileUpdateRequest"},"FirstJobInfo":{"properties":{"step_id":{"type":"string","title":"Step Id"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["step_id"],"title":"FirstJobInfo"},"FiverrAccountCreate":{"properties":{"fiverr_username":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Fiverr Username"}},"type":"object","title":"FiverrAccountCreate","description":"Owner-driven creation. The agent_id + owner_user_id come from the\nauth context, not the body — keeps creation route simple and prevents\ncross-account writes."},"FiverrAccountResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"fiverr_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fiverr Username"},"cookies_secret_arn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cookies Secret Arn"},"state":{"type":"string","enum":["pending_kyc","active","limited","banned"],"title":"State"},"last_polled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Polled At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","agent_id","owner_user_id","state","created_at","updated_at"],"title":"FiverrAccountResponse"},"FiverrAccountUpdate":{"properties":{"fiverr_username":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Fiverr Username"},"state":{"anyOf":[{"type":"string","enum":["pending_kyc","active","limited","banned"]},{"type":"null"}],"title":"State"},"cookies_secret_arn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cookies Secret Arn"}},"type":"object","title":"FiverrAccountUpdate","description":"PATCH-shape: every field optional, only the ones present mutate."},"FiverrActionDecision":{"properties":{"approve":{"type":"boolean","title":"Approve"},"reject_reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reject Reason"}},"type":"object","required":["approve"],"title":"FiverrActionDecision","description":"Owner approve/reject decision. ``reject_reason`` required when\n``approve=False``."},"FiverrActionPendingCreate":{"properties":{"type":{"type":"string","enum":["send_message","accept_order","deliver","request_revision","update_gig"],"title":"Type"},"order_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Order Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["type"],"title":"FiverrActionPendingCreate","description":"Bot drafts an action; owner approves it before it touches the dashboard.\n\n``payload`` shape varies by action type — kept JSON to avoid a Union\nexplosion. Validation that the payload matches the type lives in the\nbot, not the API. (W2 work; the schema is forward-compatible.)"},"FiverrActionPendingList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FiverrActionPendingResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"FiverrActionPendingList"},"FiverrActionPendingResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"account_id":{"type":"string","format":"uuid","title":"Account Id"},"order_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Order Id"},"type":{"type":"string","enum":["send_message","accept_order","deliver","request_revision","update_gig"],"title":"Type"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"drafted_by_agent_at":{"type":"string","format":"date-time","title":"Drafted By Agent At"},"approved_by_owner_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Approved By Owner At"},"applied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Applied At"},"state":{"type":"string","enum":["pending","approved","rejected","applied","failed"],"title":"State"},"reject_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reject Reason"}},"type":"object","required":["id","account_id","type","payload","drafted_by_agent_at","state"],"title":"FiverrActionPendingResponse"},"FiverrGigCreate":{"properties":{"fiverr_gig_url":{"type":"string","minLength":1,"title":"Fiverr Gig Url"},"category":{"type":"string","maxLength":64,"minLength":1,"title":"Category"},"packages":{"additionalProperties":true,"type":"object","title":"Packages"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["fiverr_gig_url","category"],"title":"FiverrGigCreate"},"FiverrGigList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FiverrGigResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"FiverrGigList"},"FiverrGigResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"account_id":{"type":"string","format":"uuid","title":"Account Id"},"fiverr_gig_url":{"type":"string","title":"Fiverr Gig Url"},"category":{"type":"string","title":"Category"},"packages":{"additionalProperties":true,"type":"object","title":"Packages"},"active":{"type":"boolean","title":"Active"},"metrics":{"additionalProperties":true,"type":"object","title":"Metrics"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","account_id","fiverr_gig_url","category","packages","active","metrics","created_at","updated_at"],"title":"FiverrGigResponse"},"FiverrGigUpdate":{"properties":{"fiverr_gig_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fiverr Gig Url"},"category":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Category"},"packages":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Packages"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"FiverrGigUpdate"},"FiverrOrderCreate":{"properties":{"fiverr_order_id":{"type":"string","maxLength":40,"minLength":1,"title":"Fiverr Order Id"},"gig_id":{"type":"string","format":"uuid","title":"Gig Id"},"buyer_handle":{"type":"string","maxLength":64,"minLength":1,"title":"Buyer Handle"},"buyer_brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Brief"},"package_tier":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Package Tier"},"total_price_cents":{"type":"integer","minimum":0.0,"title":"Total Price Cents","default":0},"state":{"type":"string","enum":["inquiry_received","quote_drafted","quote_sent","order_received","order_accepted","in_progress","delivered","revision_requested","completed","canceled","disputed"],"title":"State","default":"inquiry_received"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"}},"type":"object","required":["fiverr_order_id","gig_id","buyer_handle"],"title":"FiverrOrderCreate","description":"Internal-only — the bot writes orders as it discovers them on Fiverr.\n\nMirrors the dashboard's view of the order, not anything the owner\nsubmits directly."},"FiverrOrderList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FiverrOrderResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"FiverrOrderList"},"FiverrOrderResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"fiverr_order_id":{"type":"string","title":"Fiverr Order Id"},"gig_id":{"type":"string","format":"uuid","title":"Gig Id"},"account_id":{"type":"string","format":"uuid","title":"Account Id"},"buyer_handle":{"type":"string","title":"Buyer Handle"},"buyer_brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Brief"},"package_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Package Tier"},"total_price_cents":{"type":"integer","title":"Total Price Cents"},"state":{"type":"string","enum":["inquiry_received","quote_drafted","quote_sent","order_received","order_accepted","in_progress","delivered","revision_requested","completed","canceled","disputed"],"title":"State"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"revision_count":{"type":"integer","title":"Revision Count"},"deliverable_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deliverable S3 Key"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","fiverr_order_id","gig_id","account_id","buyer_handle","total_price_cents","state","revision_count","created_at","updated_at"],"title":"FiverrOrderResponse"},"FiverrOrderUpdate":{"properties":{"state":{"anyOf":[{"type":"string","enum":["inquiry_received","quote_drafted","quote_sent","order_received","order_accepted","in_progress","delivered","revision_requested","completed","canceled","disputed"]},{"type":"null"}],"title":"State"},"buyer_brief":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Buyer Brief"},"package_tier":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Package Tier"},"total_price_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total Price Cents"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"},"delivered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Delivered At"},"revision_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Revision Count"},"deliverable_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deliverable S3 Key"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"}},"type":"object","title":"FiverrOrderUpdate"},"FlagAccess":{"properties":{"key":{"type":"string","title":"Key"},"description":{"type":"string","title":"Description"},"everyone":{"type":"boolean","title":"Everyone"},"internal_domains":{"items":{"type":"string"},"type":"array","title":"Internal Domains"},"users":{"items":{"$ref":"#/components/schemas/FlagUser"},"type":"array","title":"Users"},"domains":{"items":{"$ref":"#/components/schemas/FlagDomain"},"type":"array","title":"Domains"}},"type":"object","required":["key","description","everyone","internal_domains","users","domains"],"title":"FlagAccess"},"FlagDomain":{"properties":{"id":{"type":"string","title":"Id"},"domain":{"type":"string","title":"Domain"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["id","domain"],"title":"FlagDomain"},"FlagSummary":{"properties":{"key":{"type":"string","title":"Key"},"description":{"type":"string","title":"Description"},"everyone":{"type":"boolean","title":"Everyone"},"user_count":{"type":"integer","title":"User Count"},"domain_count":{"type":"integer","title":"Domain Count"}},"type":"object","required":["key","description","everyone","user_count","domain_count"],"title":"FlagSummary"},"FlagUser":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["user_id","email"],"title":"FlagUser"},"FolderCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"}},"type":"object","required":["name"],"title":"FolderCreateRequest"},"FolderResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"file_count":{"type":"integer","title":"File Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","parent_id","created_at"],"title":"FolderResponse"},"FolderUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"}},"type":"object","title":"FolderUpdateRequest"},"ForceAdvanceRequest":{"properties":{"reason":{"type":"string","maxLength":4000,"minLength":1,"title":"Reason"},"gamma_commit":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Gamma Commit"},"gamma_validation_run":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Gamma Validation Run"},"gamma_validation_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Gamma Validation Url"}},"type":"object","required":["reason"],"title":"ForceAdvanceRequest"},"FormFieldSchema":{"properties":{"id":{"type":"string","maxLength":50,"minLength":1,"title":"Id"},"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"type":{"type":"string","enum":["text","number","boolean","date","url","select","multi_select"],"title":"Type"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":100},{"type":"null"}],"title":"Options"},"text_format":{"anyOf":[{"type":"string","enum":["plain","markdown"]},{"type":"null"}],"title":"Text Format"}},"type":"object","required":["id","name","type"],"title":"FormFieldSchema","description":"One field inside a form column's schema."},"FromConversationRequest":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"}},"type":"object","required":["conversation_id"],"title":"FromConversationRequest"},"GenerateIllustrationsRequest":{"properties":{"slug":{"type":"string","title":"Slug"},"prompts":{"items":{"type":"string"},"type":"array","title":"Prompts"}},"type":"object","required":["slug","prompts"],"title":"GenerateIllustrationsRequest"},"GeneratePostRequest":{"properties":{"topic":{"type":"string","title":"Topic"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"}},"type":"object","required":["topic"],"title":"GeneratePostRequest"},"GoogleAuthRequest":{"properties":{"id_token":{"type":"string","title":"Id Token"}},"type":"object","required":["id_token"],"title":"GoogleAuthRequest"},"GroupAddMemberRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"}},"type":"object","required":["agent_id"],"title":"GroupAddMemberRequest"},"GroupAddUserMemberRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["user_id"],"title":"GroupAddUserMemberRequest"},"GroupCreateRequest":{"properties":{"mission":{"type":"string","title":"Mission"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"agent_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Agent Ids"},"avatar_emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Emoji"},"program_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"}},"type":"object","required":["mission","agent_ids"],"title":"GroupCreateRequest"},"GroupDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"name_source":{"type":"string","title":"Name Source"},"mission":{"type":"string","title":"Mission"},"mission_status":{"type":"string","title":"Mission Status"},"avatar_emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Emoji"},"program_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"members":{"items":{"$ref":"#/components/schemas/GroupMemberResponse"},"type":"array","title":"Members"},"user_members":{"items":{"$ref":"#/components/schemas/GroupUserMemberResponse"},"type":"array","title":"User Members","default":[]},"message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Preview"},"member_count":{"type":"integer","title":"Member Count"}},"type":"object","required":["id","name","name_source","mission","mission_status","avatar_emoji","created_at","members","member_count"],"title":"GroupDetailResponse"},"GroupMemberResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"agent_name":{"type":"string","title":"Agent Name"},"agent_avatar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Avatar"},"role":{"type":"string","title":"Role"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"}},"type":"object","required":["id","agent_id","agent_name","agent_avatar","role","joined_at"],"title":"GroupMemberResponse"},"GroupMessageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"group_id":{"type":"string","format":"uuid","title":"Group Id"},"sender_type":{"type":"string","title":"Sender Type"},"sender_agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sender Agent Id"},"sender_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sender User Id"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"sender_avatar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Avatar"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"mentions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Mentions"},"message_type":{"type":"string","title":"Message Type"},"is_deliverable":{"type":"boolean","title":"Is Deliverable"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","group_id","sender_type","sender_agent_id","sender_name","sender_avatar","content","mentions","message_type","is_deliverable","created_at"],"title":"GroupMessageResponse"},"GroupResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"name_source":{"type":"string","title":"Name Source"},"mission":{"type":"string","title":"Mission"},"mission_status":{"type":"string","title":"Mission Status"},"avatar_emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Emoji"},"program_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"members":{"items":{"$ref":"#/components/schemas/GroupMemberResponse"},"type":"array","title":"Members"},"user_members":{"items":{"$ref":"#/components/schemas/GroupUserMemberResponse"},"type":"array","title":"User Members","default":[]},"message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message Preview"}},"type":"object","required":["id","name","name_source","mission","mission_status","avatar_emoji","created_at","members"],"title":"GroupResponse"},"GroupUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"mission":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mission"},"avatar_emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Emoji"}},"type":"object","title":"GroupUpdateRequest"},"GroupUserMemberResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"user_name":{"type":"string","title":"User Name"},"user_email":{"type":"string","title":"User Email"},"role":{"type":"string","title":"Role"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"}},"type":"object","required":["id","user_id","user_name","user_email","role","joined_at"],"title":"GroupUserMemberResponse"},"GuestClaimRequest":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"}},"type":"object","required":["job_id"],"title":"GuestClaimRequest"},"GuestRunRequest":{"properties":{"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"},"garment_key":{"type":"string","maxLength":512,"title":"Garment Key"},"model_key":{"type":"string","maxLength":512,"title":"Model Key"},"detail_control":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Detail Control"}},"type":"object","required":["garment_key","model_key"],"title":"GuestRunRequest"},"GuestUploadRequest":{"properties":{"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"},"content_type":{"type":"string","pattern":"^image/(png|jpeg|webp)$","title":"Content Type","default":"image/jpeg"}},"type":"object","title":"GuestUploadRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HandPreprocessArtifacts":{"properties":{"bare":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bare"},"sam3_masks":{"items":{"type":"string"},"type":"array","title":"Sam3 Masks"},"labeled_overlay":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Labeled Overlay"},"label_viz":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Viz"},"assignment_viz":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignment Viz"},"mask_centroids":{"anyOf":[{"items":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}]},"type":"array"},{"type":"null"}],"title":"Mask Centroids"},"label_response":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Label Response"},"fingertip_bboxes_viz":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fingertip Bboxes Viz"},"assignments":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Assignments"}},"type":"object","title":"HandPreprocessArtifacts","description":"Presigned URLs + parsed JSON for the per-template hand-preprocess\ncache populated by the worker. Surfaces in `GET /api/hand-templates/{id}`.\n\nThe worker writes these artifacts under\n`apps/nail-art/templates/{template_id}/preprocess/` after the first\ntry-on consumes a template; subsequent try-ons hit the cache and\nskip the SAM3 + VLM steps that produced them."},"HandResultResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"hand_idx":{"type":"integer","title":"Hand Idx"},"status":{"type":"string","enum":["charging","running","succeeded","failed","refunded"],"title":"Status"},"hand_s3_key":{"type":"string","title":"Hand S3 Key"},"hand_template_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Hand Template Id"},"hand_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hand Url"},"bare_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bare S3 Key"},"warp_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warp S3 Key"},"final_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final S3 Key"},"final_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Url"},"candidate_s3_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Candidate S3 Keys"},"candidate_urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Candidate Urls"},"candidate_video_urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Candidate Video Urls"},"cents_charged":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cents Charged"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["id","hand_idx","status","hand_s3_key","created_at"],"title":"HandResultResponse"},"HandTemplateAnnotateRequest":{"properties":{"hand_s3_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Hand S3 Key"},"content_type":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Content Type"}},"type":"object","title":"HandTemplateAnnotateRequest","description":"Body for `POST /api/hand-templates/annotate`.\n\nCaller uploaded a hand photo via /api/uploads/standalone-presign; this\nasks the server to suggest pose / skin / aspect / background values for\nthe upload form. The frontend pre-fills the form with the suggestions\nbut the user can still override before saving.\n\nSupplies the raw `hand_s3_key` (validated to the caller's prefix) plus an\noptional `content_type`."},"HandTemplateAnnotateResponse":{"properties":{"pose":{"type":"string","enum":["single_hand","two_hands_layered","fist_flat_dual","holding_prop"],"title":"Pose"},"skin_tone":{"type":"string","enum":["fair","light","medium","tan","deep"],"title":"Skin Tone"},"aspect_ratio":{"type":"string","enum":["1:1","4:5","3:4","16:9"],"title":"Aspect Ratio"},"background":{"type":"string","enum":["white","gradient","extended"],"title":"Background"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"}},"type":"object","required":["pose","skin_tone","aspect_ratio","background","confidence"],"title":"HandTemplateAnnotateResponse","description":"Suggested discriminator values for an uploaded hand photo.\n\n``confidence`` is the LLM's self-reported confidence (0–1). A low\nvalue doesn't gate anything in v1 — the UI can dim the suggestion\nchip or surface a tooltip explaining the user should review."},"HandTemplateAssignmentEntry":{"properties":{"hand":{"type":"string","enum":["left","right"],"title":"Hand"},"finger":{"type":"string","enum":["thumb","index","middle","ring","pinky"],"title":"Finger"},"mask_id":{"type":"integer","minimum":0.0,"title":"Mask Id"}},"type":"object","required":["hand","finger","mask_id"],"title":"HandTemplateAssignmentEntry","description":"One row of the editable assignments table.\n\nThe user maps a (hand, finger) slot to a SAM3 mask index. Swap\nsemantics are enforced server-side: every mask_id present in the\ncached preprocess must appear in exactly one assignment after the\nupdate (the editor UI enforces this client-side too)."},"HandTemplateAssignmentsUpdate":{"properties":{"assignments":{"items":{"$ref":"#/components/schemas/HandTemplateAssignmentEntry"},"type":"array","maxItems":10,"minItems":1,"title":"Assignments"},"finger_flips":{"anyOf":[{"items":{"$ref":"#/components/schemas/HandTemplateFingerFlip"},"type":"array","maxItems":10},{"type":"null"}],"title":"Finger Flips"},"custom_tip_dirs":{"anyOf":[{"items":{"$ref":"#/components/schemas/HandTemplateCustomTipDir"},"type":"array","maxItems":10},{"type":"null"}],"title":"Custom Tip Dirs"}},"type":"object","required":["assignments"],"title":"HandTemplateAssignmentsUpdate","description":"Body for `PATCH /api/hand-templates/{id}/assignments`.\n\nReplaces the cached VLM-derived mapping with the operator-edited\none. The server re-renders `01_hand_assigned.png`, rewrites\n`assignments.json`, and the next try-on against this template\nconsumes the new assignments via the existing preprocess-cache\nhydrate path.\n\n`finger_flips` carries the per-finger base↔tip overrides. It is\noptional with replace-semantics: when omitted (legacy clients) the\nstored flips are preserved; when present it fully replaces them.\n\n`custom_tip_dirs` carries the per-finger fine-tuned tip direction\nvectors (na editor drag). Same optional replace-semantics as\n`finger_flips`: omit to preserve stored dirs, send the full set\n(possibly empty) to overwrite. A finger with a custom dir ignores its\n`finger_flips` entry downstream."},"HandTemplateCandidate":{"properties":{"index":{"type":"integer","maximum":3.0,"minimum":0.0,"title":"Index"},"candidate_url":{"type":"string","title":"Candidate Url"},"passed_anatomy":{"type":"boolean","title":"Passed Anatomy"}},"type":"object","required":["index","candidate_url","passed_anatomy"],"title":"HandTemplateCandidate","description":"One of the N candidates produced by `POST /generate`."},"HandTemplateCustomTipDir":{"properties":{"hand":{"type":"string","enum":["left","right"],"title":"Hand"},"finger":{"type":"string","enum":["thumb","index","middle","ring","pinky"],"title":"Finger"},"dx":{"type":"number","title":"Dx"},"dy":{"type":"number","title":"Dy"}},"type":"object","required":["hand","finger","dx","dy"],"title":"HandTemplateCustomTipDir","description":"One per-finger custom base→tip direction (na editor fine-tune).\n\n`dx`/`dy` are the unit-vector components of the desired tip direction\nin IMAGE space (same frame as the cached masks / `mask_centroids`;\nimage-down is +y). When present for a finger this OVERRIDES the\nauto-computed cluster/long-axis direction AND supersedes any\n`finger_flips` entry for the same finger — the operator's hand-tuned\narrow is the final word. Stored in `assignments.json` as\n`{\"hand.finger\": [dx, dy]}` and consumed by the warp's per-nail tip\ndirection. The editor clamps the draggable angle to a cone around the\nnail's principal axis, so the coarse up/down detection still governs\nwhich end is the tip; this value is the fine-tuned result."},"HandTemplateDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"label":{"type":"string","title":"Label"},"pose":{"type":"string","enum":["single_hand","two_hands_layered","fist_flat_dual","holding_prop"],"title":"Pose"},"skin_tone":{"type":"string","enum":["fair","light","medium","tan","deep"],"title":"Skin Tone"},"aspect_ratio":{"type":"string","enum":["1:1","4:5","3:4","16:9"],"title":"Aspect Ratio"},"background":{"type":"string","enum":["white","gradient","extended"],"title":"Background"},"prop_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prop Slug"},"hand_url":{"type":"string","title":"Hand Url"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"source":{"type":"string","enum":["admin","upload","ai_gen"],"title":"Source"},"is_active":{"type":"boolean","title":"Is Active"},"gen_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gen Prompt"},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner User Id"},"preprocess_ready":{"type":"boolean","title":"Preprocess Ready","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"stage_status":{"additionalProperties":{"type":"string"},"type":"object","title":"Stage Status"},"hand_preprocess":{"anyOf":[{"$ref":"#/components/schemas/HandPreprocessArtifacts"},{"type":"null"}]}},"type":"object","required":["id","slug","label","pose","skin_tone","aspect_ratio","background","hand_url","source","is_active","created_at","updated_at"],"title":"HandTemplateDetailResponse","description":"Single-template detail payload — extends the picker shape with the\nper-template preprocess cache. Returned by `GET /api/hand-templates/{id}`."},"HandTemplateFinalizeRequest":{"properties":{"picked_indices":{"items":{"type":"integer"},"type":"array","maxItems":4,"minItems":1,"title":"Picked Indices"}},"type":"object","required":["picked_indices"],"title":"HandTemplateFinalizeRequest","description":"Body for `POST /api/hand-templates/{draft_id}/finalize`.\n\nThe user may save one OR many candidates from the same draft. The\nfirst picked index keeps the draft row; the rest are cloned into new\n`ai_gen` rows so each finalized candidate becomes its own template."},"HandTemplateFinalizeResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/HandTemplateResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"HandTemplateFinalizeResponse","description":"Returned by `POST /finalize`. One item per saved candidate, in\nthe order the client supplied `picked_indices`."},"HandTemplateFingerFlip":{"properties":{"hand":{"type":"string","enum":["left","right"],"title":"Hand"},"finger":{"type":"string","enum":["thumb","index","middle","ring","pinky"],"title":"Finger"}},"type":"object","required":["hand","finger"],"title":"HandTemplateFingerFlip","description":"One per-finger base↔tip orientation override.\n\nWhen present, the warp flips that finger's tip direction 180° on top\nof whatever the cluster orientation resolves to — the manual fix for\na finger the auto-orientation got backwards (e.g. a reversed pinky)."},"HandTemplateGenerateRequest":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"pose":{"type":"string","enum":["single_hand","two_hands_layered","fist_flat_dual","holding_prop"],"title":"Pose"},"skin_tone":{"type":"string","enum":["fair","light","medium","tan","deep"],"title":"Skin Tone"},"aspect_ratio":{"type":"string","enum":["1:1","4:5","3:4","16:9"],"title":"Aspect Ratio"},"background":{"type":"string","enum":["white","gradient","extended"],"title":"Background","default":"white"},"refinement":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Refinement"}},"type":"object","required":["label","pose","skin_tone","aspect_ratio"],"title":"HandTemplateGenerateRequest","description":"Body for `POST /api/hand-templates/generate`.\n\nDrives the structured form. The optional `refinement` field is the\nonly free-text knob, capped at 120 chars; the rest are enumerated.\nThe server composes a deterministic prompt from these inputs (the\ntemplate lives in the worker / atom code) and fires N parallel Fal\nNB2 candidates. Each candidate is anatomy-validated before\nsurfacing — see §4.7 in the design doc."},"HandTemplateGenerateResponse":{"properties":{"draft_template_id":{"type":"string","format":"uuid","title":"Draft Template Id"},"candidates":{"items":{"$ref":"#/components/schemas/HandTemplateCandidate"},"type":"array","title":"Candidates"},"composed_prompt":{"type":"string","title":"Composed Prompt"},"cents_charged":{"type":"integer","title":"Cents Charged"},"charge_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Charge Id"}},"type":"object","required":["draft_template_id","candidates","composed_prompt","cents_charged"],"title":"HandTemplateGenerateResponse","description":"Returned by `POST /generate`. Frontend renders the candidates +\nwaits for the user to call `POST /{id}/finalize` with a picked\nindex. The draft row stays in storage but is invisible from the\npicker until finalize promotes it."},"HandTemplateListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/HandTemplateResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"HandTemplateListResponse","description":"Picker payload — admin first, then user-saved newest-first.\n\nThe route returns admin + user rows in one shot because the picker\nshows them side-by-side; the source badge differentiates them in the\nUI. No pagination in v1 — admin catalog is <50 rows and user rows\nare scoped per-user; we'll add cursors if/when a power user crosses\na few hundred saved templates."},"HandTemplateMaskEntry":{"properties":{"mask_id":{"type":"integer","minimum":0.0,"title":"Mask Id"},"png_base64":{"type":"string","title":"Png Base64"}},"type":"object","required":["mask_id","png_base64"],"title":"HandTemplateMaskEntry","description":"One user-tuned SAM3 mask. `png_base64` is a single-channel\nbinary PNG (any nonzero pixel = foreground). Dimensions must\nmatch the cached bare image; the backend re-normalizes to 0/255."},"HandTemplateMasksUpdate":{"properties":{"masks":{"items":{"$ref":"#/components/schemas/HandTemplateMaskEntry"},"type":"array","title":"Masks"}},"type":"object","required":["masks"],"title":"HandTemplateMasksUpdate","description":"Body of `PATCH /api/hand-templates/{id}/masks` — overwrites a\nsubset of the cached SAM3 masks with hand-tuned versions from the\nmask editor. Each `mask_id` must be unique and in `[0, N)` where N\nis the count of cached masks; un-submitted entries keep their\nexisting bytes."},"HandTemplateMetadataUpdate":{"properties":{"pose":{"anyOf":[{"type":"string","enum":["single_hand","two_hands_layered","fist_flat_dual","holding_prop"]},{"type":"null"}],"title":"Pose"},"skin_tone":{"anyOf":[{"type":"string","enum":["fair","light","medium","tan","deep"]},{"type":"null"}],"title":"Skin Tone"}},"type":"object","title":"HandTemplateMetadataUpdate","description":"Body for `PATCH /api/hand-templates/{id}`.\n\nLets the user fix pose / skin-tone on their own templates after\nupload — the auto-annotation occasionally guesses wrong, and the\nvalues feed downstream prompt composition. Both fields are optional:\nonly present keys are written. Aspect ratio / background / source\nare intentionally not editable here (aspect feeds image dims that\nwere already baked at upload time)."},"HandTemplateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"label":{"type":"string","title":"Label"},"pose":{"type":"string","enum":["single_hand","two_hands_layered","fist_flat_dual","holding_prop"],"title":"Pose"},"skin_tone":{"type":"string","enum":["fair","light","medium","tan","deep"],"title":"Skin Tone"},"aspect_ratio":{"type":"string","enum":["1:1","4:5","3:4","16:9"],"title":"Aspect Ratio"},"background":{"type":"string","enum":["white","gradient","extended"],"title":"Background"},"prop_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prop Slug"},"hand_url":{"type":"string","title":"Hand Url"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"source":{"type":"string","enum":["admin","upload","ai_gen"],"title":"Source"},"is_active":{"type":"boolean","title":"Is Active"},"gen_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gen Prompt"},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner User Id"},"preprocess_ready":{"type":"boolean","title":"Preprocess Ready","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","slug","label","pose","skin_tone","aspect_ratio","background","hand_url","source","is_active","created_at","updated_at"],"title":"HandTemplateResponse","description":"One row from the picker. Used by `GET /api/hand-templates` and\nevery `POST` that returns a single template."},"HandTemplateUploadRequest":{"properties":{"label":{"type":"string","maxLength":120,"minLength":1,"title":"Label"},"pose":{"type":"string","enum":["single_hand","two_hands_layered","fist_flat_dual","holding_prop"],"title":"Pose"},"skin_tone":{"type":"string","enum":["fair","light","medium","tan","deep"],"title":"Skin Tone"},"aspect_ratio":{"type":"string","enum":["1:1","4:5","3:4","16:9"],"title":"Aspect Ratio"},"background":{"type":"string","enum":["white","gradient","extended"],"title":"Background","default":"white"},"hand_s3_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Hand S3 Key"}},"type":"object","required":["label","pose","skin_tone","aspect_ratio"],"title":"HandTemplateUploadRequest","description":"Body for `POST /api/hand-templates/upload`.\n\nPromotes an uploaded hand photo into a permanent template row with the\nuser's chosen knobs. The client uploads via\n/api/uploads/standalone-presign and supplies the raw `hand_s3_key`\n(validated server-side to the caller's own prefix)."},"HealthHistoryResponse":{"properties":{"component":{"type":"string","title":"Component"},"display_name":{"type":"string","title":"Display Name"},"category":{"type":"string","title":"Category"},"data":{"items":{"$ref":"#/components/schemas/ComponentStatus"},"type":"array","title":"Data"}},"type":"object","required":["component","display_name","category","data"],"title":"HealthHistoryResponse","description":"Time-series history for a specific component."},"HealthReportResponse":{"properties":{"overall_status":{"type":"string","title":"Overall Status"},"summary":{"type":"string","title":"Summary"},"anomalies":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Anomalies"},"total_components":{"type":"integer","title":"Total Components"},"healthy_count":{"type":"integer","title":"Healthy Count"}},"type":"object","required":["overall_status","summary","anomalies","total_components","healthy_count"],"title":"HealthReportResponse","description":"Agent-friendly health report — only anomalies."},"HealthResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"plugins_loaded":{"type":"integer","title":"Plugins Loaded"},"plugin_slugs":{"items":{"type":"string"},"type":"array","title":"Plugin Slugs"}},"type":"object","required":["ok","plugins_loaded","plugin_slugs"],"title":"HealthResponse"},"HealthSummaryResponse":{"properties":{"overall_status":{"type":"string","title":"Overall Status"},"last_check":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Check"},"categories":{"additionalProperties":{"$ref":"#/components/schemas/CategorySummary"},"type":"object","title":"Categories"},"total_components":{"type":"integer","title":"Total Components"},"healthy_count":{"type":"integer","title":"Healthy Count"}},"type":"object","required":["overall_status","last_check","categories","total_components","healthy_count"],"title":"HealthSummaryResponse","description":"Full health summary — all components grouped by category."},"HeartbeatTaskAddRequest":{"properties":{"text":{"type":"string","title":"Text"}},"type":"object","required":["text"],"title":"HeartbeatTaskAddRequest","description":"Request to add a new heartbeat task via natural language."},"HeartbeatTaskToggleRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"HeartbeatTaskToggleRequest","description":"Toggle a heartbeat task on/off."},"ImageUrlResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"ImageUrlResponse"},"ImportGarmentRequest":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"}},"type":"object","required":["project_id"],"title":"ImportGarmentRequest"},"ImportRowsError":{"properties":{"row_idx":{"type":"integer","title":"Row Idx"},"column_id":{"type":"string","title":"Column Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["row_idx","column_id","message"],"title":"ImportRowsError"},"ImportRowsRequest":{"properties":{"rows":{"items":{"additionalProperties":true,"propertyNames":{"format":"uuid"},"type":"object"},"type":"array","title":"Rows"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["rows"],"title":"ImportRowsRequest","description":"POST /tables/{id}/import body.\n\n`rows` is a list of `{column_id: value}` dicts. Unknown column_ids\nare reported in `response.errors[]` and skipped; the row is still\ncreated. `dry_run` validates without committing — the FE uses this\nto surface validation errors during the column-mapping step."},"ImportRowsResponse":{"properties":{"rows_created":{"type":"integer","title":"Rows Created"},"cells_written":{"type":"integer","title":"Cells Written"},"errors":{"items":{"$ref":"#/components/schemas/ImportRowsError"},"type":"array","title":"Errors"}},"type":"object","required":["rows_created","cells_written","errors"],"title":"ImportRowsResponse"},"InlineFileRef":{"properties":{"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Id"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"role":{"type":"string","title":"Role","default":"reference"}},"type":"object","title":"InlineFileRef","description":"A file reference by S3 key (for agent-side creation) or file_id (for UI)."},"InstallAppRequest":{"properties":{"slug":{"type":"string","maxLength":64,"minLength":1,"title":"Slug"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json"}},"type":"object","required":["slug"],"title":"InstallAppRequest"},"InstallFromCatalogRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"}},"type":"object","required":["agent_id"],"title":"InstallFromCatalogRequest"},"InstallationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_slug":{"type":"string","title":"App Slug"},"installed_by":{"type":"string","format":"uuid","title":"Installed By"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"config_json":{"additionalProperties":true,"type":"object","title":"Config Json"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"uninstalled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Uninstalled At"}},"type":"object","required":["id","app_slug","installed_by","team_id","config_json","created_at","uninstalled_at"],"title":"InstallationResponse"},"InvitationInfoResponse":{"properties":{"team_name":{"type":"string","title":"Team Name"},"team_plan":{"type":"string","title":"Team Plan"},"inviter_email":{"type":"string","title":"Inviter Email"},"role":{"type":"string","title":"Role"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["team_name","team_plan","inviter_email","role","expires_at"],"title":"InvitationInfoResponse"},"InviteCreateRequest":{"properties":{"email":{"type":"string","title":"Email"},"plan":{"type":"string","title":"Plan","default":"starter"},"max_agent_slots":{"type":"integer","minimum":1.0,"title":"Max Agent Slots","default":1},"initial_credits_cents":{"type":"integer","minimum":0.0,"title":"Initial Credits Cents","default":0},"is_whitelisted":{"type":"boolean","title":"Is Whitelisted","default":true},"whitelist_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whitelist Note"},"whitelist_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Whitelist Expires At"}},"type":"object","required":["email"],"title":"InviteCreateRequest","description":"Create a whitelist invite."},"InviteInfoResponse":{"properties":{"email":{"type":"string","title":"Email"},"plan":{"type":"string","title":"Plan"},"max_agent_slots":{"type":"integer","title":"Max Agent Slots"},"initial_credits_cents":{"type":"integer","title":"Initial Credits Cents"},"is_whitelisted":{"type":"boolean","title":"Is Whitelisted"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["email","plan","max_agent_slots","initial_credits_cents","is_whitelisted","expires_at"],"title":"InviteInfoResponse"},"InviteListResponse":{"properties":{"invites":{"items":{"$ref":"#/components/schemas/InviteResponse"},"type":"array","title":"Invites"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["invites","total"],"title":"InviteListResponse","description":"List of invites."},"InviteResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"invite_token":{"type":"string","title":"Invite Token"},"plan":{"type":"string","title":"Plan"},"max_agent_slots":{"type":"integer","title":"Max Agent Slots"},"initial_credits_cents":{"type":"integer","title":"Initial Credits Cents"},"is_whitelisted":{"type":"boolean","title":"Is Whitelisted"},"whitelist_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whitelist Note"},"whitelist_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Whitelist Expires At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"redeemed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Redeemed At"},"redeemed_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Redeemed By"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","invite_token","plan","max_agent_slots","initial_credits_cents","is_whitelisted","whitelist_note","expires_at","redeemed_at","redeemed_by","created_by","created_at"],"title":"InviteResponse","description":"Single invite record."},"JobCreateRequest":{"properties":{"nail_set_s3_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Nail Set S3 Key"},"nail_set_label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Nail Set Label"},"hand_s3_keys":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":5},{"type":"null"}],"title":"Hand S3 Keys"},"hand_template_ids":{"anyOf":[{"items":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"type":"array","maxItems":5},{"type":"null"}],"title":"Hand Template Ids"},"harmonize_num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Harmonize Num Images","default":2},"nail_shape":{"anyOf":[{"type":"string","enum":["almond","square","coffin","round","oval","squoval","stiletto"]},{"type":"null"}],"title":"Nail Shape"},"nail_length":{"anyOf":[{"type":"string","enum":["super_short","short","medium","long"]},{"type":"null"}],"title":"Nail Length"},"shape_terms":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Shape Terms"},"output_aspect":{"anyOf":[{"type":"string","enum":["auto","21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16","4:1","1:4","8:1","1:8"]},{"type":"null"}],"title":"Output Aspect"},"output_max_kb":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":100.0},{"type":"null"}],"title":"Output Max Kb"},"output_format":{"anyOf":[{"type":"string","enum":["png","jpg","webp"]},{"type":"null"}],"title":"Output Format"},"output_resolution":{"anyOf":[{"type":"string","enum":["2K","4K"]},{"type":"null"}],"title":"Output Resolution"},"collection_tag":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Collection Tag"}},"type":"object","title":"JobCreateRequest","description":"Frontend posts this after uploading hand images + selecting a nail-set.\n\nInputs are raw S3 keys: `nail_set_s3_key` + `hand_s3_keys`, uploaded via\n`/api/uploads/standalone-presign` under the caller's own prefix (or\npre-seeded admin nail-sets / curated-gallery keys). They're scope- +\nexistence-validated server-side before the job is accepted.\n\nDEPRECATED — direct hand upload: a hand with a `None` entry in\n`hand_template_ids` (or no `hand_template_ids` at all) is an ad-hoc,\nuser-uploaded hand that runs the full strip + SAM3 + VLM preprocess.\nThe frontend no longer offers direct hand upload — all hands now come\nfrom curated hand templates — so this is retained only for in-flight /\nlegacy jobs and is slated for removal. New callers SHOULD supply a\n`hand_template_id` per hand. (Per-finger custom directions also only\napply on the template path; the worker logs a DEPRECATED warning when a\nhand arrives without a template.)"},"JobCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"series_id":{"type":"string","format":"uuid","title":"Series Id"},"status":{"type":"string","enum":["draft","pending","running","succeeded","failed"],"title":"Status"},"nail_set_s3_key":{"type":"string","title":"Nail Set S3 Key"},"hands":{"items":{"$ref":"#/components/schemas/HandResultResponse"},"type":"array","title":"Hands"},"total_cents_charged":{"type":"integer","title":"Total Cents Charged"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","series_id","status","nail_set_s3_key","hands","total_cents_charged","created_at"],"title":"JobCreateResponse"},"JobDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["draft","pending","running","succeeded","failed"],"title":"Status"},"nail_set_s3_key":{"type":"string","title":"Nail Set S3 Key"},"nail_set_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nail Set Url"},"nail_set_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nail Set Label"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"hands":{"items":{"$ref":"#/components/schemas/HandResultResponse"},"type":"array","title":"Hands"},"total_cents_charged":{"type":"integer","title":"Total Cents Charged"},"total_cents_refunded":{"type":"integer","title":"Total Cents Refunded"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["id","status","nail_set_s3_key","nail_set_label","error_message","hands","total_cents_charged","total_cents_refunded","created_at","started_at","finished_at"],"title":"JobDetailResponse"},"JobDraftResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["draft","pending","running","succeeded","failed"],"title":"Status","default":"draft"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","created_at"],"title":"JobDraftResponse","description":"Minimal payload returned by `POST /api/jobs/draft`.\n\nThe frontend uses the returned `id` to scope subsequent presign calls\nso input uploads land under `apps/nail-art/{id}/inputs/`. The job\nstays in 'draft' status — invisible in History — until `/submit`\nflips it to running with charges + SQS enqueue."},"JobListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/JobSeriesResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["items"],"title":"JobListResponse"},"JobSeriesResponse":{"properties":{"series_id":{"type":"string","format":"uuid","title":"Series Id"},"status":{"type":"string","enum":["draft","pending","running","succeeded","failed"],"title":"Status"},"nail_set_s3_key":{"type":"string","title":"Nail Set S3 Key"},"nail_set_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nail Set Url"},"nail_set_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nail Set Label"},"hands":{"items":{"$ref":"#/components/schemas/HandResultResponse"},"type":"array","title":"Hands"},"total_cents_charged":{"type":"integer","title":"Total Cents Charged"},"total_cents_refunded":{"type":"integer","title":"Total Cents Refunded"},"run_count":{"type":"integer","title":"Run Count"},"last_run_at":{"type":"string","format":"date-time","title":"Last Run At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"hand_s3_keys":{"items":{"type":"string"},"type":"array","title":"Hand S3 Keys"},"run_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Run Ids"},"kind":{"type":"string","enum":["try_on","thumbnail_gen","lifestyle_gen","nail_video_gen"],"title":"Kind","default":"try_on"},"thumbnail_meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Thumbnail Meta"},"lifestyle_meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lifestyle Meta"},"nail_video_meta":{"anyOf":[{"$ref":"#/components/schemas/NailVideoSeriesMeta"},{"type":"null"}]}},"type":"object","required":["series_id","status","nail_set_s3_key","nail_set_label","hands","total_cents_charged","total_cents_refunded","run_count","last_run_at","created_at","hand_s3_keys","run_ids"],"title":"JobSeriesResponse","description":"Collapsed view of all runs sharing the same inputs.\n\nSame nail-set + same set of hand source images = one series; the\nseries's `hands` array carries the union of variants across every\nrun, newest-first. Used by `GET /api/jobs` so re-generations with\nidentical inputs fold into one History row instead of N."},"KitAssetsRequest":{"properties":{"s3_keys":{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1,"title":"S3 Keys"},"kind":{"type":"string","pattern":"^(tryon|pose)$","title":"Kind"}},"type":"object","required":["s3_keys","kind"],"title":"KitAssetsRequest"},"LeaveTeamRequest":{"properties":{"agent_disposition":{"type":"string","pattern":"^(transfer|take)$","title":"Agent Disposition","default":"transfer"}},"type":"object","title":"LeaveTeamRequest"},"LifestyleGenerateRequest":{"properties":{"source_s3_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Source S3 Key"},"source_series_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Series Id"},"reference_s3_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Reference S3 Key"},"prompt":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Prompt"},"num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Images","default":2},"nail_set_label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Nail Set Label"},"output_aspect":{"anyOf":[{"type":"string","enum":["auto","21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16","4:1","1:4","8:1","1:8"]},{"type":"null"}],"title":"Output Aspect"},"output_resolution":{"anyOf":[{"type":"string","enum":["2K","4K"]},{"type":"null"}],"title":"Output Resolution"}},"type":"object","title":"LifestyleGenerateRequest","description":"POST `/api/lifestyle/generate` body.\n\nRe-renders a finished try-on image (`source`) as a lifestyle showcase\nshot. The optional `reference` image is a STYLE/MOOD reference (lighting,\npalette, framing — NOT a literal background) and `prompt` describes the\nscene in words. At least one of `reference` / `prompt` must be present.\n\nAsync like try-on: returns a `JobCreateResponse`; the N variants land in\n`hands[0].candidate_urls`, polled via `getJob`."},"ListAddRequest":{"properties":{"kind":{"type":"string","pattern":"^(black|white)$","title":"Kind"},"emails":{"items":{"type":"string"},"type":"array","maxItems":2000,"minItems":1,"title":"Emails"},"note":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Note"}},"type":"object","required":["kind","emails"],"title":"ListAddRequest"},"ListingCopyRequest":{"properties":{"language":{"type":"string","pattern":"^(en|zh-CN)$","title":"Language","default":"en"},"platform":{"anyOf":[{"type":"string","pattern":"^(shopify|etsy|amazon)$"},{"type":"null"}],"title":"Platform"},"brand_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Brand Name"},"product_category":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Product Category"},"known_facts":{"items":{"type":"string"},"type":"array","maxItems":12,"title":"Known Facts"},"target_market":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Target Market"},"price_tier":{"anyOf":[{"type":"string","pattern":"^(budget|mid|premium)$"},{"type":"null"}],"title":"Price Tier"},"brand_voice":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Brand Voice"},"primary_keyword":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Primary Keyword"},"secondary_keywords":{"items":{"type":"string"},"type":"array","maxItems":12,"title":"Secondary Keywords"},"banned_words":{"items":{"type":"string"},"type":"array","maxItems":24,"title":"Banned Words"},"title_case":{"type":"boolean","title":"Title Case","default":false},"use_shop_context":{"type":"boolean","title":"Use Shop Context","default":true}},"type":"object","title":"ListingCopyRequest","description":"The Listing Pack request — everything beyond ``language`` is the FE\nsettings panel, all optional; explicit values beat Radar-derived ones."},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LookupAgentItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"owner_user_id":{"type":"string","title":"Owner User Id"},"owner_email":{"type":"string","title":"Owner Email"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"session_count":{"type":"integer","title":"Session Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Active At"}},"type":"object","required":["id","name","status","owner_user_id","owner_email","team_id","team_name","session_count","created_at","last_active_at"],"title":"LookupAgentItem"},"LookupResponse":{"properties":{"agents":{"items":{"$ref":"#/components/schemas/LookupAgentItem"},"type":"array","title":"Agents"},"sessions":{"items":{"$ref":"#/components/schemas/LookupSessionItem"},"type":"array","title":"Sessions"},"total_agents":{"type":"integer","title":"Total Agents"},"total_sessions":{"type":"integer","title":"Total Sessions"}},"type":"object","required":["agents","sessions","total_agents","total_sessions"],"title":"LookupResponse"},"LookupSessionItem":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"agent_id":{"type":"string","title":"Agent Id"},"agent_name":{"type":"string","title":"Agent Name"},"user_id":{"type":"string","title":"User Id"},"user_email":{"type":"string","title":"User Email"},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"message_count":{"type":"integer","title":"Message Count"},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["conversation_id","title","agent_id","agent_name","user_id","user_email","team_id","team_name","message_count","last_message_at","created_at","updated_at"],"title":"LookupSessionItem"},"ManagerKnowledgeUpdate":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"ManagerKnowledgeUpdate"},"ManagerUploadRequest":{"properties":{"files":{"items":{"$ref":"#/components/schemas/FileInfo"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"ManagerUploadRequest"},"MemoryCreate":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"text":{"type":"string","maxLength":500,"minLength":1,"title":"Text"},"kind":{"type":"string","enum":["preference","fact","instruction","observation","skill_outcome"],"title":"Kind","default":"preference"},"source":{"type":"string","enum":["chat_user_explicit","chat_inferred","heartbeat","admin","skill","memory_md","memory_dir"],"title":"Source","default":"chat_user_explicit"},"source_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Message Id"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","default":0.95},"pinned":{"type":"boolean","title":"Pinned","default":false}},"type":"object","required":["agent_id","text"],"title":"MemoryCreate","description":"Internal write payload (X-Internal-Key auth path).\n\nUsed by skill callbacks and other server-side writers. User-facing\nwrites happen via /workspace/MEMORY.md (indexed by memory_file_sync),\nnot this endpoint directly."},"MemoryItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"text":{"type":"string","title":"Text"},"kind":{"type":"string","enum":["preference","fact","instruction","observation","skill_outcome"],"title":"Kind"},"source":{"type":"string","enum":["chat_user_explicit","chat_inferred","heartbeat","admin","skill","memory_md","memory_dir"],"title":"Source"},"source_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Message Id"},"confidence":{"type":"number","title":"Confidence"},"pinned":{"type":"boolean","title":"Pinned"},"hit_count":{"type":"integer","title":"Hit Count"},"last_recalled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Recalled At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","agent_id","user_id","text","kind","source","source_message_id","confidence","pinned","hit_count","last_recalled_at","expires_at","created_at","updated_at"],"title":"MemoryItem","description":"A single memory row — what list/detail endpoints return."},"MemoryList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MemoryItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"MemoryList"},"MemoryUpdate":{"properties":{"text":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Text"},"kind":{"anyOf":[{"type":"string","enum":["preference","fact","instruction","observation","skill_outcome"]},{"type":"null"}],"title":"Kind"},"pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence"}},"type":"object","title":"MemoryUpdate","description":"User-facing PATCH payload — pin/unpin, edit text/kind, owner-only.\n\n`confidence` adjustments are admin-only — the route layer enforces\nthat. We accept the field here so admins can pass it through the\nsame shape."},"MetricCard":{"properties":{"label":{"type":"string","title":"Label"},"value":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Value"},"change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change"}},"type":"object","required":["label","value"],"title":"MetricCard","description":"Single metric card."},"MetricDataPoint":{"properties":{"metric_date":{"type":"string","format":"date","title":"Metric Date"},"followers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Followers"},"views_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Views Total"},"avg_watch_time_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Watch Time Seconds"},"avg_completion_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Completion Rate"},"posts_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Posts Count"},"comments_received":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Comments Received"}},"type":"object","required":["metric_date"],"title":"MetricDataPoint"},"MigrateBatchRequest":{"properties":{"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier","description":"Filter by tier (optional)"},"status":{"type":"string","title":"Status","description":"Filter by status","default":"active"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","description":"Max agents to migrate in this batch","default":10}},"type":"object","title":"MigrateBatchRequest"},"MigrateEc2Response":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"service_arn":{"type":"string","title":"Service Arn"},"ebs_volume_id":{"type":"string","title":"Ebs Volume Id"},"launch_type":{"type":"string","title":"Launch Type"}},"type":"object","required":["agent_id","service_arn","ebs_volume_id","launch_type"],"title":"MigrateEc2Response"},"MultipartAbortRequest":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"upload_id":{"type":"string","title":"Upload Id"},"s3_key":{"type":"string","title":"S3 Key"}},"type":"object","required":["file_id","upload_id","s3_key"],"title":"MultipartAbortRequest"},"MultipartCompleteRequest":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"upload_id":{"type":"string","title":"Upload Id"},"s3_key":{"type":"string","title":"S3 Key"},"parts":{"items":{"$ref":"#/components/schemas/MultipartPartETag"},"type":"array","maxItems":10000,"minItems":1,"title":"Parts"}},"type":"object","required":["file_id","upload_id","s3_key","parts"],"title":"MultipartCompleteRequest"},"MultipartCreateRequest":{"properties":{"filename":{"type":"string","maxLength":500,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":100,"minLength":1,"title":"Content Type"},"size_bytes":{"type":"integer","maximum":524288000.0,"exclusiveMinimum":0.0,"title":"Size Bytes"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"}},"type":"object","required":["filename","content_type","size_bytes"],"title":"MultipartCreateRequest"},"MultipartCreateResponse":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"upload_id":{"type":"string","title":"Upload Id"},"s3_key":{"type":"string","title":"S3 Key"},"part_size":{"type":"integer","title":"Part Size"},"part_count":{"type":"integer","title":"Part Count"}},"type":"object","required":["file_id","upload_id","s3_key","part_size","part_count"],"title":"MultipartCreateResponse"},"MultipartPartETag":{"properties":{"PartNumber":{"type":"integer","title":"Partnumber"},"ETag":{"type":"string","title":"Etag"}},"type":"object","required":["PartNumber","ETag"],"title":"MultipartPartETag"},"MultipartPresignPartsRequest":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"upload_id":{"type":"string","title":"Upload Id"},"s3_key":{"type":"string","title":"S3 Key"},"part_numbers":{"items":{"type":"integer"},"type":"array","maxItems":10000,"minItems":1,"title":"Part Numbers"}},"type":"object","required":["file_id","upload_id","s3_key","part_numbers"],"title":"MultipartPresignPartsRequest"},"MultipartPresignPartsResponse":{"properties":{"urls":{"items":{"$ref":"#/components/schemas/PresignedPart"},"type":"array","title":"Urls"}},"type":"object","required":["urls"],"title":"MultipartPresignPartsResponse"},"NailLookupResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/NailLookupUserItem"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["users","total"],"title":"NailLookupResponse"},"NailLookupUserItem":{"properties":{"user_id":{"type":"string","title":"User Id"},"user_email":{"type":"string","title":"User Email"}},"type":"object","required":["user_id","user_email"],"title":"NailLookupUserItem"},"NailSetPreflightRequest":{"properties":{"nail_set_s3_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Nail Set S3 Key"}},"type":"object","title":"NailSetPreflightRequest","description":"调用者经 /api/uploads/standalone-presign 上传了甲片图,给出其原始 s3_key\n(校验必须落在调用者自己的 standalone 前缀下,防跨用户 key 注入)。"},"NailSetPreflightResponse":{"properties":{"usable":{"type":"boolean","title":"Usable"},"blocking_problems":{"items":{"type":"string"},"type":"array","title":"Blocking Problems"},"nail_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nail Count"}},"type":"object","required":["usable","blocking_problems"],"title":"NailSetPreflightResponse","description":"可试戴度预检结果 —— **只返回标记码,不返回任何文案**。前端用 i18n 把\n`blocking_problems` 里的码 map 成本地化文字。usable=false 当且仅当存在阻断\n问题;前端据此决定是否弹「建议先用 thumbnail」的引导(不阻断 try-on)。"},"NailVideoGenerateRequest":{"properties":{"source_s3_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Source S3 Key"},"source_series_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Series Id"},"template_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Template Id"},"template_s3_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Template S3 Key"},"num_videos":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Num Videos","default":1},"duration_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration S"},"output_aspect":{"anyOf":[{"type":"string","enum":["auto","21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16","4:1","1:4","8:1","1:8"]},{"type":"null"}],"title":"Output Aspect"},"nail_set_label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Nail Set Label"}},"type":"object","title":"NailVideoGenerateRequest","description":"POST `/api/nail-video/generate` body.\n\nReplaces the nail tips in a stored TEMPLATE VIDEO (resolved server-side from\n`template_id`) with the nails shown in the uploaded `source` image, via fal\nSeedance. The client never supplies a raw video key — only the catalog\n`template_id`.\n\nAsync like try-on / lifestyle: returns a `JobCreateResponse`; the N output\nMP4s land in `hands[0].candidate_video_urls`, polled via `getJob`."},"NailVideoSeriesMeta":{"properties":{"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"},"template_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Label"},"aspect_ratio":{"anyOf":[{"type":"string","enum":["auto","21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16","4:1","1:4","8:1","1:8"]},{"type":"null"}],"title":"Aspect Ratio"},"duration_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration S"},"source_from_tryon":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Source From Tryon"}},"type":"object","title":"NailVideoSeriesMeta","description":"Subset of `nail_video_meta` JSONB surfaced for the History Regenerate\nflow. Mirrors the non-image fields of `NailVideoGenerateRequest`."},"NailVideoTemplateItem":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"video_url":{"type":"string","title":"Video Url"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["id","label","video_url"],"title":"NailVideoTemplateItem","description":"One catalog entry as the app's Video picker consumes it.\n\n``id`` is the slug (the value the client sends back as ``template_id``).\n``video_url`` is a presigned GET URL the picker plays as a muted loop."},"NailVideoTemplateListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NailVideoTemplateItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"NailVideoTemplateListResponse"},"NextDispatched":{"properties":{"step_id":{"type":"string","title":"Step Id"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["step_id"],"title":"NextDispatched"},"NotificationListResponse":{"properties":{"notifications":{"items":{"$ref":"#/components/schemas/NotificationResponse"},"type":"array","title":"Notifications"},"total":{"type":"integer","title":"Total"},"unread_count":{"type":"integer","title":"Unread Count"}},"type":"object","required":["notifications","total","unread_count"],"title":"NotificationListResponse","description":"Paginated notification list."},"NotificationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"event_type":{"type":"string","title":"Event Type"},"title":{"type":"string","title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"read":{"type":"boolean","title":"Read"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","agent_id","event_type","title","body","read","created_at"],"title":"NotificationResponse","description":"Single notification."},"NotifyEmailBody":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"}},"type":"object","title":"NotifyEmailBody"},"OfficialAppAdminResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"kind":{"type":"string","title":"Kind"},"embed_origin":{"type":"string","title":"Embed Origin"},"embed_path":{"type":"string","title":"Embed Path"},"requires_credentials":{"items":{"type":"string"},"type":"array","title":"Requires Credentials"},"is_listed":{"type":"boolean","title":"Is Listed"},"meter_units":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Meter Units","default":[]},"platform_fee_bps":{"type":"integer","title":"Platform Fee Bps","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["slug","title","description","icon_url","kind","embed_origin","embed_path","requires_credentials","is_listed","created_at","updated_at"],"title":"OfficialAppAdminResponse","description":"Catalog row as seen by an admin (includes is_listed + updated_at)."},"OfficialAppAdminUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Icon Url"},"embed_origin":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Embed Origin"},"embed_path":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Embed Path"},"requires_credentials":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Requires Credentials"},"is_listed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Listed"},"meter_units":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Meter Units"},"platform_fee_bps":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Platform Fee Bps"}},"type":"object","title":"OfficialAppAdminUpdateRequest","description":"Editable fields for admin catalog edits.\n\nSlug + kind are immutable; create a new row to change them."},"OfficialAppCatalogEntry":{"properties":{"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"kind":{"type":"string","title":"Kind"},"embed_origin":{"type":"string","title":"Embed Origin"},"embed_path":{"type":"string","title":"Embed Path"},"requires_credentials":{"items":{"type":"string"},"type":"array","title":"Requires Credentials"},"installed":{"type":"boolean","title":"Installed"},"installation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Installation Id"}},"type":"object","required":["slug","title","description","icon_url","kind","embed_origin","embed_path","requires_credentials","installed"],"title":"OfficialAppCatalogEntry","description":"One catalog card the user sees in the Apps view."},"OfficialAppTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"}},"type":"object","required":["token","expires_in_seconds"],"title":"OfficialAppTokenResponse"},"OnboardingRequest":{"properties":{"name":{"type":"string","title":"Name"},"about":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"About"},"niche_industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Niche Industry"},"professional_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Professional Role"},"language_preference":{"type":"string","title":"Language Preference","default":"English"}},"type":"object","required":["name"],"title":"OnboardingRequest"},"OutreachEvent":{"properties":{"email":{"type":"string","maxLength":320,"title":"Email"},"event":{"type":"string","pattern":"^(check|sent|stop)$","title":"Event"}},"type":"object","required":["email","event"],"title":"OutreachEvent"},"OutreachSeedRequest":{"properties":{"to":{"type":"string","maxLength":255,"minLength":3,"title":"To"},"subject":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Subject"},"body":{"anyOf":[{"type":"string","maxLength":1500},{"type":"null"}],"title":"Body"},"confirm":{"type":"boolean","title":"Confirm","default":false}},"type":"object","required":["to"],"title":"OutreachSeedRequest"},"OverviewResponse":{"properties":{"total_users":{"$ref":"#/components/schemas/MetricCard"},"paying_users":{"$ref":"#/components/schemas/MetricCard"},"mrr_cents":{"$ref":"#/components/schemas/MetricCard"},"credits_consumed":{"$ref":"#/components/schemas/MetricCard"},"whitelisted_users":{"$ref":"#/components/schemas/MetricCard"}},"type":"object","required":["total_users","paying_users","mrr_cents","credits_consumed","whitelisted_users"],"title":"OverviewResponse","description":"Dashboard overview — key metric cards.\n\nAgent-platform cards (total/active agents) were dropped 2026-07-07 when\nthe AI-employee product was retired; paying_users now means active\nstudio subscriptions."},"OverviewStatsResponse":{"properties":{"total_agents":{"type":"integer","title":"Total Agents"},"total_followers":{"type":"integer","title":"Total Followers"},"total_views":{"type":"integer","title":"Total Views"},"total_credits_spent":{"type":"integer","title":"Total Credits Spent"},"agents":{"items":{"$ref":"#/components/schemas/AgentAnalyticsResponse"},"type":"array","title":"Agents"}},"type":"object","required":["total_agents","total_followers","total_views","total_credits_spent","agents"],"title":"OverviewStatsResponse"},"PaginatedMessages":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/GroupMessageResponse"},"type":"array","title":"Messages"},"has_more":{"type":"boolean","title":"Has More"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["messages","has_more"],"title":"PaginatedMessages"},"PasswordResetConfirm":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"},"new_password":{"type":"string","minLength":8,"title":"New Password"}},"type":"object","required":["email","code","new_password"],"title":"PasswordResetConfirm"},"PasswordResetRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"PasswordResetRequest"},"PasswordResetResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"PasswordResetResponse"},"PatchRecipe":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"}},"type":"object","title":"PatchRecipe"},"PatchUserRecipe":{"properties":{"recipe_key":{"type":"string","title":"Recipe Key"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger"}},"type":"object","required":["recipe_key"],"title":"PatchUserRecipe"},"PersonaGenerateRequest":{"properties":{"mode":{"type":"string","title":"Mode"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"target_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Handle"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"about":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"About"},"niche":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Niche"},"occupation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occupation"},"tone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tone"},"role_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Template"},"document_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Document Keys"},"doc_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Description"}},"type":"object","required":["mode"],"title":"PersonaGenerateRequest"},"PersonaResponse":{"properties":{"character_json":{"additionalProperties":true,"type":"object","title":"Character Json"},"style_analysis":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Style Analysis"}},"type":"object","required":["character_json"],"title":"PersonaResponse"},"PlaidExchangeTokenRequest":{"properties":{"public_token":{"type":"string","title":"Public Token"},"institution_id":{"type":"string","title":"Institution Id","default":""},"institution_name":{"type":"string","title":"Institution Name","default":""},"account_ids":{"items":{"type":"string"},"type":"array","title":"Account Ids","default":[]},"scope_level":{"type":"string","maxLength":20,"title":"Scope Level","default":"read_only"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"},"agent_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Agent Ids","default":[]}},"type":"object","required":["public_token"],"title":"PlaidExchangeTokenRequest"},"PlaidLinkTokenRequest":{"properties":{"scope_level":{"type":"string","maxLength":20,"title":"Scope Level","default":"read_only"}},"type":"object","title":"PlaidLinkTokenRequest"},"PlaidLinkTokenResponse":{"properties":{"link_token":{"type":"string","title":"Link Token"}},"type":"object","required":["link_token"],"title":"PlaidLinkTokenResponse"},"PlatformMeResponse":{"properties":{"user":{"$ref":"#/components/schemas/PlatformUserMinimal"},"team":{"anyOf":[{"$ref":"#/components/schemas/PlatformTeamMinimal"},{"type":"null"}]},"plan":{"type":"string","title":"Plan"},"locale":{"type":"string","title":"Locale"},"wallet_balance_cents":{"type":"integer","title":"Wallet Balance Cents"},"app_entitlements":{"additionalProperties":true,"type":"object","title":"App Entitlements"}},"type":"object","required":["user","plan","locale","wallet_balance_cents"],"title":"PlatformMeResponse","description":"Subset of platform-side user/team/wallet info safe to share with apps.\n\nApps call this once on iframe load (and may cache for ~30s). Fields chosen\nto satisfy the common app needs — identity, locale, balance, plan — without\nleaking auth-adjacent data (no API keys, no internal flags)."},"PlatformTeamMinimal":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"PlatformTeamMinimal"},"PlatformUserMinimal":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["id","email"],"title":"PlatformUserMinimal"},"PluginBackend":{"properties":{"kind":{"type":"string","title":"Kind"},"atom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Atom"},"rate_limit_pool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Limit Pool"},"default_timeout_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Timeout Seconds"}},"type":"object","required":["kind"],"title":"PluginBackend"},"PluginInputSpec":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"required":{"type":"boolean","title":"Required","default":false},"default":{"anyOf":[{},{"type":"null"}],"title":"Default"},"values":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Values"}},"type":"object","required":["name","type"],"title":"PluginInputSpec"},"PluginManifest":{"properties":{"slug":{"type":"string","pattern":"^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)*$","title":"Slug"},"name":{"type":"string","title":"Name"},"category":{"type":"string","title":"Category"},"version":{"type":"integer","title":"Version","default":1},"inputs":{"items":{"$ref":"#/components/schemas/PluginInputSpec"},"type":"array","title":"Inputs"},"outputs":{"items":{"$ref":"#/components/schemas/PluginOutputSpec"},"type":"array","title":"Outputs"},"backend":{"$ref":"#/components/schemas/PluginBackend"},"cost_estimate":{"additionalProperties":true,"type":"object","title":"Cost Estimate"},"ui":{"additionalProperties":true,"type":"object","title":"Ui"}},"type":"object","required":["slug","name","category","backend"],"title":"PluginManifest","description":"Static plugin descriptor loaded from a YAML file.\n\nSee `src/tableflow/plugins/registry.py` for loader; YAML lives under\n`src/tableflow/plugins/builtins/*.yaml`."},"PluginOutputSpec":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["name","type"],"title":"PluginOutputSpec"},"PresetModelBatchCreate":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PresetModelCreateItem"},"type":"array","maxItems":200,"minItems":1,"title":"Items"}},"type":"object","required":["items"],"title":"PresetModelBatchCreate"},"PresetModelCreateItem":{"properties":{"s3_key":{"type":"string","maxLength":512,"minLength":1,"title":"S3 Key"},"category":{"type":"string","enum":["woman","man","boy","girl","baby"],"title":"Category"},"facing":{"anyOf":[{"type":"string","enum":["front","back"]},{"type":"null"}],"title":"Facing"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","required":["s3_key","category"],"title":"PresetModelCreateItem"},"PresetModelPatch":{"properties":{"category":{"anyOf":[{"type":"string","enum":["woman","man","boy","girl","baby"]},{"type":"null"}],"title":"Category"},"facing":{"anyOf":[{"type":"string","enum":["front","back"]},{"type":"null"}],"title":"Facing"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"PresetModelPatch"},"PresetUploadPresignRequest":{"properties":{"category":{"type":"string","enum":["woman","man","boy","girl","baby"],"title":"Category"},"content_type":{"type":"string","title":"Content Type"}},"type":"object","required":["category","content_type"],"title":"PresetUploadPresignRequest"},"PresetZipExpandRequest":{"properties":{"zip_key":{"type":"string","maxLength":512,"minLength":1,"title":"Zip Key"},"category":{"type":"string","enum":["woman","man","boy","girl","baby"],"title":"Category"}},"type":"object","required":["zip_key","category"],"title":"PresetZipExpandRequest"},"PresetZipPresignRequest":{"properties":{},"type":"object","title":"PresetZipPresignRequest"},"PresignBatchRequest":{"properties":{"keys":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Keys","description":"S3 object keys to presign"},"variant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant","description":"Downscaled read-variant to serve instead of the original: 'thumb' (256 px, grid cells) or 'preview' (1280 px, lightbox). Omit or 'original' for full size — which is what download, editing and export must keep using. Falls back to the original whenever the derivative isn't available yet, so the caller can always just render what it gets back."}},"type":"object","required":["keys"],"title":"PresignBatchRequest"},"PresignResponse":{"properties":{"key":{"type":"string","title":"Key"},"url":{"type":"string","title":"Url"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"}},"type":"object","required":["key","url","expires_in_seconds"],"title":"PresignResponse"},"PresignedPart":{"properties":{"part_number":{"type":"integer","title":"Part Number"},"url":{"type":"string","title":"Url"}},"type":"object","required":["part_number","url"],"title":"PresignedPart"},"ProcessDocumentsRequest":{"properties":{"document_keys":{"items":{"type":"string"},"type":"array","title":"Document Keys"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["document_keys"],"title":"ProcessDocumentsRequest"},"ProcessDocumentsResponse":{"properties":{"doc_context":{"additionalProperties":true,"type":"object","title":"Doc Context"}},"type":"object","required":["doc_context"],"title":"ProcessDocumentsResponse"},"ProgramCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"ProgramCreateRequest"},"ProgramResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"team_id":{"type":"string","format":"uuid","title":"Team Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"agent_count":{"type":"integer","title":"Agent Count","default":0}},"type":"object","required":["id","team_id","name","description","created_by"],"title":"ProgramResponse"},"ProgramUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"ProgramUpdateRequest"},"PromotionCreateRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"brief_text":{"type":"string","maxLength":5000,"minLength":10,"title":"Brief Text"},"product_images_s3":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Product Images S3"},"product_descriptions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Product Descriptions"}},"type":"object","required":["agent_id","brief_text"],"title":"PromotionCreateRequest"},"PromotionListResponse":{"properties":{"promotions":{"items":{"$ref":"#/components/schemas/PromotionResponse"},"type":"array","title":"Promotions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["promotions","total"],"title":"PromotionListResponse"},"PromotionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"brief_text":{"type":"string","title":"Brief Text"},"product_images_s3":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Product Images S3"},"product_descriptions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Product Descriptions"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","agent_id","brief_text","product_images_s3","product_descriptions","status","created_at"],"title":"PromotionResponse"},"PromotionUpdateRequest":{"properties":{"brief_text":{"anyOf":[{"type":"string","maxLength":5000,"minLength":10},{"type":"null"}],"title":"Brief Text"},"product_images_s3":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Product Images S3"},"product_descriptions":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Product Descriptions"},"status":{"anyOf":[{"type":"string","pattern":"^(active|paused|completed)$"},{"type":"null"}],"title":"Status"}},"type":"object","title":"PromotionUpdateRequest"},"PromptCallRequest":{"properties":{"prompt_key":{"type":"string","title":"Prompt Key"},"version_num":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Num"},"atom_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Atom Job Id"},"input_ref":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Ref"},"output_ref":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Ref"}},"type":"object","required":["prompt_key"],"title":"PromptCallRequest"},"ProposalResolveRequest":{"properties":{"action":{"type":"string","title":"Action"}},"type":"object","required":["action"],"title":"ProposalResolveRequest"},"ProvisionUserRequest":{"properties":{"email":{"type":"string","title":"Email"},"bonus_credits":{"type":"integer","title":"Bonus Credits","default":0}},"type":"object","required":["email"],"title":"ProvisionUserRequest"},"ProvisionUserResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"created":{"type":"boolean","title":"Created"},"studio_bonus_credits":{"type":"integer","title":"Studio Bonus Credits"}},"type":"object","required":["user_id","created","studio_bonus_credits"],"title":"ProvisionUserResponse"},"PublicAgentResponse":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"slug":{"type":"string","title":"Slug"},"owner_handle":{"type":"string","title":"Owner Handle"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"agent_name":{"type":"string","title":"Agent Name"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"samples":{"items":{"$ref":"#/components/schemas/PublicSample"},"type":"array","title":"Samples"},"visible":{"type":"boolean","title":"Visible"}},"type":"object","required":["agent_id","slug","owner_handle","agent_name","visible"],"title":"PublicAgentResponse"},"PublicSample":{"properties":{"title":{"type":"string","maxLength":120,"title":"Title"},"cdn_url":{"type":"string","maxLength":1000,"title":"Cdn Url"}},"type":"object","required":["title","cdn_url"],"title":"PublicSample"},"QualityRemediationBackfill":{"properties":{"status":{"type":"string","title":"Status"},"report":{"type":"string","title":"Report"},"gamma_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gamma Branch"},"gamma_commit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gamma Commit"},"pull_request_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pull Request Url"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}}},"type":"object","required":["status","report"],"title":"QualityRemediationBackfill"},"QuotaOverrideRequest":{"properties":{"quota_bytes":{"type":"integer","exclusiveMinimum":0.0,"title":"Quota Bytes"}},"type":"object","required":["quota_bytes"],"title":"QuotaOverrideRequest"},"ReactionCreate":{"properties":{"type":{"type":"string","pattern":"^(up|down)$","title":"Type","description":"Reaction type: 'up' or 'down'"},"comment":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Comment","description":"Optional feedback text"}},"type":"object","required":["type"],"title":"ReactionCreate"},"ReadDocumentResponse":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"too_large":{"type":"boolean","title":"Too Large","default":false},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"}},"type":"object","required":["file_id","filename","content_type","size_bytes"],"title":"ReadDocumentResponse"},"RecipeGate":{"properties":{"requires_approval":{"type":"boolean","title":"Requires Approval","default":true}},"type":"object","title":"RecipeGate"},"RecipeRowGate":{"properties":{"status_col":{"type":"string","maxLength":50,"minLength":1,"title":"Status Col"},"allow":{"items":{"type":"string"},"type":"array","maxItems":20,"minItems":1,"title":"Allow"}},"type":"object","required":["status_col","allow"],"title":"RecipeRowGate","description":"Row-level gate keyed off a sibling status cell.\n\nUsed by skills like smart-bulk-tryon where users want explicit\nper-stage review gates. Each recipe declares which `status_col`\n(sibling column on the same row) drives gating and which `allow`\nlist of cell values unblocks the recipe.\n\nExecutor flow: when row.data[status_col] is NOT in `allow`, the cell\nparks at `pending_approval` (same state as `requires_approval`\ngates). User advances the status via the bulk-update-cell endpoint,\nwhich stamps a one-shot Redis bypass marker so the next executor\ntick dispatches without re-gating. Cascade re-fires after that\nnaturally pass because the status value still satisfies `allow`.\n\nBoth `status_col` and `allow` are matched by either column id OR\ndisplay name on the recipe's parent table — same tolerance as\n`inputs[].from`. Missing column → executor treats as not-in-allow\n(defensive)."},"RecipeRowStatusWrites":{"properties":{"on_dispatch":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"On Dispatch"},"on_deliver":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"On Deliver"},"on_fail":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"On Fail"}},"type":"object","title":"RecipeRowStatusWrites","description":"Row-level status auto-transitions declared by the recipe.\n\nThree hooks; each writes a literal value into row.data[status_col]\n(the same column referenced by `row_gate.status_col`). Missing keys\nare no-ops, so an intermediate cell can declare on_dispatch + on_fail\nwhile skipping on_deliver (used by video clip cells where only the\nfinal stitched video cell owns the `done` transition).\n\nHelper enforces monotonic forward-only ordering via a per-skill\nstage map — a late tryon_back deliver doesn't drag a row already\nadvanced to `awaiting_pose` back to `tryon_review`."},"RecipeSync":{"properties":{"source":{"type":"string","maxLength":100,"minLength":1,"title":"Source"},"poll_interval":{"type":"string","maxLength":20,"title":"Poll Interval","default":"1h"}},"type":"object","required":["source"],"title":"RecipeSync"},"RedeemCouponRequest":{"properties":{"code":{"type":"string","maxLength":50,"minLength":3,"title":"Code"}},"type":"object","required":["code"],"title":"RedeemCouponRequest","description":"User-facing coupon redemption."},"RefundRequest":{"properties":{"reason":{"type":"string","maxLength":256,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"RefundRequest"},"RefundResponse":{"properties":{"charge_id":{"type":"string","format":"uuid","title":"Charge Id"},"refund_id":{"type":"string","format":"uuid","title":"Refund Id"},"cents_refunded":{"type":"integer","title":"Cents Refunded"},"wallet_balance_cents_after":{"type":"integer","title":"Wallet Balance Cents After"},"idempotent_replay":{"type":"boolean","title":"Idempotent Replay","default":false}},"type":"object","required":["charge_id","refund_id","cents_refunded","wallet_balance_cents_after"],"title":"RefundResponse"},"RegisterPushTokenRequest":{"properties":{"push_token":{"type":"string","title":"Push Token"},"platform":{"type":"string","title":"Platform"},"device_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Name"}},"type":"object","required":["push_token","platform"],"title":"RegisterPushTokenRequest","description":"Register a device push token."},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"invite_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invite Token"},"signup_source":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Signup Source"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"RegisterResponse":{"properties":{"message":{"type":"string","title":"Message"},"email":{"type":"string","title":"Email"}},"type":"object","required":["message","email"],"title":"RegisterResponse"},"RegisterSkillsRequest":{"properties":{"skills":{"items":{"$ref":"#/components/schemas/SkillManifestEntry"},"type":"array","maxItems":64,"minItems":1,"title":"Skills"}},"type":"object","required":["skills"],"title":"RegisterSkillsRequest"},"RegisterSkillsResponse":{"properties":{"app_slug":{"type":"string","title":"App Slug"},"registered":{"type":"integer","title":"Registered"},"propagated_to_bindings":{"type":"integer","title":"Propagated To Bindings","default":0}},"type":"object","required":["app_slug","registered"],"title":"RegisterSkillsResponse"},"RejectProdRequest":{"properties":{"reason":{"type":"string","maxLength":4000,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"RejectProdRequest"},"RejectRequest":{"properties":{"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"RejectRequest","description":"Reject content with reason."},"ResendCodeRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendCodeRequest"},"ResetMissionRequest":{"properties":{"mission":{"type":"string","title":"Mission"}},"type":"object","required":["mission"],"title":"ResetMissionRequest"},"RevisionListResponse":{"properties":{"revisions":{"items":{"$ref":"#/components/schemas/RevisionResponse"},"type":"array","title":"Revisions"},"head_revision_id":{"type":"string","format":"uuid","title":"Head Revision Id"},"main_revision_id":{"type":"string","format":"uuid","title":"Main Revision Id"}},"type":"object","required":["revisions","head_revision_id","main_revision_id"],"title":"RevisionListResponse"},"RevisionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"table_id":{"type":"string","format":"uuid","title":"Table Id"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"kind":{"type":"string","title":"Kind"},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch Name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","table_id","parent_id","kind","branch_name","title","body","created_by","created_at"],"title":"RevisionResponse"},"RevisionRevert":{"properties":{"target_revision_id":{"type":"string","format":"uuid","title":"Target Revision Id"},"label":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Label"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"}},"type":"object","required":["target_revision_id"],"title":"RevisionRevert","description":"Revert to a target revision. Always creates a new revert revision\nand moves HEAD to it; never destructive."},"RevisionUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Label"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"}},"type":"object","title":"RevisionUpdate"},"RoleInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"label":{"type":"string","title":"Label"},"icon":{"type":"string","title":"Icon"},"archetype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archetype"},"recommended_services":{"items":{"type":"string"},"type":"array","title":"Recommended Services","default":[]},"onboarding_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarding Message"}},"type":"object","required":["id","slug","label","icon"],"title":"RoleInfo","description":"Lightweight role info embedded in agent responses."},"RollbackRequest":{"properties":{"to_version_num":{"type":"integer","title":"To Version Num"}},"type":"object","required":["to_version_num"],"title":"RollbackRequest"},"RotateApiKeyRequest":{"properties":{"api_key":{"type":"string","maxLength":512,"minLength":1,"title":"Api Key"}},"type":"object","required":["api_key"],"title":"RotateApiKeyRequest"},"RowCreate":{"properties":{},"type":"object","title":"RowCreate","description":"Body for `POST /tables/{id}/rows`.\n\nSingle-row v1 — `count`/batch land alongside the row-source pipeline\nin P2. `prefill` is intentionally absent here so the API contract\nis just \"create empty row, then PATCH cells\"."},"RowInsert":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data"},"order_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Key"}},"type":"object","required":["data"],"title":"RowInsert","description":"One row. `data` may be keyed by column id OR by column name (server\nnormalizes). `order_key` is optional — server generates at end of table\nif omitted."},"RowResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"table_id":{"type":"string","format":"uuid","title":"Table Id"},"order_key":{"type":"string","title":"Order Key"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","table_id","order_key","created_by","created_at"],"title":"RowResponse"},"RowSourceCreate":{"properties":{"connector":{"type":"string","enum":["manual","tintin_storage","smart_storage","s3_prefix","local_upload","google_drive","onedrive","apollo_query","lark_pull"],"title":"Connector"},"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"schedule":{"type":"string","enum":["once","daily","webhook"],"title":"Schedule","default":"once"}},"type":"object","required":["connector"],"title":"RowSourceCreate"},"RowSourceUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"schedule":{"anyOf":[{"type":"string","enum":["once","daily","webhook"]},{"type":"null"}],"title":"Schedule"}},"type":"object","title":"RowSourceUpdate"},"RowUpdate":{"properties":{"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"order_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Key"}},"type":"object","title":"RowUpdate"},"RowsInsert":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/RowInsert"},"type":"array","maxItems":500,"minItems":1,"title":"Rows"}},"type":"object","required":["rows"],"title":"RowsInsert"},"ScopeOptionResponse":{"properties":{"level":{"type":"string","title":"Level"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["level","label","description","scopes"],"title":"ScopeOptionResponse"},"SectionUpdateRequest":{"properties":{"content":{"additionalProperties":true,"type":"object","title":"Content"}},"type":"object","required":["content"],"title":"SectionUpdateRequest"},"SelectOption":{"properties":{"id":{"type":"string","maxLength":50,"minLength":1,"title":"Id"},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"},"color":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Color"}},"type":"object","required":["id","label"],"title":"SelectOption"},"SelfDeleteRequest":{"properties":{"confirm_email":{"type":"string","maxLength":255,"title":"Confirm Email"}},"type":"object","required":["confirm_email"],"title":"SelfDeleteRequest"},"SendGroupMessageRequest":{"properties":{"content":{"type":"string","title":"Content"},"mentions":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Mentions"}},"type":"object","required":["content"],"title":"SendGroupMessageRequest"},"ServiceDefinitionResponse":{"properties":{"service_id":{"type":"string","title":"Service Id"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"icon":{"type":"string","title":"Icon"},"category":{"type":"string","title":"Category"},"auth_type":{"type":"string","title":"Auth Type","default":"oauth2"},"scope_options":{"items":{"$ref":"#/components/schemas/ScopeOptionResponse"},"type":"array","title":"Scope Options"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"is_read_only":{"type":"boolean","title":"Is Read Only"},"requires_plan":{"type":"string","title":"Requires Plan"},"api_key_config":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyConfigResponse"},{"type":"null"}]}},"type":"object","required":["service_id","display_name","description","icon","category","scope_options","capabilities","is_read_only","requires_plan"],"title":"ServiceDefinitionResponse"},"ServiceGrantResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","agent_id","created_at"],"title":"ServiceGrantResponse"},"SessionUsageRow":{"properties":{"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"credits_cents":{"type":"integer","title":"Credits Cents"},"calls":{"type":"integer","title":"Calls"},"last_activity_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Activity At"}},"type":"object","required":["conversation_id","title","credits_cents","calls","last_activity_at"],"title":"SessionUsageRow","description":"One row of the per-session breakdown.\n\n`conversation_id` is None for transactions where the gateway did not\nhave an active conversation in Redis at debit time (heartbeat-only\nwake cycles, or rows written before the gateway started tagging).\nThose collapse into a single \"Other\" row in the UI."},"SetPermissionsRequest":{"properties":{"agent_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Agent Ids"},"user_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"User Ids"}},"type":"object","title":"SetPermissionsRequest"},"SetUserAutomation":{"properties":{"neutralize_garment_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Neutralize Garment Enabled"},"qa_auto_regen_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Qa Auto Regen Enabled"},"qa_notes_in_regen_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Qa Notes In Regen Enabled"}},"type":"object","title":"SetUserAutomation"},"SharedFileResponse":{"properties":{"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"cdn_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cdn Url"},"is_previewable":{"type":"boolean","title":"Is Previewable","default":false},"requires_auth":{"type":"boolean","title":"Requires Auth","default":false}},"type":"object","required":["filename","content_type","size_bytes"],"title":"SharedFileResponse"},"ShopifyConnectRequest":{"properties":{"shop_domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Shop Domain"}},"type":"object","title":"ShopifyConnectRequest"},"ShopifyCreditsSyncRequest":{"properties":{"email":{"type":"string","title":"Email"},"monthly_credits":{"type":"integer","title":"Monthly Credits","default":500},"plan":{"type":"string","title":"Plan","default":"free"},"force":{"type":"boolean","title":"Force","default":false}},"type":"object","required":["email"],"title":"ShopifyCreditsSyncRequest"},"ShopifyCreditsSyncResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"created":{"type":"boolean","title":"Created"},"granted":{"type":"boolean","title":"Granted"},"balance_credits":{"type":"number","title":"Balance Credits"},"balance_centicredits":{"type":"integer","title":"Balance Centicredits"},"next_reset_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Reset At"}},"type":"object","required":["user_id","created","granted","balance_credits","balance_centicredits","next_reset_at"],"title":"ShopifyCreditsSyncResponse"},"SignalActionRequest":{"properties":{"action":{"type":"string","pattern":"^(snooze|dismiss|restore)$","title":"Action"},"days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Days","default":30}},"type":"object","required":["action"],"title":"SignalActionRequest"},"SimulateRecipient":{"properties":{"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},"type":"object","title":"SimulateRecipient","description":"Either a real account (user_id or email that resolves to one) or a\nbare address with no account behind it. The latter can be previewed and\nmailed, but has no audience verdict to report — there is no signup date\nor wallet to evaluate the rules against."},"SimulateRequest":{"properties":{"recipients":{"items":{"$ref":"#/components/schemas/SimulateRecipient"},"type":"array","maxItems":20,"minItems":1,"title":"Recipients"},"as_of_day":{"anyOf":[{"type":"integer","maximum":400.0,"minimum":0.0},{"type":"null"}],"title":"As Of Day"}},"type":"object","required":["recipients"],"title":"SimulateRequest"},"SimulateSendRequest":{"properties":{"recipients":{"items":{"$ref":"#/components/schemas/SimulateRecipient"},"type":"array","maxItems":20,"minItems":1,"title":"Recipients"},"slugs":{"items":{"type":"string"},"type":"array","maxItems":6,"minItems":1,"title":"Slugs"},"confirm":{"type":"boolean","title":"Confirm","default":false},"write_ledger":{"type":"boolean","title":"Write Ledger","default":false}},"type":"object","required":["recipients","slugs"],"title":"SimulateSendRequest"},"SingleGenItem":{"properties":{"project_id":{"type":"string","title":"Project Id"},"row_id":{"type":"string","title":"Row Id"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"state":{"type":"string","title":"State"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"product_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type"},"garment_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Garment Category"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"garment_keys":{"items":{"type":"string"},"type":"array","title":"Garment Keys"},"model_keys":{"items":{"type":"string"},"type":"array","title":"Model Keys"},"scene_keys":{"items":{"type":"string"},"type":"array","title":"Scene Keys"},"tryon_keys":{"items":{"type":"string"},"type":"array","title":"Tryon Keys"},"pose_front_keys":{"items":{"type":"string"},"type":"array","title":"Pose Front Keys"},"pose_back_keys":{"items":{"type":"string"},"type":"array","title":"Pose Back Keys"},"video_keys":{"items":{"type":"string"},"type":"array","title":"Video Keys"}},"type":"object","required":["project_id","row_id","job_id","state","created_at","product_type","garment_category","params","garment_keys","model_keys","scene_keys","tryon_keys","pose_front_keys","pose_back_keys","video_keys"],"title":"SingleGenItem"},"SingleHistoryQuickProject":{"properties":{"project_id":{"type":"string","title":"Project Id"},"owner_user_id":{"type":"string","title":"Owner User Id"},"owner_email":{"type":"string","title":"Owner Email"},"generation_count":{"type":"integer","title":"Generation Count"}},"type":"object","required":["project_id","owner_user_id","owner_email","generation_count"],"title":"SingleHistoryQuickProject"},"SingleHistoryResponse":{"properties":{"quick_projects":{"items":{"$ref":"#/components/schemas/SingleHistoryQuickProject"},"type":"array","title":"Quick Projects"},"generations":{"items":{"$ref":"#/components/schemas/SingleGenItem"},"type":"array","title":"Generations"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["quick_projects","generations","total"],"title":"SingleHistoryResponse"},"SkillBundleItem":{"properties":{"skill_definition_id":{"type":"string","format":"uuid","title":"Skill Definition Id"},"is_required":{"type":"boolean","title":"Is Required","default":false}},"type":"object","required":["skill_definition_id"],"title":"SkillBundleItem"},"SkillDispatch":{"properties":{"on_col":{"type":"string","maxLength":50,"minLength":1,"title":"On Col"},"map":{"additionalProperties":{"type":"string"},"type":"object","maxProperties":20,"minProperties":1,"title":"Map"}},"type":"object","required":["on_col","map"],"title":"SkillDispatch","description":"Variant selection: pick the skill by a sibling cell's value."},"SkillManifestEntry":{"properties":{"skill_slug":{"type":"string","maxLength":80,"minLength":1,"title":"Skill Slug"},"version":{"type":"string","maxLength":32,"minLength":1,"title":"Version"},"s3_key_prefix":{"type":"string","maxLength":512,"minLength":1,"title":"S3 Key Prefix"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"tools":{"items":{"type":"string"},"type":"array","title":"Tools"}},"type":"object","required":["skill_slug","version","s3_key_prefix"],"title":"SkillManifestEntry"},"SkipHeadshotRequest":{"properties":{"skip_headshot":{"type":"boolean","title":"Skip Headshot","default":false}},"type":"object","title":"SkipHeadshotRequest"},"StandalonePresignRequest":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":64,"minLength":1,"title":"Content Type"},"kind":{"type":"string","title":"Kind","description":"hand | nail_set | hand_template | nail_tips | lifestyle_ref | lifestyle_source | nail_video_source | nail_video_template","default":"hand"}},"type":"object","required":["filename","content_type"],"title":"StandalonePresignRequest"},"StorageBulkGetRequest":{"properties":{"file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"minItems":1,"title":"File Ids"}},"type":"object","required":["file_ids"],"title":"StorageBulkGetRequest","description":"App-backend → Platform: resolve N file_ids to their s3_keys + metadata\nin one round-trip when accepting a job submission."},"StorageBulkGetResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StorageFileResponse"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"StorageBulkGetResponse"},"StorageConfirmRequest":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"s3_key":{"type":"string","title":"S3 Key"}},"type":"object","required":["file_id","s3_key"],"title":"StorageConfirmRequest"},"StorageError":{"properties":{"error":{"type":"string","enum":["storage.not_found","storage.too_large","storage.unauthorized","storage.quota_exceeded","storage.invalid","storage.unreachable"],"title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["error","detail"],"title":"StorageError"},"StorageFileResponse":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"s3_key":{"type":"string","title":"S3 Key"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"},"app_slug":{"type":"string","title":"App Slug"},"folder_path":{"type":"string","title":"Folder Path"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_confirmed":{"type":"boolean","title":"Is Confirmed"}},"type":"object","required":["file_id","filename","content_type","size_bytes","s3_key","app_slug","folder_path","created_at","is_confirmed"],"title":"StorageFileResponse","description":"One storage_files row, hydrated with a short-lived GET URL when\nthe caller is reading. Same shape returned from confirm + get + list\nso apps have one type to reason about."},"StorageListItem":{"properties":{"file_id":{"type":"string","title":"File Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["file_id","filename","content_type","size_bytes","updated_at"],"title":"StorageListItem"},"StorageListRequest":{"properties":{"limit":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Limit","default":20},"cursor":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Cursor"},"filename_prefix":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Filename Prefix"},"content_type_prefix":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Content Type Prefix"},"folder":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Folder"}},"type":"object","title":"StorageListRequest"},"StorageListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StorageListItem"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items"],"title":"StorageListResponse"},"StorageOverviewResponse":{"properties":{"total_used_bytes":{"type":"integer","title":"Total Used Bytes"},"total_file_count":{"type":"integer","title":"Total File Count"},"total_user_count":{"type":"integer","title":"Total User Count"},"top_users":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Top Users"}},"type":"object","required":["total_used_bytes","total_file_count","total_user_count","top_users"],"title":"StorageOverviewResponse"},"StorageReadRequest":{"properties":{"filename":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Filename"},"file_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"File Id"}},"type":"object","title":"StorageReadRequest"},"StorageReadResponse":{"properties":{"file_id":{"type":"string","title":"File Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"presigned_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Presigned Url"}},"type":"object","required":["file_id","filename","content_type","size_bytes"],"title":"StorageReadResponse"},"StorageUploadUrlRequest":{"properties":{"filename":{"type":"string","maxLength":500,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":100,"minLength":1,"title":"Content Type"},"size_bytes":{"type":"integer","maximum":524288000.0,"minimum":0.0,"title":"Size Bytes"},"kind":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Kind"}},"type":"object","required":["filename","content_type","size_bytes"],"title":"StorageUploadUrlRequest","description":"Iframe asks for a presigned PUT against the user's `Apps/<title>/` tree."},"StorageUploadUrlResponse":{"properties":{"file_id":{"type":"string","format":"uuid","title":"File Id"},"s3_key":{"type":"string","title":"S3 Key"},"upload_url":{"type":"string","title":"Upload Url"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"}},"type":"object","required":["file_id","s3_key","upload_url","expires_in_seconds"],"title":"StorageUploadUrlResponse"},"StorageUsageResponse":{"properties":{"used_bytes":{"type":"integer","title":"Used Bytes"},"quota_bytes":{"type":"integer","title":"Quota Bytes"},"used_pct":{"type":"number","title":"Used Pct"},"plan":{"type":"string","title":"Plan"},"file_count":{"type":"integer","title":"File Count"}},"type":"object","required":["used_bytes","quota_bytes","used_pct","plan","file_count"],"title":"StorageUsageResponse"},"StorageWriteRequest":{"properties":{"filename":{"type":"string","maxLength":500,"minLength":1,"title":"Filename"},"content":{"type":"string","maxLength":524288,"minLength":1,"title":"Content"},"content_type":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Content Type"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"folder":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Folder"}},"type":"object","required":["filename","content"],"title":"StorageWriteRequest"},"StorageWriteResponse":{"properties":{"file_id":{"type":"string","title":"File Id"},"s3_key":{"type":"string","title":"S3 Key"},"size_bytes":{"type":"integer","title":"Size Bytes"},"audit_id":{"type":"string","title":"Audit Id"}},"type":"object","required":["file_id","s3_key","size_bytes","audit_id"],"title":"StorageWriteResponse"},"StudioCancelRequest":{"properties":{"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"reason":{"anyOf":[{"type":"string","enum":["too_expensive","low_quality","missing_features","unused","switched_service","too_complex","customer_service","other"]},{"type":"null"}],"title":"Reason"},"comment":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Comment"}},"type":"object","title":"StudioCancelRequest","description":"Cancel body: optional reason + one-line comment (both skippable)."},"StudioChangePlanRequest":{"properties":{"plan":{"type":"string","pattern":"^(starter|studio|pro)$","title":"Plan"},"billing_period":{"type":"string","pattern":"^(monthly|annual)$","title":"Billing Period","default":"monthly"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"}},"type":"object","required":["plan"],"title":"StudioChangePlanRequest","description":"Upgrade / downgrade an active studio subscription (Stripe proration)."},"StudioChangeRoleRequest":{"properties":{"role":{"type":"string","enum":["member","admin"],"title":"Role"}},"type":"object","required":["role"],"title":"StudioChangeRoleRequest"},"StudioCreditPackRequest":{"properties":{"pack":{"type":"string","pattern":"^(mini|plus)$","title":"Pack"},"return_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return To"}},"type":"object","required":["pack"],"title":"StudioCreditPackRequest","description":"One-time studio credit pack (no subscription) — the paywall's\nlow-commitment offer. Pack ids + sizes live in\nbilling_service.STUDIO_CREDIT_PACKS. Personal wallet only."},"StudioInvitationInfoResponse":{"properties":{"team_name":{"type":"string","title":"Team Name"},"inviter_email":{"type":"string","title":"Inviter Email"},"role":{"type":"string","title":"Role"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["team_name","inviter_email","role","expires_at"],"title":"StudioInvitationInfoResponse","description":"Public (no-auth) shape for the accept page."},"StudioInviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","enum":["member","admin"],"title":"Role","default":"member"}},"type":"object","required":["email"],"title":"StudioInviteRequest"},"StudioSubscribeRequest":{"properties":{"plan":{"type":"string","pattern":"^(starter|studio|pro)$","title":"Plan"},"billing_period":{"type":"string","pattern":"^(monthly|annual)$","title":"Billing Period","default":"monthly"},"return_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return To"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"}},"type":"object","required":["plan"],"title":"StudioSubscribeRequest","description":"Subscribe to a studio (consumer) plan — nail / garment try-on / video.\n\nSeparate from SubscribeRequest because the studio tier names overlap the\nagent V2 plan names; this gates them to the studio set + studio checkout."},"StudioSubscriptionCancelRequest":{"properties":{"mode":{"type":"string","pattern":"^(period_end|immediate)$","title":"Mode","default":"period_end"},"zero_credits":{"type":"boolean","title":"Zero Credits","default":false},"owner_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Team Id"}},"type":"object","title":"StudioSubscriptionCancelRequest","description":"Admin cancellation of a user's (or their owned team's) studio subscription.\n\n``period_end`` schedules a soft cancel — keeps access + credits until the\npaid period lapses (reversible via the user-facing resume). ``immediate``\ncancels in Stripe right now; pair with ``zero_credits`` to also expire the\nsubscription credit pool on the spot. Works for both real Stripe\nsubscriptions and admin comp subscriptions (no Stripe id)."},"StudioSubscriptionManageRequest":{"properties":{"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"}},"type":"object","title":"StudioSubscriptionManageRequest","description":"Body for cancel / resume of a studio subscription. Optional owner_team_id\nselects the team wallet's subscription (P3.5, flag-gated + owner-only)."},"StudioTeamDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"members":{"items":{"$ref":"#/components/schemas/StudioTeamMemberResponse"},"type":"array","title":"Members"},"invitations":{"items":{"$ref":"#/components/schemas/StudioTeamInvitationResponse"},"type":"array","title":"Invitations"}},"type":"object","required":["id","name","members"],"title":"StudioTeamDetailResponse"},"StudioTeamInvitationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","email","role","status","token","expires_at"],"title":"StudioTeamInvitationResponse"},"StudioTeamMemberResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"joined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Joined At"}},"type":"object","required":["user_id","email","role"],"title":"StudioTeamMemberResponse"},"StudioTeamMembersResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/StudioTeamMemberResponse"},"type":"array","title":"Members"}},"type":"object","required":["members"],"title":"StudioTeamMembersResponse"},"StudioTeamResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["id","name","role"],"title":"StudioTeamResponse"},"StudioTransferOwnershipRequest":{"properties":{"new_owner_id":{"type":"string","format":"uuid","title":"New Owner Id"}},"type":"object","required":["new_owner_id"],"title":"StudioTransferOwnershipRequest"},"SubscribeRequest":{"properties":{"plan":{"type":"string","pattern":"^(starter|growth|viral|enterprise|team|business)$","title":"Plan"},"billing_period":{"type":"string","pattern":"^(monthly|annual)$","title":"Billing Period","default":"monthly"}},"type":"object","required":["plan"],"title":"SubscribeRequest","description":"Subscribe to a plan."},"TableCreate":{"properties":{"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"}},"type":"object","required":["workspace_id","name"],"title":"TableCreate"},"TableListResponse":{"properties":{"tables":{"items":{"$ref":"#/components/schemas/TableSummary"},"type":"array","title":"Tables"}},"type":"object","required":["tables"],"title":"TableListResponse"},"TablePolicies":{"properties":{"dedup_key":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Dedup Key"},"hitl_columns":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Hitl Columns"}},"type":"object","title":"TablePolicies","description":"Table-level configuration for dedup + HITL columns."},"TableResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"head_revision_id":{"type":"string","format":"uuid","title":"Head Revision Id"},"main_revision_id":{"type":"string","format":"uuid","title":"Main Revision Id"},"created_by_user_id":{"type":"string","format":"uuid","title":"Created By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"columns":{"items":{"$ref":"#/components/schemas/ColumnResponse"},"type":"array","title":"Columns"},"row_count":{"type":"integer","title":"Row Count","default":0}},"type":"object","required":["id","workspace_id","name","description","head_revision_id","main_revision_id","created_by_user_id","created_at","updated_at"],"title":"TableResponse","description":"Table read response.\n\nP1.0 returned just the summary fields. P1.1 inlines the active\ncolumns + active row count so a TableDetailPage loads in one\nrequest. Rows themselves come from `GET /tables/{id}/rows` because\nthey paginate."},"TableRowsResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/RowResponse"},"type":"array","title":"Rows"},"cells":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/CellPointer"},"propertyNames":{"format":"uuid"},"type":"object"},"propertyNames":{"format":"uuid"},"type":"object","title":"Cells"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["rows","cells"],"title":"TableRowsResponse","description":"Paginated rows + their current cells at the head revision.\n\n`cells[row_id][column_id]` = `{value, version_num, cell_version_id}`.\nMissing entries = tombstone (cell never written, or column archived)."},"TableSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"head_revision_id":{"type":"string","format":"uuid","title":"Head Revision Id"},"main_revision_id":{"type":"string","format":"uuid","title":"Main Revision Id"},"created_by_user_id":{"type":"string","format":"uuid","title":"Created By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","name","description","head_revision_id","main_revision_id","created_by_user_id","created_at","updated_at"],"title":"TableSummary","description":"Compact shape used in list responses."},"TaskCreateRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"priority":{"type":"string","title":"Priority","default":"medium"},"source_type":{"type":"string","title":"Source Type","default":"manual"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"source_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source Context"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"parent_task_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Task Id"}},"type":"object","required":["agent_id","title"],"title":"TaskCreateRequest"},"TaskUpdateRequest":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"priority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Priority"}},"type":"object","title":"TaskUpdateRequest"},"TeamCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"TeamCreateRequest"},"TeamInvitationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","role","status","token","expires_at","created_at"],"title":"TeamInvitationResponse"},"TeamInviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","pattern":"^(admin|member)$","title":"Role","default":"member"}},"type":"object","required":["email"],"title":"TeamInviteRequest"},"TeamMemberResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"role":{"type":"string","title":"Role"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"}},"type":"object","required":["id","user_id","email","role","joined_at"],"title":"TeamMemberResponse"},"TeamResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"plan":{"type":"string","title":"Plan"},"max_agent_slots":{"type":"integer","title":"Max Agent Slots"},"max_seats":{"type":"integer","title":"Max Seats"},"spending_cap_multiplier":{"type":"number","title":"Spending Cap Multiplier"},"members":{"items":{"$ref":"#/components/schemas/TeamMemberResponse"},"type":"array","title":"Members","default":[]},"invitations":{"items":{"$ref":"#/components/schemas/TeamInvitationResponse"},"type":"array","title":"Invitations","default":[]},"credit_balance_cents":{"type":"integer","title":"Credit Balance Cents","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","plan","max_agent_slots","max_seats","spending_cap_multiplier","created_at"],"title":"TeamResponse"},"TeamUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"spending_cap_multiplier":{"anyOf":[{"type":"number","maximum":10.0,"minimum":1.0},{"type":"null"}],"title":"Spending Cap Multiplier"}},"type":"object","title":"TeamUpdateRequest"},"TemplateInstantiate":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"},"credential_bindings":{"additionalProperties":{"type":"string"},"type":"object","title":"Credential Bindings"},"row_source":{"anyOf":[{"$ref":"#/components/schemas/RowSourceCreate"},{"type":"null"}]},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"template_parameters":{"additionalProperties":{"type":"string"},"type":"object","title":"Template Parameters"}},"type":"object","required":["agent_id"],"title":"TemplateInstantiate","description":"Body for POST /api/bitable-templates/{id}/instantiate.\n\nCreates a new bittable from the template, with recipes wired up and\n(optionally) a row_source configured.\n\n- `agent_id` is the target agent the new bittable will belong to;\n  the request user must own it via the standard team-scope rule.\n- `credential_bindings` maps template slot names → vault credential\n  slugs/ids. Slots declared in the template must all be bound\n  (missing slots return 400).\n- `row_source` (optional) wires a `bitable_row_sources` row onto the\n  new bitable. Shape is the same as the B4 `RowSourceCreate` — if\n  the template carries a `row_source_spec`, this defaults to that\n  but the caller may override per-field.\n- `conversation_id` is optional; if null the server falls back\n  through the same Redis/active-conv path as `POST /api/bitables`."},"TemplateParseRequest":{"properties":{"html":{"type":"string","minLength":1,"title":"Html"}},"type":"object","required":["html"],"title":"TemplateParseRequest"},"TemplateSaveAs":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Description"},"credential_slots":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Credential Slots"},"row_source_spec":{"anyOf":[{"$ref":"#/components/schemas/RowSourceCreate"},{"type":"null"}]},"is_listed":{"type":"boolean","title":"Is Listed","default":false}},"type":"object","required":["name"],"title":"TemplateSaveAs","description":"Capture an active bittable as a template.\n\nEvery field is optional except `name` — callers typically want to\npromote an in-use table without re-describing it. The server snap-\nshots `column_graph` and `table_policies` from the source bitable."},"TemplateUploadRequest":{"properties":{"html":{"type":"string","minLength":1,"title":"Html"},"asset_map":{"additionalProperties":{"type":"string"},"type":"object","title":"Asset Map"},"subject":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Subject"},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["html"],"title":"TemplateUploadRequest"},"TestSendRequest":{"properties":{"to_email":{"type":"string","maxLength":255,"minLength":3,"title":"To Email"}},"type":"object","required":["to_email"],"title":"TestSendRequest"},"ThumbnailGenerateRequest":{"properties":{"reference_s3_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Reference S3 Key"},"nail_set_label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Nail Set Label"},"lighting":{"anyOf":[{"type":"string","enum":["studio","soft","natural","dramatic"]},{"type":"null"}],"title":"Lighting"},"angle":{"anyOf":[{"type":"string","enum":["top","three_quarter","macro"]},{"type":"null"}],"title":"Angle"},"spacing_mm":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.5},{"type":"null"}],"title":"Spacing Mm"},"refinement":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Refinement"},"collection_tag":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Collection Tag"},"aspect_ratio":{"anyOf":[{"type":"string","enum":["auto","21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16","4:1","1:4","8:1","1:8"]},{"type":"null"}],"title":"Aspect Ratio"}},"type":"object","title":"ThumbnailGenerateRequest","description":"POST `/api/thumbnails/generate` body.\n\nSingle reference image of the nail design (a raw `s3_key` uploaded via\n`/api/uploads/standalone-presign`), plus a handful of optional knobs the\nuser can tune in the form. Reasonable defaults are baked in so the\nsimplest call is just `{\"reference_s3_key\": \"...\"}`."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"TokenResponse"},"TopicResearchRequest":{"properties":{"niche":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Niche"}},"type":"object","title":"TopicResearchRequest"},"TrackFileRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"s3_key":{"type":"string","title":"S3 Key"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"source":{"type":"string","title":"Source","default":"media_worker"},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Ref"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"publish":{"type":"boolean","title":"Publish","default":false}},"type":"object","required":["agent_id","s3_key"],"title":"TrackFileRequest"},"TransactionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"action_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Type"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","amount_cents","action_type","agent_id","created_at"],"title":"TransactionResponse","description":"Single ledger transaction."},"TransferCaveat":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"}},"type":"object","required":["code","message"],"title":"TransferCaveat"},"TransferInviteCreate":{"properties":{"to_email":{"type":"string","format":"email","title":"To Email"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"},"selections":{"$ref":"#/components/schemas/TransferSelections"}},"type":"object","required":["to_email"],"title":"TransferInviteCreate"},"TransferInviteList":{"properties":{"invites":{"items":{"$ref":"#/components/schemas/TransferInviteResponse"},"type":"array","title":"Invites"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["invites","total"],"title":"TransferInviteList"},"TransferInviteResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"from_user_id":{"type":"string","format":"uuid","title":"From User Id"},"from_user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From User Email"},"to_email":{"type":"string","title":"To Email"},"to_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"To User Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"selections":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Selections"},"status":{"type":"string","title":"Status"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"},"declined_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Declined At"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"preview":{"anyOf":[{"$ref":"#/components/schemas/TransferPreview"},{"type":"null"}]}},"type":"object","required":["id","agent_id","from_user_id","to_email","selections","status","expires_at","created_at"],"title":"TransferInviteResponse"},"TransferOwnershipRequest":{"properties":{"new_owner_id":{"type":"string","format":"uuid","title":"New Owner Id"}},"type":"object","required":["new_owner_id"],"title":"TransferOwnershipRequest"},"TransferPreview":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"to_email":{"type":"string","title":"To Email"},"recipient_exists":{"type":"boolean","title":"Recipient Exists"},"recipient_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Recipient Team Id"},"same_user":{"type":"boolean","title":"Same User","default":false},"vault_credentials":{"items":{"$ref":"#/components/schemas/TransferableResource"},"type":"array","title":"Vault Credentials","default":[]},"bitables":{"items":{"$ref":"#/components/schemas/TransferableResource"},"type":"array","title":"Bitables","default":[]},"bitable_templates":{"items":{"$ref":"#/components/schemas/TransferableResource"},"type":"array","title":"Bitable Templates","default":[]},"storage_files":{"items":{"$ref":"#/components/schemas/TransferableResource"},"type":"array","title":"Storage Files","default":[]},"storage_folders":{"items":{"$ref":"#/components/schemas/TransferableResource"},"type":"array","title":"Storage Folders","default":[]},"elements":{"items":{"$ref":"#/components/schemas/TransferableResource"},"type":"array","title":"Elements","default":[]},"skill_forks":{"items":{"$ref":"#/components/schemas/TransferableResource"},"type":"array","title":"Skill Forks","default":[]},"datahub_jobs":{"items":{"$ref":"#/components/schemas/TransferableResource"},"type":"array","title":"Datahub Jobs","default":[]},"user_scoped_memories":{"items":{"$ref":"#/components/schemas/TransferableResource"},"type":"array","title":"User Scoped Memories","default":[]},"oauth_services":{"items":{"$ref":"#/components/schemas/TransferableResource"},"type":"array","title":"Oauth Services","default":[]},"caveats":{"items":{"$ref":"#/components/schemas/TransferCaveat"},"type":"array","title":"Caveats","default":[]}},"type":"object","required":["agent_id","to_email","recipient_exists"],"title":"TransferPreview","description":"What sender sees before creating an invitation."},"TransferPreviewRequest":{"properties":{"to_email":{"type":"string","format":"email","title":"To Email"}},"type":"object","required":["to_email"],"title":"TransferPreviewRequest"},"TransferSelections":{"properties":{"vault_credential_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Vault Credential Ids"},"bitable_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Bitable Ids"},"bitable_template_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Bitable Template Ids"},"storage_file_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Storage File Ids"},"storage_folder_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Storage Folder Ids"},"element_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Element Ids"},"skill_definition_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Skill Definition Ids"},"datahub_job_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Datahub Job Ids"},"agent_memory_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Agent Memory Ids"}},"type":"object","title":"TransferSelections","description":"Resource ids the sender opts in to transfer with the agent.\n\nAnything keyed by `agent_id` / `character_id` (workspace files,\nagent_skills installs, group memberships, workflow executions,\ndata_tables, agent-scoped agent_memory rows) travels automatically\nand is not represented here."},"TransferableResource":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"label":{"type":"string","title":"Label"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"team_owned":{"type":"boolean","title":"Team Owned","default":false}},"type":"object","required":["id","label"],"title":"TransferableResource"},"TryonAgentAccess":{"properties":{"everyone":{"type":"boolean","title":"Everyone"},"users":{"items":{"$ref":"#/components/schemas/TryonAgentUser"},"type":"array","title":"Users"}},"type":"object","required":["everyone","users"],"title":"TryonAgentAccess"},"TryonAgentPlanCatalogResponse":{"properties":{"locale":{"type":"string","enum":["en","zh"],"title":"Locale"},"primitives":{"items":{"$ref":"#/components/schemas/TryonAgentPlanPrimitive"},"type":"array","title":"Primitives"}},"type":"object","required":["locale","primitives"],"title":"TryonAgentPlanCatalogResponse"},"TryonAgentPlanConfirmRequest":{"properties":{"confirmed":{"type":"boolean","title":"Confirmed","default":true}},"type":"object","title":"TryonAgentPlanConfirmRequest"},"TryonAgentPlanCreate":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"instruction":{"type":"string","maxLength":2000,"minLength":1,"title":"Instruction"},"scope":{"additionalProperties":true,"type":"object","title":"Scope"}},"type":"object","required":["project_id","instruction"],"title":"TryonAgentPlanCreate"},"TryonAgentPlanPrimitive":{"properties":{"slug":{"type":"string","title":"Slug"},"description":{"type":"string","title":"Description"},"description_en":{"type":"string","title":"Description En"},"description_zh":{"type":"string","title":"Description Zh"},"is_destructive":{"type":"boolean","title":"Is Destructive"},"params_schema":{"additionalProperties":true,"type":"object","title":"Params Schema"}},"type":"object","required":["slug","description","description_en","description_zh","is_destructive","params_schema"],"title":"TryonAgentPlanPrimitive"},"TryonAgentPlanResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"instruction":{"type":"string","title":"Instruction"},"scope":{"additionalProperties":true,"type":"object","title":"Scope"},"steps":{"items":{"$ref":"#/components/schemas/TryonAgentPlanStepSchema"},"type":"array","title":"Steps"},"planner_summary":{"type":"string","title":"Planner Summary"},"planner_reasoning":{"type":"string","title":"Planner Reasoning"},"planner_confidence":{"type":"number","title":"Planner Confidence"},"base_table_version_num":{"type":"integer","title":"Base Table Version Num"},"status":{"type":"string","title":"Status"},"confirmed_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Confirmed By User Id"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed At"},"result":{"additionalProperties":true,"type":"object","title":"Result"},"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","agent_id","instruction","scope","planner_summary","planner_reasoning","planner_confidence","base_table_version_num","status","confirmed_by_user_id","confirmed_at","result","created_at","updated_at"],"title":"TryonAgentPlanResponse"},"TryonAgentPlanStepSchema":{"properties":{"primitive":{"type":"string","title":"Primitive"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"depends_on":{"items":{"type":"integer"},"type":"array","title":"Depends On"},"rationale":{"type":"string","title":"Rationale","default":""},"status":{"type":"string","title":"Status"},"result":{"additionalProperties":true,"type":"object","title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["primitive","params","status"],"title":"TryonAgentPlanStepSchema"},"TryonAgentUser":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["user_id","email"],"title":"TryonAgentUser"},"TryonCellPatch":{"properties":{"value":{"title":"Value"}},"type":"object","title":"TryonCellPatch"},"TryonCellStateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"row_id":{"type":"string","format":"uuid","title":"Row Id"},"cell_key":{"type":"string","title":"Cell Key"},"state":{"type":"string","title":"State"},"current_job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Job Id"},"current_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Version Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"blocker":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Blocker"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"auto_regen_count":{"type":"integer","title":"Auto Regen Count"},"stale":{"type":"boolean","title":"Stale"},"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","row_id","cell_key","state","current_job_id","current_version_id","error_message","blocker","auto_regen_count","stale","created_at","updated_at"],"title":"TryonCellStateResponse"},"TryonCellVersionListResponse":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/TryonCellVersionResponse"},"type":"array","title":"Versions"}},"type":"object","required":["versions"],"title":"TryonCellVersionListResponse"},"TryonCellVersionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"row_id":{"type":"string","format":"uuid","title":"Row Id"},"cell_key":{"type":"string","title":"Cell Key"},"version_num":{"type":"integer","title":"Version Num"},"value":{"title":"Value"},"source_kind":{"type":"string","title":"Source Kind"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"written_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Written By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","row_id","cell_key","version_num","value","source_kind","source_id","note","written_by_user_id","created_at"],"title":"TryonCellVersionResponse"},"TryonChatCancelResponse":{"properties":{"project_id":{"type":"string","title":"Project Id"},"interrupt_requested":{"type":"boolean","title":"Interrupt Requested"}},"type":"object","required":["project_id","interrupt_requested"],"title":"TryonChatCancelResponse"},"TryonChatHistoryResponse":{"properties":{"project_id":{"type":"string","title":"Project Id"},"messages":{"items":{"$ref":"#/components/schemas/TryonChatMessageResponse"},"type":"array","title":"Messages"},"agent_busy":{"type":"boolean","title":"Agent Busy"},"interrupt_requested":{"type":"boolean","title":"Interrupt Requested"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"}},"type":"object","required":["project_id","messages","agent_busy","interrupt_requested"],"title":"TryonChatHistoryResponse"},"TryonChatMessageResponse":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","title":"Role"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"sender_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender User Id"},"sequence":{"type":"integer","title":"Sequence"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","role","content","sender_user_id","sequence","created_at"],"title":"TryonChatMessageResponse"},"TryonColumnSpec":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":255,"minLength":1,"title":"Label"},"type":{"type":"string","maxLength":64,"minLength":1,"title":"Type"},"width":{"type":"integer","maximum":640.0,"minimum":64.0,"title":"Width","default":160},"step":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Step"},"required":{"type":"boolean","title":"Required","default":false},"pinned":{"anyOf":[{"type":"string","pattern":"^(left|right)$"},{"type":"null"}],"title":"Pinned"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"option_meta":{"anyOf":[{"items":{"$ref":"#/components/schemas/TryonOptionMeta"},"type":"array"},{"type":"null"}],"title":"Option Meta"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"form_schema":{"anyOf":[{"$ref":"#/components/schemas/TryonFormSchema"},{"type":"null"}]}},"type":"object","required":["key","label","type"],"title":"TryonColumnSpec"},"TryonCriticDeliver":{"properties":{"score":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Score"},"findings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":50,"title":"Findings"},"suggested_regen_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Suggested Regen Note"},"raw":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Raw"},"validator_skill":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Validator Skill"},"atom_job_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Atom Job Id"},"error":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Error"}},"type":"object","title":"TryonCriticDeliver","description":"Posted by tintin-media-worker's smart_edit_critic atom to the\ntryon critic-deliver endpoint. Wire shape mirrors the bitable B8\nCellValidationCreate so a single critic atom serves both surfaces."},"TryonEditingCommitToCellRequest":{"properties":{"output_s3_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Output S3 Key"},"request_id":{"type":"string","format":"uuid","title":"Request Id"}},"type":"object","required":["output_s3_key","request_id"],"title":"TryonEditingCommitToCellRequest"},"TryonEditingDeliverBody":{"properties":{"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"atom_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Atom Type"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"s3_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"S3 Keys"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"},"outputs":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Outputs"}},"additionalProperties":true,"type":"object","title":"TryonEditingDeliverBody","description":"Worker-side flattened callback shape.\n\nThe media-worker's ``_send_callback()`` posts\n``{\"job_id\": ..., \"atom_type\": ..., **result}`` (the result dict is\nspread at top level). We accept that shape directly here rather\nthan forcing the worker to reshape per-route."},"TryonEditingOutput":{"properties":{"s3_key":{"type":"string","title":"S3 Key"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height"}},"type":"object","required":["s3_key"],"title":"TryonEditingOutput"},"TryonEditingProjectCreateFromCell":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"row_id":{"type":"string","format":"uuid","title":"Row Id"},"cell_key":{"type":"string","maxLength":128,"minLength":1,"title":"Cell Key"},"source_image_s3_key":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Source Image S3 Key"},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"}},"type":"object","required":["project_id","row_id","cell_key"],"title":"TryonEditingProjectCreateFromCell","description":"Spawn an editing project from a tryon table cell.\n\nThe cell may hold a scalar s3_key, a {s3_key} dict, or a\n{s3_keys: list} dict. When the cell holds multiple images the\ncaller MUST send ``source_image_s3_key`` to pin which one to\nedit. The server snapshots that key into ``source_s3_key`` so the\nediting project survives downstream row mutations, and stamps it\non the cell's metadata so the FE can scope per-image badges +\ndelete protection."},"TryonEditingProjectCreateFromUpload":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"source_s3_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Source S3 Key"}},"type":"object","required":["name","source_s3_key"],"title":"TryonEditingProjectCreateFromUpload","description":"Create an editing project from a freshly uploaded image.\n\nThe image must already have been uploaded via /api/tryon/multipart/*\nwith purpose='editing_source' or 'scratch'. The s3_key returned by\nmultipart/complete is what we accept here."},"TryonEditingProjectListResponse":{"properties":{"projects":{"items":{"$ref":"#/components/schemas/TryonEditingProjectResponse"},"type":"array","title":"Projects"},"pagination_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pagination Token"}},"type":"object","required":["projects"],"title":"TryonEditingProjectListResponse"},"TryonEditingProjectResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"source_kind":{"type":"string","title":"Source Kind"},"source_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Project Id"},"source_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Row Id"},"source_cell_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Cell Key"},"source_s3_key":{"type":"string","title":"Source S3 Key"},"source_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Image Url"},"source_project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Project Name"},"source_row_sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Row Sku"},"request_count_cached":{"type":"integer","title":"Request Count Cached"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","owner_user_id","owner_team_id","name","status","source_kind","source_project_id","source_row_id","source_cell_key","source_s3_key","request_count_cached","created_at","updated_at"],"title":"TryonEditingProjectResponse"},"TryonEditingProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"status":{"anyOf":[{"type":"string","enum":["active","archived"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"TryonEditingProjectUpdate"},"TryonEditingRequestListResponse":{"properties":{"requests":{"items":{"$ref":"#/components/schemas/TryonEditingRequestResponse"},"type":"array","title":"Requests"},"pagination_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pagination Token"}},"type":"object","required":["requests"],"title":"TryonEditingRequestListResponse"},"TryonEditingRequestResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"editing_project_id":{"type":"string","format":"uuid","title":"Editing Project Id"},"tool_name":{"type":"string","title":"Tool Name"},"status":{"type":"string","title":"Status"},"input_image_s3_key":{"type":"string","title":"Input Image S3 Key"},"input_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Image Url"},"input_payload":{"additionalProperties":true,"type":"object","title":"Input Payload"},"outputs":{"items":{"$ref":"#/components/schemas/TryonEditingOutput"},"type":"array","title":"Outputs"},"job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"},"error_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Reason"},"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","editing_project_id","tool_name","status","input_image_s3_key","input_payload","job_id","error_reason","created_at","completed_at"],"title":"TryonEditingRequestResponse"},"TryonExecutionLogCreate":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Row Id"},"job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"},"actor_kind":{"type":"string","maxLength":64,"title":"Actor Kind","default":"user"},"actor_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Actor Id"},"event_kind":{"type":"string","maxLength":64,"minLength":1,"title":"Event Kind"},"cell_key":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Cell Key"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["project_id","event_kind"],"title":"TryonExecutionLogCreate"},"TryonExecutionLogListResponse":{"properties":{"logs":{"items":{"$ref":"#/components/schemas/TryonExecutionLogResponse"},"type":"array","title":"Logs"}},"type":"object","required":["logs"],"title":"TryonExecutionLogListResponse"},"TryonExecutionLogResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Row Id"},"job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"},"actor_kind":{"type":"string","title":"Actor Kind"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Id"},"event_kind":{"type":"string","title":"Event Kind"},"cell_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cell Key"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","row_id","job_id","actor_kind","actor_id","event_kind","cell_key","message","payload","created_at"],"title":"TryonExecutionLogResponse"},"TryonExportJobCreatedResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","enum":["queued","running","ready","failed"],"title":"Status"}},"type":"object","required":["job_id","status"],"title":"TryonExportJobCreatedResponse","description":"Shape returned by ``POST /api/tryon/projects/{id}/exports``."},"TryonExportJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"project_id":{"type":"string","title":"Project Id"},"user_id":{"type":"string","title":"User Id"},"format":{"type":"string","title":"Format"},"status":{"type":"string","enum":["queued","running","ready","failed"],"title":"Status"},"filename":{"type":"string","title":"Filename"},"download_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Download Url"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","title":"Created At"},"ready_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ready At"}},"type":"object","required":["job_id","project_id","user_id","format","status","filename","download_url","error","created_at","ready_at"],"title":"TryonExportJobResponse","description":"Shape returned by ``GET /api/tryon/projects/{id}/exports/{job_id}``.\n\nMirrors bitable's response so the FE polling helper can be ported\nnearly verbatim."},"TryonFormFieldSpec":{"properties":{"key":{"type":"string","maxLength":128,"minLength":1,"title":"Key"},"label":{"type":"string","maxLength":255,"minLength":1,"title":"Label"},"kind":{"type":"string","pattern":"^(select|text|number|boolean)$","title":"Kind","default":"select"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Options"},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"}},"type":"object","required":["key","label"],"title":"TryonFormFieldSpec","description":"One field inside a `type=form` column's structured editor.\n\n`kind` is the input UI (\"select\" | \"text\" | \"number\" | \"boolean\"). When\nkind == \"select\", `options` must be present. Server stores the cell value\nas a JSONB dict `{<field.key>: <value>, ...}` so the agent can read it\nvia the same path as before — no special tool surface."},"TryonFormSchema":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/TryonFormFieldSpec"},"type":"array","title":"Fields"}},"type":"object","title":"TryonFormSchema"},"TryonFreeGenerateRequest":{"properties":{"prompt":{"type":"string","maxLength":4000,"minLength":1,"title":"Prompt"},"reference_keys":{"items":{"type":"string"},"type":"array","maxItems":12,"title":"Reference Keys"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"resolution":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Resolution"},"aspect_ratio":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Aspect Ratio"}},"type":"object","required":["prompt"],"title":"TryonFreeGenerateRequest","description":"Free-form generate for cells without a static recipe (e.g. scene).\n\nUser supplies a natural-language prompt; the BE dispatches smart_edit\nwith that prompt + any reference images, and lands the result on\nthe named cell. No recipe required — the dispatcher stamps\n`_target_cell_key` in input_payload so the deliver handler knows\nwhere to write."},"TryonIngestRequest":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"resource_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200,"minItems":1,"title":"Resource Ids"},"prompt":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Prompt"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"mode":{"type":"string","enum":["auto","garments","models"],"title":"Mode","default":"auto"}},"type":"object","required":["project_id","resource_ids"],"title":"TryonIngestRequest"},"TryonIngestResponse":{"properties":{"workspace":{"$ref":"#/components/schemas/TryonWorkspaceResponse"},"created_rows":{"type":"integer","title":"Created Rows"},"created_resources":{"type":"integer","title":"Created Resources"},"assigned_resources":{"type":"integer","title":"Assigned Resources"},"needs_review":{"type":"integer","title":"Needs Review"},"message":{"type":"string","title":"Message"},"parse_report":{"additionalProperties":true,"type":"object","title":"Parse Report"}},"type":"object","required":["workspace","created_rows","created_resources","assigned_resources","needs_review","message"],"title":"TryonIngestResponse"},"TryonJobCreate":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Row Id"},"sku_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Sku Id"},"product_type":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Product Type"},"step_key":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Step Key"},"recipe_key":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Recipe Key"},"input_payload":{"additionalProperties":true,"type":"object","title":"Input Payload"},"output_payload":{"additionalProperties":true,"type":"object","title":"Output Payload"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"],"title":"Status","default":"queued"},"atom_type":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Atom Type"},"atom_job_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Atom Job Id"},"source_kind":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Source Kind"},"source_ref":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Source Ref"}},"type":"object","required":["project_id"],"title":"TryonJobCreate"},"TryonJobDeliver":{"properties":{"atom_job_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Atom Job Id"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled","ok","error","cancelled"],"title":"Status"},"result":{"additionalProperties":true,"type":"object","title":"Result"},"error_message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["status"],"title":"TryonJobDeliver","description":"Internal callback body used by deliver_to_tryon post-processing."},"TryonJobListResponse":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/TryonJobResponse"},"type":"array","title":"Jobs"}},"type":"object","required":["jobs"],"title":"TryonJobListResponse"},"TryonJobResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Row Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"sku_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku Id"},"product_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type"},"step_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Key"},"recipe_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipe Key"},"status":{"type":"string","title":"Status"},"atom_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Atom Type"},"atom_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Atom Job Id"},"source_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Kind"},"source_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Ref"},"input_payload":{"additionalProperties":true,"type":"object","title":"Input Payload"},"output_payload":{"additionalProperties":true,"type":"object","title":"Output Payload"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"attempt_count":{"type":"integer","title":"Attempt Count"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"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"}},"type":"object","required":["id","project_id","row_id","owner_user_id","owner_team_id","sku_id","product_type","step_key","recipe_key","status","atom_type","atom_job_id","source_kind","source_ref","input_payload","output_payload","error_message","attempt_count","started_at","completed_at","created_at","updated_at"],"title":"TryonJobResponse"},"TryonJobUpdate":{"properties":{"sku_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Sku Id"},"product_type":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Product Type"},"row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Row Id"},"step_key":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Step Key"},"recipe_key":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Recipe Key"},"input_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Payload"},"output_payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Payload"},"status":{"anyOf":[{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},{"type":"null"}],"title":"Status"},"atom_type":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Atom Type"},"atom_job_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Atom Job Id"},"error_message":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Error Message"}},"type":"object","title":"TryonJobUpdate"},"TryonLookupProjectItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"owner_user_id":{"type":"string","title":"Owner User Id"},"owner_email":{"type":"string","title":"Owner Email"},"row_count":{"type":"integer","title":"Row Count"},"job_count":{"type":"integer","title":"Job Count"},"archived":{"type":"boolean","title":"Archived"},"surface":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Surface"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","owner_user_id","owner_email","row_count","job_count","archived","surface","created_at","updated_at"],"title":"TryonLookupProjectItem"},"TryonLookupResponse":{"properties":{"projects":{"items":{"$ref":"#/components/schemas/TryonLookupProjectItem"},"type":"array","title":"Projects"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["projects","total"],"title":"TryonLookupResponse"},"TryonMultipartAbortRequest":{"properties":{"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"editing_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Editing Project Id"},"upload_id":{"type":"string","minLength":1,"title":"Upload Id"},"s3_key":{"type":"string","minLength":1,"title":"S3 Key"}},"type":"object","required":["upload_id","s3_key"],"title":"TryonMultipartAbortRequest"},"TryonMultipartCompleteRequest":{"properties":{"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"editing_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Editing Project Id"},"upload_id":{"type":"string","minLength":1,"title":"Upload Id"},"s3_key":{"type":"string","minLength":1,"title":"S3 Key"},"filename":{"type":"string","maxLength":500,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":100,"minLength":1,"title":"Content Type"},"size":{"type":"integer","maximum":524288000.0,"exclusiveMinimum":0.0,"title":"Size"},"parts":{"items":{"$ref":"#/components/schemas/TryonMultipartCompletedPart"},"type":"array","minItems":1,"title":"Parts"}},"type":"object","required":["upload_id","s3_key","filename","content_type","size","parts"],"title":"TryonMultipartCompleteRequest"},"TryonMultipartCompletedPart":{"properties":{"part_number":{"type":"integer","minimum":1.0,"title":"Part Number"},"etag":{"type":"string","minLength":1,"title":"Etag"}},"type":"object","required":["part_number","etag"],"title":"TryonMultipartCompletedPart"},"TryonMultipartCreateRequest":{"properties":{"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"editing_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Editing Project Id"},"purpose":{"type":"string","enum":["cell","editing_source","editing_mask","editing_ref","scratch","chat"],"title":"Purpose","default":"cell"},"filename":{"type":"string","maxLength":500,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":100,"minLength":1,"title":"Content Type"},"size":{"type":"integer","maximum":524288000.0,"exclusiveMinimum":0.0,"title":"Size"}},"type":"object","required":["filename","content_type","size"],"title":"TryonMultipartCreateRequest"},"TryonMultipartCreateResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"s3_key":{"type":"string","title":"S3 Key"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"part_size":{"type":"integer","title":"Part Size"},"part_count":{"type":"integer","title":"Part Count"}},"type":"object","required":["upload_id","s3_key","filename","content_type","part_size","part_count"],"title":"TryonMultipartCreateResponse"},"TryonMultipartPartResponse":{"properties":{"part_number":{"type":"integer","title":"Part Number"},"etag":{"type":"string","title":"Etag"}},"type":"object","required":["part_number","etag"],"title":"TryonMultipartPartResponse"},"TryonMultipartPresignPartsRequest":{"properties":{"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"editing_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Editing Project Id"},"upload_id":{"type":"string","minLength":1,"title":"Upload Id"},"s3_key":{"type":"string","minLength":1,"title":"S3 Key"},"part_numbers":{"items":{"type":"integer"},"type":"array","maxItems":10000,"minItems":1,"title":"Part Numbers"}},"type":"object","required":["upload_id","s3_key","part_numbers"],"title":"TryonMultipartPresignPartsRequest"},"TryonMultipartPresignPartsResponse":{"properties":{"urls":{"items":{"$ref":"#/components/schemas/TryonMultipartPresignedPart"},"type":"array","title":"Urls"}},"type":"object","required":["urls"],"title":"TryonMultipartPresignPartsResponse"},"TryonMultipartPresignedPart":{"properties":{"part_number":{"type":"integer","title":"Part Number"},"url":{"type":"string","title":"Url"}},"type":"object","required":["part_number","url"],"title":"TryonMultipartPresignedPart"},"TryonOptionMeta":{"properties":{"value":{"type":"string","maxLength":128,"minLength":1,"title":"Value"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"},"sketch_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Sketch Url"},"product_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Product Types"},"model_categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Categories"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"type":"object","required":["value"],"title":"TryonOptionMeta","description":"Rich metadata for a multi_select/select column option.\n\nUsed by the pose_variants picker to surface preview sketches +\nproduct/model-category eligibility. Frontend treats it as\nadditive: if `option_meta` is present, render rich cards;\notherwise fall back to `options` (plain strings)."},"TryonPoseVariantAnalyzeRequest":{"properties":{"source_photo_s3_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Source Photo S3 Key"}},"type":"object","required":["source_photo_s3_key"],"title":"TryonPoseVariantAnalyzeRequest"},"TryonPoseVariantAnalyzeResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"product_types":{"items":{"type":"string"},"type":"array","title":"Product Types"},"model_categories":{"items":{"type":"string"},"type":"array","title":"Model Categories"}},"type":"object","required":["slug","label","description","product_types","model_categories"],"title":"TryonPoseVariantAnalyzeResponse"},"TryonPoseVariantCreate":{"properties":{"scope":{"type":"string","pattern":"^(global|table)$","title":"Scope"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"slug":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[a-z0-9_-]+$","title":"Slug"},"label":{"type":"string","maxLength":255,"minLength":1,"title":"Label"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"source_photo_s3_key":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Source Photo S3 Key"},"refinement_prompt":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Refinement Prompt"},"sketch_s3_key":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Sketch S3 Key"},"sketch_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Sketch Url"},"product_types":{"items":{"type":"string"},"type":"array","title":"Product Types"},"model_categories":{"items":{"type":"string"},"type":"array","title":"Model Categories"}},"type":"object","required":["scope","slug","label"],"title":"TryonPoseVariantCreate","description":"User creates a new pose variant. `scope` decides where it lives:\n- \"global\": owned by current_user, visible across all of their projects\n- \"table\":  owned by current_user, attached to `project_id`\nPresets are seeded via migration only; the API rejects scope=preset\nposts."},"TryonPoseVariantListResponse":{"properties":{"variants":{"items":{"$ref":"#/components/schemas/TryonPoseVariantResponse"},"type":"array","title":"Variants"}},"type":"object","required":["variants"],"title":"TryonPoseVariantListResponse"},"TryonPoseVariantPreviewSketchRequest":{"properties":{"source_photo_s3_key":{"type":"string","maxLength":2048,"minLength":1,"title":"Source Photo S3 Key"},"refinement_prompt":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Refinement Prompt"}},"type":"object","required":["source_photo_s3_key"],"title":"TryonPoseVariantPreviewSketchRequest"},"TryonPoseVariantPreviewSketchResponse":{"properties":{"sketch_s3_key":{"type":"string","title":"Sketch S3 Key"},"sketch_url":{"type":"string","title":"Sketch Url"}},"type":"object","required":["sketch_s3_key","sketch_url"],"title":"TryonPoseVariantPreviewSketchResponse"},"TryonPoseVariantResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"scope":{"type":"string","title":"Scope"},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner User Id"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"slug":{"type":"string","title":"Slug"},"label":{"type":"string","title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sketch_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sketch S3 Key"},"sketch_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sketch Url"},"source_photo_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Photo S3 Key"},"refinement_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refinement Prompt"},"product_types":{"items":{"type":"string"},"type":"array","title":"Product Types"},"model_categories":{"items":{"type":"string"},"type":"array","title":"Model Categories"},"sketch_status":{"type":"string","title":"Sketch Status","default":"ready"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","scope","owner_user_id","owner_team_id","project_id","slug","label","description","sketch_s3_key","sketch_url","source_photo_s3_key","refinement_prompt","product_types","model_categories","created_at","updated_at"],"title":"TryonPoseVariantResponse"},"TryonPoseVariantUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"refinement_prompt":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Refinement Prompt"},"product_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Product Types"},"model_categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Categories"}},"type":"object","title":"TryonPoseVariantUpdate","description":"Editable fields on an owned variant. Presets are immutable —\nthe API rejects PATCH on any scope=preset row."},"TryonProgramCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"sort_order":{"type":"integer","title":"Sort Order","default":0}},"type":"object","required":["name"],"title":"TryonProgramCreate"},"TryonProgramListResponse":{"properties":{"programs":{"items":{"$ref":"#/components/schemas/TryonProgramResponse"},"type":"array","title":"Programs"}},"type":"object","required":["programs"],"title":"TryonProgramListResponse"},"TryonProgramResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"sort_order":{"type":"integer","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","owner_user_id","owner_team_id","name","description","settings","sort_order","created_at","updated_at","archived_at"],"title":"TryonProgramResponse"},"TryonProgramUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"TryonProgramUpdate"},"TryonProjectCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"program_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"}},"type":"object","required":["name"],"title":"TryonProjectCreate"},"TryonProjectListResponse":{"properties":{"projects":{"items":{"$ref":"#/components/schemas/TryonProjectResponse"},"type":"array","title":"Projects"}},"type":"object","required":["projects"],"title":"TryonProjectListResponse"},"TryonProjectResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"program_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"row_count_cached":{"type":"integer","title":"Row Count Cached"},"job_count_cached":{"type":"integer","title":"Job Count Cached"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","owner_user_id","owner_team_id","name","description","settings","row_count_cached","job_count_cached","created_at","updated_at","archived_at"],"title":"TryonProjectResponse"},"TryonProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"},"program_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Program Id"},"clear_program":{"type":"boolean","title":"Clear Program","default":false}},"type":"object","title":"TryonProjectUpdate"},"TryonQaBackfillRequest":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"row_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":500},{"type":"null"}],"title":"Row Ids"},"force":{"type":"boolean","title":"Force","default":false},"auto_regen":{"type":"boolean","title":"Auto Regen","default":true}},"type":"object","required":["project_id"],"title":"TryonQaBackfillRequest"},"TryonQaBackfillResponse":{"properties":{"workspace":{"$ref":"#/components/schemas/TryonWorkspaceResponse"},"updated_rows":{"type":"integer","title":"Updated Rows"},"updated_cells":{"type":"integer","title":"Updated Cells"},"dispatched_jobs":{"items":{"$ref":"#/components/schemas/TryonJobResponse"},"type":"array","title":"Dispatched Jobs"},"message":{"type":"string","title":"Message"}},"type":"object","required":["workspace","updated_rows","updated_cells","message"],"title":"TryonQaBackfillResponse"},"TryonRecipeCreate":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"recipe_key":{"type":"string","maxLength":128,"minLength":1,"title":"Recipe Key"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"step_order":{"type":"integer","title":"Step Order","default":0},"enabled":{"type":"boolean","title":"Enabled","default":true},"trigger":{"type":"string","maxLength":64,"title":"Trigger","default":"manual"},"depends_on":{"items":{},"type":"array","title":"Depends On"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"output_schema":{"additionalProperties":true,"type":"object","title":"Output Schema"},"dispatch":{"additionalProperties":true,"type":"object","title":"Dispatch"},"ui":{"additionalProperties":true,"type":"object","title":"Ui"}},"type":"object","required":["project_id","recipe_key","name"],"title":"TryonRecipeCreate"},"TryonRecipeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"recipe_key":{"type":"string","title":"Recipe Key"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"step_order":{"type":"integer","title":"Step Order"},"enabled":{"type":"boolean","title":"Enabled"},"trigger":{"type":"string","title":"Trigger"},"depends_on":{"items":{},"type":"array","title":"Depends On"},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema"},"output_schema":{"additionalProperties":true,"type":"object","title":"Output Schema"},"dispatch":{"additionalProperties":true,"type":"object","title":"Dispatch"},"ui":{"additionalProperties":true,"type":"object","title":"Ui"},"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","owner_user_id","owner_team_id","recipe_key","name","description","step_order","enabled","trigger","depends_on","input_schema","output_schema","dispatch","ui","created_at","updated_at"],"title":"TryonRecipeResponse"},"TryonRecipeUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"step_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Step Order"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"trigger":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Trigger"},"depends_on":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Depends On"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"},"output_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Schema"},"dispatch":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Dispatch"},"ui":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ui"}},"type":"object","title":"TryonRecipeUpdate"},"TryonResourceCreate":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"kind":{"type":"string","maxLength":64,"minLength":1,"title":"Kind"},"role":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Role"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Url"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["project_id","kind"],"title":"TryonResourceCreate"},"TryonResourceListResponse":{"properties":{"resources":{"items":{"$ref":"#/components/schemas/TryonResourceResponse"},"type":"array","title":"Resources"}},"type":"object","required":["resources"],"title":"TryonResourceListResponse"},"TryonResourceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"kind":{"type":"string","title":"Kind"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Url"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"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","owner_user_id","owner_team_id","kind","role","label","s3_key","external_url","archived_at","created_at","updated_at"],"title":"TryonResourceResponse"},"TryonResourceUpdate":{"properties":{"kind":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Kind"},"role":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Role"},"label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Label"},"s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"S3 Key"},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Url"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"TryonResourceUpdate"},"TryonRowCreate":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"sku_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Sku Id"},"product_type":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Product Type"},"garment_category":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Garment Category"},"status":{"type":"string","enum":["draft","ready","running","review","done","blocked"],"title":"Status","default":"draft"},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"step_state":{"additionalProperties":true,"type":"object","title":"Step State"}},"type":"object","required":["project_id"],"title":"TryonRowCreate"},"TryonRowListResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/TryonRowResponse"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"TryonRowListResponse"},"TryonRowResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"owner_user_id":{"type":"string","format":"uuid","title":"Owner User Id"},"owner_team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Team Id"},"order_index":{"type":"integer","title":"Order Index"},"sku_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku Id"},"product_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Type"},"garment_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Garment Category"},"status":{"type":"string","title":"Status"},"data":{"additionalProperties":true,"type":"object","title":"Data"},"step_state":{"additionalProperties":true,"type":"object","title":"Step State"},"billing_charged":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Billing Charged"},"billing_refunded":{"type":"boolean","title":"Billing Refunded","default":false},"free_retry_used":{"type":"boolean","title":"Free Retry Used","default":false},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"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","owner_user_id","owner_team_id","order_index","sku_id","product_type","garment_category","status","data","step_state","archived_at","created_at","updated_at"],"title":"TryonRowResponse"},"TryonRowUpdate":{"properties":{"sku_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Sku Id"},"product_type":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Product Type"},"garment_category":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Garment Category"},"status":{"anyOf":[{"type":"string","enum":["draft","ready","running","review","done","blocked"]},{"type":"null"}],"title":"Status"},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"step_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Step State"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived"}},"type":"object","title":"TryonRowUpdate"},"TryonRunRequest":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"row_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":200},{"type":"null"}],"title":"Row Ids"},"recipe_key":{"type":"string","maxLength":128,"title":"Recipe Key","default":"generate_tryon_front"},"prompt":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Prompt"},"qa_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Qa Note"},"resolution":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Resolution"},"aspect_ratio":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Aspect Ratio"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"free_retry_of_row_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Free Retry Of Row Id"}},"type":"object","required":["project_id"],"title":"TryonRunRequest"},"TryonRunResponse":{"properties":{"workspace":{"$ref":"#/components/schemas/TryonWorkspaceResponse"},"jobs":{"items":{"$ref":"#/components/schemas/TryonJobResponse"},"type":"array","title":"Jobs"},"skipped_rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Skipped Rows"},"message":{"type":"string","title":"Message"}},"type":"object","required":["workspace","jobs","message"],"title":"TryonRunResponse"},"TryonTableBranchCreate":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"from_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"From Version Id"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"},"set_as_head":{"type":"boolean","title":"Set As Head","default":true}},"type":"object","required":["name"],"title":"TryonTableBranchCreate"},"TryonTableCheckoutRequest":{"properties":{"branch_name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Branch Name"},"version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Version Id"}},"type":"object","title":"TryonTableCheckoutRequest"},"TryonTableMergeRequest":{"properties":{"source_branch_name":{"type":"string","maxLength":128,"minLength":1,"title":"Source Branch Name"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"}},"type":"object","required":["source_branch_name"],"title":"TryonTableMergeRequest"},"TryonTableMergeResponse":{"properties":{"status":{"type":"string","enum":["merged","conflicts"],"title":"Status"},"version":{"anyOf":[{"$ref":"#/components/schemas/TryonTableVersionResponse"},{"type":"null"}]},"conflicts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Conflicts"},"source_version_id":{"type":"string","format":"uuid","title":"Source Version Id"},"target_version_id":{"type":"string","format":"uuid","title":"Target Version Id"},"base_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Base Version Id"}},"type":"object","required":["status","source_version_id","target_version_id"],"title":"TryonTableMergeResponse"},"TryonTableRevertRequest":{"properties":{"target_version_id":{"type":"string","format":"uuid","title":"Target Version Id"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"}},"type":"object","required":["target_version_id"],"title":"TryonTableRevertRequest"},"TryonTableVersionCreate":{"properties":{"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"},"set_as_head":{"type":"boolean","title":"Set As Head","default":true}},"type":"object","title":"TryonTableVersionCreate"},"TryonTableVersionDiffResponse":{"properties":{"from_version_id":{"type":"string","format":"uuid","title":"From Version Id"},"to_version_id":{"type":"string","format":"uuid","title":"To Version Id"},"added_rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Added Rows"},"removed_rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Removed Rows"},"changed_cells":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Changed Cells"}},"type":"object","required":["from_version_id","to_version_id"],"title":"TryonTableVersionDiffResponse"},"TryonTableVersionListResponse":{"properties":{"versions":{"items":{"$ref":"#/components/schemas/TryonTableVersionResponse"},"type":"array","title":"Versions"}},"type":"object","required":["versions"],"title":"TryonTableVersionListResponse"},"TryonTableVersionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"parent_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Version Id"},"version_num":{"type":"integer","title":"Version Num"},"kind":{"type":"string","title":"Kind"},"branch_name":{"type":"string","title":"Branch Name"},"source_kind":{"type":"string","title":"Source Kind"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"},"operation":{"type":"string","title":"Operation"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"snapshot":{"additionalProperties":true,"type":"object","title":"Snapshot"},"written_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Written By User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","parent_version_id","version_num","kind","branch_name","source_kind","source_id","operation","summary","message","snapshot","written_by_user_id","created_at"],"title":"TryonTableVersionResponse"},"TryonUploadFileInfo":{"properties":{"filename":{"type":"string","maxLength":500,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":100,"minLength":1,"title":"Content Type"},"size":{"type":"integer","maximum":524288000.0,"exclusiveMinimum":0.0,"title":"Size"}},"type":"object","required":["filename","content_type","size"],"title":"TryonUploadFileInfo"},"TryonUploadUrlItem":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"s3_key":{"type":"string","title":"S3 Key"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["upload_url","s3_key","filename","content_type","expires_in"],"title":"TryonUploadUrlItem"},"TryonUploadUrlsRequest":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"files":{"items":{"$ref":"#/components/schemas/TryonUploadFileInfo"},"type":"array","maxItems":20,"minItems":1,"title":"Files"}},"type":"object","required":["project_id","files"],"title":"TryonUploadUrlsRequest"},"TryonUploadUrlsResponse":{"properties":{"uploads":{"items":{"$ref":"#/components/schemas/TryonUploadUrlItem"},"type":"array","title":"Uploads"}},"type":"object","required":["uploads"],"title":"TryonUploadUrlsResponse"},"TryonUploadedFileItem":{"properties":{"s3_key":{"type":"string","title":"S3 Key"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size":{"type":"integer","title":"Size"}},"type":"object","required":["s3_key","filename","content_type","size"],"title":"TryonUploadedFileItem"},"TryonUploadedFilesResponse":{"properties":{"uploads":{"items":{"$ref":"#/components/schemas/TryonUploadedFileItem"},"type":"array","title":"Uploads"}},"type":"object","required":["uploads"],"title":"TryonUploadedFilesResponse"},"TryonWorkspaceResponse":{"properties":{"project":{"$ref":"#/components/schemas/TryonProjectResponse"},"columns":{"items":{"$ref":"#/components/schemas/TryonColumnSpec"},"type":"array","title":"Columns"},"recipes":{"items":{"$ref":"#/components/schemas/TryonRecipeResponse"},"type":"array","title":"Recipes"},"rows":{"items":{"$ref":"#/components/schemas/TryonRowResponse"},"type":"array","title":"Rows"},"cell_states":{"items":{"$ref":"#/components/schemas/TryonCellStateResponse"},"type":"array","title":"Cell States"},"resources":{"items":{"$ref":"#/components/schemas/TryonResourceResponse"},"type":"array","title":"Resources"},"jobs":{"items":{"$ref":"#/components/schemas/TryonJobResponse"},"type":"array","title":"Jobs"},"logs":{"items":{"$ref":"#/components/schemas/TryonExecutionLogResponse"},"type":"array","title":"Logs"}},"type":"object","required":["project","columns","recipes","rows","resources","jobs","logs"],"title":"TryonWorkspaceResponse"},"TryonZipCellRef":{"properties":{"row_id":{"type":"string","format":"uuid","title":"Row Id"},"cell_key":{"type":"string","maxLength":64,"minLength":1,"title":"Cell Key"}},"type":"object","required":["row_id","cell_key"],"title":"TryonZipCellRef","description":"A single (row, cell_key) coordinate for cell-level ZIP scope."},"TryonZipExportRequest":{"properties":{"row_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Row Ids"},"cell_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cell Keys"},"cell_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/TryonZipCellRef"},"type":"array"},{"type":"null"}],"title":"Cell Refs"},"naming_mode":{"type":"string","enum":["subfolder","prefix"],"title":"Naming Mode","default":"subfolder"}},"type":"object","title":"TryonZipExportRequest","description":"Body for ``POST /api/tryon/projects/{id}/exports`` (format=zip).\n\nSelection precedence: ``cell_refs`` > ``row_ids`` (× ``cell_keys``) >\n\"all rows × all attachment cells\". Caller picks one shape; we\ndon't try to reconcile mixed shapes.\n\n``naming_mode``:\n  - ``subfolder``: ``{column_name}/{row_label}/file.ext``\n  - ``prefix``:    ``{column_name}__{row_label}__file.ext``"},"UnreadCountResponse":{"properties":{"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"UnreadCountResponse","description":"Unread notification count."},"UpdateAgentDocumentsRequest":{"properties":{"document_keys":{"items":{"type":"string"},"type":"array","title":"Document Keys"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["document_keys"],"title":"UpdateAgentDocumentsRequest"},"UpdateAgentDocumentsResponse":{"properties":{"doc_context":{"additionalProperties":true,"type":"object","title":"Doc Context"},"workspace_refreshed":{"type":"boolean","title":"Workspace Refreshed"}},"type":"object","required":["doc_context","workspace_refreshed"],"title":"UpdateAgentDocumentsResponse"},"UpdateElementRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"usage_instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usage Instructions"},"element_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Element Type"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"visibility":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visibility"}},"type":"object","title":"UpdateElementRequest"},"UpdateFileRequest":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"}},"type":"object","title":"UpdateFileRequest"},"UpdatePostRequest":{"properties":{"frontmatter":{"$ref":"#/components/schemas/BlogPostFrontmatter"},"content":{"type":"string","title":"Content"}},"type":"object","required":["frontmatter","content"],"title":"UpdatePostRequest"},"UpdateRoleRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"recommended_services":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Recommended Services"},"onboarding_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Onboarding Message"},"archetype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archetype"}},"type":"object","title":"UpdateRoleRequest"},"UpdateSchemaRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"singleton":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Singleton"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"fields":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Fields"}},"type":"object","title":"UpdateSchemaRequest"},"UpdateScopesRequest":{"properties":{"scope_level":{"type":"string","maxLength":20,"title":"Scope Level"}},"type":"object","required":["scope_level"],"title":"UpdateScopesRequest"},"UpdateSharingRequest":{"properties":{"share_mode":{"type":"string","pattern":"^(private|link|restricted)$","title":"Share Mode"}},"type":"object","required":["share_mode"],"title":"UpdateSharingRequest"},"UpdateSkillBundleRequest":{"properties":{"skills":{"items":{"$ref":"#/components/schemas/SkillBundleItem"},"type":"array","title":"Skills"}},"type":"object","required":["skills"],"title":"UpdateSkillBundleRequest"},"UpdateSpaceRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"locales":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Locales"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"}},"type":"object","title":"UpdateSpaceRequest"},"UploadRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"url":{"type":"string","title":"Url"},"prefix":{"type":"string","title":"Prefix","default":"uploads"}},"type":"object","required":["agent_id","url"],"title":"UploadRequest"},"UploadUrlsRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"files":{"items":{"$ref":"#/components/schemas/FileInfo"},"type":"array","title":"Files"}},"type":"object","required":["agent_id","files"],"title":"UploadUrlsRequest"},"UsageBucketRow":{"properties":{"label":{"type":"string","title":"Label"},"credits_cents":{"type":"integer","title":"Credits Cents"},"calls":{"type":"integer","title":"Calls"}},"type":"object","required":["label","credits_cents","calls"],"title":"UsageBucketRow","description":"Aggregated usage along a single dimension (action_type or model)."},"UsageRequest":{"properties":{"token":{"type":"string","minLength":10,"title":"Token"},"event":{"type":"string","maxLength":64,"minLength":1,"title":"Event"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["token","event"],"title":"UsageRequest","description":"Non-billing telemetry event. Logs an `app_usage` ledger row with\n`amount=0` and the event details in metadata for later analytics."},"UserAutomationSettings":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"neutralize_garment_enabled":{"type":"boolean","title":"Neutralize Garment Enabled"},"qa_auto_regen_enabled":{"type":"boolean","title":"Qa Auto Regen Enabled"},"qa_notes_in_regen_enabled":{"type":"boolean","title":"Qa Notes In Regen Enabled"}},"type":"object","required":["user_id","email","neutralize_garment_enabled","qa_auto_regen_enabled","qa_notes_in_regen_enabled"],"title":"UserAutomationSettings"},"UserDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"plan":{"type":"string","title":"Plan"},"max_agent_slots":{"type":"integer","title":"Max Agent Slots"},"is_whitelisted":{"type":"boolean","title":"Is Whitelisted"},"whitelisted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Whitelisted At"},"whitelist_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whitelist Note"},"whitelist_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Whitelist Expires At"},"whitelist_no_expiration":{"type":"boolean","title":"Whitelist No Expiration","default":false},"credit_balance":{"type":"integer","title":"Credit Balance"},"credit_subscription":{"type":"integer","title":"Credit Subscription","default":0},"credit_bonus":{"type":"integer","title":"Credit Bonus","default":0},"team_credit_balance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Credit Balance"},"team_credit_subscription":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Credit Subscription"},"team_credit_bonus":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Credit Bonus"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"studio_credits":{"type":"number","title":"Studio Credits","default":0},"studio_credits_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Studio Credits Expires At"},"studio_bonus_credits":{"type":"number","title":"Studio Bonus Credits","default":0},"studio_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Plan"},"studio_billing_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Billing Period"},"studio_subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Subscription Status"},"studio_current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Studio Current Period End"},"studio_cancel_at_period_end":{"type":"boolean","title":"Studio Cancel At Period End","default":false},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"stripe_subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Subscription Id"},"owned_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owned Team Id"},"owned_team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owned Team Name"},"owned_team_studio_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Owned Team Studio Credits"},"owned_team_studio_bonus_credits":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Owned Team Studio Bonus Credits"},"owned_team_studio_credits_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Owned Team Studio Credits Expires At"},"owned_team_studio_subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owned Team Studio Subscription Status"},"owned_team_studio_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owned Team Studio Plan"},"owned_team_studio_current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Owned Team Studio Current Period End"},"agents":{"items":{"$ref":"#/components/schemas/AgentSummary"},"type":"array","title":"Agents"},"connected_services":{"items":{"type":"string"},"type":"array","title":"Connected Services"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","plan","max_agent_slots","is_whitelisted","whitelisted_at","whitelist_note","credit_balance","stripe_customer_id","stripe_subscription_id","agents","connected_services","created_at"],"title":"UserDetailResponse","description":"Detailed user info."},"UserListResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/UserSummary"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["users","total","page","page_size"],"title":"UserListResponse","description":"Paginated user list."},"UserProfileUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"company_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Size"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"purposes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Purposes"},"avatar_s3_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar S3 Key"}},"type":"object","title":"UserProfileUpdate"},"UserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"plan":{"type":"string","title":"Plan"},"max_agent_slots":{"type":"integer","title":"Max Agent Slots"},"manager_agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Manager Agent Id"},"team_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"team_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Role"},"profile":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Profile"},"onboarding_completed":{"type":"boolean","title":"Onboarding Completed","default":false},"last_ui_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Last Ui State"},"desktop_tools_activated":{"type":"boolean","title":"Desktop Tools Activated","default":false},"capabilities":{"additionalProperties":true,"type":"object","title":"Capabilities","default":{}},"work_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Work Email"},"work_email_verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Work Email Verified At"},"active_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Active Context"},"teams":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Teams","default":[]},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}},"type":"object","required":["id","email","plan","max_agent_slots","manager_agent_id"],"title":"UserResponse"},"UserStorageListResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/UserStorageResponse"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"}},"type":"object","required":["users","total","page","per_page"],"title":"UserStorageListResponse"},"UserStorageResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"plan":{"type":"string","title":"Plan"},"used_bytes":{"type":"integer","title":"Used Bytes"},"quota_bytes":{"type":"integer","title":"Quota Bytes"},"used_pct":{"type":"number","title":"Used Pct"},"file_count":{"type":"integer","title":"File Count"}},"type":"object","required":["user_id","email","plan","used_bytes","quota_bytes","used_pct","file_count"],"title":"UserStorageResponse"},"UserSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"plan":{"type":"string","title":"Plan"},"studio_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Plan"},"studio_billing_period":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Billing Period"},"studio_subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Studio Subscription Status"},"agent_count":{"type":"integer","title":"Agent Count","default":0},"credit_balance":{"type":"integer","title":"Credit Balance","default":0},"credit_subscription":{"type":"integer","title":"Credit Subscription","default":0},"credit_bonus":{"type":"integer","title":"Credit Bonus","default":0},"team_credit_balance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Credit Balance"},"team_credit_subscription":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Credit Subscription"},"team_credit_bonus":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team Credit Bonus"},"is_whitelisted":{"type":"boolean","title":"Is Whitelisted"},"whitelist_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Whitelist Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","plan","is_whitelisted","created_at"],"title":"UserSummary","description":"User summary for list view."},"UserUpdateRequest":{"properties":{"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"max_agent_slots":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Agent Slots"},"add_credits_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Add Credits Cents"},"credit_target":{"anyOf":[{"type":"string","pattern":"^(team|personal)$"},{"type":"null"}],"title":"Credit Target"},"add_studio_credits":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Add Studio Credits"},"studio_credits_expires_in_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Studio Credits Expires In Days"},"set_studio_bonus_credits":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Set Studio Bonus Credits"},"set_studio_credits":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Set Studio Credits"},"set_studio_credits_expires_in_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Set Studio Credits Expires In Days"},"studio_credits_target":{"anyOf":[{"type":"string","pattern":"^(team|personal)$"},{"type":"null"}],"title":"Studio Credits Target"},"grant_studio_plan":{"anyOf":[{"type":"string","pattern":"^(starter|studio|pro)$"},{"type":"null"}],"title":"Grant Studio Plan"},"grant_studio_billing_period":{"anyOf":[{"type":"string","pattern":"^(monthly|annual)$"},{"type":"null"}],"title":"Grant Studio Billing Period"}},"type":"object","title":"UserUpdateRequest","description":"Update user settings (all fields optional)."},"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"},"VaultGetError":{"properties":{"error":{"type":"string","enum":["vault.not_found","vault.no_grant","vault.business_mismatch","vault.unreachable"],"title":"Error"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["error","detail"],"title":"VaultGetError"},"VaultGetRequest":{"properties":{"slug":{"type":"string","minLength":1,"title":"Slug","description":"Credential slug"},"fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fields","description":"Optional — specific field names to return. Omit for all fields."}},"type":"object","required":["slug"],"title":"VaultGetRequest"},"VaultGetResponse":{"properties":{"fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Fields"},"business_id":{"type":"string","title":"Business Id"},"audit_id":{"type":"string","title":"Audit Id"}},"type":"object","required":["fields","business_id","audit_id"],"title":"VaultGetResponse"},"VerifyCodeRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"VerifyCodeRequest"},"VerifyRequest":{"properties":{"u":{"type":"string","title":"U","description":"user id"},"e":{"type":"string","title":"E","description":"work email the token was minted for"},"exp":{"type":"integer","title":"Exp","description":"unix expiry the token was minted with"},"t":{"type":"string","title":"T","description":"HMAC token"}},"type":"object","required":["u","e","exp","t"],"title":"VerifyRequest"},"VoiceGenerateRequest":{"properties":{"character_json":{"additionalProperties":true,"type":"object","title":"Character Json"}},"type":"object","required":["character_json"],"title":"VoiceGenerateRequest"},"VoiceResponse":{"properties":{"voice_id":{"type":"string","title":"Voice Id"},"sample_s3_key":{"type":"string","title":"Sample S3 Key"}},"type":"object","required":["voice_id","sample_s3_key"],"title":"VoiceResponse"},"WhitelistNoteRequest":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"}},"type":"object","title":"WhitelistNoteRequest","description":"Edit the note on an EXISTING whitelist grant.\n\nSeparate from WhitelistRequest because re-POSTing to change a note would\nreset `whitelisted_at` / `whitelisted_by` and re-open the expiry choice —\nlosing when and by whom the exemption was originally granted. The note is\nthe only field this touches.\n\nFree text on purpose: it carries whatever the 2B contract needs (contract\nno. / wire amount / period / who signed it), and those vary per deal. The\ncolumn is TEXT, so multi-line is fine; the cap is here to keep an admin\ntypo from writing a novel into every list response."},"WhitelistRequest":{"properties":{"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"no_expiration":{"type":"boolean","title":"No Expiration","default":false}},"type":"object","title":"WhitelistRequest","description":"Whitelist a user."},"WizardTestSendRequest":{"properties":{"html":{"type":"string","minLength":1,"title":"Html"},"asset_map":{"additionalProperties":{"type":"string"},"type":"object","title":"Asset Map"},"subject":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Subject"},"to_emails":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"To Emails"},"sender_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Sender Email"},"sender_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sender Name"}},"type":"object","required":["html","to_emails"],"title":"WizardTestSendRequest"},"WooConnectRequest":{"properties":{"store_url":{"type":"string","maxLength":512,"minLength":1,"title":"Store Url"}},"type":"object","required":["store_url"],"title":"WooConnectRequest"},"WorkflowPlanRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"title":{"type":"string","title":"Title"},"trigger":{"type":"string","title":"Trigger","default":"skill:workflow-planner"},"context":{"additionalProperties":true,"type":"object","title":"Context"}},"type":"object","required":["agent_id","title","context"],"title":"WorkflowPlanRequest"},"WorkflowProgressRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"atom_type":{"type":"string","title":"Atom Type"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["agent_id","atom_type","metadata"],"title":"WorkflowProgressRequest"},"WorkspaceCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"WorkspaceCreate"},"WorkspaceListResponse":{"properties":{"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceResponse"},"type":"array","title":"Workspaces"}},"type":"object","required":["workspaces"],"title":"WorkspaceListResponse"},"WorkspaceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"team_id":{"type":"string","format":"uuid","title":"Team Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","team_id","name","created_at"],"title":"WorkspaceResponse"},"WriteSkillFileRequest":{"properties":{"content":{"type":"string","maxLength":500000,"minLength":1,"title":"Content"}},"type":"object","required":["content"],"title":"WriteSkillFileRequest"},"WriteTemplateRequest":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"WriteTemplateRequest"},"ZipCellRef":{"properties":{"row_id":{"type":"string","format":"uuid","title":"Row Id"},"col_id":{"type":"string","title":"Col Id"}},"type":"object","required":["row_id","col_id"],"title":"ZipCellRef","description":"A single (row, column) coordinate for cell-level ZIP scope."},"ZipExportRequest":{"properties":{"row_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Row Ids"},"col_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Col Ids"},"cell_refs":{"anyOf":[{"items":{"$ref":"#/components/schemas/ZipCellRef"},"type":"array"},{"type":"null"}],"title":"Cell Refs"},"naming_mode":{"type":"string","enum":["subfolder","prefix"],"title":"Naming Mode","default":"subfolder"},"revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revision Id"},"version_scope":{"type":"string","enum":["current","all"],"title":"Version Scope","default":"current"},"sub_table_depth":{"type":"integer","maximum":3.0,"minimum":0.0,"title":"Sub Table Depth","default":0}},"type":"object","title":"ZipExportRequest","description":"Body for ``POST /api/bitables/{id}/exports?format=zip``.\n\nSelection precedence: ``cell_refs`` > ``row_ids`` (× ``col_ids``) >\n\"all rows × all attachment columns\". Caller picks one shape; we\ndon't try to reconcile mixed shapes.\n\n``naming_mode``:\n  - ``subfolder``: ``{column_name}/{row_label}/file.ext``\n  - ``prefix``:    ``{column_name}__{row_label}__file.ext``\n\n``version_scope`` only affects versioned attachment columns. ``current``\npulls each cell's ``current_version_id`` value; ``all`` walks every\n``BitableCellVersion`` for the cell and prefixes the version number into\nthe path.\n\n``sub_table_depth`` recurses link columns. Cycles are detected by\nvisited table_id; a cycled table is skipped (not an error). ``0``\ndisables sub-table recursion entirely."},"_BuildModeRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"_BuildModeRequest"},"src__api__routes__admin_edm__PresignRequest":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":100,"minLength":1,"title":"Content Type"}},"type":"object","required":["filename","content_type"],"title":"PresignRequest"},"src__api__routes__admin_feature_flags__AddUser":{"properties":{"email":{"type":"string","title":"Email"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["email"],"title":"AddUser"},"src__api__routes__admin_prompt_debug__PublishRequest":{"properties":{"body":{"type":"string","title":"Body"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"expected_parent_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Parent Version"}},"type":"object","required":["body"],"title":"PublishRequest"},"src__api__routes__admin_tryon_agent__AddUser":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"AddUser"},"src__api__routes__cms__PublishRequest":{"properties":{"types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Types"},"locales":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Locales"},"trigger_build":{"type":"boolean","title":"Trigger Build","default":true}},"type":"object","title":"PublishRequest"},"src__api__routes__cms__UploadUrlRequest":{"properties":{"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"space":{"type":"string","title":"Space","default":"homepage"},"doc_type":{"type":"string","title":"Doc Type","default":""}},"type":"object","required":["filename","content_type"],"title":"UploadUrlRequest"},"src__api__routes__internal__WriteDocumentRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"filename":{"type":"string","title":"Filename"},"content":{"type":"string","title":"Content"},"content_type":{"type":"string","title":"Content Type","default":"text/markdown"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["agent_id","filename","content"],"title":"WriteDocumentRequest"},"src__api__routes__media__JobSubmitRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"type":{"type":"string","title":"Type"},"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"file_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"File Context"}},"type":"object","required":["agent_id","type"],"title":"JobSubmitRequest"},"src__api__routes__work_email__BindRequest":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"BindRequest"},"src__nail_art__routes__uploads__PresignRequest":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id","description":"Draft job_id from POST /api/jobs/draft"},"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":64,"minLength":1,"title":"Content Type"},"kind":{"type":"string","title":"Kind","description":"hand | nail_set","default":"hand"},"hand_idx":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Hand Idx"}},"type":"object","required":["job_id","filename","content_type"],"title":"PresignRequest"},"src__nail_art__schemas__jobs__JobSubmitRequest":{"properties":{"nail_set_s3_key":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Nail Set S3 Key"},"nail_set_label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Nail Set Label"},"hand_s3_keys":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":5},{"type":"null"}],"title":"Hand S3 Keys"},"hand_template_ids":{"anyOf":[{"items":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"type":"array","maxItems":5},{"type":"null"}],"title":"Hand Template Ids"},"harmonize_num_images":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Harmonize Num Images","default":2},"nail_shape":{"anyOf":[{"type":"string","enum":["almond","square","coffin","round","oval","squoval","stiletto"]},{"type":"null"}],"title":"Nail Shape"},"nail_length":{"anyOf":[{"type":"string","enum":["super_short","short","medium","long"]},{"type":"null"}],"title":"Nail Length"},"shape_terms":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Shape Terms"},"output_aspect":{"anyOf":[{"type":"string","enum":["auto","21:9","16:9","3:2","4:3","5:4","1:1","4:5","3:4","2:3","9:16","4:1","1:4","8:1","1:8"]},{"type":"null"}],"title":"Output Aspect"},"output_max_kb":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":100.0},{"type":"null"}],"title":"Output Max Kb"},"output_format":{"anyOf":[{"type":"string","enum":["png","jpg","webp"]},{"type":"null"}],"title":"Output Format"},"output_resolution":{"anyOf":[{"type":"string","enum":["2K","4K"]},{"type":"null"}],"title":"Output Resolution"},"collection_tag":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Collection Tag"}},"type":"object","title":"JobSubmitRequest","description":"POST `/api/jobs/{id}/submit` body. Pins inputs onto the draft and\nruns the charge fan-out.\n\nEither presign-uploaded inputs (the route lists `apps/nail-art/{id}/inputs/`\nin S3 to discover them automatically) OR explicit keys/file_ids\npassed in this body. The explicit path is required when inputs came\nvia Platform Storage uploadFile (workspace-visible files) rather\nthan the per-app presign route.\n\nThe optional ``nail_shape`` / ``nail_length`` / ``shape_terms``\nfields let the user override the auto-detected shape from the\ncatalog. Auto-detect still runs as fallback; user override always\nwins. ``shape_terms`` is echoed VERBATIM into the harmonize prompt\nso the user's exact words (\"super short almond, round shape\")\nflow through without paraphrase — see pain-points doc §4.3.\n\n``output_aspect`` / ``output_max_kb`` / ``output_format`` apply as\na post-harmonize encode pass — the raw NB2 PNG is re-encoded to\nthe requested aspect + size budget. See §4.8."},"src__schemas__agent__UploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"s3_key":{"type":"string","title":"S3 Key"}},"type":"object","required":["upload_url","s3_key"],"title":"UploadUrlResponse"},"src__schemas__app_agent_bindings__BindRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"}},"type":"object","required":["agent_id"],"title":"BindRequest"},"src__schemas__billing__UsageResponse":{"properties":{"total_spent_cents":{"type":"integer","title":"Total Spent Cents"},"current_balance_cents":{"type":"integer","title":"Current Balance Cents"},"transactions":{"items":{"$ref":"#/components/schemas/TransactionResponse"},"type":"array","title":"Transactions"}},"type":"object","required":["total_spent_cents","current_balance_cents","transactions"],"title":"UsageResponse","description":"Credit usage summary."},"src__schemas__bitable__ColumnCreate":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"type":{"type":"string","enum":["text","number","boolean","date","select","multi_select","attachment","url","user","agent_ref","form","link"],"title":"Type"},"width":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":40.0},{"type":"null"}],"title":"Width"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOption"},"type":"array"},{"type":"null"}],"title":"Options"},"after_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After Id"},"before_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before Id"},"recipe":{"anyOf":[{"$ref":"#/components/schemas/ColumnRecipe"},{"type":"null"}]},"number_format":{"anyOf":[{"type":"string","enum":["plain","currency","percent"]},{"type":"null"}],"title":"Number Format"},"currency":{"anyOf":[{"type":"string","enum":["USD","EUR","GBP","JPY","CNY"]},{"type":"null"}],"title":"Currency"},"min_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Value"},"max_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Value"},"label_style":{"anyOf":[{"type":"string","enum":["checkbox","yes_no","toggle"]},{"type":"null"}],"title":"Label Style"},"form_mode":{"anyOf":[{"type":"string","enum":["list","single"]},{"type":"null"}],"title":"Form Mode"},"form_schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormFieldSchema"},"type":"array"},{"type":"null"}],"title":"Form Schema"},"text_format":{"anyOf":[{"type":"string","enum":["plain","markdown"]},{"type":"null"}],"title":"Text Format"},"link_to_table_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Link To Table Id"},"cascade_policy":{"anyOf":[{"type":"string","enum":["cascade","orphan","restrict"]},{"type":"null"}],"title":"Cascade Policy"}},"type":"object","required":["name","type"],"title":"ColumnCreate","description":"Input for column creation — `id` is auto-assigned if omitted.\n\nPositioning: pass either `after_id` or `before_id` (not both) to\nsplice the new column next to an existing one. Default (neither)\nappends to the end, matching the original behavior."},"src__schemas__bitable__ColumnUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"title":"Name"},"width":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":40.0},{"type":"null"}],"title":"Width"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOption"},"type":"array"},{"type":"null"}],"title":"Options"},"type":{"anyOf":[{"type":"string","enum":["text","number","boolean","date","select","multi_select","attachment","url","user","agent_ref","form","link"]},{"type":"null"}],"title":"Type"},"recipe":{"anyOf":[{"$ref":"#/components/schemas/ColumnRecipe"},{"type":"null"}]},"number_format":{"anyOf":[{"type":"string","enum":["plain","currency","percent"]},{"type":"null"}],"title":"Number Format"},"currency":{"anyOf":[{"type":"string","enum":["USD","EUR","GBP","JPY","CNY"]},{"type":"null"}],"title":"Currency"},"min_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Value"},"max_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Value"},"label_style":{"anyOf":[{"type":"string","enum":["checkbox","yes_no","toggle"]},{"type":"null"}],"title":"Label Style"},"form_mode":{"anyOf":[{"type":"string","enum":["list","single"]},{"type":"null"}],"title":"Form Mode"},"form_schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormFieldSchema"},"type":"array"},{"type":"null"}],"title":"Form Schema"},"text_format":{"anyOf":[{"type":"string","enum":["plain","markdown"]},{"type":"null"}],"title":"Text Format"},"link_to_table_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Link To Table Id"},"cascade_policy":{"anyOf":[{"type":"string","enum":["cascade","orphan","restrict"]},{"type":"null"}],"title":"Cascade Policy"}},"type":"object","title":"ColumnUpdate"},"src__schemas__bitable__RevisionCreate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Label"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"},"set_as_head":{"type":"boolean","title":"Set As Head","default":true},"parent_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Revision Id"}},"type":"object","title":"RevisionCreate","description":"Open a new revision off the current HEAD (or any chosen parent).\n\nlabel: short human-readable name; unique per table. Defaults to a\n       timestamp-derived \"v<n>\" if omitted (server picks).\nmessage: optional commit message.\nset_as_head: when True (default), the new revision becomes the table's\n             HEAD on success. False = create the branch and stay on\n             the previous HEAD (useful for templates).\nparent_revision_id: branch from a specific revision. Defaults to HEAD."},"src__schemas__data__DataSourceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"name":{"type":"string","title":"Name"},"source_type":{"type":"string","title":"Source Type"},"backend":{"type":"string","title":"Backend"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count"},"columns":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Columns","default":[]},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","agent_id","name","source_type","backend","created_at","updated_at"],"title":"DataSourceResponse"},"src__schemas__datahub__DataSourceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"provider":{"type":"string","title":"Provider"},"source_type":{"type":"string","title":"Source Type"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"capabilities":{"additionalProperties":true,"type":"object","title":"Capabilities"},"credit_cost":{"type":"integer","title":"Credit Cost"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","provider","source_type","name","description","capabilities","credit_cost","status"],"title":"DataSourceResponse","description":"Response schema for a data source."},"src__schemas__integration__GrantRequest":{"properties":{"agent_ids":{"items":{"type":"string","format":"uuid"},"type":"array","minItems":1,"title":"Agent Ids"}},"type":"object","required":["agent_ids"],"title":"GrantRequest"},"src__schemas__platform_sdk__UsageResponse":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"}},"type":"object","required":["event_id"],"title":"UsageResponse"},"src__schemas__storage__GrantResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"granted_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Granted By Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","created_at"],"title":"GrantResponse"},"src__schemas__storage__UploadUrlRequest":{"properties":{"filename":{"type":"string","maxLength":500,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":100,"minLength":1,"title":"Content Type"},"size_bytes":{"type":"integer","maximum":524288000.0,"exclusiveMinimum":0.0,"title":"Size Bytes"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"}},"type":"object","required":["filename","content_type","size_bytes"],"title":"UploadUrlRequest"},"src__schemas__storage__UploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"s3_key":{"type":"string","title":"S3 Key"},"file_id":{"type":"string","format":"uuid","title":"File Id"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["upload_url","s3_key","file_id","expires_in"],"title":"UploadUrlResponse"},"src__schemas__storage__WriteDocumentRequest":{"properties":{"filename":{"type":"string","maxLength":500,"minLength":1,"title":"Filename"},"content":{"type":"string","maxLength":524288,"minLength":1,"title":"Content"},"content_type":{"type":"string","maxLength":100,"title":"Content Type","default":"text/markdown"},"agent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Id"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["filename","content"],"title":"WriteDocumentRequest"},"src__schemas__vault__GrantRequest":{"properties":{"agent_id":{"type":"string","format":"uuid","title":"Agent Id"}},"type":"object","required":["agent_id"],"title":"GrantRequest"},"src__schemas__vault__GrantResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"credential_id":{"type":"string","format":"uuid","title":"Credential Id"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","credential_id","agent_id","created_at"],"title":"GrantResponse"},"src__tableflow__schemas__ColumnCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"cell_type":{"type":"string","minLength":1,"title":"Cell Type"},"cell_config":{"additionalProperties":true,"type":"object","title":"Cell Config"},"width_px":{"anyOf":[{"type":"integer","maximum":1200.0,"minimum":40.0},{"type":"null"}],"title":"Width Px"}},"type":"object","required":["name","cell_type"],"title":"ColumnCreate","description":"Body for `POST /tables/{id}/columns`.\n\n`cell_type` is restricted to the P1.1 supported set; the route layer\n420s on anything else so the FE gets a clean error rather than a\nsilent JSONB write the renderer can't display."},"src__tableflow__schemas__ColumnUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"width_px":{"anyOf":[{"type":"integer","maximum":1200.0,"minimum":40.0},{"type":"null"}],"title":"Width Px"},"cell_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cell Config"},"cell_type":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Cell Type"},"pinned_side":{"anyOf":[{"type":"string","pattern":"^(left|right)$"},{"type":"null"}],"title":"Pinned Side"}},"type":"object","title":"ColumnUpdate","description":"Partial update. Round A re-enables `cell_type` change after\ncolumn creation; the service coerces existing cell values across\nthe allowed transition matrix and drops un-coercible values to\nnull. Pairs not on the matrix return 400 with a \"delete + recreate\"\nhint.\n\n`pinned_side` is a layout hint. Three-valued: a literal \"left\" /\n\"right\" pins the column to that edge of the grid; explicit `None`\nvia the JSON `null` literal unpins. Omitting the key leaves the\ncurrent value alone — the route handler distinguishes via Pydantic\n`model_fields_set`."},"src__tableflow__schemas__RevisionCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"body":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Body"}},"type":"object","required":["title"],"title":"RevisionCreate","description":"POST /revisions body — snapshot the current head as a named commit."},"src__tableflow__schemas__UploadUrlRequest":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":128,"minLength":1,"title":"Content Type"},"size_bytes":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Size Bytes"}},"type":"object","required":["filename","content_type"],"title":"UploadUrlRequest","description":"POST /tables/{id}/upload-url body."},"src__tableflow__schemas__UploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"s3_key":{"type":"string","title":"S3 Key"},"max_size_bytes":{"type":"integer","title":"Max Size Bytes"}},"type":"object","required":["upload_url","s3_key","max_size_bytes"],"title":"UploadUrlResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}