{"openapi":"3.1.0","info":{"title":"Decipon API","description":"Influence Tactics Detection - Manipulation Scoring and Analysis","version":"1.21.0"},"paths":{"/v1/analyze":{"post":{"tags":["analysis"],"summary":"Analyze Content","description":"Analyze content for manipulation indicators.\n\nReturns complete analysis including:\n- Influence Tactics Score (0-100) with composite factors\n- Red team perspective (why manipulative)\n- Blue team perspective (why legitimate)\n- Synthesis (balanced view)","operationId":"analyze_content_v1_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/analyze/url":{"post":{"tags":["analysis"],"summary":"Analyze Url","description":"Analyze content from a URL.\n\nFetches content from the provided URL and analyzes it for manipulation indicators.","operationId":"analyze_url_v1_analyze_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/score/{content_hash}":{"get":{"tags":["analysis"],"summary":"Get Score","description":"Get score for previously analyzed content.","operationId":"get_score_v1_score__content_hash__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"content_hash","in":"path","required":true,"schema":{"type":"string","title":"Content Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NCIScore"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/analyze/batch":{"post":{"tags":["analysis"],"summary":"Analyze Batch","description":"Analyze multiple contents in batch.","operationId":"analyze_batch_v1_analyze_batch_post","requestBody":{"content":{"application/json":{"schema":{"items":{"type":"string"},"type":"array","title":"Contents"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Analyze Batch V1 Analyze Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/analyze/quick":{"post":{"tags":["analysis"],"summary":"Analyze Quick","description":"Quick analysis optimized for social media content.\n\nThis endpoint provides fast scoring (100-500ms) by skipping expensive\nLLM operations like perspective generation and context-dependent scoring.\n\nIdeal for:\n- Twitter/X.com posts\n- High-volume real-time analysis\n- Chrome extension integration\n\nFeatures:\n- ML + rule-based scoring (no LLM calls)\n- Propaganda detection with BERTweet (Twitter-optimized)\n- Automatic caching for repeated content\n- Minimum 100 character threshold (short posts are unreliable)\n\nReturns:\n- Overall manipulation score (0-100)\n- Confidence level\n- Propaganda detection results\n- Processing time","operationId":"analyze_quick_v1_analyze_quick_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickAnalyzeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickAnalyzeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/analyze/batch/quick":{"post":{"tags":["analysis"],"summary":"Analyze Batch Quick","description":"Batch quick analysis optimized for Twitter/X.com feeds.\n\nProcesses multiple posts in a single request with optimizations:\n- Automatic content deduplication (same content = same score)\n- Skips posts below 100 characters (too short for meaningful analysis)\n- Prioritizes visible content (first items processed first)\n- Higher concurrency than standard batch (20 vs 10 workers)\n- Uses quick analysis (no LLM calls, 100-500ms per item)\n\nPerfect for:\n- Chrome extension analyzing visible tweets\n- Batch processing Twitter threads\n- Real-time feed analysis\n\nLimits:\n- Maximum 50 items per batch\n- 30 requests per minute rate limit","operationId":"analyze_batch_quick_v1_analyze_batch_quick_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchQuickAnalyzeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchQuickAnalyzeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/analyze/free":{"post":{"tags":["analysis"],"summary":"Analyze Free","description":"Pool-funded free analysis. No API key required.\n\nDeducts from the Public Good Pool to fund the analysis.\nUses quick analysis (no LLM calls) for cost efficiency.\nRate limited to 3 requests per day per IP.\n\nReturns 503 with donate_url when pool is exhausted.\nReturns 429 when daily limit is reached.","operationId":"analyze_free_v1_analyze_free_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickAnalyzeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuickAnalyzeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/validate":{"post":{"tags":["validation"],"summary":"Submit Validation","description":"Submit a human validation for content.","operationId":"submit_validation_v1_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationRequest"}}},"required":true},"responses":{"200":{"description":"Validation updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResponse"}}}},"201":{"description":"Validation created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/consensus/{content_hash}":{"get":{"tags":["validation"],"summary":"Get Consensus","description":"Get consensus score for content.","operationId":"get_consensus_v1_consensus__content_hash__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"content_hash","in":"path","required":true,"schema":{"type":"string","title":"Content Hash"}},{"name":"include_validations","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Validations"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsensusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/feedback":{"post":{"tags":["feedback"],"summary":"Submit Feedback","description":"Submit thumbs up/down feedback for an analysis.","operationId":"submit_feedback_v1_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/export/feedback":{"get":{"tags":["feedback"],"summary":"Export Feedback","description":"Export validation data for model training.","operationId":"export_feedback_v1_export_feedback_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"}},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End Date"}},{"name":"min_validations","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Min Validations"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":1000,"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/FeedbackExportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/news/showcase":{"get":{"tags":["news"],"summary":"News Showcase","description":"Return scored news articles for showcase display.\n\nSupports filtering by source_id, category, language, or any combination.\nReturns the article list plus category statistics for navigation.","operationId":"news_showcase_v1_news_showcase_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source_id","title":"Source"},"description":"Filter by source_id"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/NewsCategory"},{"type":"null"}],"description":"Filter by category","title":"Category"},"description":"Filter by category"},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}$"},{"type":"null"}],"description":"Filter by ISO 639-1 lowercase language code (e.g. 'en', 'nb')","title":"Language"},"description":"Filter by ISO 639-1 lowercase language code (e.g. 'en', 'nb')"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max articles to return","default":20,"title":"Limit"},"description":"Max articles to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsShowcaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/news/languages":{"get":{"tags":["news"],"summary":"News Languages","description":"Return languages currently present in the analysed-news corpus.\n\nPowers the /news language switcher: only languages with at least one\nscored article in the recent window appear, sorted by article count\ndescending so the most-active language is offered first.","operationId":"news_languages_v1_news_languages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsLanguagesResponse"}}}}}}},"/v1/news/categories":{"get":{"tags":["news"],"summary":"News Categories","description":"Return available news categories with statistics.\n\nCategories are returned with article counts and average scores from the\nlast 48 hours. Use this endpoint to build category navigation.","operationId":"news_categories_v1_news_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NewsCategoryResponse"},"type":"array","title":"Response News Categories V1 News Categories Get"}}}}}}},"/v1/news/sources":{"get":{"tags":["news"],"summary":"News Sources","description":"Return active news sources with statistics.","operationId":"news_sources_v1_news_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/NewsSourceResponse"},"type":"array","title":"Response News Sources V1 News Sources Get"}}}}}}},"/news":{"get":{"tags":["news"],"summary":"News Page","description":"Render the dedicated news exploration page.","operationId":"news_page_news_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/v1/leaderboard/weekly":{"get":{"tags":["leaderboard"],"summary":"Leaderboard Weekly","description":"Return the weekly influence patterns leaderboard.\n\nSources are ranked by average ITP score over a 7-day window.\nOnly sources with sufficient article volume (10+ articles) qualify.\nData is pre-computed by the scheduler and served from cache.","operationId":"leaderboard_weekly_v1_leaderboard_weekly_get","parameters":[{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-W\\d{2}$"},{"type":"null"}],"description":"ISO week to fetch (e.g., '2026-W09'). Defaults to current week.","title":"Week"},"description":"ISO week to fetch (e.g., '2026-W09'). Defaults to current week."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaderboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/leaderboard/source/{source_id}/factors":{"get":{"tags":["leaderboard"],"summary":"Leaderboard Source Factors","description":"Return composite factor breakdown for a specific source.\n\nLazy-loaded on card expand/click to avoid expensive JSONB aggregation\non initial page load.","operationId":"leaderboard_source_factors_v1_leaderboard_source__source_id__factors_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","maxLength":50,"pattern":"^[a-z0-9_-]+$","title":"Source Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"description":"Rolling window in days","default":7,"title":"Days"},"description":"Rolling window in days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Leaderboard Source Factors V1 Leaderboard Source  Source Id  Factors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leaderboard":{"get":{"tags":["leaderboard"],"summary":"Leaderboard Page","description":"Render the weekly influence patterns report page.","operationId":"leaderboard_page_leaderboard_get","parameters":[{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-W\\d{2}$"},{"type":"null"}],"title":"Week"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/leaderboard/embed":{"get":{"tags":["leaderboard"],"summary":"Leaderboard Embed","description":"Render a lightweight embeddable leaderboard for iframes.\n\nSets permissive frame headers to allow embedding on third-party sites.\nMinimal HTML with inlined CSS, no header/footer, top 5 sources only.","operationId":"leaderboard_embed_leaderboard_embed_get","parameters":[{"name":"week","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-W\\d{2}$"},{"type":"null"}],"title":"Week"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reputation/domain/{domain}":{"get":{"tags":["reputation"],"summary":"Get Domain Reputation","description":"Return reputation data for a domain.\n\nData is pre-computed daily by the scheduler and served from cache\nwith database fallback.","operationId":"get_domain_reputation_v1_reputation_domain__domain__get","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","maxLength":253,"pattern":"(?i)^[a-z0-9][a-z0-9.\\-]*\\.[a-z]{2,}$","description":"Domain to look up (e.g., 'reuters.com')","title":"Domain"},"description":"Domain to look up (e.g., 'reuters.com')"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainReputationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/reputation/domain/{domain}/history":{"get":{"tags":["reputation"],"summary":"Get Domain Reputation History","description":"Return weekly score history for trend charts.","operationId":"get_domain_reputation_history_v1_reputation_domain__domain__history_get","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","maxLength":253,"pattern":"(?i)^[a-z0-9][a-z0-9.\\-]*\\.[a-z]{2,}$","title":"Domain"}},{"name":"weeks","in":"query","required":false,"schema":{"type":"integer","maximum":52,"minimum":4,"description":"Weeks of history","default":13,"title":"Weeks"},"description":"Weeks of history"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainReputationHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/source/{domain}/badge":{"get":{"tags":["reputation"],"summary":"Source Badge","description":"Render an embeddable reputation badge widget.\n\nSets permissive frame headers to allow embedding on third-party sites.","operationId":"source_badge_source__domain__badge_get","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}},{"name":"style","in":"query","required":false,"schema":{"type":"string","pattern":"^(compact|full)$","default":"compact","title":"Style"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/source/{domain}":{"get":{"tags":["reputation"],"summary":"Source Reputation Page","description":"Render the source reputation detail page.","operationId":"source_reputation_page_source__domain__get","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","title":"Domain"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/intelligence/patterns":{"get":{"tags":["intelligence"],"summary":"Intelligence Patterns","description":"Return tactic co-occurrence patterns.\n\nShows which manipulation tactics tend to appear together and at what\nfrequency. Data is aggregated daily by the scheduler from all scored\nanalyses (API + news pipeline).","operationId":"intelligence_patterns_v1_intelligence_patterns_get","parameters":[{"name":"min_correlation","in":"query","required":false,"schema":{"type":"number","maximum":1.0,"minimum":0.0,"description":"Minimum correlation strength to include","default":0.0,"title":"Min Correlation"},"description":"Minimum correlation strength to include"},{"name":"tactic","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":50,"pattern":"^[a-z_]+$"},{"type":"null"}],"description":"Filter to one tactic's pairs (CategoryType value)","title":"Tactic"},"description":"Filter to one tactic's pairs (CategoryType value)"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"description":"Lookback window in days (aggregate across daily snapshots)","default":30,"title":"Days"},"description":"Lookback window in days (aggregate across daily snapshots)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CooccurrenceMatrixResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/intelligence/patterns/anomalies":{"get":{"tags":["intelligence"],"summary":"Intelligence Anomalies","description":"Return unusual/rare co-occurrence patterns (statistical outliers).\n\nIdentifies tactic pairs that appear together at unexpectedly high or low\nrates compared to what individual tactic frequencies would predict.","operationId":"intelligence_anomalies_v1_intelligence_patterns_anomalies_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"description":"Lookback window","default":30,"title":"Days"},"description":"Lookback window"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/patterns":{"get":{"tags":["intelligence"],"summary":"Patterns Page","description":"Render the tactic co-occurrence patterns page.","operationId":"patterns_page_patterns_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/publishers/register":{"post":{"tags":["publishers"],"summary":"Register Publisher","description":"Register a new publisher account.\n\nRequires a valid API key (X-API-Key header) to identify the customer.\nReturns a publisher token (pub_...) shown only once.","operationId":"register_publisher_publishers_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/publishers/domains":{"post":{"tags":["publishers"],"summary":"Add Domain","description":"Add a domain for verification.","operationId":"add_domain_publishers_domains_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/publishers/domains/verify":{"post":{"tags":["publishers"],"summary":"Verify Domain Endpoint","description":"Trigger verification check for a domain.","operationId":"verify_domain_endpoint_publishers_domains_verify_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/publishers/domains/{domain_id}":{"delete":{"tags":["publishers"],"summary":"Remove Domain","description":"Remove a domain from the publisher.","operationId":"remove_domain_publishers_domains__domain_id__delete","parameters":[{"name":"domain_id","in":"path","required":true,"schema":{"type":"string","title":"Domain Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/publishers/embed-code":{"get":{"tags":["publishers"],"summary":"Get Embed Code","description":"Generate the embed code snippet for a publisher.","operationId":"get_embed_code_publishers_embed_code_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/publishers/api/analytics":{"get":{"tags":["publishers"],"summary":"Analytics Api","description":"JSON API for analytics chart data.","operationId":"analytics_api_publishers_api_analytics_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api":{"get":{"tags":["info"],"summary":"Api Info","description":"API information endpoint.","operationId":"api_info_api_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Api Info Api Get"}}}}}}},"/health":{"get":{"tags":["info"],"summary":"Health Check","description":"Health check endpoint with service connectivity verification.\n\nAlways returns the overall ``status`` so Docker/Coolify/Traefik probes\nkeep working. Per-service ``checks`` are gated when\n``settings.health_detail_tokens`` is set — see\n``_health_detail_authorized``.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}}},"components":{"schemas":{"AnalyzeRequest":{"properties":{"content":{"type":"string","maxLength":1000000,"minLength":50,"title":"Content","description":"Content to analyze"},"content_type":{"type":"string","title":"Content Type","description":"MIME type of content","default":"text/plain"},"semantic_content_type":{"type":"string","title":"Semantic Content Type","description":"Content category hint: auto, news, social_media (§4.1.1)","default":"auto"},"options":{"additionalProperties":true,"type":"object","title":"Options","description":"Analysis options"},"source_metadata":{"anyOf":[{"$ref":"#/components/schemas/SourceMetadata"},{"type":"null"}],"description":"Optional source metadata (e.g., tweet author, URL) to display on the analysis page"}},"type":"object","required":["content"],"title":"AnalyzeRequest","description":"Request body for content analysis (Protocol Section 4.1.1)"},"AnalyzeResponse":{"properties":{"content_hash":{"type":"string","title":"Content Hash"},"score":{"$ref":"#/components/schemas/NCIScore"},"perspectives":{"anyOf":[{"$ref":"#/components/schemas/PerspectivesModel"},{"type":"null"}]},"propaganda":{"anyOf":[{"$ref":"#/components/schemas/PropagandaModel"},{"type":"null"}]},"guidance":{"anyOf":[{"$ref":"#/components/schemas/GuidanceModel"},{"type":"null"}]},"context_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Metadata"},"status":{"type":"string","title":"Status","default":"success"}},"type":"object","required":["content_hash","score"],"title":"AnalyzeResponse","description":"Response from content analysis - includes score AND perspectives per PRD"},"AnalyzeUrlRequest":{"properties":{"url":{"type":"string","title":"Url","description":"URL to fetch and analyze"},"semantic_content_type":{"type":"string","title":"Semantic Content Type","description":"Type of content (news, social_media, etc)","default":"news"},"options":{"additionalProperties":true,"type":"object","title":"Options","description":"Analysis options"}},"type":"object","required":["url"],"title":"AnalyzeUrlRequest","description":"Request body for URL-based content analysis"},"AnomalyPairResponse":{"properties":{"tactic_a":{"type":"string","title":"Tactic A","description":"First tactic (alphabetically)"},"tactic_b":{"type":"string","title":"Tactic B","description":"Second tactic (alphabetically)"},"tactic_a_display":{"type":"string","title":"Tactic A Display","description":"Display name for tactic A","default":""},"tactic_b_display":{"type":"string","title":"Tactic B Display","description":"Display name for tactic B","default":""},"lift":{"type":"number","title":"Lift","description":"Observed/expected ratio (>2.0 = positive, <0.3 = negative)"},"observed_rate":{"type":"number","minimum":0.0,"title":"Observed Rate","description":"Observed co-occurrence rate"},"expected_rate":{"type":"number","minimum":0.0,"title":"Expected Rate","description":"Expected rate under independence"},"co_occurrence_count":{"type":"integer","minimum":0.0,"title":"Co Occurrence Count","description":"Times both tactics appeared together"},"anomaly_type":{"type":"string","enum":["positive","negative"],"title":"Anomaly Type","description":"'positive' (over-represented) or 'negative' (suppressed)"}},"type":"object","required":["tactic_a","tactic_b","lift","observed_rate","expected_rate","co_occurrence_count","anomaly_type"],"title":"AnomalyPairResponse","description":"A single anomalous tactic co-occurrence pair (statistical outlier)."},"AnomalyResponse":{"properties":{"days":{"type":"integer","title":"Days","description":"Lookback window in days"},"anomalies":{"items":{"$ref":"#/components/schemas/AnomalyPairResponse"},"type":"array","title":"Anomalies","description":"Anomalous pairs sorted by absolute lift deviation"},"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"When this response was generated"}},"type":"object","required":["days"],"title":"AnomalyResponse","description":"Response from the co-occurrence anomaly detection endpoint."},"BatchQuickAnalyzeRequest":{"properties":{"contents":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Contents","description":"List of content strings to analyze"},"semantic_content_type":{"type":"string","title":"Semantic Content Type","description":"Content type for ML routing","default":"social_media"}},"type":"object","required":["contents"],"title":"BatchQuickAnalyzeRequest","description":"Request body for batch quick analysis (optimized for Twitter/X.com feeds).\n\nProcesses multiple posts in a single request with automatic deduplication\nand optimized concurrency. Returns quick scores for all items.\n\nFeatures:\n- Automatic content deduplication (same content = same score)\n- Skips posts below minimum length threshold\n- Prioritizes visible content (first items processed first)\n- Maximum 50 items per batch (higher throughput than standard batch)"},"BatchQuickAnalyzeResponse":{"properties":{"status":{"type":"string","title":"Status","default":"success"},"total_count":{"type":"integer","title":"Total Count","description":"Total items submitted"},"analyzed_count":{"type":"integer","title":"Analyzed Count","description":"Items successfully analyzed"},"skipped_count":{"type":"integer","title":"Skipped Count","description":"Items skipped (too short, etc.)"},"cached_count":{"type":"integer","title":"Cached Count","description":"Items served from cache"},"results":{"items":{"$ref":"#/components/schemas/QuickAnalyzeResponse"},"type":"array","title":"Results"},"total_processing_time_ms":{"type":"integer","title":"Total Processing Time Ms"}},"type":"object","required":["total_count","analyzed_count","skipped_count","cached_count","results","total_processing_time_ms"],"title":"BatchQuickAnalyzeResponse","description":"Response from batch quick analysis."},"CategoryScore":{"properties":{"value":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Value","description":"Category score (1-5)"},"weight":{"type":"number","maximum":1.0,"exclusiveMinimum":0.0,"title":"Weight","description":"Weight within composite factor"},"evidence":{"type":"string","title":"Evidence","description":"Evidence supporting this score"},"confidence":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Confidence","description":"Confidence in this score"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Human-friendly display name from Protocol Section 5.2"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Scoring pipeline metadata (scoring_method, ml_raw_score, search_findings, etc.)"}},"type":"object","required":["value","weight","evidence"],"title":"CategoryScore","description":"Individual category score (1-5 scale) per Protocol Section 3.1"},"CompositeFactor":{"properties":{"composite_value":{"type":"number","maximum":5.0,"minimum":1.0,"title":"Composite Value","description":"Weighted average of category scores"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","description":"Confidence in composite"},"categories":{"additionalProperties":{"$ref":"#/components/schemas/CategoryScore"},"type":"object","title":"Categories","description":"Component category scores"}},"type":"object","required":["composite_value","confidence","categories"],"title":"CompositeFactor","description":"Composite factor aggregating multiple categories per Protocol Section 2.2"},"CompositeFactors":{"properties":{"emotional_manipulation":{"$ref":"#/components/schemas/CompositeFactor"},"suspicious_timing":{"$ref":"#/components/schemas/CompositeFactor"},"uniform_messaging":{"$ref":"#/components/schemas/CompositeFactor"},"tribal_division":{"$ref":"#/components/schemas/CompositeFactor"},"missing_information":{"$ref":"#/components/schemas/CompositeFactor"}},"type":"object","required":["emotional_manipulation","suspicious_timing","uniform_messaging","tribal_division","missing_information"],"title":"CompositeFactors","description":"All 5 composite factors"},"ConsensusResponse":{"properties":{"content_hash":{"type":"string","title":"Content Hash"},"consensus_score":{"type":"number","title":"Consensus Score"},"ai_score":{"type":"number","title":"Ai Score"},"human_score":{"type":"number","title":"Human Score"},"confidence":{"type":"number","title":"Confidence"},"confidence_interval":{"additionalProperties":true,"type":"object","title":"Confidence Interval"},"validation_count":{"type":"integer","title":"Validation Count"},"is_valid":{"type":"boolean","title":"Is Valid"},"calculated_at":{"type":"string","format":"date-time","title":"Calculated At"},"status":{"type":"string","title":"Status","default":"success"}},"type":"object","required":["content_hash","consensus_score","ai_score","human_score","confidence","confidence_interval","validation_count","is_valid","calculated_at"],"title":"ConsensusResponse","description":"Response with consensus data (Protocol Section 4.1.4)"},"CooccurrenceMatrixResponse":{"properties":{"days":{"type":"integer","title":"Days","description":"Lookback window in days"},"summary":{"$ref":"#/components/schemas/CooccurrenceSummaryResponse","description":"Aggregate statistics"},"pairs":{"items":{"$ref":"#/components/schemas/TacticPairResponse"},"type":"array","title":"Pairs","description":"Tactic pairs sorted by correlation strength"},"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"When this response was generated"}},"type":"object","required":["days"],"title":"CooccurrenceMatrixResponse","description":"Full co-occurrence matrix response with pairs, summary, and metadata."},"CooccurrenceSummaryResponse":{"properties":{"total_analyses":{"type":"integer","title":"Total Analyses","description":"Total analyses in the window","default":0},"total_pairs":{"type":"integer","title":"Total Pairs","description":"Unique tactic pairs with data","default":0},"strongest_pair":{"type":"string","title":"Strongest Pair","description":"Strongest correlated pair label","default":""},"strongest_correlation":{"type":"number","title":"Strongest Correlation","description":"Strongest correlation value","default":0.0},"snapshot_days":{"type":"integer","title":"Snapshot Days","description":"Days of snapshot data available","default":0}},"type":"object","title":"CooccurrenceSummaryResponse","description":"Aggregate statistics for the co-occurrence matrix."},"DomainReputationHistoryResponse":{"properties":{"domain":{"type":"string","title":"Domain","description":"Canonical domain"},"weekly_scores":{"items":{"type":"number"},"type":"array","title":"Weekly Scores","description":"Historical EWMA scores, oldest first (daily snapshots)"},"weeks":{"type":"integer","title":"Weeks","description":"Maximum number of data points","default":13}},"type":"object","required":["domain"],"title":"DomainReputationHistoryResponse","description":"Historical score series for a domain (used for trend charts).\n\nEach entry is a daily EWMA snapshot produced by the scheduler."},"DomainReputationResponse":{"properties":{"domain":{"type":"string","title":"Domain","description":"Canonical domain (e.g., 'reuters.com')"},"ewma_score":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Ewma Score","description":"EWMA-smoothed ITP score"},"raw_avg_score":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Raw Avg Score","description":"Simple average ITP score"},"article_count":{"type":"integer","minimum":0.0,"title":"Article Count","description":"Total articles analyzed in the window"},"tier":{"type":"string","title":"Tier","description":"Score tier: LOW, MODERATE, HIGH, or SEVERE"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","description":"Confidence score (0-0.95)"},"trend_slope":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trend Slope","description":"Points/week change"},"trend_direction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trend Direction","description":"'improving', 'stable', or 'worsening'"},"factor_breakdown":{"additionalProperties":{"type":"number"},"type":"object","title":"Factor Breakdown","description":"Top composite factor scores"},"min_score":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Min Score","description":"Minimum score in window","default":0.0},"max_score":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Max Score","description":"Maximum score in window","default":0.0},"weekly_scores":{"items":{"type":"number"},"type":"array","title":"Weekly Scores","description":"Historical EWMA scores for sparkline, oldest first (daily snapshots)"},"snapshot_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Date","description":"Date of the latest snapshot (ISO format)"},"window_days":{"type":"integer","title":"Window Days","description":"Rolling window in days","default":90},"is_preliminary":{"type":"boolean","title":"Is Preliminary","description":"True when article_count is below full threshold","default":false}},"type":"object","required":["domain","ewma_score","raw_avg_score","article_count","tier","confidence"],"title":"DomainReputationResponse","description":"Domain-level reputation data aggregated from news pipeline analysis."},"FeedbackExportItem":{"properties":{"content_hash":{"type":"string","title":"Content Hash"},"ai_score":{"type":"number","title":"Ai Score"},"human_scores":{"items":{"type":"number"},"type":"array","title":"Human Scores"},"human_avg":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Human Avg"},"agreement_rate":{"type":"number","title":"Agreement Rate"},"validation_count":{"type":"integer","title":"Validation Count"},"feedback_notes":{"items":{"type":"string"},"type":"array","title":"Feedback Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["content_hash","ai_score","human_scores","human_avg","agreement_rate","validation_count","feedback_notes","created_at"],"title":"FeedbackExportItem","description":"Single item in feedback export"},"FeedbackExportResponse":{"properties":{"status":{"type":"string","title":"Status"},"count":{"type":"integer","title":"Count"},"data":{"items":{"$ref":"#/components/schemas/FeedbackExportItem"},"type":"array","title":"Data"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["status","count","data","limit","offset","total"],"title":"FeedbackExportResponse","description":"Response from feedback export"},"FeedbackRequest":{"properties":{"content_hash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$","title":"Content Hash","description":"Full content hash (sha256:...)"},"helpful":{"type":"boolean","title":"Helpful","description":"True for thumbs up, False for thumbs down"}},"type":"object","required":["content_hash","helpful"],"title":"FeedbackRequest","description":"Request body for submitting analysis feedback."},"FeedbackResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"},"helpful_count":{"type":"integer","title":"Helpful Count","description":"Total thumbs up count"},"not_helpful_count":{"type":"integer","title":"Not Helpful Count","description":"Total thumbs down count"}},"type":"object","required":["helpful_count","not_helpful_count"],"title":"FeedbackResponse","description":"Response from feedback submission."},"GuidanceModel":{"properties":{"tips":{"items":{"$ref":"#/components/schemas/GuidanceTipModel"},"type":"array","title":"Tips","default":[]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"type":"object","title":"GuidanceModel","description":"Actionable guidance based on analysis results."},"GuidanceTipModel":{"properties":{"factor":{"type":"string","title":"Factor"},"tip":{"type":"string","title":"Tip"},"severity":{"type":"string","title":"Severity"}},"type":"object","required":["factor","tip","severity"],"title":"GuidanceTipModel","description":"Single actionable guidance tip."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"protocol_version":{"type":"string","title":"Protocol Version"},"scorer_id":{"type":"string","title":"Scorer Id"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"checks":{"additionalProperties":{"$ref":"#/components/schemas/ServiceCheck"},"type":"object","title":"Checks"}},"type":"object","required":["status","version","protocol_version","scorer_id","timestamp"],"title":"HealthResponse","description":"Health check response"},"LeaderboardEntryResponse":{"properties":{"rank":{"type":"integer","minimum":1.0,"title":"Rank","description":"Position in the leaderboard (1 = highest ITP score)"},"source_id":{"type":"string","title":"Source Id","description":"Unique source identifier slug"},"source_name":{"type":"string","title":"Source Name","description":"Display name of the news source"},"domain":{"type":"string","title":"Domain","description":"Website domain (e.g., examplenews.com)","default":""},"avg_score":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Avg Score","description":"Average ITP score over the period"},"tier":{"type":"string","title":"Tier","description":"Score tier: LOW, MODERATE, HIGH, or SEVERE"},"article_count":{"type":"integer","minimum":0.0,"title":"Article Count","description":"Articles analyzed in the period"},"change":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change","description":"Score change vs. previous week (positive = worsening)"},"region":{"type":"string","title":"Region","description":"Geographic region of the source","default":""},"category":{"type":"string","title":"Category","description":"News category","default":"general"},"factors":{"additionalProperties":{"type":"number"},"type":"object","title":"Factors","description":"Top composite factor scores: {factor_name: avg_score}"}},"type":"object","required":["rank","source_id","source_name","avg_score","tier","article_count"],"title":"LeaderboardEntryResponse","description":"Single source entry in the weekly leaderboard ranking."},"LeaderboardResponse":{"properties":{"week":{"type":"string","title":"Week","description":"ISO week identifier (e.g., 2026-W09)"},"period_start":{"type":"string","format":"date-time","title":"Period Start","description":"Start of the reporting period (UTC)"},"period_end":{"type":"string","format":"date-time","title":"Period End","description":"End of the reporting period (UTC)"},"summary":{"$ref":"#/components/schemas/LeaderboardSummaryResponse","description":"Aggregate statistics for the period"},"rankings":{"items":{"$ref":"#/components/schemas/LeaderboardEntryResponse"},"type":"array","title":"Rankings","description":"Sources ranked by average ITP score descending"},"trend":{"items":{"type":"number"},"type":"array","title":"Trend","description":"Weekly average scores for trend chart (oldest first)"},"min_article_threshold":{"type":"integer","title":"Min Article Threshold","description":"Minimum articles required to appear on leaderboard","default":10},"generated_at":{"type":"string","format":"date-time","title":"Generated At","description":"When this leaderboard was computed"}},"type":"object","required":["week","period_start","period_end"],"title":"LeaderboardResponse","description":"Full weekly leaderboard response with rankings, trends, and metadata."},"LeaderboardSummaryResponse":{"properties":{"articles_analyzed":{"type":"integer","title":"Articles Analyzed","description":"Total articles scored in the period","default":0},"sources_tracked":{"type":"integer","title":"Sources Tracked","description":"Total active sources tracked","default":0},"qualifying_sources":{"type":"integer","title":"Qualifying Sources","description":"Sources meeting minimum article threshold","default":0},"avg_score":{"type":"number","title":"Avg Score","description":"Mean ITP score across all sources","default":0.0},"severe_count":{"type":"integer","title":"Severe Count","description":"Number of sources in SEVERE tier","default":0}},"type":"object","title":"LeaderboardSummaryResponse","description":"Aggregate statistics for the leaderboard period."},"NCIScore":{"properties":{"version":{"type":"string","title":"Version","description":"Protocol version","default":"1.0"},"content_hash":{"type":"string","title":"Content Hash","description":"SHA-256 hash of analyzed content"},"overall":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Overall","description":"Overall manipulation score (0-100)"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","description":"Overall confidence"},"composite_factors":{"$ref":"#/components/schemas/CompositeFactors","description":"5 composite factor scores"},"risk_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Tier","description":"Risk tier: LOW, MODERATE, HIGH, or SEVERE"},"risk_emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Emoji","description":"Tier emoji indicator"},"risk_indicator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Indicator","description":"Bracket indicator per spec: ·, !, !!, !!!"},"metadata":{"$ref":"#/components/schemas/ScoreMetadata","description":"Scoring metadata"}},"type":"object","required":["content_hash","overall","confidence","composite_factors","metadata"],"title":"NCIScore","description":"Complete Manipulation Score structure per Protocol Section 2.2\n\nThis is the main output format of the protocol."},"NewsArticleResponse":{"properties":{"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"source_id":{"type":"string","title":"Source Id"},"source_name":{"type":"string","title":"Source Name","default":""},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"published_at":{"type":"string","format":"date-time","title":"Published At"},"overall_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall Score"},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence"},"language":{"type":"string","title":"Language","description":"ISO 639-1 lowercase language code","default":"en"},"top_factors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Top Factors","description":"Top 2-3 composite factors by score: [{name, score, label}]"},"analysis_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Analysis Url","description":"Link to full analysis page (/analysis/{short_id})"}},"type":"object","required":["title","url","source_id","published_at"],"title":"NewsArticleResponse","description":"Single news article with influence tactics score for showcase display."},"NewsCategory":{"type":"string","enum":["general","health","financial","fact-checking","state-media","partisan","central-bank"],"title":"NewsCategory","description":"News source categories for ICP-targeted feed browsing."},"NewsCategoryResponse":{"properties":{"category_id":{"type":"string","title":"Category Id","description":"URL-safe category identifier (e.g., 'health')"},"name":{"type":"string","title":"Name","description":"Display name (e.g., 'Health & Wellness')"},"description":{"type":"string","title":"Description","description":"Category description for UI tooltips"},"icon":{"type":"string","title":"Icon","description":"Icon identifier for frontend rendering"},"article_count":{"type":"integer","title":"Article Count","description":"Number of scored articles in this category","default":0},"source_count":{"type":"integer","title":"Source Count","description":"Number of active sources in this category","default":0},"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score","description":"Average influence tactics score across articles"}},"type":"object","required":["category_id","name","description","icon"],"title":"NewsCategoryResponse","description":"News category with statistics for category browsing."},"NewsLanguageEntry":{"properties":{"code":{"type":"string","title":"Code","description":"ISO 639-1 lowercase language code"},"label":{"type":"string","title":"Label","description":"Human-readable language name in its own locale"},"count":{"type":"integer","title":"Count","description":"Number of scored articles in this language"}},"type":"object","required":["code","label","count"],"title":"NewsLanguageEntry","description":"One language present in the news corpus."},"NewsLanguagesResponse":{"properties":{"languages":{"items":{"$ref":"#/components/schemas/NewsLanguageEntry"},"type":"array","title":"Languages","description":"Sorted by count desc; only languages with count > 0 are returned."}},"type":"object","title":"NewsLanguagesResponse","description":"Languages currently present in the analysed-news corpus."},"NewsShowcaseResponse":{"properties":{"articles":{"items":{"$ref":"#/components/schemas/NewsArticleResponse"},"type":"array","title":"Articles"},"total_count":{"type":"integer","title":"Total Count"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated"},"source_stats":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Source Stats"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"Current category filter if applied"},"categories":{"items":{"$ref":"#/components/schemas/NewsCategoryResponse"},"type":"array","title":"Categories","description":"Available categories with statistics"}},"type":"object","required":["articles","total_count"],"title":"NewsShowcaseResponse","description":"Paginated showcase feed of scored news articles."},"NewsSourceResponse":{"properties":{"source_id":{"type":"string","title":"Source Id"},"name":{"type":"string","title":"Name"},"website_url":{"type":"string","title":"Website Url"},"domain":{"type":"string","title":"Domain","description":"Canonical domain (e.g., 'reuters.com')","default":""},"region":{"type":"string","title":"Region"},"editorial_lean":{"type":"string","title":"Editorial Lean"},"category":{"type":"string","title":"Category"},"article_count":{"type":"integer","title":"Article Count","default":0},"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score"}},"type":"object","required":["source_id","name","website_url","region","editorial_lean","category"],"title":"NewsSourceResponse","description":"News source info with recent statistics."},"PerspectiveModel":{"properties":{"type":{"type":"string","title":"Type"},"summary":{"type":"string","title":"Summary"},"key_points":{"items":{"type":"string"},"type":"array","title":"Key Points"},"evidence":{"items":{"type":"string"},"type":"array","title":"Evidence"},"further_investigation":{"items":{"type":"string"},"type":"array","title":"Further Investigation","default":[]},"confidence":{"type":"number","title":"Confidence"},"score_suggestion":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score Suggestion"}},"type":"object","required":["type","summary","key_points","evidence","confidence"],"title":"PerspectiveModel","description":"Single perspective (red team, blue team, or synthesis)"},"PerspectivesModel":{"properties":{"red_team":{"$ref":"#/components/schemas/PerspectiveModel"},"blue_team":{"$ref":"#/components/schemas/PerspectiveModel"},"synthesis":{"$ref":"#/components/schemas/PerspectiveModel"},"is_balanced":{"type":"boolean","title":"Is Balanced"},"dominant_perspective":{"type":"string","title":"Dominant Perspective"},"score_disagreement":{"anyOf":[{"$ref":"#/components/schemas/ScoreDisagreementModel"},{"type":"null"}]}},"type":"object","required":["red_team","blue_team","synthesis","is_balanced","dominant_perspective"],"title":"PerspectivesModel","description":"All three perspectives"},"PropagandaModel":{"properties":{"has_propaganda":{"type":"boolean","title":"Has Propaganda"},"confidence":{"type":"number","title":"Confidence"},"techniques":{"items":{"$ref":"#/components/schemas/TechniqueModel"},"type":"array","title":"Techniques","default":[]},"technique_count":{"type":"integer","title":"Technique Count","default":0},"latency_ms":{"type":"number","title":"Latency Ms","default":0.0}},"type":"object","required":["has_propaganda","confidence"],"title":"PropagandaModel","description":"ML-based propaganda detection results."},"QuickAnalyzeRequest":{"properties":{"content":{"type":"string","maxLength":50000,"minLength":1,"title":"Content","description":"Content to analyze (1-50000 chars; under 100 chars returns skipped response)"},"content_type":{"type":"string","title":"Content Type","description":"MIME type of content","default":"text/plain"},"semantic_content_type":{"type":"string","title":"Semantic Content Type","description":"Content category hint: auto, news, social_media (§4.1.1)","default":"auto"}},"type":"object","required":["content"],"title":"QuickAnalyzeRequest","description":"Request body for quick/lightweight content analysis (optimized for social media).\n\nThis endpoint skips LLM-heavy operations like perspective generation and\ncontext-dependent category scoring, reducing latency from 8-35s to ~100-500ms.\n\nIdeal for:\n- Twitter/X.com posts\n- High-volume batch processing\n- Real-time browser extensions\n\nNote: Content under 100 chars returns a \"skipped\" response (too short for reliable analysis)."},"QuickAnalyzeResponse":{"properties":{"content_hash":{"type":"string","title":"Content Hash"},"overall_score":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Overall Score"},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence"},"composite_factors":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Composite Factors","description":"5 composite factor scores for mini-card display"},"propaganda":{"anyOf":[{"$ref":"#/components/schemas/PropagandaModel"},{"type":"null"}]},"processing_time_ms":{"type":"integer","title":"Processing Time Ms"},"status":{"type":"string","title":"Status","default":"success"},"skipped_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skipped Reason","description":"If set, content was skipped (e.g., 'too_short')"},"upgrade_prompt":{"anyOf":[{"$ref":"#/components/schemas/UpgradePrompt"},{"type":"null"}],"description":"Shown when approaching free tier limit"}},"type":"object","required":["content_hash","overall_score","confidence","processing_time_ms"],"title":"QuickAnalyzeResponse","description":"Response from quick content analysis.\n\nIncludes only essential fields for fast rendering:\n- Overall score (0-100)\n- Propaganda detection results\n- Processing latency\n\nDoes NOT include (for speed):\n- Detailed category breakdowns\n- Perspective analysis (red/blue/synthesis)\n- Guidance tips"},"ScoreDisagreementModel":{"properties":{"original_score":{"type":"number","title":"Original Score"},"synthesis_suggestion":{"type":"number","title":"Synthesis Suggestion"},"difference":{"type":"number","title":"Difference"},"direction":{"type":"string","title":"Direction"},"severity":{"type":"string","title":"Severity"}},"type":"object","required":["original_score","synthesis_suggestion","difference","direction","severity"],"title":"ScoreDisagreementModel","description":"Score disagreement between synthesis and original score."},"ScoreMetadata":{"properties":{"scorer":{"$ref":"#/components/schemas/Scorer"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"processing_time_ms":{"type":"integer","title":"Processing Time Ms","description":"Processing time in milliseconds"}},"type":"object","required":["scorer","processing_time_ms"],"title":"ScoreMetadata","description":"Metadata about score generation"},"Scorer":{"properties":{"type":{"type":"string","enum":["ai","human","oracle"],"title":"Type","description":"Type of scorer"},"identifier":{"type":"string","title":"Identifier","description":"Unique identifier for this scorer"},"version":{"type":"string","title":"Version","description":"Version of scoring implementation"}},"type":"object","required":["type","identifier","version"],"title":"Scorer","description":"Scorer metadata per Protocol Section 2.2"},"ServiceCheck":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"ServiceCheck","description":"Individual service health check result."},"SourceMetadata":{"properties":{"site_name":{"type":"string","maxLength":100,"title":"Site Name","description":"Source platform name","default":""},"title":{"type":"string","maxLength":500,"title":"Title","description":"Content title for display","default":""},"description":{"type":"string","maxLength":10000,"title":"Description","description":"Content description/text","default":""},"url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Url","description":"Link to original content"},"image":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Image","description":"Preview image URL"},"author":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Author","description":"Content author"},"linked_urls":{"items":{"type":"string","maxLength":2048},"type":"array","maxItems":10,"title":"Linked Urls","description":"External URLs referenced in the content"}},"type":"object","title":"SourceMetadata","description":"Source metadata for display on the analysis page (e.g., tweet origin info).\n\nAll URL fields are validated to only accept http/https schemes to prevent\nstored XSS via javascript: URIs rendered in template href attributes."},"TacticPairResponse":{"properties":{"tactic_a":{"type":"string","title":"Tactic A","description":"First tactic (alphabetically)"},"tactic_b":{"type":"string","title":"Tactic B","description":"Second tactic (alphabetically)"},"tactic_a_display":{"type":"string","title":"Tactic A Display","description":"Display name for tactic A","default":""},"tactic_b_display":{"type":"string","title":"Tactic B Display","description":"Display name for tactic B","default":""},"co_occurrence_count":{"type":"integer","minimum":0.0,"title":"Co Occurrence Count","description":"Times both tactics appeared together"},"total_a_count":{"type":"integer","minimum":0.0,"title":"Total A Count","description":"Times tactic A appeared"},"total_b_count":{"type":"integer","minimum":0.0,"title":"Total B Count","description":"Times tactic B appeared"},"total_analyses":{"type":"integer","minimum":0.0,"title":"Total Analyses","description":"Total analyses in window"},"correlation_strength":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Correlation Strength","description":"Jaccard similarity: co_occurrence / (total_a + total_b - co_occurrence)"},"avg_score_a":{"type":"number","minimum":0.0,"title":"Avg Score A","description":"Avg score of tactic A when co-occurring"},"avg_score_b":{"type":"number","minimum":0.0,"title":"Avg Score B","description":"Avg score of tactic B when co-occurring"}},"type":"object","required":["tactic_a","tactic_b","co_occurrence_count","total_a_count","total_b_count","total_analyses","correlation_strength","avg_score_a","avg_score_b"],"title":"TacticPairResponse","description":"A single tactic co-occurrence pair with correlation data."},"TechniqueModel":{"properties":{"name":{"type":"string","title":"Name"},"confidence":{"type":"number","title":"Confidence"},"above_threshold":{"type":"boolean","title":"Above Threshold"}},"type":"object","required":["name","confidence","above_threshold"],"title":"TechniqueModel","description":"A detected propaganda technique."},"UpgradePrompt":{"properties":{"remaining_today":{"type":"integer","title":"Remaining Today","description":"Free analyses remaining today"},"message":{"type":"string","title":"Message","description":"User-facing message about remaining quota"},"pricing_url":{"type":"string","title":"Pricing Url","description":"URL to pricing/upgrade page"}},"type":"object","required":["remaining_today","message","pricing_url"],"title":"UpgradePrompt","description":"Prompt shown to free-tier users approaching their daily limit."},"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"},"ValidationRequest":{"properties":{"content_hash":{"type":"string","title":"Content Hash","description":"Hash of content being validated"},"validator_id":{"type":"string","title":"Validator Id","description":"Unique validator identifier","default":"anonymous"},"validator_type":{"type":"string","title":"Validator Type","description":"Type of validator: human, ai, or oracle","default":"human"},"vote_agrees":{"type":"boolean","title":"Vote Agrees","description":"Whether validator agrees with the AI score"},"vote_score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Vote Score","description":"Optional corrected score"},"vote_confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Vote Confidence","description":"Confidence in validation","default":0.5},"feedback":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Feedback","description":"Structured feedback: {notes, missing_factors, ...}"},"notes":{"type":"string","title":"Notes","description":"Optional text notes (legacy, prefer feedback.notes)","default":""}},"type":"object","required":["content_hash","vote_agrees"],"title":"ValidationRequest","description":"Request body for validation submission (Protocol Section 4.1.3)"},"ValidationResponse":{"properties":{"status":{"type":"string","title":"Status"},"validation_id":{"type":"string","title":"Validation Id"},"content_hash":{"type":"string","title":"Content Hash"},"message":{"type":"string","title":"Message"}},"type":"object","required":["status","validation_id","content_hash","message"],"title":"ValidationResponse","description":"Response from validation submission"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}