{"openapi":"3.1.0","info":{"title":"Deep Agents Code Generation API","description":"Multi-agent AI platform for generating full-stack web applications","version":"2.0.0"},"paths":{"/auth/me":{"get":{"tags":["Authentication"],"summary":"Get Current User Profile","description":"Get current authenticated user profile from local DB.","operationId":"get_current_user_profile_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}}}},"/auth/logout":{"post":{"tags":["Authentication"],"summary":"Logout","description":"Clear server-side impersonation cookie.\n\nClerk session termination is handled client-side through Clerk SDK.","operationId":"logout_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/projects":{"post":{"tags":["Projects"],"summary":"Create Project","description":"Create a new project.\n\nArgs:\n    request: Project creation request\n    user_id: Current user ID\n    db: Database session (auto-managed by Depends)\n\nReturns:\n    Created project\n\nRaises:\n    HTTPException: If validation fails or database error occurs","operationId":"create_project_projects_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Projects"],"summary":"List Projects","description":"List all projects for the current user.\n\nArgs:\n    user_id: Current user ID\n    db: Database session\n\nReturns:\n    List of projects\n\nRaises:\n    HTTPException: If database error occurs","operationId":"list_projects_projects_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Filter"}},{"name":"paginated","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Paginated"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProjectListResponse"},{"type":"array","items":{"$ref":"#/components/schemas/ProjectResponse"}}],"title":"Response List Projects Projects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}":{"get":{"tags":["Projects"],"summary":"Get Project","description":"Get a specific project.\n\nArgs:\n    project_id: Project ID\n    user_id: Current user ID\n    db: Database session\n\nReturns:\n    Project details\n\nRaises:\n    HTTPException: If project not found or user doesn't have access","operationId":"get_project_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Projects"],"summary":"Update Project","description":"Update a project.\n\nArgs:\n    project_id: Project ID\n    request: Update request\n    user_id: Current user ID\n    db: Database session\n\nReturns:\n    Updated project\n\nRaises:\n    HTTPException: If project not found or user doesn't have access","operationId":"update_project_projects__project_id__put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete Project","description":"Soft-delete a project without clearing generated data.\n\nThis marks the project as deleted so it no longer appears in user-facing\nproject lists. Workflows, generated files, filesystem output directories,\ndeployments, previews, gallery entries, logs, and cost records are preserved.\n\nNote:\n    Convex infrastructure is not deleted here. Static sites keep using the\n    shared deployment, and dedicated Convex projects remain external\n    resources until an explicit cleanup flow removes them.\n\nArgs:\n    project_id: Project ID\n    user_id: Current user ID\n    db: Database session\n\nRaises:\n    HTTPException: If project not found or user doesn't have access","operationId":"delete_project_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/rerun":{"post":{"tags":["Projects"],"summary":"Rerun Project","description":"Rerun a project with the original prompt (clean regeneration).\n\nThis will:\n- Find the first workflow's prompt for the project\n- Return the prompt so the frontend can trigger a new workflow\n\nArgs:\n    project_id: Project ID\n    user_id: Current user ID\n    db: Database session\n\nReturns:\n    Original prompt for regeneration\n\nRaises:\n    HTTPException: If project not found, no workflows exist, or user doesn't have access","operationId":"rerun_project_projects__project_id__rerun_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RerunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/page-structure":{"get":{"tags":["Projects"],"summary":"Get Page Structure","description":"Get page structure for editing.\n\nReturns the current page structure for a workflow that is awaiting user input.\n\nArgs:\n    workflow_id: Workflow ID\n    user_id: Current user ID\n    db: Database session\n\nReturns:\n    Page structure with editing capability flag\n\nRaises:\n    HTTPException: If workflow not found or not accessible","operationId":"get_page_structure_projects_workflows__workflow_id__page_structure_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageStructureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Projects"],"summary":"Update Page Structure","description":"Update page structure for a workflow.\n\nUpdates the page structure for a workflow that is awaiting user input or completed.\nThis allows users to modify the structure and regenerate if needed.\n\nArgs:\n    workflow_id: Workflow ID\n    request: Updated page structure\n    user_id: Current user ID\n    db: Database session\n\nReturns:\n    Success message\n\nRaises:\n    HTTPException: If workflow not found, not editable, or invalid structure","operationId":"update_page_structure_projects_workflows__workflow_id__page_structure_put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageStructureRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/upload-logo":{"post":{"tags":["Projects"],"summary":"Upload Logo Image","description":"Upload a logo image directly for a workflow's header or footer.\n\nSaves to public/logo.png (header) or public/footer-logo.png (footer).\nReturns the public-relative path so the frontend can store it in\nheader_config/footer_config without embedding base64 in the JSON payload.","operationId":"upload_logo_image_projects_workflows__workflow_id__upload_logo_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_logo_image_projects_workflows__workflow_id__upload_logo_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/app-spec":{"put":{"tags":["Projects"],"summary":"Update App Spec","description":"Update app spec (application configuration) for a workflow.\n\nUpdates configuration like users, settings, etc. for a workflow.\n\nArgs:\n    workflow_id: Workflow ID\n    request: Updated app spec\n    user_id: Current user ID\n    db: Database session\n\nReturns:\n    Success message\n\nRaises:\n    HTTPException: If workflow not found or not editable","operationId":"update_app_spec_projects_workflows__workflow_id__app_spec_put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppSpecRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/pending-changes":{"delete":{"tags":["Projects"],"summary":"Discard Pending Changes","description":"Discard all unapplied pending config changes for a workflow.","operationId":"discard_pending_changes_projects_workflows__workflow_id__pending_changes_delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/apply-pending-changes":{"post":{"tags":["Projects"],"summary":"Apply Pending Changes","description":"Apply pending config changes queued since the last generation.\n\nCollects all unapplied entries from pending_config_changes, constructs a\nchanges_summary from their items, marks all entries as applied, then kicks\noff a targeted editor-agent regeneration via workflow.regenerate().\n\nReturns the list of change entries that were applied.","operationId":"apply_pending_changes_projects_workflows__workflow_id__apply_pending_changes_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/regenerate":{"post":{"tags":["Projects"],"summary":"Regenerate Workflow","description":"Start a fresh workflow from the current workflow's refined prompt.\n\nWhen `body.from_planning` is False the new workflow reuses the source's\napproved `page_structure` and restarts only the code-generation phase —\nuseful when the plan was already good but generation tripped a transient\ncode-gen failure. Defaults to True (re-plan from prompt).","operationId":"regenerate_workflow_projects_workflows__workflow_id__regenerate_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRegenerateRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRegenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/conversation":{"post":{"tags":["Projects"],"summary":"Send Conversation Message","description":"Process conversation message using the DeepAgent conversation agent.\n\nUses the agentic system to:\n1. Analyze user request with AI\n2. Route to appropriate agent for modifications\n3. Apply changes to entities/pages\n4. Log progress for SSE streaming","operationId":"send_conversation_message_projects_workflows__workflow_id__conversation_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/reference-assets/{asset_path}":{"get":{"tags":["Projects"],"summary":"Get Reference Asset","operationId":"get_reference_asset_projects_workflows__workflow_id__reference_assets__asset_path__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"asset_path","in":"path","required":true,"schema":{"type":"string","title":"Asset Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/conversation/apply":{"post":{"tags":["Projects"],"summary":"Apply Conversation Changes","description":"Apply confirmed changes from conversation to the database.","operationId":"apply_conversation_changes_projects_workflows__workflow_id__conversation_apply_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/forms":{"get":{"tags":["Projects"],"summary":"Get Workflow Forms","description":"Get all forms for a workflow.\n\nForms are stored per-page in page_structure.pages[].forms\nThis endpoint aggregates all forms across all pages.","operationId":"get_workflow_forms_projects_workflows__workflow_id__forms_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/pages/{page_id}/forms":{"post":{"tags":["Projects"],"summary":"Create Workflow Form","description":"Add a new form to a specific page in the workflow.","operationId":"create_workflow_form_projects_workflows__workflow_id__pages__page_id__forms_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Form"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/pages/{page_id}/forms/{form_id}":{"put":{"tags":["Projects"],"summary":"Update Workflow Form","description":"Update a form in a specific page of the workflow.","operationId":"update_workflow_form_projects_workflows__workflow_id__pages__page_id__forms__form_id__put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"page_id","in":"path","required":true,"schema":{"type":"string","title":"Page Id"}},{"name":"form_id","in":"path","required":true,"schema":{"type":"string","title":"Form Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Form"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/games/share-claims":{"get":{"tags":["Projects"],"summary":"List My Game Share Claims","description":"Return the current user's social share reward claims.","operationId":"list_my_game_share_claims_projects_games_share_claims_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GameShareClaimResponse"},"type":"array","title":"Response List My Game Share Claims Projects Games Share Claims Get"}}}}}},"post":{"tags":["Projects"],"summary":"Submit Game Share Claim","description":"Submit a social post URL for manual 100-credit reward review.","operationId":"submit_game_share_claim_projects_games_share_claims_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameShareClaimCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameShareClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/workflows/{workflow_id}":{"delete":{"tags":["Projects"],"summary":"Delete Workflow","description":"Delete a specific workflow and all associated data.\n\nThis will delete:\n- The workflow record\n- Generated files (database records via CASCADE)\n- Workflow events (database records via CASCADE)\n- Agent logs (database records via CASCADE)\n- Generated images (database records via CASCADE)\n- Preview runtime (local dev server / Cloudflare)\n- Generated site runtime files that point at the shared Convex deployment\n- Generated code directory (file system)\n\nNote:\n    The shared Convex deployment itself is never deleted here.\n\nArgs:\n    project_id: Project ID\n    workflow_id: Workflow ID\n    user_id: Current user ID\n    db: Database session\n\nRaises:\n    HTTPException: If workflow not found or user doesn't have access","operationId":"delete_workflow_projects__project_id__workflows__workflow_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/gallery":{"get":{"tags":["Public"],"summary":"Get Public Gallery Entries","description":"Return superadmin-approved gallery entries for public display.","operationId":"get_public_gallery_entries_public_gallery_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"app_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicGalleryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/gallery/{entry_id}/vote":{"put":{"tags":["Public"],"summary":"Set Game Vote","operationId":"set_game_vote_public_gallery__entry_id__vote_put","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameVoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameVoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/gallery/{entry_id}/template":{"get":{"tags":["Public"],"summary":"Get Public Gallery Template","description":"Return template reuse payload for a gallery/Discord entry.","operationId":"get_public_gallery_template_public_gallery__entry_id__template_get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicGalleryTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/public/templates/{template_id}":{"get":{"tags":["Public"],"summary":"Get Public Template","description":"Return template reuse payload by gallery entry id or legacy workflow id.","operationId":"get_public_template_public_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicGalleryTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/publish-settings/cloudflare-accounts":{"get":{"tags":["Publish Settings"],"summary":"List Cloudflare Accounts","operationId":"list_cloudflare_accounts_publish_settings_cloudflare_accounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedCloudflareAccountListResponse"}}}}}},"post":{"tags":["Publish Settings"],"summary":"Create Cloudflare Account","operationId":"create_cloudflare_account_publish_settings_cloudflare_accounts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSavedCloudflareAccountRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedCloudflareAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/publish-settings/cloudflare-accounts/validate":{"post":{"tags":["Publish Settings"],"summary":"Validate Cloudflare Account","operationId":"validate_cloudflare_account_publish_settings_cloudflare_accounts_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateSavedCloudflareAccountRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloudflareAccountValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/publish-settings/cloudflare-accounts/{account_id}":{"put":{"tags":["Publish Settings"],"summary":"Update Cloudflare Account","operationId":"update_cloudflare_account_publish_settings_cloudflare_accounts__account_id__put","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSavedCloudflareAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedCloudflareAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Publish Settings"],"summary":"Delete Cloudflare Account","operationId":"delete_cloudflare_account_publish_settings_cloudflare_accounts__account_id__delete","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSavedCloudflareAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/settings":{"get":{"tags":["Project Settings"],"summary":"Get Project Settings","description":"Get project settings including all workflows and their admin credentials.\n\nArgs:\n    project_id: Project ID\n    session: Database session\n    user_id: Current user ID\n    \nReturns:\n    Project settings with workflows and credentials","operationId":"get_project_settings_projects__project_id__settings_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Project Settings"],"summary":"Update Project Settings","description":"Update project settings (name, description).\n\nArgs:\n    project_id: Project ID\n    request: Update request with new values\n    session: Database session\n    user_id: Current user ID\n    \nReturns:\n    Success message","operationId":"update_project_settings_projects__project_id__settings_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProjectSettingsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/admin-credentials":{"get":{"tags":["Project Settings"],"summary":"Get Workflow Admin Credentials","description":"Return generated admin login details for one workflow/site.","operationId":"get_workflow_admin_credentials_projects_workflows__workflow_id__admin_credentials_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowAdminCredentials"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Project Settings"],"summary":"Update Admin Credentials","description":"Reset a workflow admin to a user-specified temporary password.","operationId":"update_admin_credentials_projects_workflows__workflow_id__admin_credentials_put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdminCredentialsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/regenerate-password":{"post":{"tags":["Project Settings"],"summary":"Regenerate Admin Password","description":"Generate a brand new temporary password and require first-login rotation.","operationId":"regenerate_admin_password_projects_workflows__workflow_id__regenerate_password_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegeneratePasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/convex-info":{"get":{"tags":["Project Settings"],"summary":"Get Workflow Convex Info","description":"Get Convex project information for a workflow.\n\nReturns Convex project details for the specified workflow.","operationId":"get_workflow_convex_info_projects_workflows__workflow_id__convex_info_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/env-vars":{"get":{"tags":["Project Settings"],"summary":"List Workflow Env Vars","operationId":"list_workflow_env_vars_projects_workflows__workflow_id__env_vars_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowEnvVarResponse"},"title":"Response List Workflow Env Vars Projects Workflows  Workflow Id  Env Vars Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Project Settings"],"summary":"Upsert Workflow Env Var","operationId":"upsert_workflow_env_var_projects_workflows__workflow_id__env_vars_put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertWorkflowEnvVarRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEnvVarResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Project Settings"],"summary":"Delete Workflow Env Var","operationId":"delete_workflow_env_var_projects_workflows__workflow_id__env_vars_delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteWorkflowEnvVarRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Workflow Env Var Projects Workflows  Workflow Id  Env Vars Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/env-vars/catalog":{"get":{"tags":["Project Settings"],"summary":"Get Workflow Env Var Catalog","description":"Return existing env vars + suggestions tailored to the workflow's enabled features.\n\nThis is the single endpoint the dashboard's env-vars panel consumes.","operationId":"get_workflow_env_var_catalog_projects_workflows__workflow_id__env_vars_catalog_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEnvVarCatalog"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/workflows/{workflow_id}/env-vars/{env_key}/reveal":{"get":{"tags":["Project Settings"],"summary":"Reveal Workflow Env Var","operationId":"reveal_workflow_env_var_projects_workflows__workflow_id__env_vars__env_key__reveal_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"env_key","in":"path","required":true,"schema":{"type":"string","title":"Env Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowEnvVarResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/public/workflows/{workflow_id}/admin-credentials":{"get":{"tags":["Project Settings"],"summary":"Get Public Admin Credentials","description":"Get admin credentials for a generated site.\nWorkflow ID acts as authentication.","operationId":"get_public_admin_credentials_projects_public_workflows__workflow_id__admin_credentials_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/projects/{project_id}/submissions":{"get":{"tags":["Submissions"],"summary":"List Project Submissions","description":"Return this static site's form submissions from the shared Convex deployment.\n\n404 when the project doesn't exist or the caller doesn't own it.","operationId":"list_project_submissions_projects__project_id__submissions_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"form_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Form Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/games":{"get":{"tags":["Super Admin"],"summary":"List Games","description":"List generated games for moderation.","operationId":"list_games_super_admin_games_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}},{"name":"published","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Published"}},{"name":"user_search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GameSummary"},"title":"Response List Games Super Admin Games Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/games/{game_id}/publish":{"post":{"tags":["Super Admin"],"summary":"Publish Game","description":"Publish a generated game to the public games gallery.","operationId":"publish_game_super_admin_games__game_id__publish_post","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/games/{game_id}/unpublish":{"post":{"tags":["Super Admin"],"summary":"Unpublish Game","description":"Remove a generated game from the public games gallery.","operationId":"unpublish_game_super_admin_games__game_id__unpublish_post","parameters":[{"name":"game_id","in":"path","required":true,"schema":{"type":"string","title":"Game Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/game-share-claims":{"get":{"tags":["Super Admin"],"summary":"List Game Share Claims","description":"List social share reward claims for review.","operationId":"list_game_share_claims_super_admin_game_share_claims_get","parameters":[{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"pending","title":"Status Filter"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GameShareClaimSummary"},"title":"Response List Game Share Claims Super Admin Game Share Claims Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/game-share-claims/{claim_id}/review":{"post":{"tags":["Super Admin"],"summary":"Review Game Share Claim","description":"Approve/reject a share claim. Approval grants 100 normal credits.","operationId":"review_game_share_claim_super_admin_game_share_claims__claim_id__review_post","parameters":[{"name":"claim_id","in":"path","required":true,"schema":{"type":"string","title":"Claim Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareClaimReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameShareClaimSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/dashboard":{"get":{"tags":["Super Admin"],"summary":"Get Dashboard Stats","description":"Get system statistics for super admin dashboard.\n\nArgs:\n    admin_user_id: Super admin user ID\n    db: Database session\n    time_filter: Time filter for statistics (today, week, month, all)\n\nReturns:\n    System statistics","operationId":"get_dashboard_stats_super_admin_dashboard_get","parameters":[{"name":"time_filter","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Time Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/users":{"get":{"tags":["Super Admin"],"summary":"Get All Users","description":"Get all users with summary information.\n\nArgs:\n    admin_user_id: Super admin user ID\n    db: Database session\n    limit: Maximum number of users to return\n    offset: Number of users to skip\n    time_filter: Time filter for user activity (today, week, month, all)\n\nReturns:\n    List of user summaries","operationId":"get_all_users_super_admin_users_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"time_filter","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Time Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserSummary"},"title":"Response Get All Users Super Admin Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/proposals":{"get":{"tags":["Super Admin"],"summary":"Get All Proposals","description":"List published proposals and captured leads, without their full content.\n\nLeads are included deliberately. A client who hands over their contact details\non a session that never published a proposal is still a lead the team has to\nact on; filtering to status == \"proposal\" left those visible only in Discord\nand the database, which is where revenue goes to die quietly.","operationId":"get_all_proposals_super_admin_proposals_get","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/ProposalListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/proposals/{proposal_id}/notes":{"post":{"tags":["Super Admin"],"summary":"Set Proposal Notes","description":"Record which Upwork job an estimate belongs to.\n\nA note is attribution, not scope. It says nothing about what was quoted, so it\nis written in place rather than forking the proposal, the same way a captured\nlead's contact details are. It lives here rather than on the public\nwizard because, like project_id, it is internal and must never reach the\nclient holding the share link.","operationId":"set_proposal_notes_super_admin_proposals__proposal_id__notes_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalNotesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalSummaryNotes"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/proposals/{proposal_id}/overrides":{"post":{"tags":["Super Admin"],"summary":"Set Proposal Overrides","description":"Set the pricing-formula overrides for a whole project.\n\nWritten to every proposal in the lineage at once, because the formulas are a\nproperty of the project rather than of one version: quoting the same job two\ndifferent ways across versions is the bug this prevents. Later refinements\ninherit them by copying from their parent.\n\nScoped to this project on purpose: a correction here must never move a figure a\ndifferent client has already seen. Overrides change how the stored ai_days is\npriced, not what was scoped, so no version is forked. A bad formula is a 400 and\nnothing is stored; an empty map clears the overrides back to the defaults.","operationId":"set_proposal_overrides_super_admin_proposals__proposal_id__overrides_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalOverridesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/workflows":{"get":{"tags":["Super Admin"],"summary":"Get All Workflows","description":"Get all workflows with summary information.\n\nArgs:\n    admin_user_id: Super admin user ID\n    db: Database session\n    limit: Maximum number of workflows to return\n    offset: Number of workflows to skip\n    status_filter: Filter by workflow status\n\nReturns:\n    List of workflow summaries","operationId":"get_all_workflows_super_admin_workflows_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}},{"name":"plan_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/agent__routes_super_admin__WorkflowSummary"},"title":"Response Get All Workflows Super Admin Workflows Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/gallery":{"get":{"tags":["Super Admin"],"summary":"List Gallery Entries","description":"List gallery entries for moderation.","operationId":"list_gallery_entries_super_admin_gallery_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"plan_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Filter"}},{"name":"app_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Type"}},{"name":"show_on_gallery","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show On Gallery"}},{"name":"user_search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GalleryEntrySummary"},"title":"Response List Gallery Entries Super Admin Gallery Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Super Admin"],"summary":"Create Manual Gallery Entry","description":"Create a manual gallery entry from an arbitrary site URL.","operationId":"create_manual_gallery_entry_super_admin_gallery_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualGalleryEntryCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GalleryEntrySummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/gallery/{entry_id}":{"patch":{"tags":["Super Admin"],"summary":"Update Gallery Entry Visibility","description":"Update a gallery entry.","operationId":"update_gallery_entry_visibility_super_admin_gallery__entry_id__patch","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GalleryUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GalleryEntrySummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Super Admin"],"summary":"Delete Gallery Entry","description":"Delete one gallery entry and any stored screenshot asset.","operationId":"delete_gallery_entry_super_admin_gallery__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/gallery/{entry_id}/retrigger":{"post":{"tags":["Super Admin"],"summary":"Retrigger Gallery Pipeline","description":"Reset a gallery entry and re-run the screenshot/discord pipeline.","operationId":"retrigger_gallery_pipeline_super_admin_gallery__entry_id__retrigger_post","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GalleryEntrySummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/help-requests":{"get":{"tags":["Super Admin"],"summary":"List Help Requests","description":"List support intake requests submitted via Ask for Help.","operationId":"list_help_requests_super_admin_help_requests_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}},{"name":"user_search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HelpRequestSummary"},"title":"Response List Help Requests Super Admin Help Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/workflows/{workflow_id}":{"get":{"tags":["Super Admin"],"summary":"Get Workflow Details","description":"Get a detailed view of a workflow (prompt/status) plus linked files and token ledger.\n\nThis is intended for super-admin transparency: it lets an admin see what a user is building\nand reconcile cost/token consumption per workflow.","operationId":"get_workflow_details_super_admin_workflows__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"transactions_limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Transactions Limit"}},{"name":"files_limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Files Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/audit-logs":{"get":{"tags":["Super Admin"],"summary":"Get Audit Logs","description":"Return recent agent logs (audit trail) enriched with user/project context.","operationId":"get_audit_logs_super_admin_audit_logs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuditLogItem"},"title":"Response Get Audit Logs Super Admin Audit Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/alerts":{"get":{"tags":["Super Admin"],"summary":"Get Alerts","description":"Enhanced alerts for super admins - workflow failures, payment issues, and system anomalies.","operationId":"get_alerts_super_admin_alerts_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":7,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/users/{user_id}/promote":{"post":{"tags":["Super Admin"],"summary":"Promote User To Super Admin","description":"Promote a user to super admin.\n\nArgs:\n    user_id: User ID to promote\n    admin_user_id: Super admin user ID making the change\n    db: Database session\n\nReturns:\n    Success message","operationId":"promote_user_to_super_admin_super_admin_users__user_id__promote_post","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"}}}}}}},"/super-admin/users/{user_id}/demote":{"post":{"tags":["Super Admin"],"summary":"Demote Super Admin To User","description":"Demote a super admin to regular user.\n\nArgs:\n    user_id: User ID to demote\n    admin_user_id: Super admin user ID making the change\n    db: Database session\n\nReturns:\n    Success message","operationId":"demote_super_admin_to_user_super_admin_users__user_id__demote_post","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"}}}}}}},"/super-admin/users/{user_id}/suspend":{"post":{"tags":["Super Admin"],"summary":"Suspend User","description":"Suspend a user account.\n\nArgs:\n    user_id: User ID to suspend\n    suspension_reason: Optional reason for suspension\n    admin_user_id: Super admin user ID making the change\n    db: Database session\n\nReturns:\n    Success message","operationId":"suspend_user_super_admin_users__user_id__suspend_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"suspension_reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suspension Reason"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/users/{user_id}/unsuspend":{"post":{"tags":["Super Admin"],"summary":"Unsuspend User","description":"Unsuspend a user account.\n\nArgs:\n    user_id: User ID to unsuspend\n    admin_user_id: Super admin user ID making the change\n    db: Database session\n\nReturns:\n    Success message","operationId":"unsuspend_user_super_admin_users__user_id__unsuspend_post","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"}}}}}}},"/super-admin/users/{user_id}/impersonate":{"post":{"tags":["Super Admin"],"summary":"Impersonate User","description":"Impersonate a user (login as that user) for support purposes.\n\nArgs:\n    user_id: User ID to impersonate\n    admin_user_id: Super admin user ID making the request\n    db: Database session\n\nReturns:\n    User information for the impersonated user and sets secure impersonation cookie","operationId":"impersonate_user_super_admin_users__user_id__impersonate_post","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"}}}}}}},"/super-admin/exit-impersonation":{"post":{"tags":["Super Admin"],"summary":"Exit Impersonation","description":"Exit impersonation mode and return to original admin user.\n\nArgs:\n    request: HTTP request\n    db: Database session\n\nReturns:\n    Original admin user profile and clears impersonation cookie\n\nRaises:\n    HTTPException: If not in impersonation mode or admin user not found","operationId":"exit_impersonation_super_admin_exit_impersonation_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/super-admin/projects":{"get":{"tags":["Super Admin"],"summary":"Get All Projects","description":"Get all projects with summary information.\n\nArgs:\n    admin_user_id: Super admin user ID\n    db: Database session\n    limit: Maximum number of projects to return\n    offset: Number of projects to skip\n    time_filter: Time filter for projects (today, week, month, all)\n\nReturns:\n    List of project summaries","operationId":"get_all_projects_super_admin_projects_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"time_filter","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Time Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectSummary"},"title":"Response Get All Projects Super Admin Projects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/projects/{project_id}":{"get":{"tags":["Super Admin"],"summary":"Get Project Details","description":"Get detailed project information including structure and workflows.\n\nArgs:\n    project_id: Project ID\n    admin_user_id: Super admin user ID\n    db: Database session\n\nReturns:\n    Detailed project information","operationId":"get_project_details_super_admin_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDetails"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/projects/{project_id}/files/{file_id}/content":{"get":{"tags":["Super Admin"],"summary":"Get File Content","description":"Get the content of a specific generated file.\n\nArgs:\n    project_id: Project ID\n    file_id: File ID\n    admin_user_id: Super admin user ID\n    db: Database session\n\nReturns:\n    File content","operationId":"get_file_content_super_admin_projects__project_id__files__file_id__content_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/cost-analytics":{"get":{"tags":["Super Admin"],"summary":"Get Platform Cost Analytics","description":"Get platform-wide AI cost analytics.\n\nOnly accessible by super admins.","operationId":"get_platform_cost_analytics_super_admin_cost_analytics_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Platform Cost Analytics Super Admin Cost Analytics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/top-cost-users":{"get":{"tags":["Super Admin"],"summary":"Get Top Cost Users","description":"Get the top cost-generating users on the platform.\n\nOnly accessible by super admins.","operationId":"get_top_cost_users_super_admin_top_cost_users_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{},"title":"Response Get Top Cost Users Super Admin Top Cost Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/cost-trends":{"get":{"tags":["Super Admin"],"summary":"Get Cost Trends","description":"Get cost trends over time for the platform.\n\nOnly accessible by super admins.","operationId":"get_cost_trends_super_admin_cost_trends_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 Get Cost Trends Super Admin Cost Trends Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/subscriptions":{"get":{"tags":["Super Admin"],"summary":"Get All Subscriptions","description":"Get all subscriptions with user details.\n\nArgs:\n    admin_user_id: Super admin user ID\n    db: Database session\n    limit: Maximum number of subscriptions to return\n    offset: Number to skip\n    status_filter: Filter by subscription status\n    \nReturns:\n    List of subscription summaries","operationId":"get_all_subscriptions_super_admin_subscriptions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionSummary"},"title":"Response Get All Subscriptions Super Admin Subscriptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/token-usage":{"get":{"tags":["Super Admin"],"summary":"Get Token Usage","description":"Get comprehensive token usage statistics for all users.\n\nArgs:\n    admin_user_id: Super admin user ID\n    db: Database session\n    limit: Maximum number of records to return\n    offset: Number to skip\n    \nReturns:\n    List of detailed token usage summaries with subscription context","operationId":"get_token_usage_super_admin_token_usage_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TokenUsageSummary"},"title":"Response Get Token Usage Super Admin Token Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/token-analytics/dashboard":{"get":{"tags":["Super Admin - Token Analytics"],"summary":"Get Token Analytics Dashboard","description":"Get comprehensive token analytics dashboard.\n\nArgs:\n    admin_user_id: Super admin user ID\n    db: Database session\n    days: Number of days to analyze (default 30)\n    \nReturns:\n    Complete token analytics with flows, trends, and insights","operationId":"get_token_analytics_dashboard_super_admin_token_analytics_dashboard_get","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/TokenAnalyticsDashboard"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/token-analytics/project-usage":{"get":{"tags":["Super Admin - Token Analytics"],"summary":"Get Project Usage","description":"Aggregate AI cost rows by account and project.\n\ncost_cents is stored as micro-cents (cost_usd * 1_000_000); the response\nreturns dollars so the UI never has to know about the storage scale.","operationId":"get_project_usage_super_admin_token_analytics_project_usage_get","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/ProjectUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/super-admin/token-analytics/project-usage/{project_id}/models":{"get":{"tags":["Super Admin - Token Analytics"],"summary":"Get Project Model Usage","description":"Return model-level usage details for one project.\n\nThe summary table groups by account/project/agent for scanning; this endpoint\nkeeps the model split visible for cost investigations and provider audits.","operationId":"get_project_model_usage_super_admin_token_analytics_project_usage__project_id__models_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"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/ProjectModelUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscriptions/plans":{"get":{"tags":["subscriptions"],"summary":"Get Subscription Plans","description":"Get all available subscription plans.\n\nReturns one plan per tier (plan_type). When multiple versions of the same\ntier are active (e.g. pro_v1 and pro_v2), the highest version_label wins\nand is the one returned. To retire a version from the pricing page, set\nits is_active = FALSE — existing subscribers are unaffected.","operationId":"get_subscription_plans_api_subscriptions_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanResponse"},"type":"array","title":"Response Get Subscription Plans Api Subscriptions Plans Get"}}}}}}},"/api/subscriptions/my-subscription":{"get":{"tags":["subscriptions"],"summary":"Get My Subscription","description":"Get current user's subscription and token information.","operationId":"get_my_subscription_api_subscriptions_my_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTokenInfo"}}}}}}},"/api/subscriptions/subscription-status":{"get":{"tags":["subscriptions"],"summary":"Get Subscription Status","description":"Get user's subscription status to determine checkout flow.","operationId":"get_subscription_status_api_subscriptions_subscription_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionStatusResponse"}}}}}}},"/api/subscriptions/create-checkout":{"post":{"tags":["subscriptions"],"summary":"Create Checkout Session","description":"Create a Stripe checkout session for subscription.","operationId":"create_checkout_session_api_subscriptions_create_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutRequest"}}},"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"}}}}}}},"/api/subscriptions/create-credit-topup-checkout":{"post":{"tags":["subscriptions"],"summary":"Create Credit Topup Checkout Session","description":"Create a Stripe Checkout session to buy additional credits (one-time payment).\n\nAmount is determined server-side from the user's current plan topup pricing.\nFulfillment is handled idempotently via Stripe webhook.","operationId":"create_credit_topup_checkout_session_api_subscriptions_create_credit_topup_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditTopupCheckoutRequest"}}},"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"}}}}}}},"/api/subscriptions/sync-stripe-state":{"post":{"tags":["subscriptions"],"summary":"Sync Subscription State From Stripe","description":"Refresh the active subscription from live Stripe state.","operationId":"sync_subscription_state_from_stripe_api_subscriptions_sync_stripe_state_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/subscriptions/customer-portal":{"post":{"tags":["subscriptions"],"summary":"Create Customer Portal Session","description":"Create a customer portal session for subscription management.","operationId":"create_customer_portal_session_api_subscriptions_customer_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/subscriptions/token-history":{"get":{"tags":["subscriptions"],"summary":"Get Token History","description":"Get user's token transaction history with pagination and filters.","operationId":"get_token_history_api_subscriptions_token_history_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}},{"name":"transaction_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transaction Type"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTokenHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscriptions/check-tokens/{required_tokens}":{"get":{"tags":["subscriptions"],"summary":"Check Token Availability","description":"Check if user has enough tokens for an operation.","operationId":"check_token_availability_api_subscriptions_check_tokens__required_tokens__get","parameters":[{"name":"required_tokens","in":"path","required":true,"schema":{"type":"integer","title":"Required Tokens"}},{"name":"site_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscriptions/verify-session/{session_id}":{"post":{"tags":["subscriptions"],"summary":"Verify Checkout Session","description":"Verify a Stripe checkout session and activate subscription.","operationId":"verify_checkout_session_api_subscriptions_verify_session__session_id__post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscriptions/auto-topup-settings":{"get":{"tags":["subscriptions"],"summary":"Get Auto Topup Settings","description":"Return the current user's auto top-up preference.\n\nSelf-heals stale state: if the toggle is on but Stripe has no usable card\n(the customer was never created, or the card was detached), the toggle is\ncleared so the dashboard reflects reality and generations no longer fail\nlater with the misleading \"auto top-up failed\" error.","operationId":"get_auto_topup_settings_api_subscriptions_auto_topup_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopupSettingsResponse"}}}}}},"post":{"tags":["subscriptions"],"summary":"Update Auto Topup Settings","description":"Enable or disable auto top-up and set the top-up amount for the current user.\n\nWhen enabled and the user runs out of credits during generation, the system\nwill automatically charge the customer's saved payment method via Stripe and\nadd credits without interrupting the generation. If no reusable billing\ndetails exist yet, we redirect the user to Stripe-hosted billing setup first.","operationId":"update_auto_topup_settings_api_subscriptions_auto_topup_settings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopupSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopupSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscriptions/complete-auto-topup-setup/{session_id}":{"post":{"tags":["subscriptions"],"summary":"Complete Auto Topup Setup","description":"Finalize Stripe-hosted billing setup and enable auto top-up for the user.","operationId":"complete_auto_topup_setup_api_subscriptions_complete_auto_topup_setup__session_id__post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTopupSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/gallery-sync":{"post":{"tags":["webhooks"],"summary":"Gallery Sync Webhook","description":"Receive signed gallery entries synced from local/dev AppCafe backends.","operationId":"gallery_sync_webhook_api_webhooks_gallery_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/webhooks/stripe":{"post":{"tags":["webhooks"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.","operationId":"stripe_webhook_api_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/webhooks/smartlead":{"post":{"tags":["webhooks"],"summary":"Smartlead Email Webhook","description":"Record Smartlead sent / bounce / unsubscribe events against outreach leads.","operationId":"smartlead_email_webhook_api_webhooks_smartlead_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/models/pricing":{"get":{"tags":["models"],"summary":"Get Model Pricing","description":"Get current pricing for all available models.\n\nReturns:\n    List of models with their pricing information","operationId":"get_model_pricing_api_models_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Get Model Pricing Api Models Pricing Get"}}}}}}},"/api/models/pricing/{model_name}":{"get":{"tags":["models"],"summary":"Get Model Pricing By Name","description":"Get pricing for a specific model.\n\nArgs:\n    model_name: The name/ID of the model\n\nReturns:\n    Model pricing information","operationId":"get_model_pricing_by_name_api_models_pricing__model_name__get","parameters":[{"name":"model_name","in":"path","required":true,"schema":{"type":"string","title":"Model Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/costs/analytics":{"get":{"tags":["costs"],"summary":"Get Cost Analytics","description":"Get cost analytics with optional filters.\n\nReturns detailed cost breakdown by provider, model, and individual records.\nUsers can only see their own costs.","operationId":"get_cost_analytics_api_costs_analytics_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider (e.g., openrouter)","title":"Provider"},"description":"Filter by provider (e.g., openrouter)"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Start date for filtering (YYYY-MM-DD)","title":"Start Date"},"description":"Start date for filtering (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End date for filtering (YYYY-MM-DD)","title":"End Date"},"description":"End date for filtering (YYYY-MM-DD)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of records to return","default":100,"title":"Limit"},"description":"Maximum number of records to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Cost Analytics Api Costs Analytics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/costs/user/{user_id}":{"get":{"tags":["costs"],"summary":"Get User Cost Analytics","description":"Get cost analytics for a specific user.\n\nUsers can only access their own data.","operationId":"get_user_cost_analytics_api_costs_user__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider (e.g., openrouter)","title":"Provider"},"description":"Filter by provider (e.g., openrouter)"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Start date for filtering (YYYY-MM-DD)","title":"Start Date"},"description":"Start date for filtering (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End date for filtering (YYYY-MM-DD)","title":"End Date"},"description":"End date for filtering (YYYY-MM-DD)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Maximum number of records to return","default":100,"title":"Limit"},"description":"Maximum number of records to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get User Cost Analytics Api Costs User  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/costs/models/top-cost":{"get":{"tags":["costs"],"summary":"Get Top Cost Models","description":"Get the top cost-generating models for the current user.\n\nReturns models sorted by total cost in descending order.","operationId":"get_top_cost_models_api_costs_models_top_cost_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Number of top models to return","default":10,"title":"Limit"},"description":"Number of top models to return"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Start date for filtering (YYYY-MM-DD)","title":"Start Date"},"description":"Start date for filtering (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End date for filtering (YYYY-MM-DD)","title":"End Date"},"description":"End date for filtering (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Top Cost Models Api Costs Models Top Cost Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/costs/providers/breakdown":{"get":{"tags":["costs"],"summary":"Get Provider Cost Breakdown","description":"Get cost breakdown by AI provider for the current user.\n\nReturns detailed breakdown of costs by provider with usage statistics.","operationId":"get_provider_cost_breakdown_api_costs_providers_breakdown_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Start date for filtering (YYYY-MM-DD)","title":"Start Date"},"description":"Start date for filtering (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End date for filtering (YYYY-MM-DD)","title":"End Date"},"description":"End date for filtering (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Provider Cost Breakdown Api Costs Providers Breakdown Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/costs/recent":{"get":{"tags":["costs"],"summary":"Get Recent Costs","description":"Get the most recent cost records for the current user.\n\nReturns the latest AI generation costs for quick overview.","operationId":"get_recent_costs_api_costs_recent_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"Number of recent records to return","default":20,"title":"Limit"},"description":"Number of recent records to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Recent Costs Api Costs Recent Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/costs/stats":{"get":{"tags":["costs"],"summary":"Get Cost Stats","description":"Get cost statistics for the current user.\n\nReturns summary statistics including daily averages, total spend, etc.","operationId":"get_cost_stats_api_costs_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Cost Stats Api Costs Stats Get"}}}}}}},"/api/costs/workflow/{workflow_id}":{"get":{"tags":["costs"],"summary":"Get Workflow Cost Breakdown","description":"Get the full AI cost breakdown for a single workflow (generation run).\n\nAggregates every ``AICostTracking`` row for the workflow: total cost, prompt/\ncompletion/cached tokens, per-model and per-generation-type breakdowns, call\ncount, and the first/last call timestamps.\n\nPer-workflow cost exposes internal generation economics, so this endpoint is\nrestricted to super admins (the strictest guard in this module).","operationId":"get_workflow_cost_breakdown_api_costs_workflow__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Workflow Cost Breakdown Api Costs Workflow  Workflow Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/images/workflow/{workflow_id}":{"get":{"tags":["images"],"summary":"Get Workflow Images","description":"Get all images generated for a workflow.\n\nArgs:\n    workflow_id: The workflow ID\n    user_id: Current user ID (from auth)\n    db: Database session\n    \nReturns:\n    List of all images with metadata\n    \nRaises:\n    HTTPException: If workflow not found or user doesn't have access","operationId":"get_workflow_images_api_images_workflow__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowImagesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/images/{image_id}":{"get":{"tags":["images"],"summary":"Get Image","description":"Get details of a specific generated image.\n\nArgs:\n    image_id: The image's unique ID (not the image_id field, but the UUID)\n    user_id: Current user ID (from auth)\n    db: Database session\n    \nReturns:\n    Image details\n    \nRaises:\n    HTTPException: If image not found or user doesn't have access","operationId":"get_image_api_images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/images/{image_id}/file":{"get":{"tags":["images"],"summary":"Get Image File","description":"Serve the actual image file for a generated image record.","operationId":"get_image_file_api_images__image_id__file_get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/images/workflow/{workflow_id}/active/{logical_image_id}":{"get":{"tags":["images"],"summary":"Get Active Image For Workflow","description":"Get the active (latest) generated image for a workflow + logical image_id.","operationId":"get_active_image_for_workflow_api_images_workflow__workflow_id__active__logical_image_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"logical_image_id","in":"path","required":true,"schema":{"type":"string","title":"Logical Image Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/images/{image_id}/regenerate":{"post":{"tags":["images"],"summary":"Regenerate Image","description":"Regenerate an image with an updated prompt or dimensions.\n\nArgs:\n    image_id: The image's unique ID (UUID)\n    request: Regeneration request with optional new prompt/dimensions\n    user_id: Current user ID (from auth)\n    db: Database session\n    \nReturns:\n    New image details\n    \nRaises:\n    HTTPException: If image not found, user doesn't have access, or regeneration fails","operationId":"regenerate_image_api_images__image_id__regenerate_post","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateImageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/images/serve/{workflow_id}/{file_path}":{"get":{"tags":["images"],"summary":"Serve Workflow Asset","description":"Serve a static asset from the workflow's public directory.","operationId":"serve_workflow_asset_api_images_serve__workflow_id___file_path__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow 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/images/workflow/{workflow_id}/generate":{"post":{"tags":["images"],"summary":"Generate Or Regenerate Workflow Image","description":"Generate (or regenerate) an image for a workflow by logical image_id.\n\nThis is a UI-friendly endpoint: the caller does not need to know the GeneratedImage UUID.","operationId":"generate_or_regenerate_workflow_image_api_images_workflow__workflow_id__generate_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateImageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/images/upload":{"post":{"tags":["images"],"summary":"Upload Custom Image","description":"Upload a custom image for use in the project.\n\nThis endpoint saves the image directly to the workflow's output directory\nwith the image ID as the filename. During generation, the agent will skip\ngenerating images that already exist.\n\nArgs:\n    file: The image file to upload\n    workflow_id: The workflow ID this image belongs to\n    image_id: The image ID from the plan (used as filename)\n    user_id: Current user ID (from auth)\n    db: Database session\n    \nReturns:\n    URL and metadata of the uploaded image\n    \nRaises:\n    HTTPException: If validation fails or upload errors occur","operationId":"upload_custom_image_api_images_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_custom_image_api_images_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/images/custom/{workflow_id}/{image_id}":{"delete":{"tags":["images"],"summary":"Delete Custom Image","description":"Delete a custom uploaded image for a workflow.\n\nArgs:\n    workflow_id: The workflow ID\n    image_id: The image ID to delete\n    user_id: Current user ID (from auth)\n    db: Database session","operationId":"delete_custom_image_api_images_custom__workflow_id___image_id__delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/ping":{"get":{"tags":["Preview"],"summary":"Ping Preview","operationId":"ping_preview_preview_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/preview/runtime-health":{"get":{"tags":["Preview"],"summary":"Check Preview Runtime Health","description":"Report whether a preview runtime (local dev server or Cloudflare) is available.","operationId":"check_preview_runtime_health_preview_runtime_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRuntimeHealthResponse"}}}}}}},"/preview/start":{"post":{"tags":["Preview"],"summary":"Start Preview","description":"Start a preview for a generated site.\n\nDefault (``wait=0``): non-blocking — returns immediately with\n``runtime=\"starting\"`` while the build/deploy runs in the background. The\ncaller polls ``/preview/status`` until it reports ``running`` (or ``failed``);\nthe FE already treats anything other than ``running`` as not-ready.\n\nOpt-in (``wait=1``): block until the dev server is actually listening before\nreturning, mirroring the project-completion gate. The response then reflects\nthe settled state truthfully — ``running`` with the live port, or HTTP 503 if\nthe server never became healthy. This is the \"instant/reliable live preview\"\ncontract: a returned ``running`` means the iframe can paint immediately.","operationId":"start_preview_preview_start_post","parameters":[{"name":"wait","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Wait"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewStartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/status/{workflow_id}":{"get":{"tags":["Preview"],"summary":"Get Preview Status","description":"Get the status of a preview container.","operationId":"get_preview_status_preview_status__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/stop/{workflow_id}":{"post":{"tags":["Preview"],"summary":"Stop Preview","description":"Stop a preview container.","operationId":"stop_preview_preview_stop__workflow_id__post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewStopResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/proxy/{workflow_id}/asset":{"get":{"tags":["Preview"],"summary":"Proxy Preview Asset","description":"Proxy preview assets (CSS, JS, images) for GrapesJS editor.","operationId":"proxy_preview_asset_preview_proxy__workflow_id__asset_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"url","in":"query","required":true,"schema":{"type":"string","title":"Url"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/proxy/{workflow_id}":{"get":{"tags":["Preview"],"summary":"Proxy Preview Html","description":"Proxy preview HTML through the API to avoid cross-origin restrictions.","operationId":"proxy_preview_html_preview_proxy__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Preview"],"summary":"Proxy Preview Html Post","description":"Proxy preview POST requests (used by Next.js RSC navigation).","operationId":"proxy_preview_html_post_preview_proxy__workflow_id__post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/proxy/{workflow_id}/{path}":{"get":{"tags":["Preview"],"summary":"Proxy Preview Path","description":"Proxy preview assets and routes under a path prefix.","operationId":"proxy_preview_path_preview_proxy__workflow_id___path__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Preview"],"summary":"Proxy Preview Path Post","description":"Proxy preview POST requests (used by Next.js RSC navigation and form submissions).","operationId":"proxy_preview_path_post_preview_proxy__workflow_id___path__post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Preview"],"summary":"Proxy Preview Path Put","description":"Proxy preview PUT requests.","operationId":"proxy_preview_path_put_preview_proxy__workflow_id___path__put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Preview"],"summary":"Proxy Preview Path Patch","description":"Proxy preview PATCH requests.","operationId":"proxy_preview_path_patch_preview_proxy__workflow_id___path__patch","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Preview"],"summary":"Proxy Preview Path Delete","description":"Proxy preview DELETE requests.","operationId":"proxy_preview_path_delete_preview_proxy__workflow_id___path__delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/ai-edit-component":{"post":{"tags":["Preview"],"summary":"Ai Edit Component","description":"Apply a visual-editor edit through the SAME engine + verify path every other\nedit uses (``LeanEngine.edit`` → triple verify-loop), instead of a bespoke model\nthat injected raw JSX with no build/runtime verification.\n\nThe selected element + the user's prompt become one natural-language instruction;\nthe engine rewrites the whole touched file(s) and the deploy+build+smoke loop\nrepairs any error in place. We snapshot the source first and ROLL BACK on a failed\nverify, so a malformed or mis-targeted edit can never ship to a previously-working\napp. Concurrent edits to the same workflow are serialized by a per-workflow lock.","operationId":"ai_edit_component_preview_ai_edit_component_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiEditComponentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiEditComponentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/editor-state/{workflow_id}":{"get":{"tags":["Preview"],"summary":"Get Editor State","operationId":"get_editor_state_preview_editor_state__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Preview"],"summary":"Delete Editor State","operationId":"delete_editor_state_preview_editor_state__workflow_id__delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/editor-state":{"post":{"tags":["Preview"],"summary":"Save Editor State","operationId":"save_editor_state_preview_editor_state_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorStateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/editor-state/{workflow_id}/history":{"get":{"tags":["Preview"],"summary":"List Editor History","operationId":"list_editor_history_preview_editor_state__workflow_id__history_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/preview/editor-state/revert":{"post":{"tags":["Preview"],"summary":"Revert Editor State","operationId":"revert_editor_state_preview_editor_state_revert_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorStateRevertRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditorStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/_next/{path}":{"get":{"tags":["Preview"],"summary":"Proxy Next Assets","description":"Proxy Next.js assets requested from preview iframes.\n\nNext.js runtime uses absolute /_next/* URLs. When the preview is embedded\nvia the backend proxy, these absolute URLs hit the backend. We resolve the\nworkflow from the Referer header and forward the request to the preview\ncontainer.","operationId":"proxy_next_assets__next__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/images/{path}":{"get":{"tags":["Preview"],"summary":"Proxy Public Images","description":"Proxy public images based on Referer.","operationId":"proxy_public_images_images__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/custom-hostnames/workflow/{workflow_id}":{"get":{"tags":["Deployment"],"summary":"Get Workflow Platform Custom Hostname","operationId":"get_workflow_platform_custom_hostname_deployment_custom_hostnames_workflow__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PlatformCustomHostnameResponse"},{"type":"null"}],"title":"Response Get Workflow Platform Custom Hostname Deployment Custom Hostnames Workflow  Workflow Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/custom-hostnames/connect":{"post":{"tags":["Deployment"],"summary":"Connect Platform Custom Hostname","operationId":"connect_platform_custom_hostname_deployment_custom_hostnames_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCustomHostnameConnectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCustomHostnameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/custom-hostnames/{custom_hostname_id}/refresh":{"post":{"tags":["Deployment"],"summary":"Refresh Platform Custom Hostname","operationId":"refresh_platform_custom_hostname_deployment_custom_hostnames__custom_hostname_id__refresh_post","parameters":[{"name":"custom_hostname_id","in":"path","required":true,"schema":{"type":"string","title":"Custom Hostname Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformCustomHostnameResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/custom-hostnames/{custom_hostname_id}":{"delete":{"tags":["Deployment"],"summary":"Delete Platform Custom Hostname","operationId":"delete_platform_custom_hostname_deployment_custom_hostnames__custom_hostname_id__delete","parameters":[{"name":"custom_hostname_id","in":"path","required":true,"schema":{"type":"string","title":"Custom Hostname Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Platform Custom Hostname Deployment Custom Hostnames  Custom Hostname Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/deploy":{"post":{"tags":["Deployment"],"summary":"Deploy To Cloudflare","description":"Deploy a generated workflow to Cloudflare Pages.\n\nThis endpoint:\n1. Validates the workflow exists and is completed\n2. Checks if Cloudflare credentials are configured\n3. Installs dependencies if needed\n4. Runs the deployment script\n5. Returns the deployment URL\n\nRequired environment variables:\n- CLOUDFLARE_API_TOKEN: API token with Pages Edit permission\n- CLOUDFLARE_ACCOUNT_ID: Your Cloudflare account ID","operationId":"deploy_to_cloudflare_deployment_deploy_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/requirements":{"get":{"tags":["Deployment"],"summary":"Check Deployment Requirements","description":"Check if all requirements for deployment are met.\n\nThis checks:\n- npm is installed\n- Cloudflare credentials are configured","operationId":"check_deployment_requirements_deployment_requirements_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentRequirementsResponse"}}}}}}},"/deployment/status/{workflow_id}":{"get":{"tags":["Deployment"],"summary":"Get Deployment Status","description":"Get deployment status for a workflow.\n\nCurrently returns whether the workflow is ready to be deployed.\nIn the future, this could track active deployments.","operationId":"get_deployment_status_deployment_status__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/stop/{workflow_id}":{"post":{"tags":["Deployment"],"summary":"Stop Deployment","description":"Stop an in-progress deployment for a workflow.","operationId":"stop_deployment_deployment_stop__workflow_id__post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopDeploymentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/history/{workflow_id}":{"get":{"tags":["Deployment"],"summary":"Get Deployment History","description":"Get deployment history for a workflow.\n\nReturns all deployment attempts with status, timestamps, and URLs.","operationId":"get_deployment_history_deployment_history__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/{deployment_id}":{"delete":{"tags":["Deployment"],"summary":"Delete Deployment","description":"Delete a deployment everywhere: its row, its live Cloudflare worker (when\nnot shared by another live deployment), and its gallery entry.\n\nBacks the publish-history delete action so a removed deployment does not\nreappear on refresh. Idempotent — deleting an already-gone deployment 404s.","operationId":"delete_deployment_deployment__deployment_id__delete","parameters":[{"name":"deployment_id","in":"path","required":true,"schema":{"type":"string","title":"Deployment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/latest/{workflow_id}":{"get":{"tags":["Deployment"],"summary":"Get Latest Deployment","description":"Get the latest deployment for a workflow.","operationId":"get_latest_deployment_deployment_latest__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/check-subdomain":{"post":{"tags":["Deployment"],"summary":"Check Subdomain","description":"Check if a subdomain is available on the platform's domain or user's domain.","operationId":"check_subdomain_deployment_check_subdomain_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubdomainCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubdomainCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/deployment/suggest-subdomain":{"post":{"tags":["Deployment"],"summary":"Suggest Subdomain","description":"Suggest a meaningful initial subdomain for a generated site.","operationId":"suggest_subdomain_deployment_suggest_subdomain_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubdomainSuggestionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubdomainSuggestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/guided-prompt/next-question":{"post":{"tags":["guided-prompt"],"summary":"Create Guided Prompt Next Question","operationId":"create_guided_prompt_next_question_api_guided_prompt_next_question_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidedPromptNextQuestionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidedPromptNextQuestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/guided-prompt/final-prompt":{"post":{"tags":["guided-prompt"],"summary":"Create Guided Prompt Final Prompt","operationId":"create_guided_prompt_final_prompt_api_guided_prompt_final_prompt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidedPromptFinalPromptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuidedPromptFinalPromptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/help/requests":{"post":{"tags":["Help"],"summary":"Create Help Request","description":"Create a paid support intake ticket from the workflow UI.","operationId":"create_help_request_help_requests_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHelpRequestPayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateHelpRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/session":{"post":{"tags":["estimate"],"summary":"Create Or Resume Session","operationId":"create_or_resume_session_api_estimate_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/scope-suggestion":{"post":{"tags":["estimate"],"summary":"Suggest Scope","operationId":"suggest_scope_api_estimate_scope_suggestion_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeSuggestionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScopeSuggestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/session/{session_id}":{"get":{"tags":["estimate"],"summary":"Get Session","operationId":"get_session_api_estimate_session__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/next-question":{"post":{"tags":["estimate"],"summary":"Next Question","description":"Start this session's next question, or report where the run already going got to.","operationId":"next_question_api_estimate_next_question_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextQuestionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextQuestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/next-question/{session_id}":{"get":{"tags":["estimate"],"summary":"Next Question Status","description":"Report where this session's question run got to. Reporting never starts work.\n\nSeparate from the POST so polling costs nothing a model budget should be spent\non, and so a client asking repeatedly is not mistaken for a client asking for\nrepeated work.","operationId":"next_question_status_api_estimate_next_question__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextQuestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/estimate":{"post":{"tags":["estimate"],"summary":"Estimate","description":"Start this session's estimate, or report where the run that is already going got to.","operationId":"estimate_api_estimate_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/estimate/{session_id}":{"get":{"tags":["estimate"],"summary":"Estimate Status","description":"Report where this session's estimate run got to. Reporting never starts work.\n\nThe counterpart to next_question_status, and there for the same reason: a client\nwaiting on a long run asks often, and asking must not spend from the budget that\ncaps model calls.","operationId":"estimate_status_api_estimate_estimate__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/proposal/{proposal_id}":{"get":{"tags":["estimate"],"summary":"Get Proposal","description":"Read a proposal so its /estimate/proposal/<id> link is shareable.\n\nPublic callers get the client-facing proposal, estimate, Q&A, and version\nhistory. The source brief and Upwork tracking id remain server-side.","operationId":"get_proposal_api_estimate_proposal__proposal_id__get","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/proposal/{proposal_id}/fork":{"post":{"tags":["estimate"],"summary":"Fork Proposal","description":"Edit a proposal by forking it into a new id, leaving the source untouched.","operationId":"fork_proposal_api_estimate_proposal__proposal_id__fork_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkProposalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/session/{session_id}/save":{"post":{"tags":["estimate"],"summary":"Save Session To Account","description":"Attach an estimate to the signed-in account so it can be found again.\n\nKept out of the anonymous allowlist so `get_current_user_id` 401s a logged-out\ncaller: the whole point is to bind the estimate to a real account rather than\nquietly save it to nobody.\n\nClaiming is first-come and permanent. An estimate already owned by someone else\nis not re-pointed — proposal links are public, so otherwise a stranger who\nopened one could take a client's project off them.","operationId":"save_session_to_account_api_estimate_session__session_id__save_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedEstimate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/estimate/mine":{"get":{"tags":["estimate"],"summary":"List My Estimates","description":"The signed-in user's saved estimates, newest first.","operationId":"list_my_estimates_api_estimate_mine_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SavedEstimate"},"type":"array","title":"Response List My Estimates Api Estimate Mine Get"}}}}}}},"/api/estimate/lead":{"post":{"tags":["estimate"],"summary":"Capture Lead","operationId":"capture_lead_api_estimate_lead_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}":{"get":{"tags":["outreach"],"summary":"Resolve Lead","description":"Resolve a lead by its URL token. Called when the outreach page loads.","operationId":"resolve_lead_api_outreach_lead__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/OutreachLeadPublic"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/visit":{"post":{"tags":["outreach"],"summary":"Record Visit","description":"Record an outreach page visit. Idempotent — safe to call on every load.","operationId":"record_visit_api_outreach_lead__token__visit_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/preview-opened":{"post":{"tags":["outreach"],"summary":"Record Preview Opened","description":"Record that the visitor opened the website preview.","operationId":"record_preview_opened_api_outreach_lead__token__preview_opened_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/project-type":{"post":{"tags":["outreach"],"summary":"Select Project Type","description":"Record which conversion path the visitor picked.\n\nPersisted rather than kept in the page, so a refresh mid-flow reopens on the\nsame path, and so checkout can decide server-side what it must require.","operationId":"select_project_type_api_outreach_lead__token__project_type_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTypeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Select Project Type Api Outreach Lead  Token  Project Type Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/interested":{"post":{"tags":["outreach"],"summary":"Submit Interested","description":"Save the visitor's contact details.\n\nRe-submitting updates the details instead of failing: contact is a step in the\nmiddle of the flow now, so a visitor who goes back to fix a typo — or who\nrefreshes after a cancelled checkout — must not be locked out.","operationId":"submit_interested_api_outreach_lead__token__interested_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterestedFormRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Submit Interested Api Outreach Lead  Token  Interested Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/unsubscribe":{"post":{"tags":["outreach"],"summary":"Unsubscribe","description":"One-click decline/unsubscribe. No login required.","operationId":"unsubscribe_api_outreach_lead__token__unsubscribe_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Unsubscribe Api Outreach Lead  Token  Unsubscribe Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/requirements-session":{"get":{"tags":["outreach"],"summary":"Get Requirements Session","description":"Resume state for the custom-changes interview.\n\nReturns nothing until the visitor has written their change request — the\nsession is created there, where there is a brief to create it with.","operationId":"get_requirements_session_api_outreach_lead__token__requirements_session_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Requirements Session Api Outreach Lead  Token  Requirements Session Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/requirements-brief":{"post":{"tags":["outreach"],"summary":"Save Requirements Brief","description":"Save \"what would you like us to change?\" and open the interview session.\n\nRe-posting an edited brief keeps the same estimate session and the answers\nalready given; it only re-opens the interview, because a changed brief can\nmake the next question a different one.","operationId":"save_requirements_brief_api_outreach_lead__token__requirements_brief_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementsBriefRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Requirements Brief Api Outreach Lead  Token  Requirements Brief Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/requirements-submitted":{"post":{"tags":["outreach"],"summary":"Requirements Submitted","description":"Finalise the requirements after the visitor reviews them.\n\nFinalised, not converted: the flow continues to checkout, and only Stripe\nmarks the lead paid. Repeat calls are a no-op so a retry cannot fail the page.","operationId":"requirements_submitted_api_outreach_lead__token__requirements_submitted_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequirementsSubmittedRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Requirements Submitted Api Outreach Lead  Token  Requirements Submitted Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/checkout":{"post":{"tags":["outreach"],"summary":"Create Outreach Checkout","description":"Start (or resume) the recurring Stripe Checkout for this lead.\n\nThe lead row is locked for the transaction and an already-open session is\nhanded back as-is, so a double-click or a second tab cannot leave two live\ncheckouts — or two subscriptions — behind one lead.","operationId":"create_outreach_checkout_api_outreach_lead__token__checkout_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Outreach Checkout Api Outreach Lead  Token  Checkout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/billing-portal":{"post":{"tags":["outreach"],"summary":"Open Billing Portal","description":"Stripe's own page for the buyer to change the card or cancel inside the free month.","operationId":"open_billing_portal_api_outreach_lead__token__billing_portal_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Open Billing Portal Api Outreach Lead  Token  Billing Portal Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/lead/{token}/payment-status":{"get":{"tags":["outreach"],"summary":"Get Payment Status","description":"Report whether this lead has paid, asking Stripe when we don't know yet.\n\nThe page calls this when it comes back from Checkout. It deliberately ignores\nanything in the return URL: the session id comes off the lead row and the\nverdict comes from Stripe, so a hand-typed ?checkout=success proves nothing.","operationId":"get_payment_status_api_outreach_lead__token__payment_status_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Payment Status Api Outreach Lead  Token  Payment Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/leads":{"get":{"tags":["outreach"],"summary":"Admin List Leads","description":"Paginated, filtered list of all outreach leads.","operationId":"admin_list_leads_api_outreach_admin_leads_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Per Page"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Search"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Campaign"}},{"name":"assigned_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"}},{"name":"min_score","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Min Score"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(newest|score|activity)$","default":"newest","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin List Leads Api Outreach Admin Leads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["outreach"],"summary":"Admin Create Lead","description":"Create a new outreach lead (generate a unique token).","operationId":"admin_create_lead_api_outreach_admin_leads_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Create Lead Api Outreach Admin Leads Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/generate":{"post":{"tags":["outreach"],"summary":"Admin Generate From Url","description":"Paste a URL → create (or reuse) a lead and kick off redesign generation in the\nbackground. Watch `preview_status` (running → ready | failed) to know how it went;\non failure `preview_error` says what to tell the admin.\n\nRe-posting the same domain regenerates that lead rather than making a second one,\nwhich is also how the dashboard's \"Try again\" works.","operationId":"admin_generate_from_url_api_outreach_admin_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFromUrlRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Generate From Url Api Outreach Admin Generate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/leads/{lead_id}":{"get":{"tags":["outreach"],"summary":"Admin Get Lead","description":"Full lead detail including events, notes, and follow-ups.","operationId":"admin_get_lead_api_outreach_admin_leads__lead_id__get","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Get Lead Api Outreach Admin Leads  Lead Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["outreach"],"summary":"Admin Update Lead","description":"Update status, assignment, notes, or metadata on a lead.","operationId":"admin_update_lead_api_outreach_admin_leads__lead_id__patch","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Update Lead Api Outreach Admin Leads  Lead Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/leads/{lead_id}/notes":{"post":{"tags":["outreach"],"summary":"Admin Add Note","description":"Add an internal note to a lead.","operationId":"admin_add_note_api_outreach_admin_leads__lead_id__notes_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddNoteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Add Note Api Outreach Admin Leads  Lead Id  Notes Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/leads/{lead_id}/follow-ups":{"post":{"tags":["outreach"],"summary":"Admin Log Follow Up","description":"Log a contact attempt made by the AppCafe team.","operationId":"admin_log_follow_up_api_outreach_admin_leads__lead_id__follow_ups_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogFollowUpRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Log Follow Up Api Outreach Admin Leads  Lead Id  Follow Ups Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/campaigns":{"get":{"tags":["outreach"],"summary":"Admin List Campaigns","description":"List all unique campaign values for filter dropdowns.","operationId":"admin_list_campaigns_api_outreach_admin_campaigns_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin List Campaigns Api Outreach Admin Campaigns Get"}}}}}}},"/api/outreach/admin/stats":{"get":{"tags":["outreach"],"summary":"Admin Stats","description":"Aggregate dashboard statistics for the outreach leads section.","operationId":"admin_stats_api_outreach_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Stats Api Outreach Admin Stats Get"}}}}}}},"/api/outreach/admin/autopilot":{"get":{"tags":["outreach"],"summary":"Admin Get Autopilot","operationId":"admin_get_autopilot_api_outreach_admin_autopilot_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Get Autopilot Api Outreach Admin Autopilot Get"}}}}}},"post":{"tags":["outreach"],"summary":"Admin Set Autopilot","operationId":"admin_set_autopilot_api_outreach_admin_autopilot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotToggleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Set Autopilot Api Outreach Admin Autopilot Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/review/next":{"get":{"tags":["outreach"],"summary":"Admin Review Next","description":"The oldest preview_ready lead — deterministic FIFO — plus how many remain.","operationId":"admin_review_next_api_outreach_admin_review_next_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Admin Review Next Api Outreach Admin Review Next Get"}}}}}}},"/api/outreach/admin/leads/{lead_id}/review":{"get":{"tags":["outreach"],"summary":"Admin Review Lead","description":"One specific lead in the review-screen shape — direct selection from the queue.\n\nSame payload as /admin/review/next, but for the lead the admin picked instead\nof the FIFO head. `remaining` still counts the preview_ready queue.","operationId":"admin_review_lead_api_outreach_admin_leads__lead_id__review_get","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Review Lead Api Outreach Admin Leads  Lead Id  Review Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/leads/{lead_id}/review-verdict":{"post":{"tags":["outreach"],"summary":"Admin Review Verdict","description":"Mark a reviewed lead not-suitable or queued for rebuild. Never sends anything.","operationId":"admin_review_verdict_api_outreach_admin_leads__lead_id__review_verdict_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewVerdictRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Review Verdict Api Outreach Admin Leads  Lead Id  Review Verdict Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/leads/{lead_id}/email-draft":{"post":{"tags":["outreach"],"summary":"Admin Save Email Draft","description":"Persist the admin's recipient/subject/message edits. Never sends.","operationId":"admin_save_email_draft_api_outreach_admin_leads__lead_id__email_draft_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Save Email Draft Api Outreach Admin Leads  Lead Id  Email Draft Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/leads/{lead_id}/email-preview":{"post":{"tags":["outreach"],"summary":"Admin Email Preview","description":"Rendered email HTML for the current draft — the live preview while typing.\n\nRenders only; nothing is persisted and nothing is sent.","operationId":"admin_email_preview_api_outreach_admin_leads__lead_id__email_preview_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/outreach/admin/leads/{lead_id}/send-email":{"post":{"tags":["outreach"],"summary":"Admin Send Outreach Email","description":"Send the reviewed outreach email. The only path in the system that sends one.\n\nThe row lock plus the EMAIL_SENT check make a double-click or two concurrent\nadmins send exactly once: the second request waits on the lock, re-reads the\nrow, and sees the status the first one committed.","operationId":"admin_send_outreach_email_api_outreach_admin_leads__lead_id__send_email_post","parameters":[{"name":"lead_id","in":"path","required":true,"schema":{"type":"string","title":"Lead Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraftRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Send Outreach Email Api Outreach Admin Leads  Lead Id  Send Email Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bidding/admin/candidates":{"get":{"tags":["bidding"],"summary":"List Candidates","operationId":"list_candidates_api_bidding_admin_candidates_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"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":{"type":"object","additionalProperties":true,"title":"Response List Candidates Api Bidding Admin Candidates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bidding/admin/stats":{"get":{"tags":["bidding"],"summary":"Stats","description":"Queue counts plus the number that decides whether anything can be bid at all:\nhow many bids the platform still allows this month.","operationId":"stats_api_bidding_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stats Api Bidding Admin Stats Get"}}}}}}},"/api/bidding/admin/candidates/{candidate_id}":{"get":{"tags":["bidding"],"summary":"Get Candidate","operationId":"get_candidate_api_bidding_admin_candidates__candidate_id__get","parameters":[{"name":"candidate_id","in":"path","required":true,"schema":{"type":"string","title":"Candidate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Candidate Api Bidding Admin Candidates  Candidate Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bidding/admin/candidates/{candidate_id}/draft":{"post":{"tags":["bidding"],"summary":"Save Draft","description":"Save the reviewer's edits. Never bids, and autopilot leaves an edited draft to them.","operationId":"save_draft_api_bidding_admin_candidates__candidate_id__draft_post","parameters":[{"name":"candidate_id","in":"path","required":true,"schema":{"type":"string","title":"Candidate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftEdits"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Draft Api Bidding Admin Candidates  Candidate Id  Draft Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bidding/admin/candidates/{candidate_id}/redraft":{"post":{"tags":["bidding"],"summary":"Redraft","description":"Send it back for a fresh draft on the next poller run.","operationId":"redraft_api_bidding_admin_candidates__candidate_id__redraft_post","parameters":[{"name":"candidate_id","in":"path","required":true,"schema":{"type":"string","title":"Candidate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Redraft Api Bidding Admin Candidates  Candidate Id  Redraft Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bidding/admin/candidates/{candidate_id}/skip":{"post":{"tags":["bidding"],"summary":"Skip","operationId":"skip_api_bidding_admin_candidates__candidate_id__skip_post","parameters":[{"name":"candidate_id","in":"path","required":true,"schema":{"type":"string","title":"Candidate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkipRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Skip Api Bidding Admin Candidates  Candidate Id  Skip Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bidding/admin/candidates/{candidate_id}/approve":{"post":{"tags":["bidding"],"summary":"Approve","description":"Approve the draft and place the bid. The only path that bids.\n\nThe row lock plus the status check mean a double click, or two admins at once,\nplace at most one bid. A source with a submit API bids immediately; everywhere\nelse the candidate stays approved for the reviewer to place by hand, and is\nnever falsely recorded as placed.","operationId":"approve_api_bidding_admin_candidates__candidate_id__approve_post","parameters":[{"name":"candidate_id","in":"path","required":true,"schema":{"type":"string","title":"Candidate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftEdits"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Approve Api Bidding Admin Candidates  Candidate Id  Approve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bidding/admin/autopilot":{"post":{"tags":["bidding"],"summary":"Set Autopilot","description":"Turn hands-free bidding on or off, and set its limits.\n\nStored in the database rather than the environment, so it takes effect on the\nnext poll with no deploy. Sources that have no submit API are unaffected: their\nproposals always wait for a human.","operationId":"set_autopilot_api_bidding_admin_autopilot_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopilotSettings"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Autopilot Api Bidding Admin Autopilot Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bidding/admin/upwork":{"get":{"tags":["bidding"],"summary":"Upwork Status","description":"Whether the Upwork account is connected, and where to go to connect it.\n\nUpwork is detection only: it has no proposal-submit API, so connecting lets the\npoller see and draft for Upwork jobs that a human then places by hand.","operationId":"upwork_status_api_bidding_admin_upwork_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Upwork Status Api Bidding Admin Upwork Get"}}}}}}},"/api/bidding/admin/upwork/connect":{"post":{"tags":["bidding"],"summary":"Upwork Connect","description":"Finish the connection with the code Upwork sent to the redirect page.","operationId":"upwork_connect_api_bidding_admin_upwork_connect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpworkCode"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Upwork Connect Api Bidding Admin Upwork Connect Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bidding/admin/upwork/disconnect":{"post":{"tags":["bidding"],"summary":"Upwork Disconnect","operationId":"upwork_disconnect_api_bidding_admin_upwork_disconnect_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Upwork Disconnect Api Bidding Admin Upwork Disconnect Post"}}}}}}},"/api/bidding/admin/candidates/{candidate_id}/mark-placed":{"post":{"tags":["bidding"],"summary":"Mark Placed","description":"Confirm that an approved bid was placed by hand.","operationId":"mark_placed_api_bidding_admin_candidates__candidate_id__mark_placed_post","parameters":[{"name":"candidate_id","in":"path","required":true,"schema":{"type":"string","title":"Candidate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mark Placed Api Bidding Admin Candidates  Candidate Id  Mark Placed Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/model-presets/models":{"get":{"tags":["Model Presets"],"summary":"List Models","description":"Return all active AI models, optionally filtered by modality.","operationId":"list_models_api_model_presets_models_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider name","title":"Provider"},"description":"Filter by provider name"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search model name or key","title":"Search"},"description":"Search model name or key"},{"name":"input_modality","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: only models whose input_modalities contains this value (e.g. 'image', 'text')","title":"Input Modality"},"description":"Filter: only models whose input_modalities contains this value (e.g. 'image', 'text')"},{"name":"output_modality","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: only models whose output_modalities contains this value (e.g. 'text', 'image')","title":"Output Modality"},"description":"Filter: only models whose output_modalities contains this value (e.g. 'text', 'image')"},{"name":"include_hidden","in":"query","required":false,"schema":{"type":"boolean","description":"Include models hidden by super admin","default":false,"title":"Include Hidden"},"description":"Include models hidden by super admin"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Models Api Model Presets Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/model-presets/presets":{"get":{"tags":["Model Presets"],"summary":"List Presets","description":"Return all system model presets with their associated models.","operationId":"list_presets_api_model_presets_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Presets Api Model Presets Presets Get"}}}}}}},"/api/model-presets/recommended-models":{"get":{"tags":["Model Presets"],"summary":"Get Recommended Models","description":"Return model recommendations for lite, pro, and max tiers.\n\nAlways returns all tiers regardless of the caller's plan.\nAlso returns user_tier indicating which tier the user defaults to. New\nworkflows default to Max for every plan; Lite and Pro are still returned so\nusers can explicitly choose them.","operationId":"get_recommended_models_api_model_presets_recommended_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Recommended Models Api Model Presets Recommended Models Get"}}}}}}},"/api/model-presets/admin/sync":{"post":{"tags":["Model Presets"],"summary":"Trigger Model Sync","description":"Admin endpoint: manually trigger an OpenRouter model sync.","operationId":"trigger_model_sync_api_model_presets_admin_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Trigger Model Sync Api Model Presets Admin Sync Post"}}}}}}},"/api/model-presets/admin/models/{model_id}/toggle-visibility":{"post":{"tags":["Model Presets"],"summary":"Toggle Model Visibility","description":"Admin endpoint: toggle whether a model is hidden from standard users.","operationId":"toggle_model_visibility_api_model_presets_admin_models__model_id__toggle_visibility_post","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Toggle Model Visibility Api Model Presets Admin Models  Model Id  Toggle Visibility Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/model-presets/workflow/{workflow_id}/models":{"get":{"tags":["Model Presets"],"summary":"Get Workflow Models","description":"Return the AI model config for a specific workflow.\n\nIf the workflow was saved with an active preset but is missing stamped model\nslots, hydrate the missing slots from that preset so workflow settings stay\nisolated from the user's global defaults.","operationId":"get_workflow_models_api_model_presets_workflow__workflow_id__models_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Workflow Models Api Model Presets Workflow  Workflow Id  Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Model Presets"],"summary":"Update Workflow Models","description":"Update (or clear) the AI model config for a workflow.\n\nSend null for a slot to reset it to the system default.","operationId":"update_workflow_models_api_model_presets_workflow__workflow_id__models_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowModelsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Workflow Models Api Model Presets Workflow  Workflow Id  Models Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/model-presets/admin/default-models":{"get":{"tags":["Model Presets"],"summary":"Get Default Models","description":"Return the current system-default models for lite, pro, and max tiers.","operationId":"get_default_models_api_model_presets_admin_default_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Default Models Api Model Presets Admin Default Models Get"}}}}}},"put":{"tags":["Model Presets"],"summary":"Set Default Models","description":"Set (or clear) the system-default model for each agent slot.\n\nSend null for a slot to clear the default without setting a new one.\nEach slot's flag is exclusive: clearing old flags first ensures at most\none model has each flag set.","operationId":"set_default_models_api_model_presets_admin_default_models_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDefaultModelsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Default Models Api Model Presets Admin Default Models Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/model-presets/admin/vision-model":{"get":{"tags":["Model Presets"],"summary":"Get Admin Vision Model","description":"Return the system-wide reference vision model setting.\n\nThe vision model is a global setting shared across all users and presets.\nIt is used exclusively for reference image and URL analysis.","operationId":"get_admin_vision_model_api_model_presets_admin_vision_model_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Admin Vision Model Api Model Presets Admin Vision Model Get"}}}}}},"put":{"tags":["Model Presets"],"summary":"Set Admin Vision Model","description":"Set the system-wide reference vision model.\n\nThis model is used for all reference analysis (uploaded images and URL\nscreenshots) across every user and workflow. It is not part of any preset.","operationId":"set_admin_vision_model_api_model_presets_admin_vision_model_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVisionModelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Admin Vision Model Api Model Presets Admin Vision Model Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/model-presets/admin/outreach-models":{"get":{"tags":["Model Presets"],"summary":"Get Admin Outreach Models","description":"Return the system-wide outreach redesign model settings.\n\nThese models drive the outreach redesign pipeline (art direction, build,\nand hero image generation) — shared across every lead, not part of any preset.","operationId":"get_admin_outreach_models_api_model_presets_admin_outreach_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Admin Outreach Models Api Model Presets Admin Outreach Models Get"}}}}}},"put":{"tags":["Model Presets"],"summary":"Set Admin Outreach Models","description":"Set the system-wide outreach redesign models.\n\nBoth fields are optional — only the ones provided are updated, leaving the\nother untouched.","operationId":"set_admin_outreach_models_api_model_presets_admin_outreach_models_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOutreachModelsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Admin Outreach Models Api Model Presets Admin Outreach Models Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/model-presets/user/presets":{"get":{"tags":["Model Presets"],"summary":"List User Presets","description":"Return all model presets owned by the current user.","operationId":"list_user_presets_api_model_presets_user_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List User Presets Api Model Presets User Presets Get"}}}}}},"post":{"tags":["Model Presets"],"summary":"Create User Preset","description":"Create a new user-owned model preset.","operationId":"create_user_preset_api_model_presets_user_presets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserPresetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create User Preset Api Model Presets User Presets Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/model-presets/user/presets/{preset_id}":{"put":{"tags":["Model Presets"],"summary":"Update User Preset","description":"Update a user-owned model preset.","operationId":"update_user_preset_api_model_presets_user_presets__preset_id__put","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserPresetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update User Preset Api Model Presets User Presets  Preset Id  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Model Presets"],"summary":"Delete User Preset","description":"Delete a user-owned model preset.","operationId":"delete_user_preset_api_model_presets_user_presets__preset_id__delete","parameters":[{"name":"preset_id","in":"path","required":true,"schema":{"type":"string","title":"Preset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","description":"Root endpoint.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","description":"Health check endpoint.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/user/subscription-status":{"get":{"summary":"Get User Subscription Status","description":"Get user's current subscription status and limits.","operationId":"get_user_subscription_status_user_subscription_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/generate":{"post":{"summary":"Generate App","description":"Generate a full-stack web application from a prompt.\n\nThis endpoint initiates an async workflow with multiple agents:\n1. Coordinator - Routes the request\n2. Planner - Creates architecture\n3. Designer - Plans file structure and design\n4. ImageGen - Generates images (if needed)\n5. CodeGen - Generates all code files\n\nArgs:\n    request: Generation request with user prompt\n    user_id: Current user ID (from JWT token)\n\nReturns:\n    Response with workflow ID and status\n\nRaises:\n    HTTPException: If validation fails or workflow initialization fails","operationId":"generate_app_generate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResponse"}}}}}}},"/workflows/{workflow_id}/approve":{"post":{"summary":"Approve Workflow","description":"Approve the design plan and trigger code generation.","operationId":"approve_workflow_workflows__workflow_id__approve_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/cancel":{"post":{"summary":"Cancel Workflow","description":"Pause a running workflow.\n\nThis endpoint stops the background workflow task and marks the workflow as paused\nso it can later resume from saved checkpoints.","operationId":"cancel_workflow_workflows__workflow_id__cancel_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows":{"get":{"summary":"List Workflows","description":"List recent workflows.\n\nArgs:\n    limit: Maximum number of workflows to return\n    offset: Offset for pagination\n\nReturns:\n    List of workflows","operationId":"list_workflows_workflows_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}":{"get":{"summary":"Get Workflow State","description":"Get current workflow state.\n\nThis endpoint returns the current state of a workflow, including status,\npage structure, and other relevant data. Use this to initialize the UI\nbefore connecting to the SSE stream.\n\nArgs:\n    workflow_id: The workflow ID\n\nReturns:\n    Workflow state","operationId":"get_workflow_state_workflows__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/files":{"get":{"summary":"Get Workflow Files","description":"Get the list of generated files for a workflow with their contents.\n\nArgs:\n    workflow_id: Workflow ID\n    user_id: Current user ID\n    db: Database session\n\nReturns:\n    List of generated files with paths and contents","operationId":"get_workflow_files_workflows__workflow_id__files_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/mobile-store-artifacts":{"get":{"summary":"Get Mobile Store Artifacts","description":"Return downloadable native package status for a generated mobile PWA.","operationId":"get_mobile_store_artifacts_workflows__workflow_id__mobile_store_artifacts_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/mobile-store-artifacts/android/build":{"post":{"summary":"Start Android Store Build","description":"Start a background Android App Bundle build for manual Play Store upload.","operationId":"start_android_store_build_workflows__workflow_id__mobile_store_artifacts_android_build_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AndroidStoreBuildRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/mobile-store-artifacts/{platform}/download":{"get":{"summary":"Download Mobile Store Artifact","description":"Download a built .aab or .ipa for manual store submission.","operationId":"download_mobile_store_artifact_workflows__workflow_id__mobile_store_artifacts__platform__download_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"platform","in":"path","required":true,"schema":{"type":"string","title":"Platform"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/mobile-store-source.zip":{"get":{"summary":"Download Mobile Store Source Archive","description":"Download generated source with Capacitor config for manual native builds.","operationId":"download_mobile_store_source_archive_workflows__workflow_id__mobile_store_source_zip_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/source.zip":{"get":{"summary":"Download Workflow Source Archive","description":"Download the generated source code as a ZIP archive.","operationId":"download_workflow_source_archive_workflows__workflow_id__source_zip_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/events":{"get":{"summary":"Get Workflow Events","description":"Get workflow events as JSON (fallback if SSE fails or for pagination).\n\nArgs:\n    workflow_id: Workflow ID\n    since_event_id: Optional event ID to get events after (for pagination)\n    event_types: Optional comma-separated list of event types to filter\n    limit: Maximum number of events to return (default 100, max 1000)\n    user_id: Current user ID\n    db: Database session\n\nReturns:\n    List of workflow events","operationId":"get_workflow_events_workflows__workflow_id__events_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"since_event_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Since Event Id"}},{"name":"event_types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Types"}},{"name":"payload","in":"query","required":false,"schema":{"type":"string","default":"full","title":"Payload"}},{"name":"include_noise","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Noise"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":250,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/stream":{"get":{"summary":"Stream Workflow Events","description":"Stream workflow events via Server-Sent Events (SSE).\n\nThis endpoint provides real-time updates about workflow execution,\nincluding agent activities, progress, and status changes.\n\nSupports Last-Event-ID header for resuming from last received event.\n\nCRITICAL FIX (2025-10-12): Event filtering now uses timestamp comparison instead of UUID comparison.\nUUIDs are not sequential, so filtering by UUID > last_uuid was causing events to be skipped,\nresulting in the frontend getting stuck at earlier workflow stages (e.g., \"Planner working...\").\nNow we filter by timestamp and order by (timestamp, id) for correct chronological event delivery.\n\nArgs:\n    workflow_id: The workflow ID to stream events for\n    request: FastAPI Request object (to access headers)\n    from_continue: If True, only stream events from the continue phase onwards\n\nReturns:\n    StreamingResponse with SSE events","operationId":"stream_workflow_events_workflows__workflow_id__stream_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"from_continue","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"From Continue"}},{"name":"include_noise","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Noise"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/continue":{"post":{"summary":"Continue Workflow","description":"Continue workflow execution after user edits.\n\nResumes code generation with the user-edited page structure.\n\nArgs:\n    workflow_id: Workflow ID\n    user_id: Current user ID\n    db: Database session\n\nReturns:\n    Status message\n\nRaises:\n    HTTPException: If workflow not found or not in correct state","operationId":"continue_workflow_workflows__workflow_id__continue_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ContinueWorkflowRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContinueWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/design-preview/regenerate":{"post":{"summary":"Regenerate Design Previews","description":"Generate three fresh unselected design directions for the same workflow.","operationId":"regenerate_design_previews_workflows__workflow_id__design_preview_regenerate_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateDesignPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workflows/{workflow_id}/regenerate":{"post":{"summary":"Regenerate Workflow","description":"Start a fresh workflow from the current workflow's refined prompt.","operationId":"regenerate_workflow_workflows__workflow_id__regenerate_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RegenerateWorkflowRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateWorkflowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contact":{"post":{"summary":"Submit Contact Form","description":"Handle contact form submission with Cloudflare Turnstile verification.\nPosts each submission to Discord as a new thread via webhook.","operationId":"submit_contact_form_api_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFormRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFormResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/enterprise/contact":{"post":{"summary":"Submit Enterprise Contact Form","description":"Post Enterprise Java app inquiries to the configured Discord channel.","operationId":"submit_enterprise_contact_form_api_enterprise_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterpriseContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFormResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddNoteRequest":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"}},"type":"object","required":["content"],"title":"AddNoteRequest"},"AiEditComponentRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"html":{"type":"string","title":"Html"},"prompt":{"type":"string","title":"Prompt"},"component_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Component Label"},"page_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Path"}},"type":"object","required":["workflow_id","html","prompt"],"title":"AiEditComponentRequest"},"AiEditComponentResponse":{"properties":{"updated_html":{"type":"string","title":"Updated Html"},"persisted_to_disk":{"type":"boolean","title":"Persisted To Disk","default":false}},"type":"object","required":["updated_html"],"title":"AiEditComponentResponse"},"AlertItem":{"properties":{"type":{"type":"string","title":"Type"},"severity":{"type":"string","title":"Severity"},"title":{"type":"string","title":"Title"},"details":{"type":"string","title":"Details"},"count":{"type":"integer","title":"Count"},"sample_ids":{"items":{"type":"string"},"type":"array","title":"Sample Ids"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["type","severity","title","details","count","sample_ids"],"title":"AlertItem"},"AlertsResponse":{"properties":{"generated_at":{"type":"string","title":"Generated At"},"alerts":{"items":{"$ref":"#/components/schemas/AlertItem"},"type":"array","title":"Alerts"}},"type":"object","required":["generated_at","alerts"],"title":"AlertsResponse"},"AndroidStoreBuildRequest":{"properties":{"app_id":{"type":"string","title":"App Id"},"app_name":{"type":"string","title":"App Name"},"server_url":{"type":"string","title":"Server Url"}},"type":"object","required":["app_id","app_name","server_url"],"title":"AndroidStoreBuildRequest"},"AnswerInput":{"properties":{"question":{"type":"string","maxLength":2000,"minLength":1,"title":"Question"},"answer":{"type":"string","maxLength":2000,"minLength":1,"title":"Answer"}},"additionalProperties":false,"type":"object","required":["question","answer"],"title":"AnswerInput"},"ApproveRequest":{"properties":{"page_structure":{"additionalProperties":true,"type":"object","title":"Page Structure"}},"type":"object","required":["page_structure"],"title":"ApproveRequest"},"AuditLogItem":{"properties":{"id":{"type":"string","title":"Id"},"timestamp":{"type":"string","title":"Timestamp"},"workflow_id":{"type":"string","title":"Workflow Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"agent_name":{"type":"string","title":"Agent Name"},"action":{"type":"string","title":"Action"},"status":{"type":"string","title":"Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","timestamp","workflow_id","user_email","project_name","agent_name","action","status","message","error"],"title":"AuditLogItem"},"AutoTopupSettingsRequest":{"properties":{"auto_topup_enabled":{"type":"boolean","title":"Auto Topup Enabled"},"auto_topup_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Topup Amount Cents"}},"type":"object","required":["auto_topup_enabled"],"title":"AutoTopupSettingsRequest"},"AutoTopupSettingsResponse":{"properties":{"auto_topup_enabled":{"type":"boolean","title":"Auto Topup Enabled"},"auto_topup_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Topup Amount Cents"},"effective_amount_cents":{"type":"integer","title":"Effective Amount Cents"},"billing_details_available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Billing Details Available"},"billing_setup_required":{"type":"boolean","title":"Billing Setup Required","default":false},"billing_setup_checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Setup Checkout Url"},"billing_setup_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Setup Session Id"}},"type":"object","required":["auto_topup_enabled","auto_topup_amount_cents","effective_amount_cents"],"title":"AutoTopupSettingsResponse"},"AutopilotSettings":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"min_score":{"type":"integer","title":"Min Score","default":0},"daily_max":{"type":"integer","title":"Daily Max","default":5}},"type":"object","required":["enabled"],"title":"AutopilotSettings"},"AutopilotToggleRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"AutopilotToggleRequest"},"Body_upload_custom_image_api_images_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"workflow_id":{"type":"string","title":"Workflow Id"},"image_id":{"type":"string","title":"Image Id"}},"type":"object","required":["file","workflow_id","image_id"],"title":"Body_upload_custom_image_api_images_upload_post"},"Body_upload_logo_image_projects_workflows__workflow_id__upload_logo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"logo_type":{"type":"string","title":"Logo Type","default":"header"}},"type":"object","required":["file"],"title":"Body_upload_logo_image_projects_workflows__workflow_id__upload_logo_post"},"CheckoutRequest":{"properties":{"acknowledged_additional_charges":{"type":"boolean","title":"Acknowledged Additional Charges","default":false}},"type":"object","title":"CheckoutRequest","description":"Start checkout. Nothing about the price comes from the client."},"CheckoutResponse":{"properties":{"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"success":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Success"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"CheckoutResponse"},"CloudflareAccountValidationResponse":{"properties":{"is_valid":{"type":"boolean","title":"Is Valid"},"message":{"type":"string","title":"Message"},"account_accessible":{"type":"boolean","title":"Account Accessible"},"workers_access":{"type":"boolean","title":"Workers Access"},"zone_found":{"type":"boolean","title":"Zone Found"},"zone_matches_account":{"type":"boolean","title":"Zone Matches Account"},"zone_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zone Id"}},"type":"object","required":["is_valid","message","account_accessible","workers_access","zone_found","zone_matches_account"],"title":"CloudflareAccountValidationResponse"},"ContactFormRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"subject":{"type":"string","title":"Subject"},"message":{"type":"string","title":"Message"},"captcha_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captcha Token"}},"type":"object","required":["name","email","subject","message"],"title":"ContactFormRequest","description":"Contact form submission model."},"ContactFormResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"ContactFormResponse","description":"Contact form response model."},"ContinueWorkflowRequest":{"properties":{"selected_design_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selected Design Id"}},"type":"object","title":"ContinueWorkflowRequest"},"ContinueWorkflowResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"resume_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resume Kind"},"task_started":{"type":"boolean","title":"Task Started","default":false}},"type":"object","required":["workflow_id","status","message"],"title":"ContinueWorkflowResponse","description":"Response for continuing workflow."},"CreateCheckoutRequest":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"billing_interval":{"type":"string","title":"Billing Interval","default":"monthly"}},"type":"object","required":["plan_id"],"title":"CreateCheckoutRequest"},"CreateCreditTopupCheckoutRequest":{"properties":{"amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Cents"}},"type":"object","title":"CreateCreditTopupCheckoutRequest"},"CreateHelpRequestPayload":{"properties":{"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"description":{"type":"string","title":"Description"},"budget":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Budget"},"allow_account_access":{"type":"boolean","title":"Allow Account Access"},"contact_email":{"type":"string","format":"email","title":"Contact Email"},"phone_number":{"type":"string","title":"Phone Number"}},"type":"object","required":["description","allow_account_access","contact_email","phone_number"],"title":"CreateHelpRequestPayload","description":"Payload for user support intake."},"CreateHelpRequestResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","status","created_at"],"title":"CreateHelpRequestResponse"},"CreateLeadRequest":{"properties":{"site_domain":{"type":"string","maxLength":255,"minLength":1,"title":"Site Domain"},"business_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Business Name"},"business_category":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Business Category"},"business_location":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Business Location"},"campaign":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Campaign"},"preview_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Preview Url"},"preview_workflow_id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Preview Workflow Id"},"internal_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Notes"}},"type":"object","required":["site_domain"],"title":"CreateLeadRequest"},"CreateProjectRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"site_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Type"},"template_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Type"},"features":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Features"},"is_private":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Private","default":false}},"type":"object","required":["name"],"title":"CreateProjectRequest","description":"Create project request."},"CreateSavedCloudflareAccountRequest":{"properties":{"name":{"type":"string","title":"Name"},"api_token":{"type":"string","title":"Api Token"},"cloudflare_account_id":{"type":"string","title":"Cloudflare Account Id"},"base_domain":{"type":"string","title":"Base Domain"}},"additionalProperties":false,"type":"object","required":["name","api_token","cloudflare_account_id","base_domain"],"title":"CreateSavedCloudflareAccountRequest"},"CreateUserPresetRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"planning_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Planning Model Id"},"designer_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Designer Model Id"},"development_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Development Model Id"},"image_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Model Id"},"repair_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repair Model Id"}},"type":"object","required":["name"],"title":"CreateUserPresetRequest"},"DeleteSavedCloudflareAccountResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"account_id":{"type":"string","title":"Account Id"}},"type":"object","required":["success","message","account_id"],"title":"DeleteSavedCloudflareAccountResponse"},"DeleteWorkflowEnvVarRequest":{"properties":{"key":{"type":"string","title":"Key"}},"additionalProperties":false,"type":"object","required":["key"],"title":"DeleteWorkflowEnvVarRequest"},"DeploymentRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"convex_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Convex Url"},"subdomain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdomain"},"deployment_target":{"type":"string","enum":["platform","platform_custom_hostname","user_cloudflare","github"],"title":"Deployment Target","default":"platform"},"platform_custom_hostname_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform Custom Hostname Id"},"user_cloudflare_account_config_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Cloudflare Account Config Id"},"user_cloudflare_api_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Cloudflare Api Token"},"user_cloudflare_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Cloudflare Account Id"},"user_cloudflare_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Cloudflare Domain"},"github_repo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Repo Url"},"github_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Branch"},"github_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Token"},"github_commit_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Commit Message"}},"type":"object","required":["workflow_id"],"title":"DeploymentRequest","description":"Request to deploy a workflow to Cloudflare Pages."},"DeploymentRequirementsResponse":{"properties":{"npm_installed":{"type":"boolean","title":"Npm Installed"},"wrangler_available":{"type":"boolean","title":"Wrangler Available"},"missing":{"items":{"type":"string"},"type":"array","title":"Missing"},"cloudflare_configured":{"type":"boolean","title":"Cloudflare Configured"}},"type":"object","required":["npm_installed","wrangler_available","missing","cloudflare_configured"],"title":"DeploymentRequirementsResponse","description":"Response for deployment requirements check."},"DeploymentResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Id"},"deployment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Status"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"deployment_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Url"},"pages_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pages Url"},"custom_domain_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain Url"},"custom_domain_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain Status"},"is_custom_domain_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom Domain Active"},"is_live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Live"},"subdomain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subdomain"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output"}},"type":"object","required":["success","message"],"title":"DeploymentResponse","description":"Response for deployment request."},"DraftEdits":{"properties":{"proposal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposal"},"bid_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bid Rate"}},"type":"object","title":"DraftEdits"},"EditorHistoryItem":{"properties":{"history_id":{"type":"string","title":"History Id"},"updated_at":{"type":"string","title":"Updated At"},"html_size":{"type":"integer","title":"Html Size"},"css_size":{"type":"integer","title":"Css Size"}},"type":"object","required":["history_id","updated_at","html_size","css_size"],"title":"EditorHistoryItem"},"EditorHistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EditorHistoryItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"EditorHistoryResponse"},"EditorStateRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"path":{"type":"string","title":"Path"},"html":{"type":"string","title":"Html"},"css":{"type":"string","title":"Css"}},"type":"object","required":["workflow_id","path","html","css"],"title":"EditorStateRequest"},"EditorStateResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"},"path":{"type":"string","title":"Path"},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html"},"css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Css"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"history_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"History Id"},"is_stale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Stale"}},"type":"object","required":["exists","path"],"title":"EditorStateResponse"},"EditorStateRevertRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"path":{"type":"string","title":"Path"},"history_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"History Id"},"reset_to_preview":{"type":"boolean","title":"Reset To Preview","default":false}},"type":"object","required":["workflow_id","path"],"title":"EditorStateRevertRequest"},"EmailDraftRequest":{"properties":{"outreach_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Outreach Email"},"subject":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Subject"},"message":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Message"}},"type":"object","title":"EmailDraftRequest","description":"The admin's editable pieces of the outreach email. Layout stays server-owned."},"EnterpriseContactRequest":{"properties":{"contact_person":{"type":"string","title":"Contact Person"},"company_email":{"type":"string","format":"email","title":"Company Email"},"contact":{"type":"string","title":"Contact"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"monthly_budget":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monthly Budget"},"app_count":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Count"},"looking_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Looking For"}},"type":"object","required":["contact_person","company_email","contact"],"title":"EnterpriseContactRequest","description":"Enterprise Java app inquiry form submission."},"EstimateRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"answers":{"items":{"$ref":"#/components/schemas/AnswerInput"},"type":"array","maxItems":40,"title":"Answers"}},"additionalProperties":false,"type":"object","required":["session_id"],"title":"EstimateRequest"},"EstimateResponse":{"properties":{"ai_days":{"type":"integer","title":"Ai Days"},"effort_breakdown":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Effort Breakdown"},"proposal_markdown":{"type":"string","title":"Proposal Markdown"},"math":{"additionalProperties":true,"type":"object","title":"Math"},"proposal_id":{"type":"string","title":"Proposal Id"},"proposal_path":{"type":"string","title":"Proposal Path"},"refine_path":{"type":"string","title":"Refine Path"}},"type":"object","required":["ai_days","effort_breakdown","proposal_markdown","math","proposal_id","proposal_path","refine_path"],"title":"EstimateResponse"},"EstimateStatusResponse":{"properties":{"state":{"type":"string","title":"State"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"result":{"anyOf":[{"$ref":"#/components/schemas/EstimateResponse"},{"type":"null"}]}},"type":"object","required":["state"],"title":"EstimateStatusResponse","description":"What one call to /estimate sees: the result, or how the run is getting there.\n\nThe model call that produces an estimate regularly outlives what a proxy in front\nof this service will hold a browser request open for, and a request cut there\nreaches the client as an unexplained transport error even though the work\nsucceeded. So the call starts the work and reports on it, and the client asks\nagain until the run settles."},"ForkProposalRequest":{"properties":{"proposal_markdown":{"type":"string","maxLength":60000,"minLength":1,"title":"Proposal Markdown"}},"additionalProperties":false,"type":"object","required":["proposal_markdown"],"title":"ForkProposalRequest","description":"Fork a staff-edited proposal without changing its requirements or estimate."},"GalleryEntrySummary":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"app_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Type"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"prompt_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Excerpt"},"site_url":{"type":"string","title":"Site Url"},"screenshot_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Url"},"show_on_gallery":{"type":"boolean","title":"Show On Gallery"},"discord_notified_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discord Notified At"},"pipeline_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Status"},"pipeline_attempts":{"type":"integer","title":"Pipeline Attempts"},"pipeline_last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Last Error"},"pipeline_next_retry_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Next Retry At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","user_id","user_email","user_name","workflow_id","project_id","name","app_type","plan","prompt","prompt_excerpt","site_url","screenshot_url","show_on_gallery","discord_notified_at","pipeline_status","pipeline_attempts","pipeline_last_error","pipeline_next_retry_at","created_at"],"title":"GalleryEntrySummary","description":"Gallery entry summary for super admin moderation."},"GalleryUpdateRequest":{"properties":{"show_on_gallery":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show On Gallery"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"site_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Site Url"},"app_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Type"}},"type":"object","title":"GalleryUpdateRequest","description":"Request payload to update gallery entry metadata or visibility."},"GameShareClaimCreateRequest":{"properties":{"game_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Id"},"gallery_entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gallery Entry Id"},"share_url":{"type":"string","title":"Share Url"}},"type":"object","required":["share_url"],"title":"GameShareClaimCreateRequest"},"GameShareClaimResponse":{"properties":{"id":{"type":"string","title":"Id"},"game_id":{"type":"string","title":"Game Id"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"share_url":{"type":"string","title":"Share Url"},"status":{"type":"string","title":"Status"},"claimed_credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Claimed Credits"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","game_id","platform","share_url","status","claimed_credits","created_at"],"title":"GameShareClaimResponse"},"GameShareClaimSummary":{"properties":{"id":{"type":"string","title":"Id"},"game_id":{"type":"string","title":"Game Id"},"game_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Title"},"user_id":{"type":"string","title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"share_url":{"type":"string","title":"Share Url"},"status":{"type":"string","title":"Status"},"claimed_credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Claimed Credits"},"token_transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Transaction Id"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","game_id","game_title","user_id","user_email","user_name","platform","share_url","status","claimed_credits","token_transaction_id","created_at","updated_at"],"title":"GameShareClaimSummary","description":"Social share reward claim for super admin review."},"GameSummary":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"gallery_entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gallery Entry Id"},"title":{"type":"string","title":"Title"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"status":{"type":"string","title":"Status"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"play_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Play Url"},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"},"share_count":{"type":"integer","title":"Share Count"},"show_on_gallery":{"type":"boolean","title":"Show On Gallery"},"gallery_pipeline_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gallery Pipeline Status"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","user_id","user_email","user_name","project_id","workflow_id","gallery_entry_id","title","prompt","status","engine","preview_url","play_url","public_url","share_count","show_on_gallery","gallery_pipeline_status","created_at","updated_at"],"title":"GameSummary","description":"Generated game summary for super admin moderation."},"GameVoteRequest":{"properties":{"value":{"type":"integer","maximum":1.0,"minimum":-1.0,"title":"Value"}},"type":"object","required":["value"],"title":"GameVoteRequest"},"GameVoteResponse":{"properties":{"gallery_entry_id":{"type":"string","title":"Gallery Entry Id"},"upvotes":{"type":"integer","title":"Upvotes"},"downvotes":{"type":"integer","title":"Downvotes"},"score":{"type":"integer","title":"Score"},"viewer_vote":{"type":"integer","title":"Viewer Vote"}},"type":"object","required":["gallery_entry_id","upvotes","downvotes","score","viewer_vote"],"title":"GameVoteResponse"},"GenerateFromUrlRequest":{"properties":{"url":{"type":"string","maxLength":2000,"minLength":4,"title":"Url"},"campaign":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Campaign"}},"type":"object","required":["url"],"title":"GenerateFromUrlRequest"},"GenerateImageRequest":{"properties":{"image_id":{"type":"string","title":"Image Id"},"page_name":{"type":"string","title":"Page Name"},"page_route":{"type":"string","title":"Page Route"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"purpose":{"type":"string","title":"Purpose"},"prompt":{"type":"string","title":"Prompt"},"dimensions":{"type":"string","title":"Dimensions"}},"type":"object","required":["image_id","page_name","page_route","purpose","prompt","dimensions"],"title":"GenerateImageRequest","description":"Request model for generating (or regenerating) a workflow image by logical image_id.\n\nThis is designed for the UI to support “update prompt and regenerate right away”,\neven if the image has never been generated before."},"GenerateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"workflow_id":{"type":"string","title":"Workflow Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"output_directory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Directory"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success","workflow_id","status","message"],"title":"GenerateResponse"},"GuidedPromptAnsweredQuestion":{"properties":{"question_id":{"type":"string","title":"Question Id"},"question":{"type":"string","title":"Question"},"values":{"items":{"type":"string"},"type":"array","title":"Values"},"skipped":{"type":"boolean","title":"Skipped","default":false}},"type":"object","required":["question_id","question"],"title":"GuidedPromptAnsweredQuestion"},"GuidedPromptFinalPromptRequest":{"properties":{"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task"},"target_customer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Customer Type"},"initial_user_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial User Intent"},"interview_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interview Mode"},"brief_id":{"type":"string","title":"Brief Id"},"source_prompt":{"type":"string","title":"Source Prompt","default":""},"requirements":{"items":{"$ref":"#/components/schemas/GuidedPromptFinalRequirement"},"type":"array","title":"Requirements"},"requirement_context":{"$ref":"#/components/schemas/GuidedPromptRequirementContext"},"interview_control":{"$ref":"#/components/schemas/GuidedPromptInterviewControl"},"generation_config":{"$ref":"#/components/schemas/GuidedPromptGenerationConfig"},"assumptions":{"items":{"type":"string"},"type":"array","title":"Assumptions"},"unknowns":{"items":{"type":"string"},"type":"array","title":"Unknowns"},"deferred_items":{"items":{"type":"string"},"type":"array","title":"Deferred Items"},"output_instruction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Instruction"}},"type":"object","required":["brief_id"],"title":"GuidedPromptFinalPromptRequest"},"GuidedPromptFinalPromptResponse":{"properties":{"prompt":{"type":"string","title":"Prompt"},"model":{"type":"string","title":"Model"},"source":{"type":"string","title":"Source","default":"ai"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"site_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Type"},"template_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Type"}},"type":"object","required":["prompt","model"],"title":"GuidedPromptFinalPromptResponse"},"GuidedPromptFinalRequirement":{"properties":{"field_id":{"type":"string","title":"Field Id"},"label":{"type":"string","title":"Label"},"values":{"items":{"type":"string"},"type":"array","title":"Values"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"assumed":{"type":"boolean","title":"Assumed","default":false}},"type":"object","required":["field_id","label"],"title":"GuidedPromptFinalRequirement"},"GuidedPromptGenerationConfig":{"properties":{"app_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Type"},"model_preset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Preset"},"generation_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generation Mode"},"max_question_budget":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Question Budget"}},"type":"object","title":"GuidedPromptGenerationConfig"},"GuidedPromptInterviewControl":{"properties":{"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"remaining_question_budget":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining Question Budget"},"todo_checklist":{"items":{"type":"string"},"type":"array","title":"Todo Checklist"},"do_not_ask":{"items":{"type":"string"},"type":"array","title":"Do Not Ask"},"details_box_shown_count":{"type":"integer","title":"Details Box Shown Count","default":0},"details_box_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Details Box Limit"}},"type":"object","title":"GuidedPromptInterviewControl"},"GuidedPromptNextQuestion":{"properties":{"id":{"type":"string","title":"Id"},"question":{"type":"string","title":"Question"},"field_kind":{"type":"string","title":"Field Kind","default":"single_select"},"options":{"items":{"type":"string"},"type":"array","title":"Options"},"default_selected":{"items":{"type":"string"},"type":"array","title":"Default Selected"},"max_selections":{"type":"integer","title":"Max Selections","default":1},"allow_custom":{"type":"boolean","title":"Allow Custom","default":true},"blank_label":{"type":"string","title":"Blank Label","default":""},"sentence_prefix":{"type":"string","title":"Sentence Prefix","default":""},"sentence_suffix":{"type":"string","title":"Sentence Suffix","default":""},"details_enabled":{"type":"boolean","title":"Details Enabled","default":false},"details_placeholder":{"type":"string","title":"Details Placeholder","default":""},"icon_key":{"type":"string","title":"Icon Key","default":""}},"type":"object","required":["id","question"],"title":"GuidedPromptNextQuestion"},"GuidedPromptNextQuestionRequest":{"properties":{"task":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task"},"target_customer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Customer Type"},"initial_user_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial User Intent"},"interview_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interview Mode"},"answered":{"items":{"$ref":"#/components/schemas/GuidedPromptAnsweredQuestion"},"type":"array","title":"Answered"},"max_questions":{"type":"integer","maximum":15.0,"minimum":1.0,"title":"Max Questions","default":15},"requirement_context":{"$ref":"#/components/schemas/GuidedPromptRequirementContext"},"interview_control":{"$ref":"#/components/schemas/GuidedPromptInterviewControl"},"generation_config":{"$ref":"#/components/schemas/GuidedPromptGenerationConfig"}},"type":"object","title":"GuidedPromptNextQuestionRequest"},"GuidedPromptNextQuestionResponse":{"properties":{"done":{"type":"boolean","title":"Done"},"question":{"anyOf":[{"$ref":"#/components/schemas/GuidedPromptNextQuestion"},{"type":"null"}]},"asked_count":{"type":"integer","title":"Asked Count","default":0},"max_questions":{"type":"integer","title":"Max Questions","default":15},"model":{"type":"string","title":"Model","default":""},"source":{"type":"string","title":"Source","default":"ai"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["done"],"title":"GuidedPromptNextQuestionResponse"},"GuidedPromptRequirementContext":{"properties":{"known_details":{"additionalProperties":true,"type":"object","title":"Known Details"},"question_answer_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Question Answer History"},"assumptions":{"items":{"type":"string"},"type":"array","title":"Assumptions"},"unknowns":{"items":{"type":"string"},"type":"array","title":"Unknowns"},"requirement_summary":{"type":"string","title":"Requirement Summary","default":""}},"type":"object","title":"GuidedPromptRequirementContext"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HelpRequestSummary":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"description":{"type":"string","title":"Description"},"budget":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Budget"},"allow_account_access":{"type":"boolean","title":"Allow Account Access"},"contact_email":{"type":"string","title":"Contact Email"},"phone_number":{"type":"string","title":"Phone Number"},"status":{"type":"string","title":"Status"},"discord_notified_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discord Notified At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","user_id","user_email","user_name","workflow_id","project_id","description","budget","allow_account_access","contact_email","phone_number","status","discord_notified_at","created_at"],"title":"HelpRequestSummary","description":"Help request summary for super admin support queue."},"ImageResponse":{"properties":{"id":{"type":"string","title":"Id"},"workflow_id":{"type":"string","title":"Workflow Id"},"image_id":{"type":"string","title":"Image Id"},"page_name":{"type":"string","title":"Page Name"},"page_route":{"type":"string","title":"Page Route"},"section":{"type":"string","title":"Section"},"purpose":{"type":"string","title":"Purpose"},"prompt":{"type":"string","title":"Prompt"},"dimensions":{"type":"string","title":"Dimensions"},"model":{"type":"string","title":"Model"},"filename":{"type":"string","title":"Filename"},"file_path":{"type":"string","title":"File Path"},"url":{"type":"string","title":"Url"},"file_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"File Size Bytes"},"version":{"type":"integer","title":"Version"},"is_active":{"type":"boolean","title":"Is Active"},"generation_success":{"type":"boolean","title":"Generation Success"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","workflow_id","image_id","page_name","page_route","section","purpose","prompt","dimensions","model","filename","file_path","url","file_size_bytes","version","is_active","generation_success","error_message","created_at"],"title":"ImageResponse","description":"Response model for a generated image."},"InterestedFormRequest":{"properties":{"full_name":{"type":"string","maxLength":255,"minLength":1,"title":"Full Name"},"business_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Business Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone"},"whatsapp":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Whatsapp"},"preferred_contact_method":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Preferred Contact Method"},"preferred_contact_time":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Preferred Contact Time"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"}},"type":"object","required":["full_name","email"],"title":"InterestedFormRequest","description":"Contact details submitted before checkout, on either path."},"LeadRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"email":{"type":"string","maxLength":255,"format":"email","title":"Email"},"phone":{"type":"string","maxLength":50,"minLength":1,"title":"Phone"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message"}},"additionalProperties":false,"type":"object","required":["session_id","name","email","phone"],"title":"LeadRequest"},"LeadResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["ok"],"title":"LeadResponse"},"LogFollowUpRequest":{"properties":{"contact_method":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Contact Method"},"contacted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Contacted At"},"outcome":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Outcome"},"next_follow_up_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Follow Up Date"},"meeting_scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Meeting Scheduled At"},"proposal_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Proposal Sent At"},"follow_up_notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"title":"Follow Up Notes"}},"type":"object","title":"LogFollowUpRequest"},"ManualGalleryEntryCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"prompt":{"type":"string","title":"Prompt"},"site_url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Site Url"},"app_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Type","default":"static"}},"type":"object","required":["name","prompt","site_url"],"title":"ManualGalleryEntryCreateRequest","description":"Request payload for super-admin-created gallery entries."},"NextQuestion":{"properties":{"text":{"type":"string","title":"Text"},"options":{"items":{"type":"string"},"type":"array","title":"Options"},"select":{"type":"string","title":"Select","default":"single"},"allow_custom":{"type":"boolean","title":"Allow Custom","default":true},"preselected":{"items":{"type":"string"},"type":"array","title":"Preselected"}},"type":"object","required":["text"],"title":"NextQuestion"},"NextQuestionRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"answers":{"items":{"$ref":"#/components/schemas/AnswerInput"},"type":"array","maxItems":40,"title":"Answers"}},"additionalProperties":false,"type":"object","required":["session_id"],"title":"NextQuestionRequest"},"NextQuestionResponse":{"properties":{"state":{"type":"string","title":"State"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"done":{"type":"boolean","title":"Done","default":false},"question":{"anyOf":[{"$ref":"#/components/schemas/NextQuestion"},{"type":"null"}]},"asked_count":{"type":"integer","title":"Asked Count","default":0}},"type":"object","required":["state"],"title":"NextQuestionResponse","description":"What one call to /next-question sees: the question, or how its run is getting there.\n\nThe same shape as EstimateStatusResponse, for the same reason: authoring a question\nis a model call whose slow tail outlives what a proxy in front of this service will\nhold a browser request open for. So the call starts the work and reports on it, and\nthe client asks again until the run settles."},"OutreachLeadPublic":{"properties":{"token":{"type":"string","title":"Token"},"site_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Domain"},"business_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Name"},"business_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Category"},"business_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Location"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"preview_status":{"type":"string","title":"Preview Status"},"status":{"type":"string","title":"Status"},"lead_score":{"type":"integer","title":"Lead Score"},"project_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Type"},"contact_already_submitted":{"type":"boolean","title":"Contact Already Submitted"},"contact_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Name"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Phone"},"requirements_already_submitted":{"type":"boolean","title":"Requirements Already Submitted"},"requirements_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requirements Session Id"},"change_request":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Request"},"payment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Status"},"is_paid":{"type":"boolean","title":"Is Paid"},"is_unsubscribed":{"type":"boolean","title":"Is Unsubscribed"}},"type":"object","required":["token","site_domain","business_name","business_category","business_location","preview_url","preview_status","status","lead_score","project_type","contact_already_submitted","contact_name","contact_email","contact_phone","requirements_already_submitted","requirements_session_id","change_request","payment_status","is_paid","is_unsubscribed"],"title":"OutreachLeadPublic","description":"Public-facing lead data returned to the outreach page visitor.\n\nThe flags below are the resume state: the page reads them on every load and\nreopens at the step the visitor stopped on. Contact details and requirements\nare steps along the way, so neither of them ends the flow — only ``is_paid``\ndoes, and only Stripe can set it."},"PageStructureResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"status":{"type":"string","title":"Status"},"page_structure":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Page Structure"},"can_edit":{"type":"boolean","title":"Can Edit"},"broken_relationships":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Broken Relationships"},"asset_issues":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Asset Issues"}},"type":"object","required":["workflow_id","status","can_edit"],"title":"PageStructureResponse","description":"Page structure response for editing."},"PaginatedTokenHistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TokenTransactionResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["items","total","page","page_size","total_pages"],"title":"PaginatedTokenHistoryResponse"},"PlanResponse":{"properties":{"id":{"type":"string","title":"Id"},"plan_type":{"type":"string","title":"Plan Type"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"base_price_cents":{"type":"integer","title":"Base Price Cents"},"signup_credits":{"type":"integer","title":"Signup Credits"},"topup_bundle_size":{"type":"integer","title":"Topup Bundle Size"},"topup_price_cents":{"type":"integer","title":"Topup Price Cents"},"default_topup_amount_cents":{"type":"integer","title":"Default Topup Amount Cents","default":1000},"auto_topup_default_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Topup Default Amount Cents"},"features":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Features"},"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"},"is_custom":{"type":"boolean","title":"Is Custom"},"previous_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Plan"},"incremental_features":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Incremental Features"}},"type":"object","required":["id","plan_type","name","description","base_price_cents","signup_credits","topup_bundle_size","topup_price_cents","features","stripe_price_id","is_custom"],"title":"PlanResponse"},"PlanTokenMetrics":{"properties":{"plan_type":{"type":"string","title":"Plan Type"},"user_count":{"type":"integer","title":"User Count"},"total_allocated":{"type":"integer","title":"Total Allocated"},"total_consumed":{"type":"integer","title":"Total Consumed"},"avg_consumption_per_user":{"type":"number","title":"Avg Consumption Per User"},"utilization_rate":{"type":"number","title":"Utilization Rate"}},"type":"object","required":["plan_type","user_count","total_allocated","total_consumed","avg_consumption_per_user","utilization_rate"],"title":"PlanTokenMetrics","description":"Token metrics per subscription plan."},"PlatformCustomHostnameConnectRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"hostname":{"type":"string","title":"Hostname"}},"type":"object","required":["workflow_id","hostname"],"title":"PlatformCustomHostnameConnectRequest"},"PlatformCustomHostnameResponse":{"properties":{"id":{"type":"string","title":"Id"},"hostname":{"type":"string","title":"Hostname"},"dns_target":{"type":"string","title":"Dns Target"},"status":{"type":"string","title":"Status"},"ssl_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssl Status"},"hostname_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname Status"},"verification_errors":{"items":{"type":"string"},"type":"array","title":"Verification Errors","default":[]},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"last_checked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Checked At"},"deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Id"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"instructions":{"additionalProperties":{"type":"string"},"type":"object","title":"Instructions"}},"type":"object","required":["id","hostname","dns_target","status","instructions"],"title":"PlatformCustomHostnameResponse"},"PreviewRuntimeHealthResponse":{"properties":{"preview_available":{"type":"boolean","title":"Preview Available"},"runtime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtime"},"message":{"type":"string","title":"Message"}},"type":"object","required":["preview_available","message"],"title":"PreviewRuntimeHealthResponse","description":"Whether a preview runtime (local dev server or Cloudflare) is available."},"PreviewStartRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"force_restart":{"type":"boolean","title":"Force Restart","default":false}},"type":"object","required":["workflow_id"],"title":"PreviewStartRequest","description":"Request to start a preview container."},"PreviewStartResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"runtime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtime"}},"type":"object","required":["success","message"],"title":"PreviewStartResponse","description":"Response for starting a preview container."},"PreviewStatusResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"status":{"type":"string","title":"Status"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"started_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Started At"},"last_accessed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Accessed"},"uptime":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Uptime"},"template_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Type"},"build_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Status"},"health_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Health Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"runtime":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtime"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"},"direct_preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direct Preview Url"}},"type":"object","required":["workflow_id","status"],"title":"PreviewStatusResponse","description":"Response for container status."},"PreviewStopResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"PreviewStopResponse","description":"Response for stopping a preview container."},"ProjectDetails":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"user_email":{"type":"string","title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"workflows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Workflows"},"page_structure":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Page Structure"},"generated_files":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Generated Files"}},"type":"object","required":["id","name","description","user_email","user_name","status","created_at","updated_at","workflows","page_structure","generated_files"],"title":"ProjectDetails","description":"Detailed project information including structure and workflows."},"ProjectListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProjectResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","total","limit","offset","has_more"],"title":"ProjectListResponse","description":"Paginated project list response."},"ProjectModelUsageResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"user_email":{"type":"string","title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"project_id":{"type":"string","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"rows":{"items":{"$ref":"#/components/schemas/ProjectModelUsageRow"},"type":"array","title":"Rows"},"total_cost_usd":{"type":"number","title":"Total Cost Usd"},"total_prompt_tokens":{"type":"integer","title":"Total Prompt Tokens"},"total_cached_tokens":{"type":"integer","title":"Total Cached Tokens"},"total_completion_tokens":{"type":"integer","title":"Total Completion Tokens"},"total_images":{"type":"integer","title":"Total Images"}},"type":"object","required":["user_id","user_email","user_name","project_id","project_name","rows","total_cost_usd","total_prompt_tokens","total_cached_tokens","total_completion_tokens","total_images"],"title":"ProjectModelUsageResponse"},"ProjectModelUsageRow":{"properties":{"model_name":{"type":"string","title":"Model Name"},"generation_type":{"type":"string","title":"Generation Type"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"cached_tokens":{"type":"integer","title":"Cached Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"image_count":{"type":"integer","title":"Image Count"},"cost_usd":{"type":"number","title":"Cost Usd"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["model_name","generation_type","agent_name","prompt_tokens","cached_tokens","completion_tokens","image_count","cost_usd","request_count"],"title":"ProjectModelUsageRow","description":"Per-project model usage rollup, optionally split by agent."},"ProjectResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"site_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Type"},"template_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Type"},"features":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Features"},"status":{"type":"string","title":"Status"},"is_favorite":{"type":"boolean","title":"Is Favorite","default":false},"is_private":{"type":"boolean","title":"Is Private","default":false},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"workflow_count":{"type":"integer","title":"Workflow Count","default":0},"latest_workflows":{"items":{"$ref":"#/components/schemas/agent__routes_projects__WorkflowSummary"},"type":"array","title":"Latest Workflows","default":[]}},"type":"object","required":["id","name","description","status","created_at","updated_at"],"title":"ProjectResponse","description":"Project response."},"ProjectSettingsResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"site_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Type"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"workflows":{"items":{"$ref":"#/components/schemas/WorkflowAdminCredentials"},"type":"array","title":"Workflows"}},"type":"object","required":["id","name","description","created_at","updated_at","workflows"],"title":"ProjectSettingsResponse","description":"Project settings response with all workflows and credentials."},"ProjectSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"user_email":{"type":"string","title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"status":{"type":"string","title":"Status"},"site_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site Type"},"template_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Type"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"file_count":{"type":"integer","title":"File Count"},"generation_time":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Generation Time"},"tokens_consumed":{"type":"integer","title":"Tokens Consumed"},"credits_consumed":{"type":"integer","title":"Credits Consumed","default":0},"last_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Activity"},"files_generated":{"type":"integer","title":"Files Generated"},"latest_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Workflow Id"},"deployment_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Url"},"custom_domain_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Custom Domain Url"},"is_custom_domain_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Custom Domain Active"}},"type":"object","required":["id","name","user_email","user_name","status","created_at","updated_at","file_count","generation_time","tokens_consumed","last_activity","files_generated"],"title":"ProjectSummary","description":"Project summary for admin dashboard."},"ProjectTypeRequest":{"properties":{"project_type":{"type":"string","maxLength":32,"title":"Project Type"}},"type":"object","required":["project_type"],"title":"ProjectTypeRequest","description":"Which of the two conversion paths the visitor picked."},"ProjectUsageResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/ProjectUsageRow"},"type":"array","title":"Rows"},"total_cost_usd":{"type":"number","title":"Total Cost Usd"},"total_prompt_tokens":{"type":"integer","title":"Total Prompt Tokens"},"total_cached_tokens":{"type":"integer","title":"Total Cached Tokens"},"total_completion_tokens":{"type":"integer","title":"Total Completion Tokens"}},"type":"object","required":["rows","total_cost_usd","total_prompt_tokens","total_cached_tokens","total_completion_tokens"],"title":"ProjectUsageResponse"},"ProjectUsageRow":{"properties":{"user_id":{"type":"string","title":"User Id"},"user_email":{"type":"string","title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"project_created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Created At"},"project_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Status"},"app_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Type"},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Name"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"cached_tokens":{"type":"integer","title":"Cached Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"cost_usd":{"type":"number","title":"Cost Usd"},"request_count":{"type":"integer","title":"Request Count"}},"type":"object","required":["user_id","user_email","user_name","project_id","project_name","project_created_at","project_status","app_type","agent_name","prompt_tokens","cached_tokens","completion_tokens","cost_usd","request_count"],"title":"ProjectUsageRow","description":"Per-project token + cost rollup."},"ProposalListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProposalSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"default_formulas":{"additionalProperties":{"type":"string"},"type":"object","title":"Default Formulas"}},"type":"object","required":["items","total","limit","offset","default_formulas"],"title":"ProposalListResponse"},"ProposalNotesRequest":{"properties":{"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","title":"ProposalNotesRequest"},"ProposalOverridesRequest":{"properties":{"formulas":{"additionalProperties":{"type":"string"},"type":"object","title":"Formulas"}},"type":"object","title":"ProposalOverridesRequest","description":"A project's formula overrides: {variable: formula} for the keys it customises.\n\nOnly non-blank formulas are kept; an omitted or blank key falls back to the\ndefault. An empty map clears every override and returns the project to defaults."},"ProposalResponse":{"properties":{"proposal_id":{"type":"string","title":"Proposal Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"proposal_path":{"type":"string","title":"Proposal Path"},"refine_path":{"type":"string","title":"Refine Path"},"proposal_markdown":{"type":"string","title":"Proposal Markdown"},"ai_days":{"type":"integer","title":"Ai Days"},"effort_breakdown":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Effort Breakdown"},"math":{"additionalProperties":true,"type":"object","title":"Math"}},"type":"object","required":["proposal_id","proposal_path","refine_path","proposal_markdown","ai_days","effort_breakdown","math"],"title":"ProposalResponse"},"ProposalSummary":{"properties":{"proposal_id":{"type":"string","title":"Proposal Id"},"proposal_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposal Path"},"status":{"type":"string","title":"Status"},"proposal_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Proposal Version"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"lead_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Name"},"lead_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Email"},"lead_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Phone"},"lead_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Message"},"who_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Who For"},"build_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Type"},"ai_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Days"},"override_formulas":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Override Formulas"},"team":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team"},"days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days"},"cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["proposal_id","proposal_path","status","proposal_version","project_id","notes","owner_name","owner_email","lead_name","lead_email","lead_phone","lead_message","who_for","build_type","ai_days","override_formulas","team","days","cost","created_at"],"title":"ProposalSummary"},"ProposalSummaryNotes":{"properties":{"proposal_id":{"type":"string","title":"Proposal Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["proposal_id","notes"],"title":"ProposalSummaryNotes"},"ProposalVersionSummary":{"properties":{"version":{"type":"integer","title":"Version"},"proposal_id":{"type":"string","title":"Proposal Id"},"proposal_path":{"type":"string","title":"Proposal Path"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_current":{"type":"boolean","title":"Is Current"}},"type":"object","required":["version","proposal_id","proposal_path","created_at","is_current"],"title":"ProposalVersionSummary"},"ProposalView":{"properties":{"proposal_id":{"type":"string","title":"Proposal Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"proposal_path":{"type":"string","title":"Proposal Path"},"refine_path":{"type":"string","title":"Refine Path"},"proposal_markdown":{"type":"string","title":"Proposal Markdown"},"ai_days":{"type":"integer","title":"Ai Days"},"effort_breakdown":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Effort Breakdown"},"math":{"additionalProperties":true,"type":"object","title":"Math"},"who_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Who For"},"build_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Type"},"answers":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Answers"},"versions":{"items":{"$ref":"#/components/schemas/ProposalVersionSummary"},"type":"array","title":"Versions"}},"type":"object","required":["proposal_id","proposal_path","refine_path","proposal_markdown","ai_days","effort_breakdown","math"],"title":"ProposalView"},"PublicGalleryListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PublicProjectResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","total","limit","offset","has_more"],"title":"PublicGalleryListResponse","description":"Paginated public gallery response."},"PublicGalleryTemplateResponse":{"properties":{"id":{"type":"string","title":"Id"},"prompt":{"type":"string","title":"Prompt"},"prompt_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Excerpt"},"public_site_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Site Url"},"preview_site_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Site Url"},"screenshot_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Url"},"use_template_url":{"type":"string","title":"Use Template Url"}},"type":"object","required":["id","prompt","prompt_excerpt","public_site_url","preview_site_url","screenshot_url","use_template_url"],"title":"PublicGalleryTemplateResponse","description":"Template reuse payload for public gallery and Discord deep links."},"PublicProjectResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"app_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Type"},"prompt_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Excerpt"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"public_site_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Site Url"},"use_template_url":{"type":"string","title":"Use Template Url"},"screenshot_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Screenshot Url"},"bundle_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Url"},"bundle_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Hash"},"created_at":{"type":"string","title":"Created At"},"upvotes":{"type":"integer","title":"Upvotes","default":0},"downvotes":{"type":"integer","title":"Downvotes","default":0},"score":{"type":"integer","title":"Score","default":0},"viewer_vote":{"type":"integer","title":"Viewer Vote","default":0}},"type":"object","required":["id","project_name","app_type","prompt_excerpt","plan","public_site_url","use_template_url","screenshot_url","created_at"],"title":"PublicProjectResponse","description":"Public gallery response model."},"RegenerateDesignPreviewResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"task_started":{"type":"boolean","title":"Task Started","default":false},"previous_design_batch":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Previous Design Batch"}},"type":"object","required":["workflow_id","status","message"],"title":"RegenerateDesignPreviewResponse"},"RegenerateImageRequest":{"properties":{"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"dimensions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dimensions"}},"type":"object","title":"RegenerateImageRequest","description":"Request model for regenerating an image."},"RegeneratePasswordResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"workflow_id":{"type":"string","title":"Workflow Id"},"temporary_password":{"type":"string","title":"Temporary Password"},"admin_email":{"type":"string","title":"Admin Email"},"requires_password_change":{"type":"boolean","title":"Requires Password Change"}},"type":"object","required":["success","workflow_id","temporary_password","admin_email","requires_password_change"],"title":"RegeneratePasswordResponse","description":"Response after regenerating password."},"RegenerateWorkflowRequest":{"properties":{"refined_prompt_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refined Prompt Override"},"from_planning":{"type":"boolean","title":"From Planning","default":true}},"type":"object","title":"RegenerateWorkflowRequest","description":"Optional body for `/workflows/{id}/regenerate`. When `from_planning`\nis False the new workflow reuses the source's approved page_structure\nand restarts only code generation; otherwise it re-plans from prompt."},"RegenerateWorkflowResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"source_workflow_id":{"type":"string","title":"Source Workflow Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["workflow_id","source_workflow_id","status","message"],"title":"RegenerateWorkflowResponse","description":"Response for workflow regeneration."},"RequirementsBriefRequest":{"properties":{"change_request":{"type":"string","maxLength":5000,"minLength":10,"title":"Change Request"}},"type":"object","required":["change_request"],"title":"RequirementsBriefRequest","description":"The visitor's own answer to \"what would you like us to change?\"."},"RequirementsSubmittedRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["session_id"],"title":"RequirementsSubmittedRequest","description":"Notify the backend that the visitor has submitted custom requirements."},"RerunResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"message":{"type":"string","title":"Message"},"prompt":{"type":"string","title":"Prompt"}},"type":"object","required":["workflow_id","message","prompt"],"title":"RerunResponse","description":"Rerun response."},"ReviewVerdictRequest":{"properties":{"verdict":{"type":"string","maxLength":32,"title":"Verdict"}},"type":"object","required":["verdict"],"title":"ReviewVerdictRequest","description":"Not-suitable / rebuild verdict from the comparison screen."},"SavedCloudflareAccountListResponse":{"properties":{"accounts":{"items":{"$ref":"#/components/schemas/SavedCloudflareAccountResponse"},"type":"array","title":"Accounts"}},"type":"object","required":["accounts"],"title":"SavedCloudflareAccountListResponse"},"SavedCloudflareAccountResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"cloudflare_account_id":{"type":"string","title":"Cloudflare Account Id"},"base_domain":{"type":"string","title":"Base Domain"},"api_token_masked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Token Masked"},"has_api_token":{"type":"boolean","title":"Has Api Token"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","name","cloudflare_account_id","base_domain","has_api_token"],"title":"SavedCloudflareAccountResponse"},"SavedEstimate":{"properties":{"session_id":{"type":"string","title":"Session Id"},"proposal_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposal Path"},"resume_path":{"type":"string","title":"Resume Path"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"who_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Who For"},"build_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Type"},"ai_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Days"},"team":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Team"},"days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days"},"cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["session_id","proposal_path","resume_path","description","who_for","build_type","ai_days","team","days","cost","status","created_at"],"title":"SavedEstimate"},"ScopeChoice":{"properties":{"options":{"items":{"type":"string"},"type":"array","title":"Options"},"suggested":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested"},"settled":{"type":"boolean","title":"Settled","default":false}},"type":"object","required":["options"],"title":"ScopeChoice","description":"One intro question's model-authored chips plus its recommended pick.\n\n``settled`` means the brief already answers this question, so the wizard takes\n``suggested`` as the answer and never puts the question to the client. The answer\nstill shows in the summary and is still editable — it is skipped, not hidden."},"ScopeSuggestionRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"}},"additionalProperties":false,"type":"object","required":["session_id"],"title":"ScopeSuggestionRequest"},"ScopeSuggestionResponse":{"properties":{"who_for":{"$ref":"#/components/schemas/ScopeChoice"},"build_type":{"$ref":"#/components/schemas/ScopeChoice"}},"type":"object","required":["who_for","build_type"],"title":"ScopeSuggestionResponse"},"SessionRequest":{"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"from_proposal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Proposal"},"answers":{"anyOf":[{"items":{"$ref":"#/components/schemas/AnswerInput"},"type":"array","maxItems":40},{"type":"null"}],"title":"Answers"},"project_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Project Id"},"description":{"anyOf":[{"type":"string","maxLength":20000},{"type":"null"}],"title":"Description"},"who_for":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Who For"},"build_type":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Build Type"}},"additionalProperties":false,"type":"object","title":"SessionRequest"},"SessionResponse":{"properties":{"session_id":{"type":"string","title":"Session Id"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"has_description":{"type":"boolean","title":"Has Description","default":false},"is_refinement":{"type":"boolean","title":"Is Refinement","default":false},"who_for":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Who For"},"build_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Build Type"},"answers":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Answers"},"estimate_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Estimate Result"},"status":{"type":"string","title":"Status","default":"in_progress"}},"type":"object","required":["session_id"],"title":"SessionResponse"},"ShareClaimReviewRequest":{"properties":{"status":{"type":"string","title":"Status"},"rejection_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rejection Reason"}},"type":"object","required":["status"],"title":"ShareClaimReviewRequest"},"SkipRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"SkipRequest"},"StopDeploymentResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"workflow_id":{"type":"string","title":"Workflow Id"},"deployment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Id"},"deployment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deployment Status"},"was_active":{"type":"boolean","title":"Was Active","default":false}},"type":"object","required":["success","message","workflow_id"],"title":"StopDeploymentResponse","description":"Response for stopping an active deployment."},"SubdomainCheckRequest":{"properties":{"subdomain":{"type":"string","title":"Subdomain"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"user_cloudflare_account_config_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Cloudflare Account Config Id"},"cloudflare_api_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cloudflare Api Token"},"cloudflare_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cloudflare Account Id"}},"type":"object","required":["subdomain"],"title":"SubdomainCheckRequest","description":"Request to check subdomain availability."},"SubdomainCheckResponse":{"properties":{"available":{"type":"boolean","title":"Available"},"message":{"type":"string","title":"Message"}},"type":"object","required":["available","message"],"title":"SubdomainCheckResponse","description":"Response for subdomain availability check."},"SubdomainSuggestionRequest":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"excluded_subdomains":{"items":{"type":"string"},"type":"array","title":"Excluded Subdomains"},"user_cloudflare_account_config_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Cloudflare Account Config Id"},"cloudflare_api_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cloudflare Api Token"},"cloudflare_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cloudflare Account Id"}},"type":"object","required":["workflow_id"],"title":"SubdomainSuggestionRequest","description":"Request to suggest an initial publish subdomain."},"SubdomainSuggestionResponse":{"properties":{"subdomain":{"type":"string","title":"Subdomain"}},"type":"object","required":["subdomain"],"title":"SubdomainSuggestionResponse"},"SubscriptionStatusPlanResponse":{"properties":{"id":{"type":"string","title":"Id"},"plan_type":{"type":"string","title":"Plan Type"}},"type":"object","required":["id","plan_type"],"title":"SubscriptionStatusPlanResponse"},"SubscriptionStatusResponse":{"properties":{"has_active_subscription":{"type":"boolean","title":"Has Active Subscription"},"current_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Plan"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"},"can_use_checkout":{"type":"boolean","title":"Can Use Checkout"},"should_use_portal":{"type":"boolean","title":"Should Use Portal"},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Id"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatusSubscriptionResponse"},{"type":"null"}]},"portal_enabled":{"type":"boolean","title":"Portal Enabled"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"cancel_effective_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Effective At"}},"type":"object","required":["has_active_subscription","current_plan","stripe_customer_id","can_use_checkout","should_use_portal","subscription_id","portal_enabled"],"title":"SubscriptionStatusResponse"},"SubscriptionStatusSubscriptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"plan":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionStatusPlanResponse"},{"type":"null"}]}},"type":"object","required":["id","status"],"title":"SubscriptionStatusSubscriptionResponse"},"SubscriptionSummary":{"properties":{"subscription_id":{"type":"string","title":"Subscription Id"},"user_id":{"type":"string","title":"User Id"},"user_email":{"type":"string","title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"plan_type":{"type":"string","title":"Plan Type"},"status":{"type":"string","title":"Status"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"renewal_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renewal Date"},"mrr_cents":{"type":"integer","title":"Mrr Cents"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"}},"type":"object","required":["subscription_id","user_id","user_email","user_name","plan_type","status","start_date","end_date","renewal_date","mrr_cents","stripe_customer_id"],"title":"SubscriptionSummary","description":"Subscription summary for admin dashboard."},"SystemStats":{"properties":{"total_users":{"type":"integer","title":"Total Users"},"new_users":{"type":"integer","title":"New Users"},"active_users":{"type":"integer","title":"Active Users"},"total_projects":{"type":"integer","title":"Total Projects"},"total_workflows":{"type":"integer","title":"Total Workflows"},"active_workflows":{"type":"integer","title":"Active Workflows"},"super_admins":{"type":"integer","title":"Super Admins"},"successful_generations":{"type":"integer","title":"Successful Generations"},"failed_generations":{"type":"integer","title":"Failed Generations"},"active_subscriptions":{"type":"integer","title":"Active Subscriptions"},"new_subscriptions":{"type":"integer","title":"New Subscriptions"},"upcoming_renewals":{"type":"integer","title":"Upcoming Renewals"},"tokens_used":{"type":"integer","title":"Tokens Used"},"subscription_plan_distribution":{"additionalProperties":true,"type":"object","title":"Subscription Plan Distribution"}},"type":"object","required":["total_users","new_users","active_users","total_projects","total_workflows","active_workflows","super_admins","successful_generations","failed_generations","active_subscriptions","new_subscriptions","upcoming_renewals","tokens_used","subscription_plan_distribution"],"title":"SystemStats","description":"System statistics."},"TokenAnalyticsDashboard":{"properties":{"flow_metrics":{"$ref":"#/components/schemas/TokenFlowMetrics"},"plan_metrics":{"items":{"$ref":"#/components/schemas/PlanTokenMetrics"},"type":"array","title":"Plan Metrics"},"top_consumers":{"items":{"$ref":"#/components/schemas/TopConsumer"},"type":"array","title":"Top Consumers"},"transaction_breakdown":{"items":{"$ref":"#/components/schemas/TransactionTypeBreakdown"},"type":"array","title":"Transaction Breakdown"},"daily_trends":{"items":{"$ref":"#/components/schemas/TokenTrend"},"type":"array","title":"Daily Trends"}},"type":"object","required":["flow_metrics","plan_metrics","top_consumers","transaction_breakdown","daily_trends"],"title":"TokenAnalyticsDashboard","description":"Comprehensive token analytics dashboard."},"TokenFlowMetrics":{"properties":{"total_allocated":{"type":"integer","title":"Total Allocated"},"total_consumed":{"type":"integer","title":"Total Consumed"},"total_refunded":{"type":"integer","title":"Total Refunded"},"net_consumption":{"type":"integer","title":"Net Consumption"},"allocation_rate_per_day":{"type":"number","title":"Allocation Rate Per Day"},"consumption_rate_per_day":{"type":"number","title":"Consumption Rate Per Day"},"efficiency_ratio":{"type":"number","title":"Efficiency Ratio"}},"type":"object","required":["total_allocated","total_consumed","total_refunded","net_consumption","allocation_rate_per_day","consumption_rate_per_day","efficiency_ratio"],"title":"TokenFlowMetrics","description":"Token flow and allocation metrics."},"TokenTransactionResponse":{"properties":{"id":{"type":"string","title":"Id"},"transaction_type":{"type":"string","title":"Transaction Type"},"tokens_change":{"type":"integer","title":"Tokens Change"},"signed_tokens_change":{"type":"integer","title":"Signed Tokens Change"},"tokens_direction":{"type":"string","title":"Tokens Direction"},"balance_before":{"type":"integer","title":"Balance Before"},"balance_after":{"type":"integer","title":"Balance After"},"cost_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost Cents"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"},"workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Id"},"tokens_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens Used"}},"type":"object","required":["id","transaction_type","tokens_change","signed_tokens_change","tokens_direction","balance_before","balance_after","cost_cents","description","created_at","workflow_id","tokens_used"],"title":"TokenTransactionResponse"},"TokenTrend":{"properties":{"date":{"type":"string","title":"Date"},"allocated":{"type":"integer","title":"Allocated"},"consumed":{"type":"integer","title":"Consumed"},"net_balance_change":{"type":"integer","title":"Net Balance Change"}},"type":"object","required":["date","allocated","consumed","net_balance_change"],"title":"TokenTrend","description":"Daily token usage trend."},"TokenUsageSummary":{"properties":{"user_id":{"type":"string","title":"User Id"},"user_email":{"type":"string","title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"token_balance":{"type":"integer","title":"Token Balance"},"tokens_allocated":{"type":"integer","title":"Tokens Allocated"},"tokens_used":{"type":"integer","title":"Tokens Used"},"total_consumed":{"type":"integer","title":"Total Consumed"},"last_usage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Usage"},"usage_today":{"type":"integer","title":"Usage Today"},"usage_7_days":{"type":"integer","title":"Usage 7 Days"},"usage_30_days":{"type":"integer","title":"Usage 30 Days"},"current_plan":{"type":"string","title":"Current Plan"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"total_cost_cents":{"type":"integer","title":"Total Cost Cents"},"cost_today_cents":{"type":"integer","title":"Cost Today Cents"},"cost_7_days_cents":{"type":"integer","title":"Cost 7 Days Cents"},"cost_30_days_cents":{"type":"integer","title":"Cost 30 Days Cents"},"total_cost_usd":{"type":"number","title":"Total Cost Usd"},"cost_today_usd":{"type":"number","title":"Cost Today Usd"},"cost_7_days_usd":{"type":"number","title":"Cost 7 Days Usd"},"cost_30_days_usd":{"type":"number","title":"Cost 30 Days Usd"},"avg_cost_per_token":{"type":"number","title":"Avg Cost Per Token"},"workflow_count":{"type":"integer","title":"Workflow Count"},"active_workflows":{"type":"integer","title":"Active Workflows"}},"type":"object","required":["user_id","user_email","user_name","token_balance","tokens_allocated","tokens_used","total_consumed","last_usage","usage_today","usage_7_days","usage_30_days","current_plan","subscription_status","total_cost_cents","cost_today_cents","cost_7_days_cents","cost_30_days_cents","total_cost_usd","cost_today_usd","cost_7_days_usd","cost_30_days_usd","avg_cost_per_token","workflow_count","active_workflows"],"title":"TokenUsageSummary","description":"Token usage summary for admin dashboard."},"TopConsumer":{"properties":{"user_id":{"type":"string","title":"User Id"},"user_email":{"type":"string","title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"tokens_consumed":{"type":"integer","title":"Tokens Consumed"},"workflow_count":{"type":"integer","title":"Workflow Count"},"avg_tokens_per_workflow":{"type":"number","title":"Avg Tokens Per Workflow"},"cost_cents":{"type":"integer","title":"Cost Cents"},"cost_usd":{"type":"number","title":"Cost Usd"},"plan_type":{"type":"string","title":"Plan Type"}},"type":"object","required":["user_id","user_email","user_name","tokens_consumed","workflow_count","avg_tokens_per_workflow","cost_cents","cost_usd","plan_type"],"title":"TopConsumer","description":"Top token consumer details."},"TransactionTypeBreakdown":{"properties":{"transaction_type":{"type":"string","title":"Transaction Type"},"count":{"type":"integer","title":"Count"},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_cost_cents":{"type":"integer","title":"Total Cost Cents"}},"type":"object","required":["transaction_type","count","total_tokens","total_cost_cents"],"title":"TransactionTypeBreakdown","description":"Breakdown of tokens by transaction type."},"UnsubscribeRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Reason"}},"type":"object","title":"UnsubscribeRequest"},"UpdateAdminCredentialsRequest":{"properties":{"temporary_password":{"type":"string","title":"Temporary Password"}},"additionalProperties":false,"type":"object","required":["temporary_password"],"title":"UpdateAdminCredentialsRequest","description":"Set a replacement temporary password for a workflow admin."},"UpdateAppSpecRequest":{"properties":{"app_spec":{"additionalProperties":true,"type":"object","title":"App Spec"}},"type":"object","required":["app_spec"],"title":"UpdateAppSpecRequest","description":"Request to update app spec (app configuration)."},"UpdateDefaultModelsRequest":{"properties":{"planner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Planner Id"},"designer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Designer Id"},"developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Developer Id"},"repair_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repair Id"},"imagegen_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imagegen Id"},"premium_planner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Premium Planner Id"},"premium_designer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Premium Designer Id"},"premium_developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Premium Developer Id"},"premium_repair_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Premium Repair Id"},"premium_imagegen_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Premium Imagegen Id"},"max_planner_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Planner Id"},"max_designer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Designer Id"},"max_developer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Developer Id"},"max_repair_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Repair Id"},"max_imagegen_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Imagegen Id"},"editor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Editor Id"},"premium_editor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Premium Editor Id"},"max_editor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Editor Id"}},"type":"object","title":"UpdateDefaultModelsRequest"},"UpdateLeadRequest":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"assigned_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assigned To"},"internal_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Notes"},"campaign":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Campaign"},"preview_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Preview Url"},"business_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Business Name"},"business_category":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Business Category"},"business_location":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Business Location"}},"type":"object","title":"UpdateLeadRequest"},"UpdateOutreachModelsRequest":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"image_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Model"},"critic_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Critic Model"}},"type":"object","title":"UpdateOutreachModelsRequest"},"UpdatePageStructureRequest":{"properties":{"page_structure":{"additionalProperties":true,"type":"object","title":"Page Structure"}},"type":"object","required":["page_structure"],"title":"UpdatePageStructureRequest","description":"Request to update page structure."},"UpdateProjectRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_favorite":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Favorite"}},"type":"object","title":"UpdateProjectRequest","description":"Update project request."},"UpdateProjectSettingsRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdateProjectSettingsRequest","description":"Update project settings request."},"UpdateSavedCloudflareAccountRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"api_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Token"},"cloudflare_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cloudflare Account Id"},"base_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Domain"}},"additionalProperties":false,"type":"object","title":"UpdateSavedCloudflareAccountRequest"},"UpdateUserPresetRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"planning_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Planning Model Id"},"designer_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Designer Model Id"},"development_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Development Model Id"},"image_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Model Id"},"repair_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repair Model Id"}},"type":"object","title":"UpdateUserPresetRequest"},"UpdateVisionModelRequest":{"properties":{"model_name":{"type":"string","title":"Model Name"}},"type":"object","required":["model_name"],"title":"UpdateVisionModelRequest"},"UpdateWorkflowModelsRequest":{"properties":{"planning_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Planning Model Id"},"designer_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Designer Model Id"},"development_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Development Model Id"},"image_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Model Id"},"repair_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repair Model Id"},"active_preset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Preset Id"}},"type":"object","title":"UpdateWorkflowModelsRequest"},"UploadImageResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"url":{"type":"string","title":"Url"},"filename":{"type":"string","title":"Filename"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"extension":{"type":"string","title":"Extension"}},"type":"object","required":["success","url","filename","file_size_bytes","extension"],"title":"UploadImageResponse","description":"Response model for uploaded custom image."},"UpsertWorkflowEnvVarRequest":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"string","title":"Value"},"scope":{"type":"string","title":"Scope","default":"runtime"},"feature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feature"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_secret":{"type":"boolean","title":"Is Secret","default":true},"is_required":{"type":"boolean","title":"Is Required","default":false}},"additionalProperties":false,"type":"object","required":["key","value"],"title":"UpsertWorkflowEnvVarRequest"},"UpworkCode":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"UpworkCode"},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"current_plan":{"type":"string","title":"Current Plan"},"token_balance":{"type":"integer","title":"Token Balance"},"created_at":{"type":"string","title":"Created At"},"impersonated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Impersonated By"}},"type":"object","required":["id","email","name","role","current_plan","token_balance","created_at"],"title":"UserResponse","description":"User response."},"UserSubscriptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"plan":{"$ref":"#/components/schemas/PlanResponse"},"status":{"type":"string","title":"Status"},"current_period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"cancel_effective_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cancel Effective At"}},"type":"object","required":["id","plan","status","current_period_start","current_period_end"],"title":"UserSubscriptionResponse"},"UserSummary":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"type":"string","title":"Role"},"project_count":{"type":"integer","title":"Project Count"},"workflow_count":{"type":"integer","title":"Workflow Count"},"created_at":{"type":"string","title":"Created At"},"last_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Activity"},"total_successful_generations":{"type":"integer","title":"Total Successful Generations"},"total_failed_generations":{"type":"integer","title":"Total Failed Generations"},"is_suspended":{"type":"boolean","title":"Is Suspended"},"suspended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suspended At"},"suspension_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suspension Reason"},"current_plan":{"type":"string","title":"Current Plan"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"subscription_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Start"},"subscription_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription End"},"next_renewal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Renewal"},"token_balance":{"type":"integer","title":"Token Balance"},"tokens_allocated":{"type":"integer","title":"Tokens Allocated"},"total_tokens_consumed":{"type":"integer","title":"Total Tokens Consumed"},"last_token_usage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Token Usage"},"last_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login"},"total_logins":{"type":"integer","title":"Total Logins"},"avg_session_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Session Duration"},"total_spent_cents":{"type":"integer","title":"Total Spent Cents"},"current_mrr_cents":{"type":"integer","title":"Current Mrr Cents"},"stripe_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Customer Id"}},"type":"object","required":["id","email","name","role","project_count","workflow_count","created_at","last_activity","total_successful_generations","total_failed_generations","is_suspended","suspended_at","suspension_reason","current_plan","subscription_status","subscription_start","subscription_end","next_renewal","token_balance","tokens_allocated","total_tokens_consumed","last_token_usage","last_login","total_logins","avg_session_duration","total_spent_cents","current_mrr_cents","stripe_customer_id"],"title":"UserSummary","description":"User summary for admin dashboard."},"UserTokenInfo":{"properties":{"token_balance":{"type":"integer","title":"Token Balance"},"pending_credits":{"type":"number","title":"Pending Credits","default":0.0},"current_plan":{"type":"string","title":"Current Plan"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/UserSubscriptionResponse"},{"type":"null"}]},"portal_enabled":{"type":"boolean","title":"Portal Enabled"},"plan_limits":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Plan Limits"},"java_app_test_bypass_enabled":{"type":"boolean","title":"Java App Test Bypass Enabled","default":false},"auto_topup_enabled":{"type":"boolean","title":"Auto Topup Enabled","default":false},"auto_topup_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Topup Amount Cents"}},"type":"object","required":["token_balance","current_plan","subscription","portal_enabled"],"title":"UserTokenInfo"},"ValidateSavedCloudflareAccountRequest":{"properties":{"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"api_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Token"},"cloudflare_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cloudflare Account Id"},"base_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Domain"}},"additionalProperties":false,"type":"object","title":"ValidateSavedCloudflareAccountRequest"},"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"},"WorkflowAdminCredentials":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"workflow_prompt":{"type":"string","title":"Workflow Prompt"},"admin_email":{"type":"string","title":"Admin Email"},"temporary_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporary Password"},"temporary_password_available":{"type":"boolean","title":"Temporary Password Available"},"live_site_admin_exists":{"type":"boolean","title":"Live Site Admin Exists"},"requires_password_change":{"type":"boolean","title":"Requires Password Change"},"password_changed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password Changed At"},"status_source":{"type":"string","title":"Status Source"},"status_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Error"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["workflow_id","workflow_prompt","admin_email","temporary_password","temporary_password_available","live_site_admin_exists","requires_password_change","password_changed_at","status_source","status_error","created_at","updated_at"],"title":"WorkflowAdminCredentials","description":"Workflow admin bootstrap state for one generated site."},"WorkflowDetails":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"started_at":{"type":"string","title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"user_prompt":{"type":"string","title":"User Prompt"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"output_directory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Directory"},"user":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"User"},"project":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Project"},"token_summary":{"$ref":"#/components/schemas/WorkflowTokenSummary"},"token_transactions":{"items":{"$ref":"#/components/schemas/WorkflowTokenTransactionSummary"},"type":"array","title":"Token Transactions"},"files":{"items":{"$ref":"#/components/schemas/WorkflowFileSummary"},"type":"array","title":"Files"}},"type":"object","required":["id","status","started_at","completed_at","user_prompt","error_message","output_directory","user","project","token_summary","token_transactions","files"],"title":"WorkflowDetails"},"WorkflowEnvVarCatalog":{"properties":{"supports_env_vars":{"type":"boolean","title":"Supports Env Vars"},"template_type":{"type":"string","title":"Template Type"},"entries":{"items":{"$ref":"#/components/schemas/WorkflowEnvVarResponse"},"type":"array","title":"Entries"},"suggestions":{"items":{"$ref":"#/components/schemas/WorkflowEnvVarSuggestion"},"type":"array","title":"Suggestions"}},"type":"object","required":["supports_env_vars","template_type","entries","suggestions"],"title":"WorkflowEnvVarCatalog","description":"Combined view of existing env vars + feature-derived suggestions.\n\nThe dashboard renders one screen per workflow that needs to know:\n  * whether this template even supports dashboard-managed env vars,\n  * the existing entries (with secrets masked), and\n  * which env keys the user *should* fill in given the features they have\n    enabled. Returning all of that in one round trip keeps the settings\n    page snappy and avoids drift between separate fetches."},"WorkflowEnvVarResponse":{"properties":{"key":{"type":"string","title":"Key"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"masked":{"type":"boolean","title":"Masked"},"scope":{"type":"string","title":"Scope"},"feature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feature"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_secret":{"type":"boolean","title":"Is Secret"},"is_required":{"type":"boolean","title":"Is Required"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["key","value","masked","scope","feature","description","is_secret","is_required","updated_at"],"title":"WorkflowEnvVarResponse"},"WorkflowEnvVarSuggestion":{"properties":{"key":{"type":"string","title":"Key"},"description":{"type":"string","title":"Description"},"is_required":{"type":"boolean","title":"Is Required"},"is_secret":{"type":"boolean","title":"Is Secret"},"feature":{"type":"string","title":"Feature"},"feature_label":{"type":"string","title":"Feature Label"}},"type":"object","required":["key","description","is_required","is_secret","feature","feature_label"],"title":"WorkflowEnvVarSuggestion"},"WorkflowFileSummary":{"properties":{"id":{"type":"string","title":"Id"},"file_path":{"type":"string","title":"File Path"},"size_bytes":{"type":"integer","title":"Size Bytes"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","file_path","size_bytes","created_at"],"title":"WorkflowFileSummary"},"WorkflowImagesResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"total_images":{"type":"integer","title":"Total Images"},"successful_images":{"type":"integer","title":"Successful Images"},"failed_images":{"type":"integer","title":"Failed Images"},"images":{"items":{"$ref":"#/components/schemas/ImageResponse"},"type":"array","title":"Images"}},"type":"object","required":["workflow_id","total_images","successful_images","failed_images","images"],"title":"WorkflowImagesResponse","description":"Response model for all images in a workflow."},"WorkflowRegenerateRequest":{"properties":{"refined_prompt_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refined Prompt Override"},"from_planning":{"type":"boolean","title":"From Planning","default":true}},"type":"object","title":"WorkflowRegenerateRequest"},"WorkflowRegenerateResponse":{"properties":{"workflow_id":{"type":"string","title":"Workflow Id"},"source_workflow_id":{"type":"string","title":"Source Workflow Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["workflow_id","source_workflow_id","status","message"],"title":"WorkflowRegenerateResponse","description":"Response for starting a regenerated workflow."},"WorkflowTokenSummary":{"properties":{"total_tokens_consumed":{"type":"integer","title":"Total Tokens Consumed"},"total_cost_cents":{"type":"integer","title":"Total Cost Cents"},"total_cost_usd":{"type":"number","title":"Total Cost Usd"},"transaction_count":{"type":"integer","title":"Transaction Count"}},"type":"object","required":["total_tokens_consumed","total_cost_cents","total_cost_usd","transaction_count"],"title":"WorkflowTokenSummary"},"WorkflowTokenTransactionSummary":{"properties":{"id":{"type":"string","title":"Id"},"transaction_type":{"type":"string","title":"Transaction Type"},"tokens_change":{"type":"integer","title":"Tokens Change"},"cost_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cost Cents"},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","transaction_type","tokens_change","cost_cents","cost_usd","description","created_at"],"title":"WorkflowTokenTransactionSummary"},"agent__routes_projects__WorkflowSummary":{"properties":{"id":{"type":"string","title":"Id"},"user_prompt":{"type":"string","title":"User Prompt"},"status":{"type":"string","title":"Status"},"started_at":{"type":"string","title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","user_prompt","status","started_at","completed_at"],"title":"WorkflowSummary","description":"Workflow summary."},"agent__routes_super_admin__WorkflowSummary":{"properties":{"id":{"type":"string","title":"Id"},"user_email":{"type":"string","title":"User Email"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name"},"current_plan":{"type":"string","title":"Current Plan"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"status":{"type":"string","title":"Status"},"started_at":{"type":"string","title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"user_prompt":{"type":"string","title":"User Prompt"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"steps_completed":{"type":"integer","title":"Steps Completed"},"total_steps":{"type":"integer","title":"Total Steps"}},"type":"object","required":["id","user_email","user_name","current_plan","project_name","status","started_at","completed_at","user_prompt","error_message","steps_completed","total_steps"],"title":"WorkflowSummary","description":"Workflow summary for admin dashboard."}}}}