{"openapi":"3.1.0","info":{"title":"NeoAPI Backend","version":"0.1.0"},"paths":{"/auth/register":{"post":{"tags":["Authentication","authentication"],"summary":"Register With Email Password","description":"Register a new user with email and password.","operationId":"register_with_email_password_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPasswordRegister"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["Authentication","authentication"],"summary":"Login With Email Password","description":"Login with email and password.","operationId":"login_with_email_password_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPasswordLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/google":{"get":{"tags":["Authentication","authentication"],"summary":"Google Oauth Url","description":"Get Google OAuth authorization URL.","operationId":"google_oauth_url_auth_oauth_google_get","parameters":[{"name":"redirect_uri","in":"query","required":false,"schema":{"type":"string","default":"https://api.neoapi.ai/auth/callback","title":"Redirect Uri"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/github":{"get":{"tags":["Authentication","authentication"],"summary":"Github Oauth Url","description":"Get GitHub OAuth authorization URL.","operationId":"github_oauth_url_auth_oauth_github_get","parameters":[{"name":"redirect_uri","in":"query","required":false,"schema":{"type":"string","default":"https://api.neoapi.ai/auth/callback","title":"Redirect Uri"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/callback":{"get":{"tags":["Authentication","authentication"],"summary":"Oauth Callback Legacy","description":"Handle legacy OAuth GET callback from Google/GitHub (for compatibility).","operationId":"oauth_callback_legacy_auth_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/callback":{"get":{"tags":["Authentication","authentication"],"summary":"Oauth Callback Get","description":"Handle OAuth GET callback from Google/GitHub and redirect to frontend.","operationId":"oauth_callback_get_auth_oauth_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Authentication","authentication"],"summary":"Oauth Callback Post","description":"Handle OAuth callback and create/login user.","operationId":"oauth_callback_post_auth_oauth_callback_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2AuthRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/google/direct":{"get":{"tags":["Authentication","authentication"],"summary":"Google Oauth Redirect","description":"Direct Google OAuth callback for web redirects.","operationId":"google_oauth_redirect_auth_oauth_google_direct_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"redirect_uri","in":"query","required":false,"schema":{"type":"string","default":"https://api.neoapi.ai/auth/callback","title":"Redirect Uri"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/github/direct":{"get":{"tags":["Authentication","authentication"],"summary":"Github Oauth Redirect","description":"Direct GitHub OAuth callback for web redirects.","operationId":"github_oauth_redirect_auth_oauth_github_direct_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"redirect_uri","in":"query","required":false,"schema":{"type":"string","default":"https://api.neoapi.ai/auth/callback","title":"Redirect Uri"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/success":{"get":{"tags":["Authentication","authentication"],"summary":"Auth Success","description":"Legacy endpoint retained for compatibility without exposing tokens.","operationId":"auth_success_auth_success_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/error":{"get":{"tags":["Authentication","authentication"],"summary":"Auth Error","description":"Legacy endpoint retained for compatibility without reflecting user input.","operationId":"auth_error_auth_error_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/logout":{"post":{"tags":["Authentication","authentication"],"summary":"Logout","description":"Clear the authentication cookie.","operationId":"logout_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/auth/me":{"get":{"tags":["Authentication","authentication"],"summary":"Get Current User Info","description":"Get current authenticated user information.","operationId":"get_current_user_info_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAuthResponse"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/api/humanize":{"post":{"tags":["Humanize","Humanize"],"summary":"Humanize Text","operationId":"humanize_text_api_humanize_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/analyze":{"post":{"tags":["Detect AI","Analyze Text"],"summary":"Analyze Text","operationId":"analyze_text_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/analyze/optimized":{"post":{"tags":["Detect AI","Analyze Text"],"summary":"Analyze Text Optimized","description":"Optimized AI text analysis with configurable response detail levels.\n\nProvides 85% smaller responses for mobile/API use cases while maintaining\naccuracy and essential information.","operationId":"analyze_text_optimized_analyze_optimized_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/save":{"post":{"tags":["Detect AI"],"summary":"Save Text","operationId":"save_text_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectionRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/performance/modes":{"get":{"tags":["Detect AI","Performance"],"summary":"Get Performance Modes","description":"Get all available performance modes and their configurations.","operationId":"get_performance_modes_performance_modes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/performance/recommendation":{"get":{"tags":["Detect AI","Performance"],"summary":"Get Processing Recommendation","description":"Get processing recommendation for specific text and preferences.","operationId":"get_processing_recommendation_performance_recommendation_get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"text","in":"query","required":true,"schema":{"type":"string","title":"Text"}},{"name":"prefer_speed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Prefer Speed"}},{"name":"prefer_accuracy","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Prefer Accuracy"}},{"name":"max_processing_time","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Processing Time"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/performance/features":{"get":{"tags":["Detect AI","Performance"],"summary":"Get Feature Flags","description":"Get current feature flag configuration.","operationId":"get_feature_flags_performance_features_get","security":[{"CustomHTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Detect AI","Performance"],"summary":"Set Feature Profile","description":"Set a performance profile (admin only).","operationId":"set_feature_profile_performance_features_post","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"profile","in":"query","required":true,"schema":{"type":"string","title":"Profile"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/performance/mode":{"post":{"tags":["Detect AI","Performance"],"summary":"Set Performance Mode","description":"Set the global performance mode (admin only).","operationId":"set_performance_mode_performance_mode_post","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"mode","in":"query","required":true,"schema":{"type":"string","title":"Mode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/performance/insights":{"get":{"tags":["Detect AI","Performance"],"summary":"Get Performance Insights","description":"Get performance insights from adaptive processing history.","operationId":"get_performance_insights_performance_insights_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/performance/benchmark":{"post":{"tags":["Detect AI","Performance"],"summary":"Run Performance Benchmark","description":"Run performance benchmark with different configurations (admin only).","operationId":"run_performance_benchmark_performance_benchmark_post","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"iterations","in":"query","required":false,"schema":{"type":"integer","default":3,"title":"Iterations"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Test Texts"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/embeddings":{"post":{"tags":["Embeddings","Embeddings"],"summary":"Create Embeddings","operationId":"create_embeddings_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/api/v2/compare_metrics":{"post":{"tags":["Compare Metrics","Compare Metrics"],"summary":"V2 Compare Metrics","description":"Compare metrics between initial and transformed analyses for version 2.\n\nArgs:\n    request (Request): Request body containing the analysis IDs to compare.\n\nReturns:\n    Dict: Comparison of metrics and scores between the initial and transformed analyses.","operationId":"v2_compare_metrics_api_v2_compare_metrics_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/current_limit":{"get":{"tags":["Users"],"summary":"Get Current Limit","operationId":"get_current_limit_current_limit_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentLimitResponse"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/generate_api_key":{"post":{"tags":["Users"],"summary":"Generate Api Key","operationId":"generate_api_key_generate_api_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAPIKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/api_keys":{"get":{"tags":["Users"],"summary":"Get Api Keys","operationId":"get_api_keys_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/unmask_api_key/{token_id}":{"post":{"tags":["Users"],"summary":"Unmask Api Key","operationId":"unmask_api_key_unmask_api_key__token_id__post","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"integer","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/revoke_api_key/{token_id}":{"delete":{"tags":["Users"],"summary":"Revoke Api Key","operationId":"revoke_api_key_revoke_api_key__token_id__delete","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"integer","title":"Token Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/revoke_all_api_keys":{"delete":{"tags":["Users"],"summary":"Revoke All Api Keys","operationId":"revoke_all_api_keys_revoke_all_api_keys_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/invite":{"post":{"tags":["Users"],"summary":"Invite User","operationId":"invite_user_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/read_user/{user_id}":{"get":{"tags":["Users"],"summary":"Read User","operationId":"read_user_read_user__user_id__get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMaskedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/status":{"get":{"tags":["Users"],"summary":"Get User Status","operationId":"get_user_status_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStatusResponse"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/playground_key":{"get":{"tags":["Users"],"summary":"Get Playground Key Endpoint","description":"Get user's playground API key in unmasked state, creating it if doesn't exist.","operationId":"get_playground_key_endpoint_playground_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/billing/upgrade":{"post":{"tags":["Billing"],"summary":"Upgrade User","operationId":"upgrade_user_billing_upgrade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/billing/downgrade":{"post":{"tags":["Billing"],"summary":"Downgrade User","operationId":"downgrade_user_billing_downgrade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/billing/create-checkout-session":{"post":{"tags":["Billing"],"summary":"Create Checkout Session","operationId":"create_checkout_session_billing_create_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/billing/webhook":{"post":{"tags":["Billing"],"summary":"Stripe Webhook","operationId":"stripe_webhook_billing_webhook_post","parameters":[{"name":"Stripe-Signature","in":"header","required":false,"schema":{"type":"string","title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/verify-checkout-session":{"post":{"tags":["Billing"],"summary":"Verify Checkout Session","operationId":"verify_checkout_session_billing_verify_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyCheckoutSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/billing/success":{"post":{"tags":["Billing"],"summary":"Payment Success","operationId":"payment_success_billing_success_post","parameters":[{"name":"session_id","in":"query","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/manage-subscription":{"get":{"tags":["Billing"],"summary":"Manage Subscription","operationId":"manage_subscription_billing_manage_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/billing/subscription-info":{"get":{"tags":["Billing"],"summary":"Get User Subscription Info","operationId":"get_user_subscription_info_billing_subscription_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/notifications":{"get":{"tags":["Notifications","notifications"],"summary":"List Notifications","description":"Get user's notifications with pagination and filtering.","operationId":"list_notifications_notifications_get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"include_read","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Read"}},{"name":"include_closed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Closed"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notifications/mark-all-read":{"post":{"tags":["Notifications","notifications"],"summary":"Mark All As Read","description":"Mark all user's unread notifications as read.","operationId":"mark_all_as_read_notifications_mark_all_read_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkReadResponse"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/notifications/{notification_id}":{"patch":{"tags":["Notifications","notifications"],"summary":"Update Notification Status","description":"Update notification status.","operationId":"update_notification_status_notifications__notification_id__patch","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"integer","title":"Notification Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Notifications","notifications"],"summary":"Get Notification","description":"Get a specific notification.","operationId":"get_notification_notifications__notification_id__get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"integer","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notification-templates/":{"post":{"tags":["Notification Templates","notification-templates"],"summary":"Create Template","description":"Create a new notification template.","operationId":"create_template_notification_templates__post","security":[{"CustomHTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Notification Templates","notification-templates"],"summary":"List Templates","description":"List all active notification templates.","operationId":"list_templates_notification_templates__get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationTemplateResponse"},"title":"Response List Templates Notification Templates  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notification-templates/{template_id}":{"patch":{"tags":["Notification Templates","notification-templates"],"summary":"Update Template","description":"Update an existing notification template.","operationId":"update_template_notification_templates__template_id__patch","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Notification Templates","notification-templates"],"summary":"Update Template","description":"Update an existing notification template.","operationId":"update_template_notification_templates__template_id__put","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Notification Templates","notification-templates"],"summary":"Get Template","description":"Get a specific notification template.","operationId":"get_template_notification_templates__template_id__get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notification-templates/send":{"post":{"tags":["Notification Templates","notification-templates"],"summary":"Send Notification","description":"Send notifications using a template.","operationId":"send_notification_notification_templates_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/ping":{"get":{"tags":["Health Check"],"summary":"Ping","operationId":"ping_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/robots.txt":{"get":{"summary":"Robots Txt","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap Xml","operationId":"sitemap_xml_sitemap_xml_get","responses":{"200":{"description":"Successful Response"}}}},"/api/users/read_user/{user_id}":{"get":{"tags":["Admin"],"summary":"Read User","operationId":"read_user_api_users_read_user__user_id__get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserMaskedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/read_all_users":{"get":{"tags":["Admin"],"summary":"Read All Users","operationId":"read_all_users_api_users_read_all_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserMaskedResponse"},"type":"array","title":"Response Read All Users Api Users Read All Users Get"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/debug/rate_limit_status":{"get":{"tags":["Debug"],"summary":"Debug Rate Limit Status","operationId":"debug_rate_limit_status_debug_rate_limit_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/health":{"get":{"tags":["Health Check"],"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/reliability/status":{"get":{"tags":["Reliability"],"summary":"Get Reliability Status","description":"Get comprehensive reliability status (admin only)","operationId":"get_reliability_status_reliability_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/reliability/metrics":{"get":{"tags":["Reliability"],"summary":"Get Reliability Metrics","description":"Get detailed reliability metrics (admin only)","operationId":"get_reliability_metrics_reliability_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/reliability/reset":{"post":{"tags":["Reliability"],"summary":"Reset Reliability Systems","description":"Reset reliability systems (admin only)","operationId":"reset_reliability_systems_reliability_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/record/{record_id}":{"get":{"tags":["Charts","Record"],"summary":"Get Record Data","operationId":"get_record_data_chart_record__record_id__get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","description":"Specific record ID to fetch","title":"Record Id"},"description":"Specific record ID to fetch"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chart/last_30_records":{"get":{"tags":["Charts","Charts"],"summary":"Get Last 30 Records","operationId":"get_last_30_records_chart_last_30_records_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/user_stats":{"get":{"tags":["Charts","Dashboard"],"summary":"Get User Stat","operationId":"get_user_stat_chart_user_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/search_records":{"post":{"tags":["Charts","Charts"],"summary":"Search Records","operationId":"search_records_chart_search_records_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRecordsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/user_projects":{"post":{"tags":["Charts","Charts"],"summary":"Get User Projects","operationId":"get_user_projects_chart_user_projects_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_user_projects_chart_user_projects_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/user_groups":{"post":{"tags":["Charts","Charts"],"summary":"Get User Groups","operationId":"get_user_groups_chart_user_groups_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_user_groups_chart_user_groups_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/user_analysis":{"post":{"tags":["Charts","Charts"],"summary":"Get User Analysis Slugs","operationId":"get_user_analysis_slugs_chart_user_analysis_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_user_analysis_slugs_chart_user_analysis_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/daily_stats":{"get":{"tags":["Charts","Dashboard"],"summary":"Get Daily Stats","operationId":"get_daily_stats_chart_daily_stats_get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","title":"Start Date"}},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","title":"End Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chart/dashboard":{"post":{"tags":["Charts","Dashboard"],"summary":"Get Dashboard Chart","operationId":"get_dashboard_chart_chart_dashboard_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardChartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/detailed":{"post":{"tags":["Charts","Charts"],"summary":"Get Detailed Metrics","operationId":"get_detailed_metrics_chart_detailed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedMetricsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/text/{text_id}":{"get":{"tags":["Charts","Charts"],"summary":"Get Text Content","operationId":"get_text_content_chart_text__text_id__get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"text_id","in":"path","required":true,"schema":{"type":"string","description":"Text ID to fetch","title":"Text Id"},"description":"Text ID to fetch"},{"name":"include_metadata","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Metadata"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chart/baselines/yesterday":{"post":{"tags":["Charts","Dashboard"],"summary":"Get Yesterday Baseline","operationId":"get_yesterday_baseline_chart_baselines_yesterday_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/baselines/last_minute":{"post":{"tags":["Charts","Dashboard"],"summary":"Get Last Minute Baseline","operationId":"get_last_minute_baseline_chart_baselines_last_minute_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/baselines/previous_hour":{"post":{"tags":["Charts","Dashboard"],"summary":"Get Previous Hour Baseline","operationId":"get_previous_hour_baseline_chart_baselines_previous_hour_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/baselines/last_hours":{"post":{"tags":["Charts","Dashboard"],"summary":"Get Last Hours Baseline","operationId":"get_last_hours_baseline_chart_baselines_last_hours_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/user_last_analysis":{"post":{"tags":["Charts","Charts"],"summary":"Get User Last Analysis","operationId":"get_user_last_analysis_chart_user_last_analysis_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/simple_stats":{"get":{"tags":["Charts","Dashboard"],"summary":"Get Simple Stats","operationId":"get_simple_stats_chart_simple_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"CustomHTTPBearer":[]}]}},"/chart/prompt/{text_id}":{"get":{"tags":["Charts","Charts"],"summary":"Get Text Prompt","operationId":"get_text_prompt_chart_prompt__text_id__get","security":[{"CustomHTTPBearer":[]}],"parameters":[{"name":"text_id","in":"path","required":true,"schema":{"type":"string","description":"Text ID to fetch prompt for","title":"Text Id"},"description":"Text ID to fetch prompt for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AISignatureAnalysis":{"properties":{"phrase_density":{"type":"number","title":"Phrase Density","default":0.0},"bigram_density":{"type":"number","title":"Bigram Density","default":0.0},"trigram_density":{"type":"number","title":"Trigram Density","default":0.0},"word_density":{"type":"number","title":"Word Density","default":0.0}},"type":"object","title":"AISignatureAnalysis"},"APIKeyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"token":{"type":"string","title":"Token"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["id","token","name","created_at","expires_at"],"title":"APIKeyResponse"},"AnalysisResponse":{"properties":{"analysis_id":{"type":"string","title":"Analysis Id"},"text_id":{"type":"string","title":"Text Id"},"is_ai_generated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Ai Generated"},"threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold"},"human_likeness_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Human Likeness Score"},"metrics":{"$ref":"#/components/schemas/TextAnalysis"},"elapsed_time":{"type":"string","title":"Elapsed Time"}},"type":"object","required":["analysis_id","text_id","metrics","elapsed_time"],"title":"AnalysisResponse"},"AuthSessionResponse":{"properties":{"authenticated":{"type":"boolean","title":"Authenticated","default":true},"user":{"$ref":"#/components/schemas/UserAuthResponse"}},"type":"object","required":["user"],"title":"AuthSessionResponse"},"Body_get_user_analysis_slugs_chart_user_analysis_post":{"properties":{"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"last_analysis":{"type":"boolean","title":"Last Analysis","default":false},"date_range":{"anyOf":[{"$ref":"#/components/schemas/DateRangeRequest"},{"type":"null"}]}},"type":"object","title":"Body_get_user_analysis_slugs_chart_user_analysis_post"},"Body_get_user_groups_chart_user_groups_post":{"properties":{"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"},"last_group":{"type":"boolean","title":"Last Group","default":false},"date_range":{"anyOf":[{"$ref":"#/components/schemas/DateRangeRequest"},{"type":"null"}]}},"type":"object","title":"Body_get_user_groups_chart_user_groups_post"},"Body_get_user_projects_chart_user_projects_post":{"properties":{"date_range":{"anyOf":[{"$ref":"#/components/schemas/DateRangeRequest"},{"type":"null"}]},"last_project":{"type":"boolean","title":"Last Project","default":false}},"type":"object","title":"Body_get_user_projects_chart_user_projects_post"},"ChartRequest":{"properties":{"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"analysis_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Slug"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"}},"type":"object","title":"ChartRequest"},"ChartType":{"type":"string","enum":["structural-insights","text-metrics","entity-distribution","coherence-complexity","part-of-speech"],"title":"ChartType"},"CheckoutSessionRequest":{"properties":{"price_id":{"type":"string","title":"Price Id"},"success_url":{"type":"string","title":"Success Url"},"cancel_url":{"type":"string","title":"Cancel Url"}},"type":"object","required":["price_id","success_url","cancel_url"],"title":"CheckoutSessionRequest"},"CurrentLimitResponse":{"properties":{"limit":{"type":"integer","title":"Limit"},"current_usage":{"type":"integer","title":"Current Usage"}},"type":"object","required":["limit","current_usage"],"title":"CurrentLimitResponse"},"DashboardChartRequest":{"properties":{"chart_type":{"$ref":"#/components/schemas/ChartType"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"analysis_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Slug"}},"type":"object","required":["chart_type"],"title":"DashboardChartRequest"},"DateRangeRequest":{"properties":{"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}},"type":"object","title":"DateRangeRequest"},"DetailedMetricsRequest":{"properties":{"page":{"type":"integer","title":"Page","default":1},"page_size":{"type":"integer","title":"Page Size","default":50},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"analysis_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Slug"}},"type":"object","title":"DetailedMetricsRequest"},"DetectionRequest":{"properties":{"analysis_id":{"anyOf":[{"type":"string","maxLength":36,"minLength":36},{"type":"null"}],"title":"Analysis Id","description":"Existing analysis ID"},"text":{"type":"string","maxLength":50000,"minLength":1,"title":"Text","description":"Text to analyze"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Optional prompt used to generate the text"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata for tracking"},"use_advanced_features":{"type":"boolean","title":"Use Advanced Features","description":"Flag to use advanced features","default":false},"weights":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Weights","description":"Custom weights for analysis"},"thresholds":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Thresholds","description":"Custom thresholds for analysis"},"normalize_metrics_output":{"type":"boolean","title":"Normalize Metrics Output","description":"Normalize metrics output","default":false},"override_weights":{"type":"boolean","title":"Override Weights","description":"Override default weights","default":false},"return_metric_scores":{"type":"boolean","title":"Return Metric Scores","description":"Return metric scores","default":false},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project","description":"Project identifier"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group","description":"Group identifier"},"analysis_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Slug","description":"Analysis slug identifier"},"save_text":{"type":"boolean","title":"Save Text","description":"Save text content to database","default":true},"performance_mode":{"anyOf":[{"type":"string","pattern":"^(fast|balanced|comprehensive|adaptive|metrics_only|skip_ai|no_ai)$"},{"type":"null"}],"title":"Performance Mode","description":"Performance mode: 'fast', 'balanced', 'comprehensive', 'adaptive', or 'metrics_only'"},"enable_adaptive_processing":{"type":"boolean","title":"Enable Adaptive Processing","description":"Enable adaptive processing based on system load and text characteristics","default":false},"user_preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"User Preferences","description":"User preferences for processing (prefer_speed, prefer_accuracy, max_processing_time)"},"feature_overrides":{"anyOf":[{"additionalProperties":{"type":"boolean"},"type":"object"},{"type":"null"}],"title":"Feature Overrides","description":"Override specific feature flags (enable_gpt2_analysis, enable_discourse_coherence, etc.)"},"response_level":{"anyOf":[{"$ref":"#/components/schemas/ResponseLevel"},{"type":"null"}],"description":"Response detail level: minimal, standard, detailed, or full","default":"standard"},"include_metadata":{"type":"boolean","title":"Include Metadata","description":"Include processing metadata in response","default":false},"skip_ai_detection":{"type":"boolean","title":"Skip Ai Detection","description":"Skip AI/human classification and heavy neural perplexity/token models to calculate linguistic and stylistic metrics at maximum speed","default":false},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"Analysis mode: 'full' (default) or 'metrics_only' / 'skip_ai'"}},"type":"object","required":["text"],"title":"DetectionRequest"},"EmailPasswordLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"EmailPasswordLogin"},"EmailPasswordRegister":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"EmailPasswordRegister"},"EmbeddingsRequest":{"properties":{"input":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Input","description":"Single text or list of texts to embed"},"normalize":{"type":"boolean","title":"Normalize","description":"Return L2-normalized embeddings","default":false}},"type":"object","required":["input"],"title":"EmbeddingsRequest"},"EmbeddingsResponse":{"properties":{"object":{"type":"string","title":"Object","default":"list"},"model":{"type":"string","title":"Model"},"dimensions":{"type":"integer","title":"Dimensions"},"input_count":{"type":"integer","title":"Input Count"},"embeddings":{"items":{"items":{"type":"number"},"type":"array"},"type":"array","title":"Embeddings"}},"type":"object","required":["model","dimensions","input_count","embeddings"],"title":"EmbeddingsResponse"},"GenerateAPIKeyRequest":{"properties":{"key_name":{"type":"string","minLength":1,"title":"Key Name","description":"Name for the API key"},"expiration_days":{"type":"integer","minimum":1.0,"title":"Expiration Days","description":"Number of days until the API key expires","default":30}},"type":"object","required":["key_name"],"title":"GenerateAPIKeyRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InviteUserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"InviteUserRequest"},"MarkReadResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"updated_count":{"type":"integer","title":"Updated Count"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","updated_count","message"],"title":"MarkReadResponse"},"NotificationCreate":{"properties":{"template_id":{"type":"integer","title":"Template Id"},"project":{"type":"string","title":"Project"},"notification_type":{"type":"string","title":"Notification Type"},"priority":{"type":"string","title":"Priority"},"variables_data":{"additionalProperties":true,"type":"object","title":"Variables Data"},"user_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"User Ids"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},"type":"object","required":["template_id","project","notification_type","priority","variables_data"],"title":"NotificationCreate","example":{"notification_type":"info","plan":"pro","priority":"medium","project":"my_project","template_id":1,"user_ids":[1,2,3],"variables_data":{"action_url":"https://example.com/action/${id}","message":"Example Message","title":"Example Title"}}},"NotificationList":{"properties":{"total":{"type":"integer","title":"Total"},"unread_count":{"type":"integer","title":"Unread Count"},"notifications":{"items":{"$ref":"#/components/schemas/NotificationResponse"},"type":"array","title":"Notifications"}},"type":"object","required":["total","unread_count","notifications"],"title":"NotificationList"},"NotificationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"},"project":{"type":"string","title":"Project"},"metric_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metric Name"},"notification_type":{"type":"string","title":"Notification Type"},"priority":{"type":"string","title":"Priority"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"variables_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Variables Data"},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"},"deviation_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Deviation Details"},"read_status":{"type":"boolean","title":"Read Status","default":false},"read_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read At"},"closed_status":{"type":"boolean","title":"Closed Status","default":false},"closed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Closed At"},"related_entity_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Related Entity Id"},"sender":{"type":"string","title":"Sender","default":"System"},"status":{"type":"string","title":"Status","default":"unread"},"delivery_attempts":{"type":"integer","title":"Delivery Attempts","default":0},"language":{"type":"string","title":"Language","default":"en"},"notification_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Notification Metadata"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deleted At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"user_timezone":{"type":"string","title":"User Timezone","default":"UTC"},"action_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Url"}},"type":"object","required":["id","user_id","project","notification_type","priority"],"title":"NotificationResponse"},"NotificationTemplateCreate":{"properties":{"name":{"type":"string","title":"Name"},"title_template":{"type":"string","title":"Title Template"},"body_template":{"type":"string","title":"Body Template"},"variables":{"additionalProperties":true,"type":"object","title":"Variables"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","title_template","body_template","variables"],"title":"NotificationTemplateCreate"},"NotificationTemplateResponse":{"properties":{"name":{"type":"string","title":"Name"},"title_template":{"type":"string","title":"Title Template"},"body_template":{"type":"string","title":"Body Template"},"variables":{"additionalProperties":true,"type":"object","title":"Variables"},"id":{"type":"integer","title":"Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","title_template","body_template","variables","id"],"title":"NotificationTemplateResponse"},"NotificationUpdate":{"properties":{"read_status":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Read Status"},"closed_status":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Closed Status"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"action_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Url"}},"type":"object","title":"NotificationUpdate"},"OAuth2AuthRequest":{"properties":{"code":{"type":"string","title":"Code"},"state":{"type":"string","title":"State"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}},"type":"object","required":["code","state"],"title":"OAuth2AuthRequest"},"PlanUpdateRequest":{"properties":{"user_id":{"type":"integer","title":"User Id"},"new_plan":{"type":"string","title":"New Plan"},"new_limit":{"type":"integer","title":"New Limit"}},"type":"object","required":["user_id","new_plan","new_limit"],"title":"PlanUpdateRequest"},"ReadabilityMetrics":{"properties":{"flesch_score":{"type":"number","title":"Flesch Score","default":0.0},"gunning_fog_score":{"type":"number","title":"Gunning Fog Score","default":0.0},"smog_score":{"type":"number","title":"Smog Score","default":0.0},"avg_words_per_sentence":{"type":"number","title":"Avg Words Per Sentence","default":0.0}},"type":"object","title":"ReadabilityMetrics"},"ResponseLevel":{"type":"string","enum":["minimal","standard","detailed","full"],"title":"ResponseLevel","description":"API response detail levels"},"SearchRecordsRequest":{"properties":{"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"project":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"analysis_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Slug"}},"type":"object","title":"SearchRecordsRequest"},"SentimentSubjectivity":{"properties":{"sentiment_score":{"type":"number","title":"Sentiment Score","default":0.0},"sentiment_label":{"type":"string","title":"Sentiment Label","default":"Unknown"},"subjectivity_score":{"type":"number","title":"Subjectivity Score","default":0.0},"text_similarity":{"type":"number","title":"Text Similarity","default":0.0}},"type":"object","title":"SentimentSubjectivity"},"StatisticalMetrics":{"properties":{"repetition_rate":{"type":"number","title":"Repetition Rate","default":0.0},"text_length":{"type":"integer","title":"Text Length","default":0},"punctuation_density":{"type":"number","title":"Punctuation Density","default":0.0}},"type":"object","title":"StatisticalMetrics"},"StructuralAnalysis":{"properties":{"noun_percentage":{"type":"number","title":"Noun Percentage","default":0.0},"verb_percentage":{"type":"number","title":"Verb Percentage","default":0.0},"adjective_percentage":{"type":"number","title":"Adjective Percentage","default":0.0},"adverb_percentage":{"type":"number","title":"Adverb Percentage","default":0.0},"entity_count":{"type":"integer","title":"Entity Count","default":0},"entity_type_distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Entity Type Distribution","default":{}}},"type":"object","title":"StructuralAnalysis"},"StylisticFeatures":{"properties":{"formality":{"type":"number","title":"Formality","default":0.0},"passive_voice_ratio":{"type":"number","title":"Passive Voice Ratio","default":0.0}},"type":"object","title":"StylisticFeatures"},"TextAnalysis":{"properties":{"text_coherence_complexity":{"$ref":"#/components/schemas/TextCoherenceComplexity"},"readability_metrics":{"$ref":"#/components/schemas/ReadabilityMetrics"},"vocabulary_lexical_diversity":{"$ref":"#/components/schemas/VocabularyLexicalDiversity"},"topic_modeling_analysis":{"$ref":"#/components/schemas/TopicModelingAnalysis"},"sentiment_subjectivity":{"$ref":"#/components/schemas/SentimentSubjectivity"},"stylistic_features":{"$ref":"#/components/schemas/StylisticFeatures"},"statistical_metrics":{"$ref":"#/components/schemas/StatisticalMetrics"},"ai_signature_analysis":{"$ref":"#/components/schemas/AISignatureAnalysis"},"structural_analysis":{"$ref":"#/components/schemas/StructuralAnalysis"}},"type":"object","required":["text_coherence_complexity","readability_metrics","vocabulary_lexical_diversity","topic_modeling_analysis","sentiment_subjectivity","stylistic_features","statistical_metrics","ai_signature_analysis","structural_analysis"],"title":"TextAnalysis"},"TextCoherenceComplexity":{"properties":{"sentence_coherence":{"type":"number","title":"Sentence Coherence","default":0.0},"complexity_score":{"type":"number","title":"Complexity Score","default":0.0},"burstiness":{"type":"number","title":"Burstiness","default":0.0},"perplexity":{"type":"number","title":"Perplexity","default":0.0}},"type":"object","title":"TextCoherenceComplexity"},"TopicModelingAnalysis":{"properties":{"topic_diversity":{"type":"number","title":"Topic Diversity","default":0.0},"lda_coverage":{"type":"number","title":"Lda Coverage","default":0.0},"main_topic_likelihood":{"type":"number","title":"Main Topic Likelihood","default":0.0},"topic_variance":{"type":"number","title":"Topic Variance","default":0.0}},"type":"object","title":"TopicModelingAnalysis"},"UserAuthResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"oauth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Provider"},"is_active":{"type":"boolean","title":"Is Active"},"plan":{"type":"string","title":"Plan"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","is_active","plan","created_at"],"title":"UserAuthResponse"},"UserMaskedResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"supabase_user_id":{"type":"string","title":"Supabase User Id"},"is_active":{"type":"boolean","title":"Is Active"},"plan":{"type":"string","title":"Plan"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},"type":"object","required":["id","email","supabase_user_id","is_active","plan"],"title":"UserMaskedResponse"},"UserStatusResponse":{"properties":{"id":{"type":"integer","title":"Id"},"plan":{"type":"string","title":"Plan"},"limit":{"type":"integer","title":"Limit"},"current_usage":{"type":"integer","title":"Current Usage"}},"type":"object","required":["id","plan","limit","current_usage"],"title":"UserStatusResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyCheckoutSessionRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["session_id"],"title":"VerifyCheckoutSessionRequest"},"VocabularyLexicalDiversity":{"properties":{"unique_word_ratio":{"type":"number","title":"Unique Word Ratio","default":0.0},"lexical_diversity":{"type":"number","title":"Lexical Diversity","default":0.0},"rare_word_ratio":{"type":"number","title":"Rare Word Ratio","default":0.0},"key_term_significance":{"type":"number","title":"Key Term Significance","default":0.0}},"type":"object","title":"VocabularyLexicalDiversity"}},"securitySchemes":{"CustomHTTPBearer":{"type":"http","scheme":"bearer"}}}}