{"openapi":"3.1.0","info":{"title":"Trade Opportunities API","description":"\n## Trade Opportunities API\n\nA comprehensive API for analyzing market data and providing trade opportunity insights\nfor Indian sectors, powered by agentic AI.\n\n### Features\n- 🔐 **Authentication**: Secure JWT-based authentication with refresh tokens\n- 📊 **Sector Analysis**: AI-powered analysis of 20+ sectors\n- 📈 **History Tracking**: Store and retrieve past analyses\n- ⭐ **Favorites**: Save favorite sectors for quick access\n- ⚡ **Caching**: Intelligent caching for faster responses\n- 🚦 **Rate Limiting**: Fair usage policies\n    ","version":"2.0.0"},"paths":{"/api/v1/auth/send-otp":{"post":{"tags":["Authentication"],"summary":"Send email OTP verification code","description":"Send a 6-digit OTP code to the requested email address. Expires in 5 minutes.","operationId":"sendOtp","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTPSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTPSendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-otp":{"post":{"tags":["Authentication"],"summary":"Verify email OTP code","description":"Verify the 6-digit OTP code sent to an email address.","operationId":"verifyOtp","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTPVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OTPVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/register":{"post":{"tags":["Authentication"],"summary":"Register a new user account","description":"Register a new user account.\n\nPassword requirements:\n- Minimum 8 characters\n- At least one uppercase letter\n- At least one lowercase letter\n- At least one digit","operationId":"registerUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["Authentication"],"summary":"Authenticate and get JWT tokens","description":"Authenticate and get access token.\n\nYou can login with username or email.\n\nDemo credentials:\n- username: `demo_user`\n- password: `Demo@123`","operationId":"loginUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["Authentication"],"summary":"Refresh access token","description":"Refresh access token using refresh token.","operationId":"refreshToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRefresh"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["Authentication"],"summary":"Logout and revoke active tokens","description":"Logout and invalidate tokens.","operationId":"logoutUser","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/me":{"get":{"tags":["Users"],"summary":"Get current user's profile information","description":"Get current user's profile.","operationId":"getCurrentUser","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Users"],"summary":"Update current user's profile information","description":"Update current user's profile.","operationId":"updateCurrentUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/me/change-password":{"post":{"tags":["Users"],"summary":"Change current user's password","description":"Change current user's password.","operationId":"changePassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/users/me/stats":{"get":{"tags":["Users"],"summary":"Get current user's usage statistics and analysis counts","description":"Get current user's statistics.","operationId":"getUserStats","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStats"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/analyze/{sector}":{"get":{"tags":["Analysis"],"summary":"Analyze an Indian equity sector and generate trade opportunity report","description":"Analyze a sector and generate trade opportunity report.\n\nSupports 20+ sectors including:\n- Technology, Pharmaceuticals, Healthcare, Fintech\n- E-commerce, Renewable Energy, Agriculture, Automotive\n- Manufacturing, Textile, Real Estate, Banking, Insurance\n- Telecom, Media, Education, Food Processing, Chemicals\n- Metals & Mining, Infrastructure","operationId":"analyzeSector","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sector","in":"path","required":true,"schema":{"type":"string","title":"Sector"}},{"name":"save_report","in":"query","required":false,"schema":{"type":"boolean","description":"Save report to file","default":false,"title":"Save Report"},"description":"Save report to file"},{"name":"use_cache","in":"query","required":false,"schema":{"type":"boolean","description":"Use cached results if available","default":true,"title":"Use Cache"},"description":"Use cached results if available"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/history":{"get":{"tags":["Analysis"],"summary":"Get user's analysis history with pagination","description":"Get user's analysis history with pagination.","operationId":"listAnalysisHistory","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":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page","default":20,"title":"Per Page"},"description":"Items per page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/history/{analysis_id}":{"get":{"tags":["Analysis"],"summary":"Get a specific saved analysis by ID","description":"Get a specific analysis by ID.","operationId":"getAnalysisById","security":[{"HTTPBearer":[]}],"parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"integer","title":"Analysis Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Analysis"],"summary":"Delete an analysis report from history","description":"Delete an analysis from history.","operationId":"deleteAnalysisById","security":[{"HTTPBearer":[]}],"parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"integer","title":"Analysis Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/favorites":{"get":{"tags":["Favorites"],"summary":"Get current user's favorite sectors","description":"Get user's favorite sectors.","operationId":"getFavorites","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoritesListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Favorites"],"summary":"Add a sector to user favorites","description":"Add a sector to favorites.","operationId":"addFavorite","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteAdd"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/favorites/{sector}":{"delete":{"tags":["Favorites"],"summary":"Remove a sector from user favorites","description":"Remove a sector from favorites.","operationId":"removeFavorite","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sector","in":"path","required":true,"schema":{"type":"string","title":"Sector"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analyze/compare":{"post":{"tags":["Analysis"],"summary":"Rank 2-5 sectors on opportunity, risk, capital, and time-to-ROI","description":"Rank 2-5 sectors on opportunity / risk / capital / time-to-ROI axes.","operationId":"compareSectors","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/history/{analysis_id}/export":{"get":{"tags":["Analysis"],"summary":"Export a saved analysis report as PDF, PPTX, XLSX, or Markdown","description":"Export a previously-saved analysis in the requested format.","operationId":"exportAnalysis","security":[{"HTTPBearer":[]}],"parameters":[{"name":"analysis_id","in":"path","required":true,"schema":{"type":"integer","title":"Analysis Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"pdf | xlsx | pptx | md","default":"pdf","title":"Format"},"description":"pdf | xlsx | pptx | md"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sectors/{sector}/market-data":{"get":{"tags":["Market Data"],"summary":"Get live market snapshot and historical trend for sector","description":"Live sector index snapshot + 12-month trend for the /results charts.","operationId":"getSectorMarketData","parameters":[{"name":"sector","in":"path","required":true,"schema":{"type":"string","title":"Sector"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sectors/{sector}/relative-strength":{"get":{"tags":["Market Data"],"summary":"Get sector index relative strength vs Nifty 50","description":"Sector index vs Nifty 50 over the last 6 months, normalised to 100.","operationId":"getSectorRelativeStrength","parameters":[{"name":"sector","in":"path","required":true,"schema":{"type":"string","title":"Sector"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sectors/correlations":{"get":{"tags":["Market Data"],"summary":"Get pairwise correlation matrix across NSE sectors","description":"90-day pairwise correlation across all mapped NSE sector indices.","operationId":"getSectorCorrelations","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/sectors/{sector}/news":{"get":{"tags":["Market Data"],"summary":"Get recent news articles for sector with VADER sentiment scores","description":"Recent news items scored with VADER sentiment.","operationId":"getSectorNews","parameters":[{"name":"sector","in":"path","required":true,"schema":{"type":"string","title":"Sector"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"description":"Max articles to return","default":10,"title":"Limit"},"description":"Max articles to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/catalog":{"get":{"tags":["Payments"],"summary":"List active subscription pricing items and plans","description":"Expose active checkout SKUs so the frontend can render real purchasable plans.","operationId":"getPaymentCatalog","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PaymentCatalogItemResponse"},"type":"array","title":"Response Getpaymentcatalog"}}}}}}},"/api/v1/payments/create-order":{"post":{"tags":["Payments"],"summary":"Create a new payment order with Razorpay","description":"Create a local order and a matching Razorpay order.","operationId":"createPaymentOrder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/payments/verify":{"post":{"tags":["Payments"],"summary":"Verify Razorpay checkout signature and complete order","description":"Verify the checkout signature, then fetch the payment state from Razorpay.","operationId":"verifyPayment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RazorpayPaymentVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/orders/{local_order_id}":{"get":{"tags":["Payments"],"summary":"Get status and details of a payment order by local ID","description":"Return the latest server-side order status for checkout polling/reconciliation.","operationId":"getOrderStatus","security":[{"HTTPBearer":[]}],"parameters":[{"name":"local_order_id","in":"path","required":true,"schema":{"type":"integer","title":"Local Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/razorpay-webhook":{"post":{"tags":["Payments"],"summary":"Handle incoming Razorpay payment webhooks with HMAC validation","description":"Consume Razorpay webhooks using mandatory HMAC SHA256 signature validation.","operationId":"handleRazorpayWebhook","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/ai/vision/analyze":{"post":{"tags":["AI"],"summary":"Analyze trade chart, receipt, or image with AI vision","description":"Analyze a trade chart, receipt, or generic image with structured output.","operationId":"analyzeImage","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyzeImage"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionAnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/ai/tts":{"post":{"tags":["AI"],"summary":"Synthesize speech audio from text using AI voice models","description":"Synthesize speech with disk-backed cache + regional arbitrage.","operationId":"synthesizeSpeech","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/voice/voices":{"get":{"tags":["Voice"],"summary":"List available text-to-speech voice options","description":"List available voices with sample text for the picker UI.","operationId":"listVoiceOptions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VoiceVoiceOption"},"type":"array","title":"Response Listvoiceoptions"}}}}}}},"/api/v1/voice/cache/stats":{"get":{"tags":["Voice"],"summary":"Get voice synthesis audio cache statistics","description":"Live cache stats — drives the cost-savings badge in the UI.","operationId":"getVoiceCacheStats","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceCacheStats"}}}}}}},"/api/v1/ai/stt":{"post":{"tags":["Voice"],"summary":"Transcribe uploaded audio file to text using speech recognition","description":"Transcribe an uploaded audio clip after VAD silence-trimming.","operationId":"transcribeAudio","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_transcribeAudio"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/voice/query":{"post":{"tags":["Voice"],"summary":"Voice market query turn: prompt to audio synthesis","description":"Text-driven voice agent turn: prompt → cached LLM reply → cached TTS.","operationId":"queryVoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/voice/agent":{"post":{"tags":["Voice"],"summary":"Full interactive voice agent pipeline (audio in, audio out)","description":"Full conversational pipeline: STT → cached LLM → cached TTS.","operationId":"voiceAgentInteraction","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_voiceAgentInteraction"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/voice/pipeline/status":{"get":{"tags":["Voice"],"summary":"Get status of voice pipelines (Deepgram Agent & HF S2S)","description":"Returns availability and configuration of voice streaming engines.","operationId":"getVoicePipelineStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/voice-agent/health":{"get":{"tags":["Voice Realtime"],"summary":"Health Check","operationId":"health_check_voice_agent_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/watchlists":{"get":{"tags":["Watchlists"],"summary":"List all watchlists created by current user","operationId":"listWatchlists","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistsResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Watchlists"],"summary":"Create a new automated sector watchlist alert","operationId":"createWatchlist","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/watchlists/{watchlist_id}":{"delete":{"tags":["Watchlists"],"summary":"Delete a watchlist alert by ID","operationId":"deleteWatchlist","security":[{"HTTPBearer":[]}],"parameters":[{"name":"watchlist_id","in":"path","required":true,"schema":{"type":"integer","title":"Watchlist Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts":{"get":{"tags":["Alerts"],"summary":"List user sector alerts with seen/unseen filters","operationId":"listAlerts","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_seen","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Seen"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/alerts/{alert_id}/acknowledge":{"post":{"tags":["Alerts"],"summary":"Acknowledge and mark an alert as read","operationId":"acknowledgeAlert","security":[{"HTTPBearer":[]}],"parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contact":{"post":{"tags":["Contact"],"summary":"Accept a contact or sales inquiry","description":"Accept a contact / sales inquiry from the landing or pricing page.","operationId":"submitContact","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cache/stats":{"get":{"tags":["Admin"],"summary":"Get server analysis cache statistics","description":"Get cache statistics (requires enterprise tier).","operationId":"getCacheStats","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/cache/clear":{"delete":{"tags":["Admin"],"summary":"Clear all server analysis cache entries","description":"Clear analysis cache (requires enterprise tier).","operationId":"clearCache","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/":{"get":{"tags":["Info"],"summary":"Get API information and available endpoints","description":"Root endpoint - API information.","operationId":"getApiInfo","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIInfoResponse"}}}}}}},"/health":{"get":{"tags":["Info"],"summary":"Health check with system status","description":"Health check endpoint with system status.","operationId":"healthCheck","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/sectors":{"get":{"tags":["Info"],"summary":"List all sectors available for analysis","description":"Get list of popular sectors available for analysis.","operationId":"listAvailableSectors","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"APIInfoResponse":{"properties":{"message":{"type":"string","title":"Message"},"version":{"type":"string","title":"Version"},"environment":{"type":"string","title":"Environment"},"endpoints":{"additionalProperties":true,"type":"object","title":"Endpoints"}},"type":"object","required":["message","version","environment","endpoints"],"title":"APIInfoResponse","description":"Schema for API info response."},"AlertItem":{"properties":{"id":{"type":"integer","title":"Id"},"sector":{"type":"string","title":"Sector"},"headline":{"type":"string","title":"Headline"},"direction":{"type":"string","title":"Direction"},"confidence":{"type":"number","title":"Confidence"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"analysis_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Analysis Id"},"triggered_at":{"type":"string","format":"date-time","title":"Triggered At"},"acknowledged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Acknowledged At"}},"type":"object","required":["id","sector","headline","direction","confidence","summary","analysis_id","triggered_at"],"title":"AlertItem"},"AlertsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AlertItem"},"type":"array","title":"Items"},"unread":{"type":"integer","title":"Unread"}},"type":"object","required":["items","unread"],"title":"AlertsResponse"},"AnalysisHistoryItem":{"properties":{"id":{"type":"integer","title":"Id"},"sector":{"type":"string","title":"Sector"},"sources_analyzed":{"type":"integer","title":"Sources Analyzed"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","sector","sources_analyzed","created_at"],"title":"AnalysisHistoryItem","description":"Schema for analysis history item."},"AnalysisHistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AnalysisHistoryItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"per_page":{"type":"integer","title":"Per Page"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","per_page","pages"],"title":"AnalysisHistoryResponse","description":"Schema for paginated analysis history."},"AnalysisResponse":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"sector":{"type":"string","title":"Sector"},"report":{"type":"string","title":"Report"},"sources_analyzed":{"type":"integer","title":"Sources Analyzed"},"sources":{"items":{"$ref":"#/components/schemas/AnalysisSource"},"type":"array","title":"Sources"},"saved_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved To"},"saved_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Saved Url"},"timestamp":{"type":"string","title":"Timestamp"},"cached":{"type":"boolean","title":"Cached","default":false},"is_mock":{"type":"boolean","title":"Is Mock","default":false},"layer_used":{"type":"string","title":"Layer Used","default":"unknown"}},"type":"object","required":["sector","report","sources_analyzed","timestamp"],"title":"AnalysisResponse","description":"Schema for analysis response."},"AnalysisSource":{"properties":{"n":{"type":"integer","title":"N","description":"1-indexed citation number, matches [N] in the report body"},"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"snippet":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snippet"}},"type":"object","required":["n","title","url"],"title":"AnalysisSource","description":"A single cited source used to build an analysis report."},"Body_analyzeImage":{"properties":{"image":{"type":"string","contentMediaType":"application/octet-stream","title":"Image"},"task":{"type":"string","title":"Task","default":"trade_chart"},"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"}},"type":"object","required":["image"],"title":"Body_analyzeImage"},"Body_transcribeAudio":{"properties":{"audio":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","required":["audio"],"title":"Body_transcribeAudio"},"Body_voiceAgentInteraction":{"properties":{"audio":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio"},"sector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"},"mode":{"type":"string","title":"Mode","default":"qa"},"voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Voice"},"response_format":{"type":"string","title":"Response Format","default":"mp3"},"speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Speed"},"history_json":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"History Json"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","required":["audio"],"title":"Body_voiceAgentInteraction"},"CompareRequest":{"properties":{"sectors":{"items":{"type":"string"},"type":"array","maxItems":5,"minItems":2,"title":"Sectors"}},"type":"object","required":["sectors"],"title":"CompareRequest","description":"Request to compare 2-5 sectors side by side."},"CompareResponse":{"properties":{"winner":{"type":"string","title":"Winner","description":"Sector with the best opportunity/risk ratio"},"headline":{"type":"string","title":"Headline"},"scores":{"items":{"$ref":"#/components/schemas/CompareSectorScore"},"type":"array","title":"Scores"},"generated_at":{"type":"string","title":"Generated At"}},"type":"object","required":["winner","headline","scores","generated_at"],"title":"CompareResponse"},"CompareSectorScore":{"properties":{"sector":{"type":"string","title":"Sector"},"opportunity_score":{"type":"number","maximum":100,"minimum":0,"title":"Opportunity Score"},"risk_score":{"type":"number","maximum":100,"minimum":0,"title":"Risk Score"},"capital_required":{"type":"string","title":"Capital Required"},"time_to_roi":{"type":"string","title":"Time To Roi"},"sentiment_score":{"type":"number","title":"Sentiment Score"},"top_opportunity":{"type":"string","title":"Top Opportunity"},"top_risk":{"type":"string","title":"Top Risk"}},"type":"object","required":["sector","opportunity_score","risk_score","capital_required","time_to_roi","sentiment_score","top_opportunity","top_risk"],"title":"CompareSectorScore"},"ContactRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":2,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}],"title":"Company"},"plan_interest":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Plan Interest","description":"free | pro | enterprise"},"message":{"type":"string","maxLength":2000,"minLength":10,"title":"Message"}},"type":"object","required":["name","email","message"],"title":"ContactRequest","description":"Schema for a contact / sales inquiry submission."},"ContactResponse":{"properties":{"id":{"type":"integer","title":"Id"},"message":{"type":"string","title":"Message","default":"Thanks — we'll be in touch within one business day."}},"type":"object","required":["id"],"title":"ContactResponse","description":"Response after accepting a contact submission."},"CreateOrderItemRequest":{"properties":{"sku":{"type":"string","maxLength":64,"minLength":1,"title":"Sku"},"quantity":{"type":"integer","maximum":100,"minimum":1,"title":"Quantity"}},"type":"object","required":["sku","quantity"],"title":"CreateOrderItemRequest","description":"Single inventory-backed line item in an order request."},"CreateOrderRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CreateOrderItemRequest"},"type":"array","maxItems":20,"minItems":1,"title":"Items"},"currency":{"type":"string","maxLength":8,"minLength":3,"title":"Currency","default":"INR"},"receipt":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Receipt"},"notes":{"additionalProperties":{"type":"string"},"type":"object","title":"Notes"}},"type":"object","required":["items"],"title":"CreateOrderRequest","description":"Create a Razorpay order using paise-denominated inventory items."},"CreateOrderResponse":{"properties":{"local_order_id":{"type":"integer","title":"Local Order Id"},"receipt":{"type":"string","title":"Receipt"},"razorpay_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Order Id"},"razorpay_payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Payment Id"},"status":{"type":"string","title":"Status"},"amount_paise":{"type":"integer","title":"Amount Paise"},"currency":{"type":"string","title":"Currency"},"inventory_applied":{"type":"boolean","title":"Inventory Applied"},"payment_verified":{"type":"boolean","title":"Payment Verified"},"items":{"items":{"$ref":"#/components/schemas/OrderLineItemResponse"},"type":"array","title":"Items"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"key_id":{"type":"string","title":"Key Id"}},"type":"object","required":["local_order_id","receipt","status","amount_paise","currency","inventory_applied","payment_verified","items","created_at","key_id"],"title":"CreateOrderResponse","description":"Response returned after creating a remote Razorpay order."},"FavoriteAdd":{"properties":{"sector":{"type":"string","maxLength":100,"minLength":2,"title":"Sector"}},"type":"object","required":["sector"],"title":"FavoriteAdd","description":"Schema for adding a favorite sector."},"FavoritesListResponse":{"properties":{"favorites":{"items":{"type":"string"},"type":"array","title":"Favorites"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["favorites","count"],"title":"FavoritesListResponse","description":"Schema for list of favorites."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"service":{"type":"string","title":"Service"},"version":{"type":"string","title":"Version"},"timestamp":{"type":"string","title":"Timestamp"},"database":{"type":"string","title":"Database"},"cache":{"additionalProperties":true,"type":"object","title":"Cache"}},"type":"object","required":["status","service","version","timestamp","database","cache"],"title":"HealthResponse","description":"Schema for health check response."},"OTPSendRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address to send OTP to"}},"type":"object","required":["email"],"title":"OTPSendRequest","description":"Schema to request an email OTP."},"OTPSendResponse":{"properties":{"message":{"type":"string","title":"Message"},"email":{"type":"string","title":"Email"},"expires_in_minutes":{"type":"integer","title":"Expires In Minutes","default":5}},"type":"object","required":["message","email"],"title":"OTPSendResponse","description":"Schema response after sending OTP."},"OTPVerifyRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address"},"code":{"type":"string","maxLength":6,"minLength":6,"title":"Code","description":"6-digit OTP code"}},"type":"object","required":["email","code"],"title":"OTPVerifyRequest","description":"Schema to verify an email OTP."},"OTPVerifyResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"message":{"type":"string","title":"Message"}},"type":"object","required":["verified","message"],"title":"OTPVerifyResponse","description":"Schema response after OTP verification."},"OrderLineItemResponse":{"properties":{"sku":{"type":"string","title":"Sku"},"item_name":{"type":"string","title":"Item Name"},"quantity":{"type":"integer","title":"Quantity"},"unit_amount_paise":{"type":"integer","title":"Unit Amount Paise"},"total_amount_paise":{"type":"integer","title":"Total Amount Paise"}},"type":"object","required":["sku","item_name","quantity","unit_amount_paise","total_amount_paise"],"title":"OrderLineItemResponse","description":"Order line item returned to the frontend."},"OrderResponse":{"properties":{"local_order_id":{"type":"integer","title":"Local Order Id"},"receipt":{"type":"string","title":"Receipt"},"razorpay_order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Order Id"},"razorpay_payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Razorpay Payment Id"},"status":{"type":"string","title":"Status"},"amount_paise":{"type":"integer","title":"Amount Paise"},"currency":{"type":"string","title":"Currency"},"inventory_applied":{"type":"boolean","title":"Inventory Applied"},"payment_verified":{"type":"boolean","title":"Payment Verified"},"items":{"items":{"$ref":"#/components/schemas/OrderLineItemResponse"},"type":"array","title":"Items"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"}},"type":"object","required":["local_order_id","receipt","status","amount_paise","currency","inventory_applied","payment_verified","items","created_at"],"title":"OrderResponse","description":"Canonical local order status."},"PasswordChange":{"properties":{"current_password":{"type":"string","minLength":6,"title":"Current Password"},"new_password":{"type":"string","maxLength":100,"minLength":8,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"PasswordChange","description":"Schema for password change."},"PaymentCatalogItemResponse":{"properties":{"sku":{"type":"string","title":"Sku"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price_paise":{"type":"integer","title":"Price Paise"},"currency":{"type":"string","title":"Currency"},"stock_quantity":{"type":"integer","title":"Stock Quantity"}},"type":"object","required":["sku","name","price_paise","currency","stock_quantity"],"title":"PaymentCatalogItemResponse","description":"Visible payment catalog item for the checkout UI."},"RazorpayPaymentVerificationRequest":{"properties":{"local_order_id":{"type":"integer","minimum":1,"title":"Local Order Id"},"razorpay_order_id":{"type":"string","maxLength":64,"minLength":5,"title":"Razorpay Order Id"},"razorpay_payment_id":{"type":"string","maxLength":64,"minLength":5,"title":"Razorpay Payment Id"},"razorpay_signature":{"type":"string","maxLength":255,"minLength":10,"title":"Razorpay Signature"}},"type":"object","required":["local_order_id","razorpay_order_id","razorpay_payment_id","razorpay_signature"],"title":"RazorpayPaymentVerificationRequest","description":"Client-side checkout signature verification payload."},"TTSRequest":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"},"voice":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Voice"},"response_format":{"type":"string","title":"Response Format","description":"mp3 | pcm","default":"mp3"},"speed":{"anyOf":[{"type":"number","maximum":4,"minimum":0.25},{"type":"null"}],"title":"Speed"},"instructions":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Instructions"},"preferred_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Provider","description":"Hint: prefer this TTS provider (gemini | openrouter | deepgram)"}},"type":"object","required":["text"],"title":"TTSRequest","description":"Request schema for text-to-speech generation."},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Token expiry time in seconds"}},"type":"object","required":["access_token","refresh_token","expires_in"],"title":"Token","description":"Schema for access token response."},"TokenRefresh":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"TokenRefresh","description":"Schema for token refresh request."},"UserCreate":{"properties":{"username":{"type":"string","maxLength":50,"minLength":3,"title":"Username","description":"Unique username"},"email":{"type":"string","format":"email","title":"Email","description":"Valid email address"},"password":{"type":"string","maxLength":100,"minLength":8,"title":"Password","description":"Password (min 8 characters)"},"full_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Full Name","description":"Full name"}},"type":"object","required":["username","email","password"],"title":"UserCreate","description":"Schema for user registration."},"UserLogin":{"properties":{"username":{"type":"string","maxLength":50,"minLength":3,"title":"Username"},"password":{"type":"string","minLength":6,"title":"Password"}},"type":"object","required":["username","password"],"title":"UserLogin","description":"Schema for user login."},"UserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"username":{"type":"string","title":"Username"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"is_active":{"type":"boolean","title":"Is Active"},"is_premium":{"type":"boolean","title":"Is Premium"},"tier":{"type":"string","title":"Tier"},"analysis_count_month":{"type":"integer","title":"Analysis Count Month"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona"},"capital_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capital Range"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"risk_appetite":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Appetite"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login"}},"type":"object","required":["id","username","email","full_name","is_active","is_premium","tier","analysis_count_month","created_at","last_login"],"title":"UserResponse","description":"Schema for user response (without sensitive data)."},"UserStats":{"properties":{"total_analyses":{"type":"integer","title":"Total Analyses"},"favorite_sectors":{"type":"integer","title":"Favorite Sectors"},"last_analysis":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Analysis"},"member_since":{"type":"string","format":"date-time","title":"Member Since"},"is_premium":{"type":"boolean","title":"Is Premium"}},"type":"object","required":["total_analyses","favorite_sectors","last_analysis","member_since","is_premium"],"title":"UserStats","description":"Schema for user statistics."},"UserUpdate":{"properties":{"full_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Full Name"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona","description":"consultant | exporter | investor | sme_owner | student"},"capital_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Capital Range","description":"50L_5Cr | 5Cr_plus | 5L_50L | under_5L"},"region":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Region"},"risk_appetite":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Appetite","description":"high | low | medium"}},"type":"object","title":"UserUpdate","description":"Schema for updating user profile."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VisionAnalysisResponse":{"properties":{"task":{"type":"string","title":"Task"},"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"analysis":{"additionalProperties":true,"type":"object","title":"Analysis"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["task","provider","model","analysis","created_at"],"title":"VisionAnalysisResponse","description":"Structured response from the multimodal analysis endpoint."},"VoiceCacheStats":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"entries":{"type":"integer","title":"Entries"},"hits":{"type":"integer","title":"Hits"},"misses":{"type":"integer","title":"Misses"},"hit_ratio":{"type":"number","title":"Hit Ratio"},"bytes_saved":{"type":"integer","title":"Bytes Saved"},"chars_saved":{"type":"integer","title":"Chars Saved"},"estimated_inr_saved":{"type":"number","title":"Estimated Inr Saved"},"last_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Provider"},"arbitrage_enabled":{"type":"boolean","title":"Arbitrage Enabled","default":false},"provider_health":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Provider Health"}},"type":"object","required":["enabled","entries","hits","misses","hit_ratio","bytes_saved","chars_saved","estimated_inr_saved"],"title":"VoiceCacheStats","description":"TTS cache stats — drives the live cost-savings UI badge."},"VoiceQueryRequest":{"properties":{"prompt":{"type":"string","maxLength":2000,"minLength":1,"title":"Prompt"},"sector":{"anyOf":[{"type":"string","maxLength":80},{"type":"null"}],"title":"Sector"},"mode":{"type":"string","title":"Mode","description":"briefing | qa | open","default":"qa"},"voice":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Voice"},"response_format":{"type":"string","title":"Response Format","description":"mp3 | pcm","default":"mp3"},"speed":{"anyOf":[{"type":"number","maximum":1.5,"minimum":0.5},{"type":"null"}],"title":"Speed"},"history":{"anyOf":[{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"},{"type":"null"}],"title":"History","description":"Prior conversation turns: [{role, content}]"},"preferred_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Provider","description":"Hint: prefer this TTS provider (gemini | openrouter | deepgram)"}},"type":"object","required":["prompt"],"title":"VoiceQueryRequest","description":"Text-driven voice agent turn (for typed questions / quick probes)."},"VoiceVoiceOption":{"properties":{"value":{"type":"string","title":"Value"},"label":{"type":"string","title":"Label"},"mood":{"type":"string","title":"Mood"},"sample_text":{"type":"string","title":"Sample Text"},"accent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},"type":"object","required":["value","label","mood","sample_text"],"title":"VoiceVoiceOption","description":"One selectable voice in the operator UI."},"WatchlistCreate":{"properties":{"sector":{"type":"string","maxLength":100,"minLength":2,"title":"Sector"},"cadence":{"type":"string","title":"Cadence","description":"hourly | daily | weekly","default":"daily"},"channels":{"items":{"type":"string"},"type":"array","title":"Channels"}},"type":"object","required":["sector"],"title":"WatchlistCreate"},"WatchlistItem":{"properties":{"id":{"type":"integer","title":"Id"},"sector":{"type":"string","title":"Sector"},"cadence":{"type":"string","title":"Cadence"},"channels":{"items":{"type":"string"},"type":"array","title":"Channels"},"is_active":{"type":"boolean","title":"Is Active"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Run At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","sector","cadence","channels","is_active","created_at"],"title":"WatchlistItem"},"WatchlistsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WatchlistItem"},"type":"array","title":"Items"},"count":{"type":"integer","title":"Count"},"slot_limit":{"type":"integer","title":"Slot Limit"},"slots_used":{"type":"integer","title":"Slots Used"}},"type":"object","required":["items","count","slot_limit","slots_used"],"title":"WatchlistsResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}