{"openapi":"3.1.0","info":{"title":"OXLO Backend","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health","health"],"summary":"Health Check","description":"Basic backend health check.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/worker":{"get":{"tags":["health","health"],"summary":"Worker Health Check","description":"Check GPU worker health status.\n\nUsed by frontend to determine if we should show maintenance message.\n\nReturns:\n    - status: \"online\" | \"offline\" | \"maintenance\"\n    - worker_status: Full response from worker's /health endpoint\n    - message: Human-readable status message","operationId":"worker_health_check_health_worker_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","description":"Create a new user and initiate email verification (OTP).","operationId":"signup_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Resend the 6-digit OTP for email verification.","operationId":"resend_verification_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","description":"Verify email address using OTP code.","operationId":"verify_email_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Console login with email + password.","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/google":{"post":{"tags":["auth"],"summary":"Google Oauth","description":"Login or signup via Google OAuth ID token.","operationId":"google_oauth_auth_google_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleOAuthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/github":{"post":{"tags":["auth"],"summary":"Github Oauth","description":"Login or signup via GitHub OAuth.\n\nFrontend should:\n- Redirect user to GitHub auth URL.\n- Receive `code` on redirect back.\n- POST that `code` to this endpoint.","operationId":"github_oauth_auth_github_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubOAuthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/complete-profile/step-1":{"post":{"tags":["auth"],"summary":"Onboarding Step 1","description":"Step 1: First Name, Last Name, Company Name (optional), Country. Required.","operationId":"onboarding_step_1_auth_complete_profile_step_1_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStep1Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/complete-profile/step-2":{"post":{"tags":["auth"],"summary":"Onboarding Step 2","description":"Step 2: Team size and role. Skippable.","operationId":"onboarding_step_2_auth_complete_profile_step_2_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStep2Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/complete-profile/step-3":{"post":{"tags":["auth"],"summary":"Onboarding Step 3","description":"Step 3: How are you planning to use Oxlo.ai? Multi-select, comma-separated.","operationId":"onboarding_step_3_auth_complete_profile_step_3_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStep3Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/complete-profile/step-4":{"post":{"tags":["auth"],"summary":"Onboarding Step 4","description":"Step 4: Who are you comparing us with? Multi-select, comma-separated.","operationId":"onboarding_step_4_auth_complete_profile_step_4_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStep4Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/complete-profile/step-5":{"post":{"tags":["auth"],"summary":"Onboarding Step 5","description":"Step 5: How did you hear about us? Completes onboarding.","operationId":"onboarding_step_5_auth_complete_profile_step_5_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStep5Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/complete-profile":{"post":{"tags":["auth"],"summary":"Complete Profile Legacy","description":"Legacy single-step complete profile. Completes all steps at once.","operationId":"complete_profile_legacy_auth_complete_profile_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStep1Request"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStepResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/me/profile-status":{"get":{"tags":["auth"],"summary":"Get Profile Status","description":"Check if user has completed their profile and return onboarding progress.","operationId":"get_profile_status_auth_me_profile_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Request password reset. Sends a 6-digit code to the user's email.","operationId":"forgot_password_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/verify-reset-code":{"post":{"tags":["auth"],"summary":"Verify Reset Code","description":"Verify the password reset code and return a temporary reset token.\nSecurity: 5 wrong attempts = 24-hour lockout per email.","operationId":"verify_reset_code_auth_verify_reset_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResetCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResetCodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Reset the user's password using the reset token.","operationId":"reset_password_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mail/submit-feedback":{"post":{"tags":["mail"],"summary":"Submit Feedback","operationId":"submit_feedback_mail_submit_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models":{"get":{"tags":["openai"],"summary":"List Models","description":"List available models in OpenAI-compatible format.\n\nMulti-worker architecture:\n- SaladCloud: All models hardcoded as HOT (can't update worker)\n- T4: Actual status from worker\n- Deduplication by normalized model name","operationId":"list_models_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/chat/completions":{"post":{"tags":["openai"],"summary":"Chat Completions","description":"Forward chat completion request to GPU worker and adapt response.\nUses model-specific prompt formatting (Mistral/Llama) to ensure models follow instructions.","operationId":"chat_completions_v1_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/workers/status":{"get":{"tags":["openai"],"summary":"Get Worker Status","description":"Get load balancer status and worker statistics.\n\nReturns:\n- summary: Overall stats (total workers, utilization, etc.)\n- workers: Per-worker stats (active requests, response times, health)\n\nUseful for monitoring and debugging load distribution.","operationId":"get_worker_status_v1_workers_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/workers/{worker_name}/enable":{"post":{"tags":["openai"],"summary":"Enable Worker","description":"Enable a worker for load balancing.","operationId":"enable_worker_v1_workers__worker_name__enable_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_name","in":"path","required":true,"schema":{"type":"string","title":"Worker Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workers/{worker_name}/disable":{"post":{"tags":["openai"],"summary":"Disable Worker","description":"Disable a worker from load balancing (for maintenance).","operationId":"disable_worker_v1_workers__worker_name__disable_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_name","in":"path","required":true,"schema":{"type":"string","title":"Worker Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/responses":{"post":{"tags":["openai"],"summary":"Responses Api","description":"OpenAI Responses API adapter.\n\nTranslates POST /v1/responses (used by OpenAI SDK 6.x / OpenClaw)\ninto the existing /v1/chat/completions handler and converts the\nresponse back to Responses API format.","operationId":"responses_api_v1_responses_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/models/sync":{"post":{"tags":["admin"],"summary":"Sync Models From Azure","description":"Connects to Azure using SAS URL, lists all .gguf blobs,\nand updates the database with new models.","operationId":"sync_models_from_azure_admin_models_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelListResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/models":{"get":{"tags":["admin"],"summary":"List Models","operationId":"list_models_admin_models_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Page Size"},"description":"Items per page"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ModelStatus"},{"type":"null"}],"description":"Filter by model status","title":"Status"},"description":"Filter by model status"},{"name":"model_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ModelType"},{"type":"null"}],"description":"Filter by model type","title":"Model Type"},"description":"Filter by model type"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or original_filename","title":"Search"},"description":"Search by name or original_filename"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Model","operationId":"create_model_admin_models_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/models/{model_id}":{"get":{"tags":["admin"],"summary":"Get Model","description":"Get a single model by ID.","operationId":"get_model_admin_models__model_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Model","description":"Delete a model by ID.","operationId":"delete_model_admin_models__model_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foundry-models":{"get":{"tags":["admin"],"summary":"List Foundry Models","description":"List all foundry models with optional filtering and pagination.","operationId":"list_foundry_models_admin_foundry_models_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Items per page","default":50,"title":"Page Size"},"description":"Items per page"},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by provider","title":"Provider"},"description":"Filter by provider"},{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tier","title":"Tier"},"description":"Filter by tier"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status","title":"Is Active"},"description":"Filter by active status"},{"name":"coming_soon","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by coming_soon status","title":"Coming Soon"},"description":"Filter by coming_soon status"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by name or id","title":"Search"},"description":"Search by name or id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoundryModelListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["admin"],"summary":"Create Foundry Model","description":"Create a new foundry model configuration.","operationId":"create_foundry_model_admin_foundry_models_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoundryModelCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoundryModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foundry-models/{model_id}":{"get":{"tags":["admin"],"summary":"Get Foundry Model","description":"Get a specific foundry model by ID.","operationId":"get_foundry_model_admin_foundry_models__model_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoundryModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update Foundry Model","description":"Update an existing foundry model configuration.\nOnly provided fields will be updated.","operationId":"update_foundry_model_admin_foundry_models__model_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoundryModelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoundryModelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete Foundry Model","description":"Delete a foundry model configuration.","operationId":"delete_foundry_model_admin_foundry_models__model_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/foundry-models/bulk":{"post":{"tags":["admin"],"summary":"Bulk Create Foundry Models","description":"Bulk create foundry models. Useful for seeding the database.\nModels that already exist will be skipped.","operationId":"bulk_create_foundry_models_admin_foundry_models_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoundryModelBulkCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoundryModelBulkCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/foundry-models/seed":{"post":{"tags":["admin"],"summary":"Seed Foundry Models From Defaults","description":"Seed the foundry_models table from the hardcoded DEFAULT_MODEL_PROVIDER_MAPPING.\nThis is useful for initial database population or resetting to defaults.\nModels that already exist will be skipped.","operationId":"seed_foundry_models_from_defaults_admin_foundry_models_seed_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoundryModelBulkCreateResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/me/api-keys":{"get":{"tags":["api_keys"],"summary":"List Api Keys","description":"List all API keys belonging to the current user.","operationId":"list_api_keys_me_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Response List Api Keys Me Api Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["api_keys"],"summary":"Create Api Key","description":"Create a new API key. Returns the SECRET KEY only once.","operationId":"create_api_key_me_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeySecret"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/me/api-keys/{key_id}/revoke":{"post":{"tags":["api_keys"],"summary":"Revoke Api Key","operationId":"revoke_api_key_me_api_keys__key_id__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/api-keys/{key_id}":{"delete":{"tags":["api_keys"],"summary":"Delete Api Key","operationId":"delete_api_key_me_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/workers/heartbeat":{"post":{"tags":["internal"],"summary":"Worker Heartbeat","description":"Receive heartbeat from worker.\n\n**DYNAMIC REGISTRATION**: If worker_id is new, automatically register\nit with the load balancer - no .env update needed!\n\nThis allows unlimited pods to connect dynamically:\n- L40s pods (auto-scaled from RunPod)\n- T4 pods (Azure or RunPod)\n- A100 pods (for large models)","operationId":"worker_heartbeat_internal_workers_heartbeat_post","parameters":[{"name":"X-Worker-Token","in":"header","required":false,"schema":{"type":"string","title":"X-Worker-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerHeartbeat"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/workers/workers":{"get":{"tags":["internal"],"summary":"List Workers","description":"List all registered workers with their status.\n\nReturns health status, VRAM usage, loaded models, and stale status.","operationId":"list_workers_internal_workers_workers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/internal/workers/workers/{worker_name}":{"delete":{"tags":["internal"],"summary":"Remove Worker","description":"Manually remove a worker from the load balancer.\n\nUse this to clean up stale/deleted pods that still appear in the dashboard.","operationId":"remove_worker_internal_workers_workers__worker_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_name","in":"path","required":true,"schema":{"type":"string","title":"Worker Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/workers/workers/cleanup":{"post":{"tags":["internal"],"summary":"Cleanup Stale Workers","description":"Auto-clean workers that haven't sent heartbeats in threshold seconds.\n\nArgs:\n    threshold_seconds: Seconds without heartbeat before removal (default: 120)\n    \nReturns:\n    List of removed worker names","operationId":"cleanup_stale_workers_internal_workers_workers_cleanup_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"threshold_seconds","in":"query","required":false,"schema":{"type":"integer","default":120,"title":"Threshold Seconds"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/me/usage":{"get":{"tags":["usage"],"summary":"Get Usage Stats","description":"Get aggregated usage statistics for the current user.\nIncludes chat tokens, model usage, images, content seconds, and cost savings.\n\nsimulate_plan: Admin-only param to preview how the page looks for a different tier.","operationId":"get_usage_stats_me_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(today|week|month)$","default":"today","title":"Period"}},{"name":"simulate_plan","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(free|free-trial|pro|premium|enterprise)?$"},{"type":"null"}],"title":"Simulate Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/stats":{"get":{"tags":["Admin"],"summary":"Get Admin Stats","description":"Get dashboard statistics summary.","operationId":"get_admin_stats_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/onboarding-analytics":{"get":{"tags":["Admin"],"summary":"Get Onboarding Analytics","description":"Aggregate onboarding data for admin analytics dashboard.","operationId":"get_onboarding_analytics_admin_onboarding_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingAnalyticsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/users/{user_id}":{"delete":{"tags":["Admin"],"summary":"Delete User","operationId":"delete_user_admin_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/ban":{"post":{"tags":["Admin"],"summary":"Ban User","operationId":"ban_user_admin_users__user_id__ban_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"ban","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Ban"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users":{"get":{"tags":["Admin"],"summary":"Get Users Paginated","description":"Get paginated list of users including total requests and tokens.","operationId":"get_users_paginated_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"promo_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Filter"}},{"name":"country_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Filter"}},{"name":"admin_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Admin Only"}},{"name":"interest_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Interest Only"}},{"name":"plan_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Filter"}},{"name":"sort_by","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort By"}},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Sort Order"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/details":{"get":{"tags":["Admin"],"summary":"Get Admin User Details","operationId":"get_admin_user_details_admin_users__user_id__details_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-codes":{"get":{"tags":["Admin"],"summary":"Get Promo Codes Paginated","description":"Get paginated promo codes with optional search and usage filter.","operationId":"get_promo_codes_paginated_admin_promo_codes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"used_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Used Only"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPromoCodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Promo Code","description":"Create a new promo code with custom characters. Must start with 'OX' and be ALL CAPS.","operationId":"create_promo_code_admin_promo_codes_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePromoCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/plans":{"get":{"tags":["Admin"],"summary":"Get Custom Plans","description":"Get paginated list of custom (non-canonical) enterprise plans.","operationId":"get_custom_plans_admin_plans_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPlansResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Plan","description":"Create a new custom enterprise plan. Plan ID must not already exist.","operationId":"create_plan_admin_plans_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlanRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAdminView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/plans/{plan_id}":{"get":{"tags":["Admin"],"summary":"Get Plan","description":"Get a single plan by ID (including canonical plans).","operationId":"get_plan_admin_plans__plan_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAdminView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Plan","description":"Update an existing custom enterprise plan. Cannot modify canonical plans.","operationId":"update_plan_admin_plans__plan_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanAdminView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/plans/{plan_id}/reassign-owner":{"post":{"tags":["Admin"],"summary":"Reassign Plan Owner","description":"Reassign ownership of a custom enterprise plan to another user.\n\nUse this when the current owner is no longer available (e.g., left the company).\nThe new owner must already be on the same plan.","operationId":"reassign_plan_owner_admin_plans__plan_id__reassign_owner_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReassignPlanOwnerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/plans/{plan_id}/users":{"get":{"tags":["Admin"],"summary":"Get Plan Users Admin","description":"Get paginated list of users on a specific enterprise plan.","operationId":"get_plan_users_admin_admin_plans__plan_id__users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"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/PaginatedPlanUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Add User To Plan Admin","description":"Add a user (by email) to a specific enterprise plan.","operationId":"add_user_to_plan_admin_admin_plans__plan_id__users_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddUserToPlanRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/plans/{plan_id}/users/{email}":{"delete":{"tags":["Admin"],"summary":"Remove User From Plan Admin","description":"Remove a user from an enterprise plan.","operationId":"remove_user_from_plan_admin_admin_plans__plan_id__users__email__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/plans/{plan_id}/codes":{"get":{"tags":["Admin"],"summary":"Get Invite Codes","description":"Get all invite codes for a specific plan.","operationId":"get_invite_codes_admin_plans__plan_id__codes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/app__api__routes__admin__EnterpriseInviteCodeView"},"title":"Response Get Invite Codes Admin Plans  Plan Id  Codes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Invite Code","description":"Create a new invite code for a plan.\n\nAdmins can either:\n- Provide an explicit `code`, or\n- Provide a `company_prefix` to auto-generate a code.","operationId":"create_invite_code_admin_plans__plan_id__codes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInviteCodeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__admin__EnterpriseInviteCodeView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/plans/{plan_id}/codes/{code}":{"patch":{"tags":["Admin"],"summary":"Update Invite Code","description":"Update an invite code (activate/deactivate or change max uses).","operationId":"update_invite_code_admin_plans__plan_id__codes__code__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string","title":"Plan Id"}},{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInviteCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__admin__EnterpriseInviteCodeView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/promo-codes/{promo_id}":{"delete":{"tags":["Admin"],"summary":"Delete Promo Code","description":"Delete a promo code by ID.","operationId":"delete_promo_code_admin_promo_codes__promo_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"promo_id","in":"path","required":true,"schema":{"type":"string","title":"Promo Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/send-platform-update":{"post":{"tags":["Admin"],"summary":"Send Platform Update","description":"Send platform update email to all users (admin only).","operationId":"send_platform_update_admin_send_platform_update_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/send-access-tomorrow":{"post":{"tags":["Admin"],"summary":"Send Access Tomorrow","description":"Send 'access opens tomorrow' reminder to users in a specific access group.","operationId":"send_access_tomorrow_admin_send_access_tomorrow_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessTomorrowRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessNotificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/send-access-notification":{"post":{"tags":["Admin"],"summary":"Send Access Notification","description":"Send access started notification to users in a specific access group.","operationId":"send_access_notification_admin_send_access_notification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessNotificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessNotificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/users/{user_id}/usage":{"get":{"tags":["Admin"],"summary":"Get User Usage Stats","description":"Get detailed usage statistics for a specific user.\n\n- **user_id**: User ID to get stats for\n- **period**: Filter period - 'week' or 'month'","operationId":"get_user_usage_stats_admin_users__user_id__usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(week|month)$","default":"month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUsageStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/users":{"get":{"tags":["Admin"],"summary":"Get Most Active Users","description":"Get most active users by requests/tokens in the specified period.\n\n- **limit**: Number of users to return (1-50)\n- **period**: Filter period - 'week' or 'month'","operationId":"get_most_active_users_admin_analytics_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(week|month)$","default":"month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserActivitySummary"},"title":"Response Get Most Active Users Admin Analytics Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/models":{"get":{"tags":["Admin"],"summary":"Get Most Used Models","description":"Get most used models by requests/tokens in the specified period.\n\n- **limit**: Number of models to return (1-50)\n- **period**: Filter period - 'week' or 'month'","operationId":"get_most_used_models_admin_analytics_models_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(week|month)$","default":"month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelUsageSummary"},"title":"Response Get Most Used Models Admin Analytics Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/patterns":{"get":{"tags":["Admin"],"summary":"Get Usage Patterns","description":"Get usage patterns including peak hours and daily distributions.\n\n- **period**: Filter period - 'week' or 'month'","operationId":"get_usage_patterns_admin_analytics_patterns_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(week|month)$","default":"month","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePatterns"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/patterns-enhanced":{"get":{"tags":["Admin"],"summary":"Get Enhanced Usage Patterns","description":"Get enhanced usage patterns with actual dates.\n\n- **period**: today, this_week, last_week, this_month","operationId":"get_enhanced_usage_patterns_admin_analytics_patterns_enhanced_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(today|this_week|last_week|this_month|last_month)$","default":"this_week","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhancedUsagePatterns"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/active-users":{"get":{"tags":["Admin"],"summary":"Get Active Users Over Time","description":"Get unique active users per day with DAU/WAU/MAU.\n\n- A user is \"active\" if they send at least 1 request\n- DAU = unique users on that specific day\n- WAU = unique users in the 7 days ending on that day (rolling)\n- MAU = unique users in the 30 days ending on that day (rolling)","operationId":"get_active_users_over_time_admin_analytics_active_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","pattern":"^(today|this_week|last_week|this_month)$","default":"this_week","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/analytics/realtime":{"get":{"tags":["Admin"],"summary":"Get Realtime Platform Activity","description":"Get real-time platform activity snapshot.\n\nShows:\n- Who's currently using the platform (last 5/15/60 min)\n- Request volume over different time windows\n- Today's hourly traffic distribution\n- 7-day average hourly traffic (for maintenance planning)\n- Suggested best maintenance window","operationId":"get_realtime_platform_activity_admin_analytics_realtime_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealtimePlatformActivity"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/email-status":{"get":{"tags":["Admin"],"summary":"Get Email Status","description":"Get email scheduler status for admin monitoring.\nShows pending emails and tracking status.","operationId":"get_email_status_admin_email_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/monitor/status":{"get":{"tags":["Admin"],"summary":"Get Monitor Status","description":"Get live health status of all monitored infrastructure components.\nReturns status from Redis (populated by the monitor agent).","operationId":"get_monitor_status_admin_monitor_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/monitor/events":{"get":{"tags":["Admin"],"summary":"Get Monitor Events","description":"Get recent monitor events/alerts (from Redis).\nSupports filtering by severity and pagination via limit.","operationId":"get_monitor_events_admin_monitor_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(info|warning|critical)$"},{"type":"null"}],"title":"Severity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/monitor/test":{"post":{"tags":["Admin"],"summary":"Trigger Monitor Test","description":"Manually trigger a full infrastructure check.\nRuns health checks, model probes, and log scan immediately.\nReturns results summary.","operationId":"trigger_monitor_test_admin_monitor_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/monitor/pause":{"get":{"tags":["Admin"],"summary":"Get Monitor Pause Status","description":"Get current pause state of the monitor agent.","operationId":"get_monitor_pause_status_admin_monitor_pause_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Toggle Monitor Pause","description":"Toggle the monitor agent on/off.\nWhen paused, all health checks, model probes, and log scans are skipped.\nAlerts are NOT sent while paused.","operationId":"toggle_monitor_pause_admin_monitor_pause_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/monitor/routing":{"get":{"tags":["Admin"],"summary":"Get Model Routing","description":"Get model routing info — shows which user-facing model IDs\nroute to which actual target models on the backend.","operationId":"get_model_routing_admin_monitor_routing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/grant-trial":{"post":{"tags":["Admin"],"summary":"Grant Custom Trial","description":"Grant a custom free trial to a user by email.\n\nThis creates a DB-level trial (no Stripe subscription - no card needed).\nThe user gets immediate plan access for the specified number of days.\n\nWhen the trial expires:\n- The scheduler's trial countdown emails fire automatically\n- After trial_end_date passes, the user is reverted to free\n- If the user subscribes via Stripe before expiry, the trial is replaced\n\nIf charge_amount_cents is set:\n- A Stripe invoice is automatically created, due on the trial end date\n- When the customer pays, the enterprise plan activates permanently\n- If they don't pay, they get reverted to free when trial expires\n\nUse cases:\n- Enterprise demo: 30-day trial, then charge $130/month\n- VIP trial extension\n- Partner integrations","operationId":"grant_custom_trial_admin_grant_trial_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantTrialRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantTrialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/extend-trial":{"post":{"tags":["Admin"],"summary":"Extend User Trial","description":"Extend an existing user's trial by additional days.\nWorks for both auto-assigned trials (7-day signup) and admin-granted trials.","operationId":"extend_user_trial_admin_extend_trial_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendTrialRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtendTrialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/revoke-trial":{"post":{"tags":["Admin"],"summary":"Revoke User Trial","description":"Revoke a user's trial immediately and revert them to the free plan.\nOnly works for users on admin-granted trials (no Stripe subscription).","operationId":"revoke_user_trial_admin_revoke_trial_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeTrialRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/active-trials":{"get":{"tags":["Admin"],"summary":"Get Active Trials","description":"List all users currently on an active trial (trial_end_date in the future).\nIncludes both auto-assigned signup trials and admin-granted trials.","operationId":"get_active_trials_admin_active_trials_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ActiveTrialView"},"type":"array","title":"Response Get Active Trials Admin Active Trials Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/send-invoice":{"post":{"tags":["Admin"],"summary":"Send Enterprise Invoice","description":"Create and send a Stripe invoice to an enterprise customer.\n\nFlow:\n1. Admin enters customer email + amount + plan\n2. Backend creates/retrieves Stripe customer\n3. Creates an invoice with one-off line item\n4. Finalizes and sends the invoice\n5. Customer pays via Stripe-hosted invoice page\n6. When paid, webhook (invoice.paid) activates their enterprise plan\n\nThe invoice metadata stores plan_id and auto_activate flag so the\nwebhook handler knows which plan to assign when payment succeeds.","operationId":"send_enterprise_invoice_admin_send_invoice_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInvoiceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/enterprise-invoices":{"get":{"tags":["Admin"],"summary":"List Enterprise Invoices","description":"List all manually-created enterprise invoices and their payment status.\nFilters Stripe invoices by the 'enterprise_invoice' metadata flag.","operationId":"list_enterprise_invoices_admin_enterprise_invoices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnterpriseInvoiceView"},"title":"Response List Enterprise Invoices Admin Enterprise Invoices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/create-checkout-link":{"post":{"tags":["Admin"],"summary":"Create Enterprise Checkout Link","description":"Create a Stripe Checkout link for enterprise/custom billing.\n\nThis generates a shareable checkout URL where:\n- The customer email is pre-filled and locked\n- X days of free trial are shown\n- $Y/month is shown as the recurring price after trial\n- The customer enters their card and subscribes\n\nWhen the customer completes checkout:\n- The existing handle_checkout_completed webhook fires\n- The plan is activated automatically in the DB\n- If a Stripe trial was set, they won't be charged until trial ends\n\nOptionally, grant_trial_access=true (default) also gives DB-level\nplan access immediately so the user can start using the service\nbefore completing payment.\n\nFlow for the admin:\n1. Create checkout link via this endpoint\n2. Send the URL to the customer (email, Slack, etc.)\n3. Customer clicks link, sees trial + price, enters card\n4. Plan activates automatically","operationId":"create_enterprise_checkout_link_admin_create_checkout_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/ops-agent/chat":{"post":{"tags":["Admin"],"summary":"Ops Agent Chat","description":"Send a message to the OXLO Ops Agent and get a response.\nOptionally forwards the response to Pumble.\n\nThis endpoint enables Pumble integration — messages from Pumble\ncan be forwarded here, and the response sent back via webhook.","operationId":"ops_agent_chat_admin_ops_agent_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsAgentChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpsAgentChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/ops-agent/pumble-test":{"post":{"tags":["Admin"],"summary":"Ops Agent Pumble Test","description":"Send a test message to Pumble via webhook to verify connectivity.\nUses the Ops Agent to generate a system status summary.","operationId":"ops_agent_pumble_test_admin_ops_agent_pumble_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/ops-agent/diagnostics":{"get":{"tags":["Admin"],"summary":"Ops Agent Diagnostics","description":"Developer diagnostic endpoint for the Ops Agent.\nReturns LLM config status, routing table, conversation state, and health.","operationId":"ops_agent_diagnostics_admin_ops_agent_diagnostics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/loops/status":{"get":{"tags":["Admin"],"summary":"Loops Status","description":"Check Loops.so API connection and template configuration.","operationId":"loops_status_admin_loops_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/loops/test-send":{"post":{"tags":["Admin"],"summary":"Loops Test Send","description":"Send a test transactional email via Loops.so.","operationId":"loops_test_send_admin_loops_test_send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"query","required":true,"schema":{"type":"string","description":"Loops transactional template ID","title":"Template Id"},"description":"Loops transactional template ID"},{"name":"to_email","in":"query","required":true,"schema":{"type":"string","description":"Recipient email","title":"To Email"},"description":"Recipient email"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/loops/test-workflow":{"post":{"tags":["Admin"],"summary":"Loops Test Workflow","description":"Fire a test workflow event via Loops.so.","operationId":"loops_test_workflow_admin_loops_test_workflow_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_name","in":"query","required":true,"schema":{"type":"string","description":"Workflow event name (e.g. welcome, pro_subscribed)","title":"Event Name"},"description":"Workflow event name (e.g. welcome, pro_subscribed)"},{"name":"to_email","in":"query","required":true,"schema":{"type":"string","description":"Recipient email","title":"To Email"},"description":"Recipient email"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/enterprise/my-plan":{"get":{"summary":"Get My Enterprise Plan","description":"Return the current user's enterprise plan and invite codes, with ownership info.","operationId":"get_my_enterprise_plan_enterprise_my_plan_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnterprisePlanOwnerView"}}}}},"security":[{"HTTPBearer":[]}]}},"/enterprise/invite-codes":{"post":{"summary":"Create Enterprise Invite Code","description":"Create a new invite code for the current user's enterprise plan (owner only).","operationId":"create_enterprise_invite_code_enterprise_invite_codes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnterpriseInviteCodeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__enterprise__EnterpriseInviteCodeView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/enterprise/invite-codes/{code}":{"patch":{"summary":"Update Enterprise Invite Code","description":"Update an invite code (enable/disable or change max uses) for the owner's plan.","operationId":"update_enterprise_invite_code_enterprise_invite_codes__code__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnterpriseInviteCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__routes__enterprise__EnterpriseInviteCodeView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/enterprise/transfer-ownership":{"post":{"summary":"Transfer Enterprise Ownership","description":"Transfer ownership of the current enterprise plan to another user on the same plan.","operationId":"transfer_enterprise_ownership_enterprise_transfer_ownership_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferOwnershipRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/enterprise/plan-users":{"get":{"summary":"Get Plan Users","description":"Get paginated list of users on the current enterprise plan (owner only).","operationId":"get_plan_users_enterprise_plan_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPlanUsers"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/enterprise/add-user":{"post":{"summary":"Add User To Plan","description":"Add an existing user to the current enterprise plan (owner only).","operationId":"add_user_to_plan_enterprise_add_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/enterprise/team-usage":{"get":{"summary":"Get Team Usage","description":"Return the enterprise team's shared usage with per-member breakdown,\nsplit by custom models (enterprise pool) and non-custom models (fallback pool).\n\nQuery params:\n    period: \"today\" | \"7d\" | \"30d\"","operationId":"get_team_usage_enterprise_team_usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"today","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/scaling/queue":{"get":{"tags":["admin-scaling"],"summary":"Get Queue Status","description":"Get current request queue status.\n\nReturns:\n- queue_length: Number of requests waiting\n- pending_requests: Number in-flight\n- avg_processing_times: Per-model average","operationId":"get_queue_status_admin_scaling_queue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/scaling/autoscaler":{"get":{"tags":["admin-scaling"],"summary":"Get Autoscaler Status","description":"Get auto-scaler status.\n\nReturns:\n- enabled: If RunPod API key is set\n- running: If monitor loop is active\n- managed_pods: List of auto-scaled pods\n- last_scale_action: When last scaling occurred","operationId":"get_autoscaler_status_admin_scaling_autoscaler_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/scaling/scale-up":{"post":{"tags":["admin-scaling"],"summary":"Force Scale Up","description":"Force scale up by creating a new pod for a specific GPU tier.\n\nArgs:\n    tier: GPU tier to scale up - \"l40s\", \"t4\", \"a100\" (default: l40s)\n\nWorks in both normal mode (requires RUNPOD_API_KEY) and dry run mode.\nReturns the created/simulated pod info for UI feedback.","operationId":"force_scale_up_admin_scaling_scale_up_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tier","in":"query","required":false,"schema":{"type":"string","default":"l40s","title":"Tier"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/scaling/scale-down/{pod_id}":{"post":{"tags":["admin-scaling"],"summary":"Force Scale Down","description":"Force terminate a specific managed pod.","operationId":"force_scale_down_admin_scaling_scale_down__pod_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pod_id","in":"path","required":true,"schema":{"type":"string","title":"Pod Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/scaling/config":{"get":{"tags":["admin-scaling"],"summary":"Get Scaling Config","description":"Get current auto-scaler configuration.","operationId":"get_scaling_config_admin_scaling_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["admin-scaling"],"summary":"Update Scaling Config","description":"Update auto-scaler configuration.\n\nOnly the fields provided will be updated.","operationId":"update_scaling_config_admin_scaling_config_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScalingConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/scaling/workers/{worker_id}/restart":{"post":{"tags":["admin-scaling"],"summary":"Restart Worker","description":"Restart a worker's process (NOT pod restart).\n\nThis kills the uvicorn process and restarts it.\nDownloaded models are preserved.\n\nRequires superuser access (validated in frontend).","operationId":"restart_worker_admin_scaling_workers__worker_id__restart_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/scaling/workers":{"get":{"tags":["admin-scaling"],"summary":"Get All Workers Status","description":"Get comprehensive status of all workers for dashboard.\n\nReturns structured data for the monitoring UI.","operationId":"get_all_workers_status_admin_scaling_workers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/images/generations":{"post":{"tags":["images"],"summary":"Generate Image","description":"Generate images using SDXL, Flux models, or Azure Foundry.\nChecks model mapping to determine routing (Azure vs local workers).","operationId":"generate_image_v1_images_generations_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/images/models":{"get":{"tags":["images"],"summary":"List Image Models","description":"List available image generation models.","operationId":"list_image_models_v1_images_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/images/edits":{"post":{"tags":["images"],"summary":"Edit Image","description":"Transform an existing image using text prompts (img2img).\nRoutes to Azure Foundry (Flux 2 Pro) or A100 worker (SDXL/SD 1.5).","operationId":"edit_image_v1_images_edits_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/detect":{"post":{"tags":["detect"],"summary":"Detect Objects","description":"Detect objects in an image using YOLO models.\nWhen FOUNDRY_ENABLED=true, routes to Azure Foundry if available, otherwise falls back to T4 worker.","operationId":"detect_objects_v1_detect_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/detect/models":{"get":{"tags":["detect"],"summary":"List Detection Models","description":"List available YOLO models.","operationId":"list_detection_models_v1_detect_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/subscription/register-interest":{"post":{"tags":["subscription"],"summary":"Register Subscription Interest","description":"Register user's interest in pro or premium subscription.\n\nThe user must be authenticated. If no payload is provided, \ndefaults to 'pro' interest (matching frontend expectations).","operationId":"register_subscription_interest_subscription_register_interest_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionInterestRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionInterestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/subscription/me/enterprise-invite":{"get":{"tags":["subscription"],"summary":"Get Enterprise Invite Code","description":"Fetch an active invite code for the current user's enterprise plan.\nOnly available for users on custom enterprise plans.","operationId":"get_enterprise_invite_code_subscription_me_enterprise_invite_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/setup-intent":{"post":{"tags":["payments"],"summary":"Create Setup Intent","description":"Create a SetupIntent for collecting payment method.\n\nThe client_secret is used with Stripe.js to securely collect card details.","operationId":"create_setup_intent_payments_setup_intent_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupIntentResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/create-checkout-session":{"post":{"tags":["payments"],"summary":"Create Checkout Session","description":"Create a Stripe Checkout Session for subscribing to a plan.\n\nThis redirects the user to Stripe's hosted payment page where Stripe\nhandles ALL payment complexity: card input, 3DS/SCA, OTP, validation.\n\nAfter successful payment, Stripe:\n1. Creates the subscription automatically\n2. Redirects user back to our success URL\n3. Fires checkout.session.completed webhook\n4. Our webhook handler activates the subscription in our DB\n\nThis is the RECOMMENDED approach for new subscriptions.\nFor upgrades (Pro → Premium), use /subscribe which modifies the existing sub.","operationId":"create_checkout_session_payments_create_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/create-portal-session":{"post":{"tags":["payments"],"summary":"Create Portal Session","description":"Create a Stripe Customer Portal session.\n\nThe portal allows customers to:\n- View and download invoices\n- Update payment methods\n- Cancel subscription\n\nNote: Configure the portal in Stripe Dashboard → Settings → Customer Portal.","operationId":"create_portal_session_payments_create_portal_session_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/payment-methods":{"get":{"tags":["payments"],"summary":"List Payment Methods","description":"List all saved payment methods for the current user.","operationId":"list_payment_methods_payments_payment_methods_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PaymentMethodResponse"},"type":"array","title":"Response List Payment Methods Payments Payment Methods Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/payment-methods/{payment_method_id}":{"delete":{"tags":["payments"],"summary":"Delete Payment Method","description":"Delete a saved payment method.","operationId":"delete_payment_method_payments_payment_methods__payment_method_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Method Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/set-default-payment-method/{payment_method_id}":{"post":{"tags":["payments"],"summary":"Set Default Payment Method","description":"Set a payment method as the default for this customer.","operationId":"set_default_payment_method_payments_set_default_payment_method__payment_method_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"payment_method_id","in":"path","required":true,"schema":{"type":"string","title":"Payment Method Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/subscribe":{"post":{"tags":["payments"],"summary":"Create Subscription","description":"Create or update subscription with bonus days logic.\n\nBusiness Rules:\n- First subscription gets bonus days (Pro: +15, Premium: +30)\n- Subsequent renewals are standard 30-day cycles\n- Upgrades allowed mid-cycle (immediate effect)\n- Downgrades NOT allowed mid-cycle (must wait for next billing)","operationId":"create_subscription_payments_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/subscription-status/{subscription_id}":{"get":{"tags":["payments"],"summary":"Get Subscription Status","description":"Poll subscription status for processing payment reconciliation.\n\nCalled by frontend when PaymentIntent is in 'processing' state.\nChecks Stripe in real-time and returns current status.\n\nReturns:\n    status: 'active' | 'processing' | 'failed' | 'requires_action'\n    plan: the plan associated with the subscription","operationId":"get_subscription_status_payments_subscription_status__subscription_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/cancel":{"post":{"tags":["payments"],"summary":"Cancel Subscription","description":"Cancel the user's subscription at end of billing period.","operationId":"cancel_subscription_payments_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/downgrade":{"post":{"tags":["payments"],"summary":"Downgrade Subscription","description":"Downgrade to a lower plan at end of current billing period.\n\nIMPORTANT: This is different from cancel!\n- Cancel: User goes to Free plan, subscription ends.\n- Downgrade: User switches to a lower PAID plan (Premium → Pro).\n\nBusiness Rules:\n- Premium can downgrade to Pro (scheduled for end of period)\n- Pro CANNOT downgrade further (use /cancel instead)\n- User keeps current plan benefits until period ends\n- At period end, new plan pricing kicks in","operationId":"downgrade_subscription_payments_downgrade_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DowngradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/cancel-downgrade":{"post":{"tags":["payments"],"summary":"Cancel Scheduled Downgrade","description":"Cancel a scheduled downgrade and stay on current plan.\n\nUser changed their mind - revert to current plan pricing.","operationId":"cancel_scheduled_downgrade_payments_cancel_downgrade_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/pending-changes":{"get":{"tags":["payments"],"summary":"Get Pending Subscription Changes","description":"Get any pending subscription changes (downgrades, cancellations).\n\nUI can use this to show scheduled changes to the user.","operationId":"get_pending_subscription_changes_payments_pending_changes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/invoices":{"get":{"tags":["payments"],"summary":"List Invoices","description":"List user's invoices.","operationId":"list_invoices_payments_invoices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceResponse"},"title":"Response List Invoices Payments Invoices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/subscription":{"get":{"tags":["payments"],"summary":"Get Subscription","description":"Get current user's subscription status including bonus days.","operationId":"get_subscription_payments_subscription_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/sync-subscription":{"post":{"tags":["payments"],"summary":"Sync Subscription","description":"Sync local subscription state with Stripe.\n\nSafety net for when webhooks fail or are delayed.\nChecks Stripe for the customer's actual active subscription\nand updates the local DB + user plan accordingly.\n\nCalled by the frontend billings page when it detects a mismatch\n(e.g., paid invoice exists but user is on free plan).","operationId":"sync_subscription_payments_sync_subscription_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/upgrade-preview":{"get":{"tags":["payments"],"summary":"Preview Upgrade","description":"Preview the prorated charge for upgrading to a new plan.\n\nUses Stripe's upcoming invoice API to calculate exactly what the user\nwill be charged today for the plan change. This shows the NET proration\namount (new plan remaining days - old plan credit), NOT the full plan price.\n\nExample: Pro ($14.90) → Premium ($49.90) halfway through the cycle:\n  - Credit for unused Pro: -$7.45\n  - Charge for Premium remaining: +$24.95\n  - Net proration charge: $17.50","operationId":"preview_upgrade_payments_upgrade_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_plan","in":"query","required":true,"schema":{"type":"string","title":"Target Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/authorize-overage":{"post":{"tags":["payments"],"summary":"Authorize Overage","description":"Opt-in to overage billing for the current day.\n\nWhen a paid user hits their daily limit, they can call this endpoint\nto authorize $0.50/request overage charges for the rest of the day.\nSets a Redis flag that the auth middleware checks to allow requests through.\n\nRequirements:\n- Must have an active paid subscription (pro or premium)\n- Must have a payment method on file (Stripe customer)\n\nThe overage authorization expires at the end of the UTC day.\nOverage usage is flushed to Stripe periodically and billed on the next invoice.","operationId":"authorize_overage_payments_authorize_overage_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/record-overage-usage":{"post":{"tags":["payments"],"summary":"Record Overage Usage","description":"Record overage usage for metered billing.\nCalled by rate limiter when user exceeds daily limit but wants to continue.\nCharges $0.50 per request.","operationId":"record_overage_usage_payments_record_overage_usage_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"quantity","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Quantity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payments/overage-enabled":{"get":{"tags":["payments"],"summary":"Check Overage Enabled","description":"Check if user has overage billing enabled (has active subscription + card).\nUsed by rate limiter to decide whether to allow overage requests.","operationId":"check_overage_enabled_payments_overage_enabled_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/my-priority":{"get":{"tags":["payments"],"summary":"Get My Priority","description":"Get the current user's queue priority level.\n\nUse this to verify:\n- Free users get priority 1\n- Pro users get priority 3\n- Premium users get priority 3\n- Enterprise users get priority 4","operationId":"get_my_priority_payments_my_priority_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/queue-status":{"get":{"tags":["payments"],"summary":"Get Queue Status","description":"Get detailed queue status for dashboard display.\n\nShows how many requests are ahead of user based on priority.","operationId":"get_queue_status_payments_queue_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/webhook":{"post":{"tags":["payments"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.\n\nEvents handled:\n- customer.subscription.updated - Plan changes, status updates\n- customer.subscription.deleted - Subscription canceled\n- invoice.paid - Payment successful\n- invoice.payment_failed - Payment failed","operationId":"stripe_webhook_payments_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"}}}}}}},"/payments/gateway":{"get":{"tags":["payments"],"summary":"Get Gateway","description":"Which payment gateway applies to the current user.\n\nThe pricing/billing UI calls this to decide between Stripe checkout\nand Razorpay Checkout JS (and which currency to display).\n\nUses real-time IP geolocation so the gateway adapts when the user's\nlocation changes (soft lock, not hard lock to signup IP).","operationId":"get_gateway_payments_gateway_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/razorpay/create-subscription":{"post":{"tags":["payments"],"summary":"Create Razorpay Subscription","description":"Create a Razorpay subscription for the user and return the IDs the\nfrontend needs to open Razorpay Checkout JS.\n\nAccess is NOT granted here. The plan activates in /razorpay/verify\n(after the user completes checkout) or via the webhook.","operationId":"create_razorpay_subscription_payments_razorpay_create_subscription_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RazorpaySubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RazorpaySubscribeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/payments/razorpay/verify":{"post":{"tags":["payments"],"summary":"Verify Razorpay Payment","description":"Verify the signature Razorpay Checkout returns after a successful\npayment, then activate the plan.\n\nThe webhook (subscription.activated / invoice.paid) is the fallback\nsource of truth if the user closes the tab before this call fires.","operationId":"verify_razorpay_payment_payments_razorpay_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RazorpayVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RazorpayVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/webhook/pumble":{"post":{"tags":["webhooks"],"summary":"Pumble Webhook","description":"Receive a message from Pumble and process it through the Ops Agent.\n\nThe response is sent back to Pumble asynchronously via the\nincoming webhook (so the user sees it in #oxlo-alerts).\n\nThis endpoint is public (no auth) — Pumble calls it directly.\n\nUsage from Pumble:\n  Configure an outgoing webhook or slash command to POST to:\n  https://your-backend.com/webhook/pumble\n\n  Or call manually:\n  curl -X POST https://your-backend.com/webhook/pumble         -H \"Content-Type: application/json\"         -d '{\"text\": \"how is the backend?\", \"user_name\": \"Shashank\"}'","operationId":"pumble_webhook_webhook_pumble_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PumbleChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PumbleChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhook/pumble/sync":{"post":{"tags":["webhooks"],"summary":"Pumble Webhook Sync","description":"Synchronous version — waits for the Ops Agent response.\nUse this for testing or when you need the response immediately.\n\nThe response is also sent to Pumble via webhook.","operationId":"pumble_webhook_sync_webhook_pumble_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PumbleChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PumbleChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhook/razorpay":{"post":{"tags":["webhooks"],"summary":"Razorpay Webhook","description":"Handle Razorpay subscription webhook events.\n\nRazorpay signs the raw request body with the webhook secret\n(HMAC SHA256) and sends it in the X-Razorpay-Signature header.\nX-Razorpay-Event-Id uniquely identifies each event for idempotency.\n\nSupported events:\n- subscription.activated\n- subscription.pending\n- subscription.halted\n- subscription.cancelled\n- subscription.completed\n- invoice.paid\n- invoice.failed","operationId":"razorpay_webhook_webhook_razorpay_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}}}}},"/v1/audio/transcriptions":{"post":{"tags":["audio","audio"],"summary":"Create Transcription","description":"Transcribe audio to text using Whisper.\n\nOpenAI-compatible endpoint for speech-to-text.\nSupports mp3, mpeg, mpga, m4a, wav, webm, ogg, and flac formats.\nMaximum file size: 25 MB.","operationId":"create_transcription_v1_audio_transcriptions_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_transcription_v1_audio_transcriptions_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/audio/speech":{"post":{"tags":["audio","audio"],"summary":"Create Speech","description":"Generate speech from text using Kokoro TTS.\n\nOpenAI-compatible endpoint for text-to-speech.\nReturns audio file in the requested format.","operationId":"create_speech_v1_audio_speech_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/audio/transcriptions/models":{"get":{"tags":["audio","audio"],"summary":"List Transcription Models","description":"List available STT models with live status from T4 worker (for UI).","operationId":"list_transcription_models_v1_audio_transcriptions_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/audio/models":{"get":{"tags":["audio","audio"],"summary":"List Audio Models","description":"List all available audio models (STT and TTS) with live status.","operationId":"list_audio_models_v1_audio_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/audio/voices":{"get":{"tags":["audio","audio"],"summary":"List Voices","description":"List available voices for TTS models.\n\nReturns a mapping of model IDs to their available voice presets.","operationId":"list_voices_v1_audio_voices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/embeddings":{"post":{"tags":["embeddings","embeddings"],"summary":"Create Embeddings","description":"Create embeddings for the provided input text(s).\n\nOpenAI-compatible endpoint for generating embeddings.\nSupports batch processing for multiple texts.","operationId":"create_embeddings_v1_embeddings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/embeddings/models":{"get":{"tags":["embeddings","embeddings"],"summary":"List Embedding Models","description":"List available embedding models.","operationId":"list_embedding_models_v1_embeddings_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/models/{model_id}/parameters":{"get":{"tags":["models","models"],"summary":"Get Model Parameters","description":"Get supported parameters, valid ranges, and defaults for a specific model.\n\nReturns a JSON object with each parameter name as key and its metadata\n(type, min, max, default, step, description) as value. Frontends use\nthis to render appropriate input controls dynamically.","operationId":"get_model_parameters_v1_models__model_id__parameters_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/parameters/defaults":{"get":{"tags":["models","models"],"summary":"Get Parameter Defaults","description":"Get parameter templates for each model category.\n\nUseful for frontends to pre-populate parameter controls before a\nspecific model is selected.","operationId":"get_parameter_defaults_v1_parameters_defaults_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/stats":{"get":{"tags":["public","public"],"summary":"Get Website Stats","description":"Public endpoint returning platform metrics for the website.\n\nCached for 24 hours (recomputes once per UTC day). No auth required.\nReturns: users (active), models_available, countries, tokens_processed","operationId":"get_website_stats_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/tutorials/likes":{"get":{"tags":["tutorials"],"summary":"Get Tutorial Likes","description":"Get the total number of likes for a specific tutorial.","operationId":"get_tutorial_likes_v1_tutorials_likes_get","parameters":[{"name":"tutorial_path","in":"query","required":true,"schema":{"type":"string","title":"Tutorial Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tutorials/like":{"post":{"tags":["tutorials"],"summary":"Toggle Tutorial Like","description":"Toggle a like for a tutorial anonymously using a browser-generated user_id.","operationId":"toggle_tutorial_like_v1_tutorials_like_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TutorialLikeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccessNotificationRequest":{"properties":{"access_group":{"type":"integer","title":"Access Group"}},"type":"object","required":["access_group"],"title":"AccessNotificationRequest"},"AccessNotificationResponse":{"properties":{"message":{"type":"string","title":"Message"},"emails_sent":{"type":"integer","title":"Emails Sent"}},"type":"object","required":["message","emails_sent"],"title":"AccessNotificationResponse"},"AccessTomorrowRequest":{"properties":{"access_group":{"type":"integer","title":"Access Group"}},"type":"object","required":["access_group"],"title":"AccessTomorrowRequest"},"ActiveTrialView":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"trial_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial End Date"},"days_remaining":{"type":"integer","title":"Days Remaining"},"has_stripe_sub":{"type":"boolean","title":"Has Stripe Sub"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["user_id","email","name","plan","trial_end_date","days_remaining","has_stripe_sub","created_at"],"title":"ActiveTrialView"},"ActiveUsersPoint":{"properties":{"date":{"type":"string","title":"Date"},"dau":{"type":"integer","title":"Dau"},"wau":{"type":"integer","title":"Wau"},"mau":{"type":"integer","title":"Mau"}},"type":"object","required":["date","dau","wau","mau"],"title":"ActiveUsersPoint"},"ActiveUsersResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ActiveUsersPoint"},"type":"array","title":"Data"},"period":{"type":"string","title":"Period"}},"type":"object","required":["data","period"],"title":"ActiveUsersResponse"},"AddUserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"AddUserRequest"},"AddUserToPlanRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"AddUserToPlanRequest"},"AdminStatsResponse":{"properties":{"total_users":{"type":"integer","title":"Total Users"},"active_users":{"type":"integer","title":"Active Users"},"promo_users":{"type":"integer","title":"Promo Users"},"normal_users":{"type":"integer","title":"Normal Users"},"admin_users":{"type":"integer","title":"Admin Users"},"verified_users":{"type":"integer","title":"Verified Users"},"profile_completed":{"type":"integer","title":"Profile Completed"},"total_requests":{"type":"integer","title":"Total Requests"},"total_tokens":{"type":"integer","title":"Total Tokens"},"interested_users":{"type":"integer","title":"Interested Users"},"pro_users":{"type":"integer","title":"Pro Users"},"premium_users":{"type":"integer","title":"Premium Users"},"enterprise_users":{"type":"integer","title":"Enterprise Users"},"trialing_users":{"type":"integer","title":"Trialing Users"},"total_paid_users":{"type":"integer","title":"Total Paid Users"},"countries":{"additionalProperties":true,"type":"object","title":"Countries"},"promo_codes":{"additionalProperties":true,"type":"object","title":"Promo Codes"},"auth_providers":{"additionalProperties":true,"type":"object","title":"Auth Providers"}},"type":"object","required":["total_users","active_users","promo_users","normal_users","admin_users","verified_users","profile_completed","total_requests","total_tokens","interested_users","pro_users","premium_users","enterprise_users","trialing_users","total_paid_users","countries","promo_codes","auth_providers"],"title":"AdminStatsResponse"},"AdminUserDetailsResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"detected_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Country Code"},"signup_date":{"type":"string","format":"date-time","title":"Signup Date"},"first_api_key_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Api Key Created At"},"first_request_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Request At"},"total_requests":{"type":"integer","title":"Total Requests"},"total_tokens":{"type":"integer","title":"Total Tokens"},"usage_graph":{"items":{"$ref":"#/components/schemas/UsagePoint"},"type":"array","title":"Usage Graph"},"model_usage":{"items":{"$ref":"#/components/schemas/ModelUsage"},"type":"array","title":"Model Usage"},"registered_interest":{"type":"boolean","title":"Registered Interest"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"}},"type":"object","required":["user_id","email","username","country_code","detected_country_code","signup_date","first_api_key_created_at","first_request_at","total_requests","total_tokens","usage_graph","model_usage","registered_interest","plan_name"],"title":"AdminUserDetailsResponse"},"ApiKeyCreate":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"}},"type":"object","title":"ApiKeyCreate"},"ApiKeyResponse":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"revoked_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked By"},"key_fragment":{"type":"string","title":"Key Fragment"}},"type":"object","required":["id","status","created_at","key_fragment"],"title":"ApiKeyResponse"},"ApiKeySecret":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"revoked_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked By"},"key_fragment":{"type":"string","title":"Key Fragment"},"secret_key":{"type":"string","title":"Secret Key"}},"type":"object","required":["id","status","created_at","key_fragment","secret_key"],"title":"ApiKeySecret"},"Body_create_transcription_v1_audio_transcriptions_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"Audio file to transcribe"},"model":{"type":"string","title":"Model","description":"Whisper model to use","default":"whisper-medium"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"Language code (auto-detect if not provided)"},"response_format":{"type":"string","title":"Response Format","description":"Response format: json, text, verbose_json","default":"json"}},"type":"object","required":["file"],"title":"Body_create_transcription_v1_audio_transcriptions_post"},"BoundingBox":{"properties":{"x1":{"type":"number","title":"X1"},"y1":{"type":"number","title":"Y1"},"x2":{"type":"number","title":"X2"},"y2":{"type":"number","title":"Y2"}},"type":"object","required":["x1","y1","x2","y2"],"title":"BoundingBox"},"ChatCompletionChoice":{"properties":{"index":{"type":"integer","title":"Index"},"finish_reason":{"type":"string","title":"Finish Reason"},"message":{"$ref":"#/components/schemas/ChatMessage"}},"type":"object","required":["index","finish_reason","message"],"title":"ChatCompletionChoice"},"ChatCompletionRequest":{"properties":{"model":{"type":"string","title":"Model"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"Messages"},"max_tokens":{"anyOf":[{"type":"integer","maximum":131072.0,"minimum":1.0},{"type":"null"}],"title":"Max Tokens"},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","default":0.7},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top P"},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop"},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Stream","default":false},"frequency_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}],"title":"Frequency Penalty"},"presence_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}],"title":"Presence Penalty"},"top_k":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":0.0},{"type":"null"}],"title":"Top K"},"repeat_penalty":{"anyOf":[{"type":"number","maximum":3.0,"minimum":0.0},{"type":"null"}],"title":"Repeat Penalty"},"min_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Min P"},"typical_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Typical P"},"tfs_z":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Tfs Z"},"mirostat_mode":{"anyOf":[{"type":"integer","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Mirostat Mode"},"mirostat_tau":{"anyOf":[{"type":"number","maximum":10.0,"minimum":0.0},{"type":"null"}],"title":"Mirostat Tau"},"mirostat_eta":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Mirostat Eta"},"n":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"N"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed"},"user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User"},"tools":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tools"},"tool_choice":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tool Choice"},"stream_options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Stream Options"},"response_format":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Format"},"include_reasoning":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Reasoning","description":"Whether to include reasoning/thinking content in the response. When false, reasoning_content is omitted from assistant messages. Defaults to true for backward compatibility.","default":true},"auto_continue":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Continue","description":"When true (default), if a streamed response is cut off by the output token limit (finish_reason='length'), the backend automatically issues follow-up requests and stitches them into one continuous response. Each continuation is a separate billed upstream request. Set false to receive the truncated response and handle continuation yourself.","default":true},"max_continuations":{"anyOf":[{"type":"integer","maximum":200.0,"minimum":1.0},{"type":"null"}],"title":"Max Continuations","description":"Safety ceiling on auto-continue passes for a single response. Continuation already stops naturally when the model finishes or its context window fills up; this is only a defense-in-depth cap against runaway cost. Defaults to 50. Raise it for very large generation tasks."}},"type":"object","required":["model","messages"],"title":"ChatCompletionRequest","description":"OpenAI-compatible chat completion request with full parameter support.\n\nCovers OpenAI, Anthropic, OpenRouter, and llama.cpp sampling params\nso users can switch providers without changing their code."},"ChatCompletionResponse":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","title":"Object","default":"chat.completion"},"created":{"type":"integer","title":"Created"},"model":{"type":"string","title":"Model"},"choices":{"items":{"$ref":"#/components/schemas/ChatCompletionChoice"},"type":"array","title":"Choices"},"usage":{"$ref":"#/components/schemas/Usage"}},"type":"object","required":["id","created","model","choices","usage"],"title":"ChatCompletionResponse"},"ChatMessage":{"properties":{"role":{"type":"string","enum":["system","user","assistant","developer","tool"],"title":"Role"},"content":{"anyOf":[{"type":"string"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Content"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"reasoning_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reasoning Content"},"tool_calls":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Tool Calls"},"tool_call_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Call Id"}},"type":"object","required":["role"],"title":"ChatMessage","description":"OpenAI-compatible chat message.\n\n`content` can be:\n  - A plain string (standard text message)\n  - A list of content blocks for multimodal/vision messages, e.g.:\n    [\n      {\"type\": \"text\", \"text\": \"What's in this image?\"},\n      {\"type\": \"image_url\", \"image_url\": {\"url\": \"data:image/png;base64,...\"}}\n    ]"},"CheckoutRequest":{"properties":{"plan":{"type":"string","title":"Plan"},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"}},"type":"object","required":["plan"],"title":"CheckoutRequest","description":"Request to create a Stripe Checkout Session for new subscriptions."},"ContentModelItem":{"properties":{"display_name":{"type":"string","title":"Display Name"},"category":{"type":"string","title":"Category"},"seconds":{"type":"number","title":"Seconds"}},"type":"object","required":["display_name","category","seconds"],"title":"ContentModelItem"},"ContentSecondsBreakdown":{"properties":{"audio_seconds":{"type":"number","title":"Audio Seconds","default":0.0},"detect_seconds":{"type":"number","title":"Detect Seconds","default":0.0},"total_seconds":{"type":"number","title":"Total Seconds","default":0.0}},"type":"object","title":"ContentSecondsBreakdown"},"CostSavings":{"properties":{"benchmark_cost":{"type":"number","title":"Benchmark Cost"},"oxlo_cost":{"type":"number","title":"Oxlo Cost"},"savings":{"type":"number","title":"Savings"},"savings_percent":{"type":"number","title":"Savings Percent"},"is_positive":{"type":"boolean","title":"Is Positive"}},"type":"object","required":["benchmark_cost","oxlo_cost","savings","savings_percent","is_positive"],"title":"CostSavings"},"CreateCheckoutLinkRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"plan_id":{"type":"string","title":"Plan Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"trial_days":{"type":"integer","title":"Trial Days","default":14},"plan_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Display Name"},"grant_trial_access":{"type":"boolean","title":"Grant Trial Access","default":true}},"type":"object","required":["email","plan_id","amount_cents"],"title":"CreateCheckoutLinkRequest"},"CreateCheckoutLinkResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"email":{"type":"string","title":"Email"},"plan_id":{"type":"string","title":"Plan Id"},"amount_display":{"type":"string","title":"Amount Display"},"trial_days":{"type":"integer","title":"Trial Days"},"message":{"type":"string","title":"Message"},"trial_granted":{"type":"boolean","title":"Trial Granted","default":false}},"type":"object","required":["checkout_url","email","plan_id","amount_display","trial_days","message"],"title":"CreateCheckoutLinkResponse"},"CreateEnterpriseInviteCodeRequest":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"company_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Prefix"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","title":"CreateEnterpriseInviteCodeRequest"},"CreateInviteCodeRequest":{"properties":{"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"company_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Prefix"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","title":"CreateInviteCodeRequest"},"CreatePlanRequest":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"requests_per_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Day"},"requests_per_minute":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Minute"},"requests_per_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Hour"},"burst_per_minute":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Burst Per Minute"},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens"},"concurrency_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concurrency Cap","default":1},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority","default":4},"allowed_model_tiers":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowed Model Tiers"},"allowed_models":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowed Models"},"allowed_gpu_types":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowed Gpu Types"},"access_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Tier"},"price_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Monthly Cents"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","default":true}},"type":"object","required":["id","name"],"title":"CreatePlanRequest"},"CreatePromoCodeRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"CreatePromoCodeRequest"},"DailyUsagePoint":{"properties":{"date":{"type":"string","title":"Date"},"label":{"type":"string","title":"Label"},"requests":{"type":"integer","title":"Requests"},"tokens":{"type":"integer","title":"Tokens"}},"type":"object","required":["date","label","requests","tokens"],"title":"DailyUsagePoint"},"Detection":{"properties":{"class_id":{"type":"integer","title":"Class Id"},"class_name":{"type":"string","title":"Class Name"},"confidence":{"type":"number","title":"Confidence"},"bbox":{"$ref":"#/components/schemas/BoundingBox"}},"type":"object","required":["class_id","class_name","confidence","bbox"],"title":"Detection"},"DetectionRequest":{"properties":{"image":{"type":"string","title":"Image","description":"Base64 encoded image or URL"},"model":{"type":"string","title":"Model","description":"YOLO model to use","default":"yolo11x.pt"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","description":"Confidence threshold","default":0.25},"iou_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Iou Threshold","description":"IoU threshold for NMS","default":0.45},"classes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Classes","description":"Filter by class names (e.g. ['person', 'car'])"},"max_detections":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Max Detections","description":"Maximum number of detections to return"},"image_size":{"anyOf":[{"type":"integer","maximum":1280.0,"minimum":320.0},{"type":"null"}],"title":"Image Size","description":"Input image size for inference"}},"type":"object","required":["image"],"title":"DetectionRequest","description":"Object detection request."},"DetectionResponse":{"properties":{"model":{"type":"string","title":"Model"},"detections":{"items":{"$ref":"#/components/schemas/Detection"},"type":"array","title":"Detections"},"count":{"type":"integer","title":"Count"},"processing_time_ms":{"type":"number","title":"Processing Time Ms"}},"type":"object","required":["model","detections","count","processing_time_ms"],"title":"DetectionResponse"},"DowngradeRequest":{"properties":{"target_plan":{"type":"string","title":"Target Plan"}},"type":"object","required":["target_plan"],"title":"DowngradeRequest","description":"Request to downgrade to a lower plan at end of billing period."},"EmailStatusResponse":{"properties":{"total_pending":{"type":"integer","title":"Total Pending"},"pending_by_type":{"additionalProperties":true,"type":"object","title":"Pending By Type"},"users_in_send_window":{"type":"integer","title":"Users In Send Window"},"recent_users_tracking":{"items":{"$ref":"#/components/schemas/EmailUserTracking"},"type":"array","title":"Recent Users Tracking"}},"type":"object","required":["total_pending","pending_by_type","users_in_send_window","recent_users_tracking"],"title":"EmailStatusResponse"},"EmailUserTracking":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"trial_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial End Date"},"api_reminder_1_sent":{"type":"boolean","title":"Api Reminder 1 Sent"},"api_reminder_2_sent":{"type":"boolean","title":"Api Reminder 2 Sent"},"founder_note_sent":{"type":"boolean","title":"Founder Note Sent"},"trial_7d_sent":{"type":"boolean","title":"Trial 7D Sent"},"trial_5d_sent":{"type":"boolean","title":"Trial 5D Sent"},"trial_3d_sent":{"type":"boolean","title":"Trial 3D Sent"},"trial_2d_sent":{"type":"boolean","title":"Trial 2D Sent"},"trial_24h_sent":{"type":"boolean","title":"Trial 24H Sent"},"trial_expired_sent":{"type":"boolean","title":"Trial Expired Sent"}},"type":"object","required":["user_id","email","created_at","plan_id","trial_end_date","api_reminder_1_sent","api_reminder_2_sent","founder_note_sent","trial_7d_sent","trial_5d_sent","trial_3d_sent","trial_2d_sent","trial_24h_sent","trial_expired_sent"],"title":"EmailUserTracking"},"EmbeddingData":{"properties":{"object":{"type":"string","title":"Object","default":"embedding"},"index":{"type":"integer","title":"Index"},"embedding":{"items":{"type":"number"},"type":"array","title":"Embedding"}},"type":"object","required":["index","embedding"],"title":"EmbeddingData","description":"Single embedding result."},"EmbeddingRequest":{"properties":{"model":{"type":"string","title":"Model","description":"Embedding model to use","default":"bge-large"},"input":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Input","description":"Text(s) to embed"},"encoding_format":{"type":"string","title":"Encoding Format","description":"Encoding format (float)","default":"float"}},"type":"object","required":["input"],"title":"EmbeddingRequest","description":"Request for creating embeddings."},"EmbeddingResponse":{"properties":{"object":{"type":"string","title":"Object","default":"list"},"data":{"items":{"$ref":"#/components/schemas/EmbeddingData"},"type":"array","title":"Data"},"model":{"type":"string","title":"Model"},"usage":{"$ref":"#/components/schemas/EmbeddingUsage"}},"type":"object","required":["data","model","usage"],"title":"EmbeddingResponse","description":"OpenAI-compatible embedding response."},"EmbeddingUsage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"type":"object","required":["prompt_tokens","total_tokens"],"title":"EmbeddingUsage","description":"Token usage for embeddings."},"EnhancedUsagePatterns":{"properties":{"peak_hour":{"type":"integer","title":"Peak Hour"},"hourly_distribution":{"items":{"type":"integer"},"type":"array","title":"Hourly Distribution"},"daily_usage":{"items":{"$ref":"#/components/schemas/DailyUsagePoint"},"type":"array","title":"Daily Usage"},"period_label":{"type":"string","title":"Period Label"}},"type":"object","required":["peak_hour","hourly_distribution","daily_usage","period_label"],"title":"EnhancedUsagePatterns"},"EnterpriseInvoiceView":{"properties":{"invoice_id":{"type":"string","title":"Invoice Id"},"customer_email":{"type":"string","title":"Customer Email"},"amount_display":{"type":"string","title":"Amount Display"},"status":{"type":"string","title":"Status"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"created":{"type":"string","format":"date-time","title":"Created"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"hosted_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Url"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"}},"type":"object","required":["invoice_id","customer_email","amount_display","status","plan_id","created","due_date","hosted_url","paid_at"],"title":"EnterpriseInvoiceView"},"EnterprisePlanOwnerView":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"plan_name":{"type":"string","title":"Plan Name"},"owner_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Owner Email"},"is_owner":{"type":"boolean","title":"Is Owner"},"invite_codes":{"items":{"$ref":"#/components/schemas/app__api__routes__enterprise__EnterpriseInviteCodeView"},"type":"array","title":"Invite Codes"}},"type":"object","required":["plan_id","plan_name","owner_email","is_owner","invite_codes"],"title":"EnterprisePlanOwnerView"},"ExtendTrialRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"additional_days":{"type":"integer","title":"Additional Days"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["email","additional_days"],"title":"ExtendTrialRequest"},"ExtendTrialResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"plan":{"type":"string","title":"Plan"},"old_trial_end":{"type":"string","format":"date-time","title":"Old Trial End"},"new_trial_end":{"type":"string","format":"date-time","title":"New Trial End"},"message":{"type":"string","title":"Message"}},"type":"object","required":["user_id","email","plan","old_trial_end","new_trial_end","message"],"title":"ExtendTrialResponse"},"FeedbackRequest":{"properties":{"user_email":{"type":"string","format":"email","title":"User Email"},"rating":{"type":"integer","title":"Rating"},"feedback_string":{"type":"string","title":"Feedback String"}},"type":"object","required":["user_email","rating","feedback_string"],"title":"FeedbackRequest"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"FoundryModelBulkCreateRequest":{"properties":{"models":{"items":{"$ref":"#/components/schemas/FoundryModelCreate"},"type":"array","title":"Models"}},"type":"object","required":["models"],"title":"FoundryModelBulkCreateRequest","description":"Schema for bulk creating FoundryModels (for seeding)."},"FoundryModelBulkCreateResponse":{"properties":{"created":{"type":"integer","title":"Created"},"skipped":{"type":"integer","title":"Skipped"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["created","skipped","errors"],"title":"FoundryModelBulkCreateResponse","description":"Response for bulk create operation."},"FoundryModelCreate":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name","description":"Display name for the model"},"target_model":{"type":"string","maxLength":200,"title":"Target Model","description":"Target model name for API calls"},"provider":{"type":"string","maxLength":50,"title":"Provider","description":"Provider: 'azure', 't4'"},"query_method":{"type":"string","maxLength":100,"title":"Query Method","description":"Query method: 'openai_chat', 'rest_flux-2-pro', etc."},"context_length":{"type":"integer","title":"Context Length","description":"Context window length (0 for non-LLM)","default":0},"quantization":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Quantization","description":"Quantization: 'fp16', 'Q8_0', etc."},"gpu_requirement":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Gpu Requirement","description":"GPU requirement: 'oxlo', 'A100', 'T4'"},"tier":{"type":"string","maxLength":20,"title":"Tier","description":"Access tier: 'free', 'pro', 'premium'","default":"free"},"owned_by":{"type":"string","maxLength":50,"title":"Owned By","description":"Owner: 'oxlo', 'worker-local'","default":"oxlo"},"coming_soon":{"type":"boolean","title":"Coming Soon","description":"Whether the model is not yet available","default":false},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for categorization"},"size":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Size","description":"Model size: '70B', 'unknown'"},"category":{"type":"string","maxLength":50,"title":"Category","description":"Category: 'chat', 'image', 'audio', etc.","default":"chat"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description for UI/docs"},"rate_limit_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Requests","description":"Rate limit: requests per window"},"rate_limit_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Tokens","description":"Rate limit: tokens per window"},"rate_limit_window_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Window Seconds","description":"Rate limit window in seconds","default":60},"fallback_to_next_endpoint":{"type":"boolean","title":"Fallback To Next Endpoint","description":"Try next endpoint on rate limit","default":false},"testable_in_playground":{"type":"boolean","title":"Testable In Playground","description":"Available in playground UI","default":true},"is_active":{"type":"boolean","title":"Is Active","description":"Whether model is active and loaded","default":true},"query_handler":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Query Handler","description":"Handler function name: 'openai_chat', 'flux_image', 'anthropic_messages', 'rest_generic'"},"endpoint_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Endpoint Config","description":"Flexible endpoint configuration with endpoints, path, auth_type, timeout, etc."},"use_foundry_endpoints":{"type":"boolean","title":"Use Foundry Endpoints","description":"If true, use Foundry endpoint rotation; if false, use endpoint_config.endpoints","default":true},"id":{"type":"string","maxLength":100,"title":"Id","description":"Model identifier like 'deepseek-r1-70b'"}},"type":"object","required":["name","target_model","provider","query_method","id"],"title":"FoundryModelCreate","description":"Schema for creating a new FoundryModel."},"FoundryModelListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FoundryModelResponse"},"type":"array","title":"Data"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["data","page","page_size","total"],"title":"FoundryModelListResponse","description":"Schema for paginated list of FoundryModels."},"FoundryModelResponse":{"properties":{"name":{"type":"string","maxLength":200,"title":"Name","description":"Display name for the model"},"target_model":{"type":"string","maxLength":200,"title":"Target Model","description":"Target model name for API calls"},"provider":{"type":"string","maxLength":50,"title":"Provider","description":"Provider: 'azure', 't4'"},"query_method":{"type":"string","maxLength":100,"title":"Query Method","description":"Query method: 'openai_chat', 'rest_flux-2-pro', etc."},"context_length":{"type":"integer","title":"Context Length","description":"Context window length (0 for non-LLM)","default":0},"quantization":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Quantization","description":"Quantization: 'fp16', 'Q8_0', etc."},"gpu_requirement":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Gpu Requirement","description":"GPU requirement: 'oxlo', 'A100', 'T4'"},"tier":{"type":"string","maxLength":20,"title":"Tier","description":"Access tier: 'free', 'pro', 'premium'","default":"free"},"owned_by":{"type":"string","maxLength":50,"title":"Owned By","description":"Owner: 'oxlo', 'worker-local'","default":"oxlo"},"coming_soon":{"type":"boolean","title":"Coming Soon","description":"Whether the model is not yet available","default":false},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for categorization"},"size":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Size","description":"Model size: '70B', 'unknown'"},"category":{"type":"string","maxLength":50,"title":"Category","description":"Category: 'chat', 'image', 'audio', etc.","default":"chat"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description for UI/docs"},"rate_limit_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Requests","description":"Rate limit: requests per window"},"rate_limit_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Tokens","description":"Rate limit: tokens per window"},"rate_limit_window_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Window Seconds","description":"Rate limit window in seconds","default":60},"fallback_to_next_endpoint":{"type":"boolean","title":"Fallback To Next Endpoint","description":"Try next endpoint on rate limit","default":false},"testable_in_playground":{"type":"boolean","title":"Testable In Playground","description":"Available in playground UI","default":true},"is_active":{"type":"boolean","title":"Is Active","description":"Whether model is active and loaded","default":true},"query_handler":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Query Handler","description":"Handler function name: 'openai_chat', 'flux_image', 'anthropic_messages', 'rest_generic'"},"endpoint_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Endpoint Config","description":"Flexible endpoint configuration with endpoints, path, auth_type, timeout, etc."},"use_foundry_endpoints":{"type":"boolean","title":"Use Foundry Endpoints","description":"If true, use Foundry endpoint rotation; if false, use endpoint_config.endpoints","default":true},"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","target_model","provider","query_method","id","created_at","updated_at"],"title":"FoundryModelResponse","description":"Schema for FoundryModel response."},"FoundryModelUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"target_model":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Target Model"},"provider":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Provider"},"query_method":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Query Method"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"quantization":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Quantization"},"gpu_requirement":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Gpu Requirement"},"tier":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Tier"},"owned_by":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Owned By"},"coming_soon":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Coming Soon"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"size":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Size"},"category":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Category"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rate_limit_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Requests"},"rate_limit_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Tokens"},"rate_limit_window_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Window Seconds"},"fallback_to_next_endpoint":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fallback To Next Endpoint"},"testable_in_playground":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Testable In Playground"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"query_handler":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Query Handler"},"endpoint_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Endpoint Config"},"use_foundry_endpoints":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Use Foundry Endpoints"}},"type":"object","title":"FoundryModelUpdate","description":"Schema for updating an existing FoundryModel. All fields optional."},"GatewayResponse":{"properties":{"gateway":{"type":"string","title":"Gateway"},"currency":{"type":"string","title":"Currency"},"prices_inr":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Prices Inr"}},"type":"object","required":["gateway","currency"],"title":"GatewayResponse"},"GithubOAuthRequest":{"properties":{"code":{"type":"string","title":"Code"},"click_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Click Id"}},"type":"object","required":["code"],"title":"GithubOAuthRequest"},"GoogleOAuthRequest":{"properties":{"id_token":{"type":"string","title":"Id Token"},"click_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Click Id"}},"type":"object","required":["id_token"],"title":"GoogleOAuthRequest"},"GrantTrialRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"plan":{"type":"string","title":"Plan"},"trial_days":{"type":"integer","title":"Trial Days"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"charge_amount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Charge Amount Cents"},"charge_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Charge Description"}},"type":"object","required":["email","plan","trial_days"],"title":"GrantTrialRequest"},"GrantTrialResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"plan":{"type":"string","title":"Plan"},"trial_ends_at":{"type":"string","format":"date-time","title":"Trial Ends At"},"message":{"type":"string","title":"Message"},"invoice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Id"},"invoice_amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Amount"}},"type":"object","required":["user_id","email","plan","trial_ends_at","message"],"title":"GrantTrialResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HourlyData":{"properties":{"hour":{"type":"integer","title":"Hour"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["hour","count"],"title":"HourlyData"},"HourlyTrafficPoint":{"properties":{"hour":{"type":"integer","title":"Hour"},"hour_label":{"type":"string","title":"Hour Label"},"requests":{"type":"integer","title":"Requests"},"unique_users":{"type":"integer","title":"Unique Users"}},"type":"object","required":["hour","hour_label","requests","unique_users"],"title":"HourlyTrafficPoint"},"ImageBreakdownItem":{"properties":{"model_name":{"type":"string","title":"Model Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["model_name","count"],"title":"ImageBreakdownItem"},"ImageData":{"properties":{"b64_json":{"type":"string","title":"B64 Json"}},"type":"object","required":["b64_json"],"title":"ImageData"},"ImageEditRequest":{"properties":{"image":{"type":"string","title":"Image","description":"Base64-encoded init image"},"prompt":{"type":"string","title":"Prompt","description":"Text description to guide transformation"},"model":{"type":"string","title":"Model","description":"Model to use (sdxl, stable-diffusion-1.5)","default":""},"strength":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Strength","description":"Transformation strength","default":0.75},"n":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"N","description":"Number of images","default":1},"negative_prompt":{"type":"string","title":"Negative Prompt","description":"What to avoid","default":""},"num_inference_steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Inference Steps","description":"Denoising steps"},"guidance_scale":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Guidance Scale","description":"CFG scale"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed"}},"type":"object","required":["image","prompt"],"title":"ImageEditRequest","description":"Request for image-to-image transformation."},"ImageGenerationRequest":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"Text description of image to generate"},"model":{"type":"string","title":"Model","description":"Model to use","default":""},"n":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"N","description":"Number of images","default":1},"size":{"type":"string","title":"Size","description":"Image size ('0x0' = model native resolution)","default":"0x0"},"quality":{"type":"string","title":"Quality","description":"Image quality","default":"standard"},"negative_prompt":{"type":"string","title":"Negative Prompt","description":"What to avoid","default":""},"num_inference_steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Inference Steps","description":"Denoising steps"},"guidance_scale":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Guidance Scale","description":"CFG scale"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seed","description":"Random seed"}},"type":"object","required":["prompt"],"title":"ImageGenerationRequest","description":"OpenAI-compatible image generation request."},"ImageGenerationResponse":{"properties":{"created":{"type":"integer","title":"Created"},"data":{"items":{"$ref":"#/components/schemas/ImageData"},"type":"array","title":"Data"}},"type":"object","required":["created","data"],"title":"ImageGenerationResponse"},"InvoiceResponse":{"properties":{"id":{"type":"string","title":"Id"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"created":{"type":"string","format":"date-time","title":"Created"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"invoice_pdf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Pdf"},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Invoice Url"}},"type":"object","required":["id","amount","currency","status","created"],"title":"InvoiceResponse"},"KeyBreakdown":{"properties":{"api_key_id":{"type":"string","title":"Api Key Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"requests":{"type":"integer","title":"Requests"},"tokens":{"type":"integer","title":"Tokens"}},"type":"object","required":["api_key_id","label","requests","tokens"],"title":"KeyBreakdown"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"ModelBreakdown":{"properties":{"model_name":{"type":"string","title":"Model Name"},"display_name":{"type":"string","title":"Display Name"},"category":{"type":"string","title":"Category"},"requests":{"type":"integer","title":"Requests"},"tokens":{"type":"integer","title":"Tokens"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"}},"type":"object","required":["model_name","display_name","category","requests","tokens","prompt_tokens","completion_tokens"],"title":"ModelBreakdown"},"ModelCreate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"original_filename":{"type":"string","title":"Original Filename"},"storage_path":{"type":"string","title":"Storage Path"},"size_bytes":{"type":"integer","title":"Size Bytes"},"model_type":{"$ref":"#/components/schemas/ModelType"},"format":{"$ref":"#/components/schemas/ModelFormat"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/ModelStatus"},{"type":"null"}],"default":"uploaded"}},"type":"object","required":["original_filename","storage_path","size_bytes","model_type","format"],"title":"ModelCreate"},"ModelFormat":{"type":"string","enum":["gguf","safetensors"],"title":"ModelFormat"},"ModelListResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ModelResponse"},"type":"array","title":"Data"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["data","page","page_size","total"],"title":"ModelListResponse"},"ModelResponse":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"original_filename":{"type":"string","title":"Original Filename"},"storage_path":{"type":"string","title":"Storage Path"},"size_bytes":{"type":"integer","title":"Size Bytes"},"model_type":{"$ref":"#/components/schemas/ModelType"},"format":{"$ref":"#/components/schemas/ModelFormat"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"status":{"$ref":"#/components/schemas/ModelStatus"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["original_filename","storage_path","size_bytes","model_type","format","id","user_id","status","created_at","updated_at"],"title":"ModelResponse"},"ModelStatus":{"type":"string","enum":["uploaded","validating","ready","error"],"title":"ModelStatus"},"ModelType":{"type":"string","enum":["chat","embedding"],"title":"ModelType"},"ModelUsage":{"properties":{"model":{"type":"string","title":"Model"},"requests":{"type":"integer","title":"Requests"},"tokens":{"type":"integer","title":"Tokens"}},"type":"object","required":["model","requests","tokens"],"title":"ModelUsage"},"ModelUsageData":{"properties":{"model":{"type":"string","title":"Model"},"requests":{"type":"integer","title":"Requests"},"tokens":{"type":"integer","title":"Tokens"}},"type":"object","required":["model","requests","tokens"],"title":"ModelUsageData"},"ModelUsageSummary":{"properties":{"model":{"type":"string","title":"Model"},"requests":{"type":"integer","title":"Requests"},"tokens":{"type":"integer","title":"Tokens"},"unique_users":{"type":"integer","title":"Unique Users"}},"type":"object","required":["model","requests","tokens","unique_users"],"title":"ModelUsageSummary"},"OnboardingAnalyticsResponse":{"properties":{"total_completed":{"type":"integer","title":"Total Completed"},"use_cases":{"additionalProperties":true,"type":"object","title":"Use Cases"},"comparing_with":{"additionalProperties":true,"type":"object","title":"Comparing With"},"referral_sources":{"additionalProperties":true,"type":"object","title":"Referral Sources"},"roles":{"additionalProperties":true,"type":"object","title":"Roles"},"team_sizes":{"additionalProperties":true,"type":"object","title":"Team Sizes"}},"type":"object","required":["total_completed","use_cases","comparing_with","referral_sources","roles","team_sizes"],"title":"OnboardingAnalyticsResponse"},"OnboardingStep1Request":{"properties":{"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"country_code":{"type":"string","title":"Country Code"}},"type":"object","required":["first_name","last_name","country_code"],"title":"OnboardingStep1Request"},"OnboardingStep2Request":{"properties":{"company_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Size"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"skip":{"type":"boolean","title":"Skip","default":false}},"type":"object","title":"OnboardingStep2Request"},"OnboardingStep3Request":{"properties":{"use_case":{"type":"string","title":"Use Case"},"use_case_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Use Case Description"}},"type":"object","required":["use_case"],"title":"OnboardingStep3Request"},"OnboardingStep4Request":{"properties":{"comparing_with":{"type":"string","title":"Comparing With"}},"type":"object","required":["comparing_with"],"title":"OnboardingStep4Request"},"OnboardingStep5Request":{"properties":{"referral_source":{"type":"string","title":"Referral Source"},"privacy_policy_accepted":{"type":"boolean","title":"Privacy Policy Accepted"}},"type":"object","required":["referral_source","privacy_policy_accepted"],"title":"OnboardingStep5Request"},"OnboardingStepResponse":{"properties":{"message":{"type":"string","title":"Message"},"onboarding_step":{"type":"integer","title":"Onboarding Step"},"profile_completed":{"type":"boolean","title":"Profile Completed"}},"type":"object","required":["message","onboarding_step","profile_completed"],"title":"OnboardingStepResponse"},"OpsAgentChatRequest":{"properties":{"message":{"type":"string","title":"Message"},"send_to_pumble":{"type":"boolean","title":"Send To Pumble","default":false}},"type":"object","required":["message"],"title":"OpsAgentChatRequest"},"OpsAgentChatResponse":{"properties":{"response":{"type":"string","title":"Response"},"pumble_sent":{"type":"boolean","title":"Pumble Sent","default":false}},"type":"object","required":["response"],"title":"OpsAgentChatResponse"},"PaginatedPlanUsers":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"users":{"items":{"$ref":"#/components/schemas/PlanUserView"},"type":"array","title":"Users"}},"type":"object","required":["total","limit","offset","users"],"title":"PaginatedPlanUsers"},"PaginatedPlanUsersResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"users":{"items":{"$ref":"#/components/schemas/PlanUserView"},"type":"array","title":"Users"}},"type":"object","required":["total","limit","offset","users"],"title":"PaginatedPlanUsersResponse"},"PaginatedPlansResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"plans":{"items":{"$ref":"#/components/schemas/PlanAdminView"},"type":"array","title":"Plans"}},"type":"object","required":["total","limit","offset","plans"],"title":"PaginatedPlansResponse"},"PaginatedPromoCodesResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"promo_codes":{"items":{"$ref":"#/components/schemas/PromoCodeView"},"type":"array","title":"Promo Codes"}},"type":"object","required":["total","limit","offset","promo_codes"],"title":"PaginatedPromoCodesResponse"},"PaginatedUsersResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"users":{"items":{"$ref":"#/components/schemas/UserAdminView"},"type":"array","title":"Users"}},"type":"object","required":["total","limit","offset","users"],"title":"PaginatedUsersResponse"},"PaymentMethodResponse":{"properties":{"id":{"type":"string","title":"Id"},"brand":{"type":"string","title":"Brand"},"last4":{"type":"string","title":"Last4"},"exp_month":{"type":"integer","title":"Exp Month"},"exp_year":{"type":"integer","title":"Exp Year"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["id","brand","last4","exp_month","exp_year"],"title":"PaymentMethodResponse"},"PlanAdminView":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"requests_per_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Day"},"requests_per_minute":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Minute"},"requests_per_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Hour"},"burst_per_minute":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Burst Per Minute"},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens"},"concurrency_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concurrency Cap"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"allowed_model_tiers":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowed Model Tiers"},"allowed_models":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowed Models"},"allowed_gpu_types":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowed Gpu Types"},"stripe_price_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Price Id"},"access_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Tier"},"price_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Monthly Cents"},"is_active":{"type":"boolean","title":"Is Active"},"is_canonical":{"type":"boolean","title":"Is Canonical"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","description","requests_per_day","requests_per_minute","requests_per_hour","burst_per_minute","max_input_tokens","max_output_tokens","concurrency_cap","priority","allowed_model_tiers","allowed_models","allowed_gpu_types","stripe_price_id","access_tier","price_monthly_cents","is_active","is_canonical","created_at","updated_at"],"title":"PlanAdminView"},"PlanUserView":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"}},"type":"object","required":["email","name","joined_at"],"title":"PlanUserView"},"PlatformUpdateRequest":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"new_models":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"New Models"},"send_to_all":{"type":"boolean","title":"Send To All","default":true}},"type":"object","required":["title","content"],"title":"PlatformUpdateRequest"},"PlatformUpdateResponse":{"properties":{"message":{"type":"string","title":"Message"},"emails_queued":{"type":"integer","title":"Emails Queued"}},"type":"object","required":["message","emails_queued"],"title":"PlatformUpdateResponse"},"PromoCodeView":{"properties":{"id":{"type":"string","title":"Id"},"code":{"type":"string","title":"Code"},"created_by":{"type":"string","title":"Created By"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"uses_count":{"type":"integer","title":"Uses Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","code","created_by","created_by_email","uses_count","created_at"],"title":"PromoCodeView"},"PumbleChatRequest":{"properties":{"text":{"type":"string","title":"Text"},"user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Name","default":"Team Member"}},"type":"object","required":["text"],"title":"PumbleChatRequest","description":"Request body for Pumble chat messages."},"PumbleChatResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["ok"],"title":"PumbleChatResponse","description":"Response for Pumble chat messages."},"RazorpaySubscribeRequest":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"RazorpaySubscribeRequest"},"RazorpaySubscribeResponse":{"properties":{"subscription_id":{"type":"string","title":"Subscription Id"},"key_id":{"type":"string","title":"Key Id"},"plan":{"type":"string","title":"Plan"},"amount_inr":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Inr"}},"type":"object","required":["subscription_id","key_id","plan"],"title":"RazorpaySubscribeResponse"},"RazorpayVerifyRequest":{"properties":{"razorpay_payment_id":{"type":"string","title":"Razorpay Payment Id"},"razorpay_subscription_id":{"type":"string","title":"Razorpay Subscription Id"},"razorpay_signature":{"type":"string","title":"Razorpay Signature"}},"type":"object","required":["razorpay_payment_id","razorpay_subscription_id","razorpay_signature"],"title":"RazorpayVerifyRequest"},"RazorpayVerifyResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"}},"type":"object","required":["success","plan","status"],"title":"RazorpayVerifyResponse"},"RealtimePlatformActivity":{"properties":{"active_users_last_5min":{"type":"integer","title":"Active Users Last 5Min"},"active_users_last_15min":{"type":"integer","title":"Active Users Last 15Min"},"active_users_last_1hr":{"type":"integer","title":"Active Users Last 1Hr"},"requests_last_5min":{"type":"integer","title":"Requests Last 5Min"},"requests_last_15min":{"type":"integer","title":"Requests Last 15Min"},"requests_last_1hr":{"type":"integer","title":"Requests Last 1Hr"},"requests_last_24hr":{"type":"integer","title":"Requests Last 24Hr"},"active_users":{"items":{"$ref":"#/components/schemas/RealtimeUserActivity"},"type":"array","title":"Active Users"},"hourly_traffic_today":{"items":{"$ref":"#/components/schemas/HourlyTrafficPoint"},"type":"array","title":"Hourly Traffic Today"},"hourly_traffic_7day_avg":{"items":{"$ref":"#/components/schemas/HourlyTrafficPoint"},"type":"array","title":"Hourly Traffic 7Day Avg"},"best_maintenance_window_utc":{"type":"string","title":"Best Maintenance Window Utc"},"current_traffic_level":{"type":"string","title":"Current Traffic Level"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["active_users_last_5min","active_users_last_15min","active_users_last_1hr","requests_last_5min","requests_last_15min","requests_last_1hr","requests_last_24hr","active_users","hourly_traffic_today","hourly_traffic_7day_avg","best_maintenance_window_utc","current_traffic_level","timestamp"],"title":"RealtimePlatformActivity"},"RealtimeUserActivity":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"last_request_at":{"type":"string","format":"date-time","title":"Last Request At"},"requests_last_5min":{"type":"integer","title":"Requests Last 5Min"},"requests_last_1hr":{"type":"integer","title":"Requests Last 1Hr"},"last_model_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Model Used"},"last_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Endpoint"}},"type":"object","required":["user_id","email","name","plan_id","last_request_at","requests_last_5min","requests_last_1hr","last_model_used","last_endpoint"],"title":"RealtimeUserActivity"},"ReassignPlanOwnerRequest":{"properties":{"new_owner_email":{"type":"string","format":"email","title":"New Owner Email"}},"type":"object","required":["new_owner_email"],"title":"ReassignPlanOwnerRequest"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ResetPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"reset_token":{"type":"string","title":"Reset Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["email","reset_token","new_password"],"title":"ResetPasswordRequest"},"RevokeTrialRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["email"],"title":"RevokeTrialRequest"},"SavingsModelItem":{"properties":{"display_name":{"type":"string","title":"Display Name"},"category":{"type":"string","title":"Category"},"benchmark_cost":{"type":"number","title":"Benchmark Cost"}},"type":"object","required":["display_name","category","benchmark_cost"],"title":"SavingsModelItem"},"ScalingConfigUpdate":{"properties":{"max_pods":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Pods"},"min_pods":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Pods"},"scale_up_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scale Up Threshold"},"scale_down_idle_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scale Down Idle Minutes"},"auto_restart_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Restart Enabled"}},"type":"object","title":"ScalingConfigUpdate","description":"Request body for updating scaling config."},"SendInvoiceRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"amount_cents":{"type":"integer","title":"Amount Cents"},"description":{"type":"string","title":"Description"},"plan_id":{"type":"string","title":"Plan Id"},"due_days":{"type":"integer","title":"Due Days","default":7},"auto_activate":{"type":"boolean","title":"Auto Activate","default":true}},"type":"object","required":["email","amount_cents","description","plan_id"],"title":"SendInvoiceRequest"},"SendInvoiceResponse":{"properties":{"invoice_id":{"type":"string","title":"Invoice Id"},"amount_display":{"type":"string","title":"Amount Display"},"customer_email":{"type":"string","title":"Customer Email"},"plan_id":{"type":"string","title":"Plan Id"},"due_date":{"type":"string","title":"Due Date"},"hosted_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Url"},"message":{"type":"string","title":"Message"}},"type":"object","required":["invoice_id","amount_display","customer_email","plan_id","due_date","hosted_url","message"],"title":"SendInvoiceResponse"},"SetupIntentResponse":{"properties":{"client_secret":{"type":"string","title":"Client Secret"},"customer_id":{"type":"string","title":"Customer Id"}},"type":"object","required":["client_secret","customer_id"],"title":"SetupIntentResponse"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"promo_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code"},"invite_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invite Code"},"turnstile_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turnstile Token"}},"type":"object","required":["email","password"],"title":"SignupRequest"},"SignupResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"SignupResponse"},"SpeechRequest":{"properties":{"model":{"type":"string","title":"Model","description":"TTS model to use","default":"kokoro-82m"},"input":{"type":"string","title":"Input","description":"Text to synthesize"},"voice":{"type":"string","title":"Voice","description":"Voice preset","default":"default"},"speed":{"type":"number","maximum":4.0,"minimum":0.25,"title":"Speed","description":"Speech speed","default":1.0},"response_format":{"type":"string","title":"Response Format","description":"Audio format: wav, mp3","default":"wav"}},"type":"object","required":["input"],"title":"SpeechRequest","description":"Request for text-to-speech synthesis."},"SubscribeRequest":{"properties":{"plan":{"type":"string","title":"Plan"},"payment_method_id":{"type":"string","title":"Payment Method Id"},"auto_renew":{"type":"boolean","title":"Auto Renew","default":true},"idempotency_key":{"type":"string","title":"Idempotency Key"}},"type":"object","required":["plan","payment_method_id","idempotency_key"],"title":"SubscribeRequest"},"SubscriptionInterest":{"type":"string","enum":["pro","premium"],"title":"SubscriptionInterest"},"SubscriptionInterestRequest":{"properties":{"interest":{"$ref":"#/components/schemas/SubscriptionInterest","description":"Type of subscription interest"}},"type":"object","required":["interest"],"title":"SubscriptionInterestRequest"},"SubscriptionInterestResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Response message"},"interest_registered":{"type":"boolean","title":"Interest Registered","description":"Whether interest was successfully registered"}},"type":"object","required":["message","interest_registered"],"title":"SubscriptionInterestResponse"},"SubscriptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"plan":{"type":"string","title":"Plan"},"status":{"type":"string","title":"Status"},"current_period_end":{"type":"string","format":"date-time","title":"Current Period End"},"effective_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Effective End Date"},"bonus_days":{"type":"integer","title":"Bonus Days","default":0},"auto_renew":{"type":"boolean","title":"Auto Renew"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"requires_action":{"type":"boolean","title":"Requires Action","default":false},"payment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Status"}},"type":"object","required":["id","plan","status","current_period_end","auto_renew"],"title":"SubscriptionResponse"},"TeamMemberUsage":{"properties":{"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"request_count":{"type":"integer","title":"Request Count"},"enterprise_count":{"type":"integer","title":"Enterprise Count","default":0},"fallback_count":{"type":"integer","title":"Fallback Count","default":0},"percentage":{"type":"number","title":"Percentage"}},"type":"object","required":["email","name","request_count","percentage"],"title":"TeamMemberUsage"},"TeamUsageResponse":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"plan_name":{"type":"string","title":"Plan Name"},"plan_daily_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Daily Limit"},"fallback_daily_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fallback Daily Limit"},"period":{"type":"string","title":"Period"},"team_total":{"type":"integer","title":"Team Total"},"team_enterprise_total":{"type":"integer","title":"Team Enterprise Total","default":0},"team_fallback_total":{"type":"integer","title":"Team Fallback Total","default":0},"members":{"items":{"$ref":"#/components/schemas/TeamMemberUsage"},"type":"array","title":"Members"}},"type":"object","required":["plan_id","plan_name","plan_daily_limit","fallback_daily_limit","period","team_total","members"],"title":"TeamUsageResponse"},"TimeSeriesData":{"properties":{"period":{"type":"string","title":"Period"},"requests":{"type":"integer","title":"Requests"},"tokens":{"type":"integer","title":"Tokens"}},"type":"object","required":["period","requests","tokens"],"title":"TimeSeriesData"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"profile_completed":{"type":"boolean","title":"Profile Completed","default":true}},"type":"object","required":["access_token"],"title":"TokenResponse"},"TransferOwnershipRequest":{"properties":{"new_owner_email":{"type":"string","format":"email","title":"New Owner Email"}},"type":"object","required":["new_owner_email"],"title":"TransferOwnershipRequest"},"TutorialLikeRequest":{"properties":{"tutorial_path":{"type":"string","maxLength":500,"minLength":1,"title":"Tutorial Path"},"user_id":{"type":"string","maxLength":128,"minLength":1,"title":"User Id"},"action":{"type":"string","enum":["like","dislike"],"title":"Action"}},"type":"object","required":["tutorial_path","user_id","action"],"title":"TutorialLikeRequest"},"UpdateEnterpriseInviteCodeRequest":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","title":"UpdateEnterpriseInviteCodeRequest"},"UpdateInviteCodeRequest":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","title":"UpdateInviteCodeRequest"},"UpdatePlanRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"requests_per_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Day"},"requests_per_minute":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Minute"},"requests_per_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Hour"},"burst_per_minute":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Burst Per Minute"},"max_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Input Tokens"},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output Tokens"},"concurrency_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Concurrency Cap"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"allowed_model_tiers":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowed Model Tiers"},"allowed_models":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowed Models"},"allowed_gpu_types":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Allowed Gpu Types"},"access_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Tier"},"price_monthly_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Monthly Cents"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdatePlanRequest"},"Usage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"title":"Usage"},"UsagePatterns":{"properties":{"peak_hour":{"type":"integer","title":"Peak Hour"},"hourly_distribution":{"items":{"type":"integer"},"type":"array","title":"Hourly Distribution"},"daily_distribution":{"items":{"type":"integer"},"type":"array","title":"Daily Distribution"}},"type":"object","required":["peak_hour","hourly_distribution","daily_distribution"],"title":"UsagePatterns"},"UsagePoint":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"requests":{"type":"integer","title":"Requests"},"tokens":{"type":"integer","title":"Tokens"}},"type":"object","required":["timestamp","requests","tokens"],"title":"UsagePoint"},"UsageStatsResponse":{"properties":{"requests_today":{"type":"integer","title":"Requests Today"},"total_tokens":{"type":"integer","title":"Total Tokens"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"success_rate":{"type":"number","title":"Success Rate"},"requests_by_hour":{"items":{"$ref":"#/components/schemas/HourlyData"},"type":"array","title":"Requests By Hour"},"breakdown_by_key":{"items":{"$ref":"#/components/schemas/KeyBreakdown"},"type":"array","title":"Breakdown By Key"},"requests_per_day_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Day Limit"},"requests_per_hour_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Requests Per Hour Limit"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"chat_tokens":{"type":"integer","title":"Chat Tokens","default":0},"chat_prompt_tokens":{"type":"integer","title":"Chat Prompt Tokens","default":0},"chat_completion_tokens":{"type":"integer","title":"Chat Completion Tokens","default":0},"unique_models_used":{"type":"integer","title":"Unique Models Used","default":0},"available_models_count":{"type":"integer","title":"Available Models Count","default":0},"content_seconds":{"type":"number","title":"Content Seconds","default":0.0},"content_seconds_breakdown":{"anyOf":[{"$ref":"#/components/schemas/ContentSecondsBreakdown"},{"type":"null"}]},"content_by_model":{"items":{"$ref":"#/components/schemas/ContentModelItem"},"type":"array","title":"Content By Model","default":[]},"images_created":{"type":"integer","title":"Images Created","default":0},"image_breakdown":{"items":{"$ref":"#/components/schemas/ImageBreakdownItem"},"type":"array","title":"Image Breakdown","default":[]},"cost_savings":{"anyOf":[{"$ref":"#/components/schemas/CostSavings"},{"type":"null"}]},"savings_by_model":{"items":{"$ref":"#/components/schemas/SavingsModelItem"},"type":"array","title":"Savings By Model","default":[]},"breakdown_by_model":{"items":{"$ref":"#/components/schemas/ModelBreakdown"},"type":"array","title":"Breakdown By Model","default":[]},"fallback_requests_today":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fallback Requests Today"},"fallback_requests_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fallback Requests Limit"},"enterprise_requests_today":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Enterprise Requests Today"},"allowed_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Models"}},"type":"object","required":["requests_today","total_tokens","prompt_tokens","completion_tokens","success_rate","requests_by_hour","breakdown_by_key"],"title":"UsageStatsResponse"},"UserActivitySummary":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"requests":{"type":"integer","title":"Requests"},"tokens":{"type":"integer","title":"Tokens"}},"type":"object","required":["user_id","email","name","requests","tokens"],"title":"UserActivitySummary"},"UserAdminView":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"promo_code_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code Used"},"signup_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Signup Number"},"access_group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Access Group"},"email_verified":{"type":"boolean","title":"Email Verified"},"profile_completed":{"type":"boolean","title":"Profile Completed"},"is_superuser":{"type":"boolean","title":"Is Superuser"},"auth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Provider"},"login_count":{"type":"integer","title":"Login Count"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"detected_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Country"},"detected_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Country Code"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_banned":{"type":"boolean","title":"Is Banned"},"total_requests":{"type":"integer","title":"Total Requests"},"total_tokens":{"type":"integer","title":"Total Tokens"}},"type":"object","required":["id","email","username","name","company_name","country_code","promo_code_used","signup_number","access_group","email_verified","profile_completed","is_superuser","auth_provider","login_count","last_login_at","detected_country","detected_country_code","status","created_at","is_banned","total_requests","total_tokens"],"title":"UserAdminView"},"UserUsageStats":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"total_requests":{"type":"integer","title":"Total Requests"},"total_tokens":{"type":"integer","title":"Total Tokens"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Active At"},"usage_by_model":{"items":{"$ref":"#/components/schemas/ModelUsageData"},"type":"array","title":"Usage By Model"},"usage_over_time":{"items":{"$ref":"#/components/schemas/TimeSeriesData"},"type":"array","title":"Usage Over Time"}},"type":"object","required":["user_id","email","name","total_requests","total_tokens","last_active_at","usage_by_model","usage_over_time"],"title":"UserUsageStats"},"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"},"VerifyEmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"},"click_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Click Id"}},"type":"object","required":["email","code"],"title":"VerifyEmailRequest"},"VerifyResetCodeRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"}},"type":"object","required":["email","code"],"title":"VerifyResetCodeRequest"},"VerifyResetCodeResponse":{"properties":{"message":{"type":"string","title":"Message"},"reset_token":{"type":"string","title":"Reset Token"}},"type":"object","required":["message","reset_token"],"title":"VerifyResetCodeResponse"},"WebhookResponse":{"properties":{"event":{"type":"string","title":"Event"},"success":{"type":"boolean","title":"Success"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["event","success"],"title":"WebhookResponse"},"WorkerHeartbeat":{"properties":{"worker_id":{"type":"string","title":"Worker Id"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"gpu_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Type"},"gpu_memory_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gpu Memory Gb"},"gpu_memory_used_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gpu Memory Used Gb"},"gpu_memory_available_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gpu Memory Available Gb"},"gpu_utilization":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gpu Utilization"},"status":{"type":"string","title":"Status","default":"online"},"cpu":{"type":"number","title":"Cpu","default":0.0},"memory":{"type":"number","title":"Memory","default":0.0},"models":{"items":{},"type":"array","title":"Models","default":[]},"loaded_models":{"items":{"type":"string"},"type":"array","title":"Loaded Models","default":[]},"available_models":{"items":{"type":"string"},"type":"array","title":"Available Models","default":[]},"loading_in_progress":{"type":"boolean","title":"Loading In Progress","default":false},"current_loading_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Loading Model"},"can_accept_new_model":{"type":"boolean","title":"Can Accept New Model","default":true},"heavy_model_loaded":{"type":"boolean","title":"Heavy Model Loaded","default":false}},"type":"object","required":["worker_id"],"title":"WorkerHeartbeat","description":"Enhanced heartbeat payload for dynamic worker registration.\nWorkers send this every 10-15 seconds to:\n1. Auto-register if new (no .env update needed!)\n2. Update stats (GPU utilization, VRAM, models)\n3. Signal they're alive"},"app__api__routes__admin__EnterpriseInviteCodeView":{"properties":{"code":{"type":"string","title":"Code"},"plan_id":{"type":"string","title":"Plan Id"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"uses_count":{"type":"integer","title":"Uses Count"},"is_active":{"type":"boolean","title":"Is Active"},"is_expired":{"type":"boolean","title":"Is Expired"},"can_use":{"type":"boolean","title":"Can Use"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["code","plan_id","plan_name","max_uses","uses_count","is_active","is_expired","can_use","created_at","created_by"],"title":"EnterpriseInviteCodeView"},"app__api__routes__enterprise__EnterpriseInviteCodeView":{"properties":{"code":{"type":"string","title":"Code"},"plan_id":{"type":"string","title":"Plan Id"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"uses_count":{"type":"integer","title":"Uses Count"},"is_active":{"type":"boolean","title":"Is Active"},"is_expired":{"type":"boolean","title":"Is Expired"},"can_use":{"type":"boolean","title":"Can Use"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["code","plan_id","max_uses","uses_count","is_active","is_expired","can_use"],"title":"EnterpriseInviteCodeView"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}