{"openapi":"3.1.0","info":{"title":"Priolix","description":"Evidence-based natural supplement knowledge base API","version":"1.0.0"},"paths":{"/benchmark":{"get":{"summary":"Benchmark Page","operationId":"benchmark_page_benchmark_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/about":{"get":{"summary":"About Page","operationId":"about_page_about_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/disclaimer":{"get":{"summary":"Disclaimer Page","operationId":"disclaimer_page_disclaimer_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/editorial-policy":{"get":{"summary":"Editorial Policy Page","operationId":"editorial_policy_page_editorial_policy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/methodology":{"get":{"summary":"Methodology Page","operationId":"methodology_page_methodology_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/privacy":{"get":{"summary":"Privacy Policy Page","operationId":"privacy_policy_page_privacy_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/terms":{"get":{"summary":"Terms Of Service Page","operationId":"terms_of_service_page_terms_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/contact":{"get":{"summary":"Contact Page","operationId":"contact_page_contact_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/cookies":{"get":{"summary":"Cookie Policy Page","operationId":"cookie_policy_page_cookies_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/accessibility":{"get":{"summary":"Accessibility Page","operationId":"accessibility_page_accessibility_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sources-and-licenses":{"get":{"summary":"Sources And Licenses Page","operationId":"sources_and_licenses_page_sources_and_licenses_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/health":{"get":{"tags":["System"],"summary":"Api Health","operationId":"api_health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/stats":{"get":{"tags":["System"],"summary":"Api Stats","operationId":"api_stats_api_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/pipeline/status":{"get":{"tags":["System"],"summary":"Api Pipeline Status","operationId":"api_pipeline_status_api_pipeline_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/webhooks":{"get":{"tags":["System"],"summary":"List Webhooks","description":"List registered webhooks. Admin-only.","operationId":"list_webhooks_api_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["System"],"summary":"Register Webhook","description":"Register a webhook. Admin-only — webhooks can drive arbitrary outbound traffic.","operationId":"register_webhook_api_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRegister"}}},"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/feedback":{"post":{"tags":["Feedback"],"summary":"Api Feedback","operationId":"api_feedback_api_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/feedback":{"post":{"tags":["Feedback"],"summary":"Api Chat Feedback","operationId":"api_chat_feedback_api_chat_feedback_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatFeedbackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/feedback/stats":{"get":{"summary":"Api Feedback Stats","description":"Aggregated feedback stats. Admin-only — leaks user interaction patterns.","operationId":"api_feedback_stats_api_feedback_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/keys":{"post":{"tags":["System"],"summary":"Create Api Key Endpoint","description":"Create a new API key.\n\nRequires either an existing admin bearer token or, when no admin key\nexists yet, the `X-Admin-Bootstrap` header matching the\n`PRIOLIX_ADMIN_BOOTSTRAP_KEY` env var. The raw key is returned exactly\nonce in this response — store it immediately.","operationId":"create_api_key_endpoint_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"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/keys/me":{"get":{"tags":["System"],"summary":"Describe Current Key","description":"Return metadata about the caller's API key (no secret material).","operationId":"describe_current_key_api_keys_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/export/csv":{"get":{"tags":["Export"],"summary":"Export Csv","operationId":"export_csv_api_export_csv_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vertical","in":"query","required":false,"schema":{"type":"string","default":"","title":"Vertical"}},{"name":"source_class","in":"query","required":false,"schema":{"type":"string","default":"","title":"Source Class"}},{"name":"min_score","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Min Score"}},{"name":"year_from","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Year From"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/export/bibtex":{"get":{"tags":["Export"],"summary":"Export Bibtex","operationId":"export_bibtex_api_export_bibtex_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vertical","in":"query","required":false,"schema":{"type":"string","default":"","title":"Vertical"}},{"name":"min_score","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Min Score"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sources":{"get":{"tags":["Sources"],"summary":"Api Sources","operationId":"api_sources_api_sources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vertical","in":"query","required":false,"schema":{"type":"string","default":"","title":"Vertical"}},{"name":"source_class","in":"query","required":false,"schema":{"type":"string","default":"","title":"Source Class"}},{"name":"evidence_level","in":"query","required":false,"schema":{"type":"string","default":"","title":"Evidence Level"}},{"name":"min_score","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Min Score"}},{"name":"year_from","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Year From"}},{"name":"year_to","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Year To"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Page Size"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"json","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/interventions":{"get":{"tags":["Interventions"],"summary":"Api Interventions","operationId":"api_interventions_api_interventions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vertical","in":"query","required":false,"schema":{"type":"string","default":"","title":"Vertical"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/gaps":{"get":{"tags":["Interventions"],"summary":"Api Gaps","operationId":"api_gaps_api_gaps_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"vertical","in":"query","required":false,"schema":{"type":"string","default":"","title":"Vertical"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/trending":{"get":{"tags":["Trending"],"summary":"Api Trending","operationId":"api_trending_api_trending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","default":12,"title":"Months"}},{"name":"min_score","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Min Score"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask":{"post":{"summary":"Api Ask","description":"Ask a health question and get an evidence-backed answer.","operationId":"api_ask_api_ask_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/ask/stream":{"post":{"tags":["Q&A"],"summary":"Api Ask Stream","description":"Streaming Q&A endpoint using Server-Sent Events.","operationId":"api_ask_stream_api_ask_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/products":{"get":{"tags":["Products"],"summary":"Api Products","operationId":"api_products_api_products_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"supplement","in":"query","required":false,"schema":{"type":"string","default":"","title":"Supplement"}},{"name":"brand","in":"query","required":false,"schema":{"type":"string","default":"","title":"Brand"}},{"name":"form","in":"query","required":false,"schema":{"type":"string","default":"","title":"Form"}},{"name":"on_market","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"On Market"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Page Size"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/products/{dsld_id}":{"get":{"tags":["Products"],"summary":"Api Product Detail","operationId":"api_product_detail_api_products__dsld_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dsld_id","in":"path","required":true,"schema":{"type":"integer","title":"Dsld Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/market/{supplement_slug}":{"get":{"tags":["Products"],"summary":"Api Market Profile","operationId":"api_market_profile_api_market__supplement_slug__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"supplement_slug","in":"path","required":true,"schema":{"type":"string","title":"Supplement Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/brands":{"get":{"tags":["Products"],"summary":"Api Brands","operationId":"api_brands_api_brands_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"supplement","in":"query","required":false,"schema":{"type":"string","default":"","title":"Supplement"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/label-image/stats":{"get":{"tags":["Products"],"summary":"Label Image Stats","description":"Coverage stats for the DSLD label image extraction pipeline.\n\nCounts on-disk WebP/JPG/PNG renders vs on-market products and the\nknown-404 skiplist, so ops can monitor ingest progress without shelling in.\n\nResult is cached for 30s — disk state changes slowly and this endpoint\nwalks ~134k files per call.","operationId":"label_image_stats_api_label_image_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/label-image/{dsld_id}":{"post":{"tags":["Products"],"summary":"Upload Label Image","operationId":"upload_label_image_api_label_image__dsld_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dsld_id","in":"path","required":true,"schema":{"type":"integer","title":"Dsld Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_label_image_api_label_image__dsld_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Products"],"summary":"List Label Images","operationId":"list_label_images_api_label_image__dsld_id__get","parameters":[{"name":"dsld_id","in":"path","required":true,"schema":{"type":"integer","title":"Dsld Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/label-image/{image_id}/vote":{"post":{"tags":["Products"],"summary":"Vote Label Image","operationId":"vote_label_image_api_label_image__image_id__vote_post","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"integer","title":"Image Id"}},{"name":"direction","in":"query","required":true,"schema":{"type":"string","pattern":"^(up|down)$","title":"Direction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/label-image/{dsld_id}/set-primary/{image_id}":{"post":{"tags":["Products"],"summary":"Set Primary Image","operationId":"set_primary_image_api_label_image__dsld_id__set_primary__image_id__post","parameters":[{"name":"dsld_id","in":"path","required":true,"schema":{"type":"integer","title":"Dsld Id"}},{"name":"image_id","in":"path","required":true,"schema":{"type":"integer","title":"Image Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/product/{dsld_id}":{"get":{"summary":"Product Page","description":"Individual product page with evidence overlay.","operationId":"product_page_product__dsld_id__get","parameters":[{"name":"dsld_id","in":"path","required":true,"schema":{"type":"integer","title":"Dsld Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/favicon.ico":{"get":{"summary":"Favicon","operationId":"favicon_favicon_ico_get","responses":{"200":{"description":"Successful Response"}}}},"/.well-known/security.txt":{"get":{"summary":"Security Txt","operationId":"security_txt__well_known_security_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/robots.txt":{"get":{"summary":"Robots Txt","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap Index","operationId":"sitemap_index_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sitemap-static.xml":{"get":{"summary":"Sitemap Static","operationId":"sitemap_static_sitemap_static_xml_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sitemap-supplements.xml":{"get":{"summary":"Sitemap Supplements","operationId":"sitemap_supplements_sitemap_supplements_xml_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sitemap-conditions.xml":{"get":{"summary":"Sitemap Conditions","operationId":"sitemap_conditions_sitemap_conditions_xml_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sitemap-interactions.xml":{"get":{"summary":"Sitemap Interactions","operationId":"sitemap_interactions_sitemap_interactions_xml_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sitemap-articles.xml":{"get":{"summary":"Sitemap Articles","operationId":"sitemap_articles_sitemap_articles_xml_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sitemap-biomarkers.xml":{"get":{"summary":"Sitemap Biomarkers","operationId":"sitemap_biomarkers_sitemap_biomarkers_xml_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/sitemap-products-{chunk_num}.xml":{"get":{"summary":"Sitemap Products Chunk","operationId":"sitemap_products_chunk_sitemap_products__chunk_num__xml_get","parameters":[{"name":"chunk_num","in":"path","required":true,"schema":{"type":"integer","title":"Chunk Num"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/drugs/suggest":{"get":{"tags":["Interactions"],"summary":"Api Drugs Suggest","description":"Autocomplete suggestions for the medications field on /blood-test.\n\nPrefix matches rank before substring matches; shorter names win within\na tier. Returns pretty display strings (title-cased, hyphens → spaces).","operationId":"api_drugs_suggest_api_drugs_suggest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":0,"maxLength":60,"default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/interactions/check":{"get":{"tags":["Interactions"],"summary":"Api Interaction Check","operationId":"api_interaction_check_api_interactions_check_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"supplement","in":"query","required":false,"schema":{"type":"string","default":"","title":"Supplement"}},{"name":"drug","in":"query","required":false,"schema":{"type":"string","default":"","title":"Drug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/interactions":{"get":{"tags":["Interactions"],"summary":"Api Interactions List","operationId":"api_interactions_list_api_interactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"supplement","in":"query","required":false,"schema":{"type":"string","default":"","title":"Supplement"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brands":{"get":{"summary":"Brand Directory","operationId":"brand_directory_brands_get","parameters":[{"name":"letter","in":"query","required":false,"schema":{"type":"string","default":"","title":"Letter"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/brands/{brand_slug}":{"get":{"summary":"Brand Detail","operationId":"brand_detail_brands__brand_slug__get","parameters":[{"name":"brand_slug","in":"path","required":true,"schema":{"type":"string","title":"Brand Slug"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"supplement","in":"query","required":false,"schema":{"type":"string","default":"","title":"Supplement"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conditions":{"get":{"summary":"Condition Index","description":"Condition index — browse all conditions with supplement evidence.","operationId":"condition_index_conditions_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/conditions/{condition_slug}":{"get":{"summary":"Condition Detail","description":"Condition landing page — supplements with evidence for this condition.","operationId":"condition_detail_conditions__condition_slug__get","parameters":[{"name":"condition_slug","in":"path","required":true,"schema":{"type":"string","title":"Condition Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/interactions":{"get":{"summary":"Interactions Index","description":"Interaction checker — browse and check drug-supplement interactions.","operationId":"interactions_index_interactions_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/interactions/{interaction_slug}":{"get":{"summary":"Interaction Detail","description":"Individual interaction detail page — SEO-optimized.","operationId":"interaction_detail_interactions__interaction_slug__get","parameters":[{"name":"interaction_slug","in":"path","required":true,"schema":{"type":"string","title":"Interaction Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/articles":{"get":{"summary":"Article Index","description":"Article index page — grouped by supplement.","operationId":"article_index_articles_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/articles/{slug}":{"get":{"summary":"Article Detail","description":"View a single article page.","operationId":"article_detail_articles__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/graph-data":{"get":{"summary":"Graph Data","description":"Return JSON nodes + edges for graph visualization.","operationId":"graph_data_graph_data_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/graph":{"get":{"summary":"Graph View","description":"Interactive knowledge graph visualization.","operationId":"graph_view_graph_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/supplements":{"get":{"summary":"Supplement Directory","description":"Supplement directory — browse all 106 supplements with market data.","operationId":"supplement_directory_supplements_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","default":"","title":"Category"}},{"name":"tradition","in":"query","required":false,"schema":{"type":"string","default":"","title":"Tradition"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/supplements/{slug}":{"get":{"summary":"Supplement Detail V2","description":"v2 prototype — Stripe-docs-style supplement detail page.\n\nReuses the same cached render_context as the v1 route; renders against\nsupplement_detail_v2.html. If the v1 cache is cold, falls back to a redirect\nto prime the cache.","operationId":"supplement_detail_v2_v2_supplements__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/supplements/{slug}":{"get":{"summary":"Supplement Detail","description":"Supplement detail — evidence, marketplace data, clickable pills.","operationId":"supplement_detail_supplements__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/supplements/{slug}/best":{"get":{"summary":"Best Supplement","description":"Best [Supplement] ranking page — products sorted by safety + evidence.","operationId":"best_supplement_supplements__slug__best_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/evidence/{vertical}":{"get":{"summary":"Vertical Evidence Summary","description":"View a vertical-specific evidence summary article (e.g. magnesium-sleep).","operationId":"vertical_evidence_summary_evidence__vertical__get","parameters":[{"name":"vertical","in":"path","required":true,"schema":{"type":"string","title":"Vertical"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/supplements/{slug}/products":{"get":{"summary":"Supplement Products","description":"Filtered product list for a supplement.","operationId":"supplement_products_supplements__slug__products_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"form","in":"query","required":false,"schema":{"type":"string","default":"","title":"Form"}},{"name":"brand","in":"query","required":false,"schema":{"type":"string","default":"","title":"Brand"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/search":{"get":{"summary":"Search","description":"Unified search: keyword matching + semantic evidence retrieval.","operationId":"search_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"type_filter","in":"query","required":false,"schema":{"type":"string","default":"","title":"Type Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/search/evidence":{"get":{"summary":"Search Evidence Endpoint","description":"Semantic evidence search using embeddings and ranking.","operationId":"search_evidence_endpoint_search_evidence_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Top K"}},{"name":"source_class","in":"query","required":false,"schema":{"type":"string","default":"","title":"Source Class"}},{"name":"exclude_off_plan","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Exclude Off Plan"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/explore/entities":{"get":{"summary":"Explore Entities","description":"Redirect to supplement directory.","operationId":"explore_entities_explore_entities_get","parameters":[{"name":"entity_type","in":"query","required":false,"schema":{"type":"string","default":"","title":"Entity Type"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/explore/sources":{"get":{"summary":"Explore Sources","description":"Source evidence browser — list all research sources.","operationId":"explore_sources_explore_sources_get","parameters":[{"name":"source_class","in":"query","required":false,"schema":{"type":"string","default":"","title":"Source Class"}},{"name":"year","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Year"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Dashboard","description":"Homepage — hero search + supplement grid + marketplace data.","operationId":"dashboard__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/chat":{"get":{"summary":"Chat Page","description":"Interactive Q&A chat with evidence-backed answers.","operationId":"chat_page_chat_get","parameters":[{"name":"about","in":"query","required":false,"schema":{"type":"string","default":"","title":"About"}},{"name":"seed","in":"query","required":false,"schema":{"type":"string","default":"","title":"Seed"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/retailer":{"get":{"summary":"Retailer Dashboard","description":"Retailer-focused dashboard showing supplement evidence summaries.","operationId":"retailer_dashboard_retailer_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/page/{page_path}":{"get":{"summary":"View Page","description":"View a wiki or output page.","operationId":"view_page_page__page_path__get","parameters":[{"name":"page_path","in":"path","required":true,"schema":{"type":"string","title":"Page Path"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/mockup/product/{dsld_id}":{"get":{"summary":"Mockup Product","description":"v2 mockup — product_detail. Reuses cached render_context if available.","operationId":"mockup_product_v2_mockup_product__dsld_id__get","parameters":[{"name":"dsld_id","in":"path","required":true,"schema":{"type":"integer","title":"Dsld Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/mockup/search":{"get":{"summary":"Mockup Search","description":"v2 mockup — search. Groups results by entity type.","operationId":"mockup_search_v2_mockup_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/mockup/chat":{"get":{"summary":"Mockup Chat","description":"v2 mockup — chat. Full-bleed conversation with optional entity rail.","operationId":"mockup_chat_v2_mockup_chat_get","parameters":[{"name":"about","in":"query","required":false,"schema":{"type":"string","default":"","title":"About"}},{"name":"seed","in":"query","required":false,"schema":{"type":"string","default":"","title":"Seed"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/blood-test":{"get":{"summary":"Blood Test Upload Page","description":"Upload form page.","operationId":"blood_test_upload_page_blood_test_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/urine-test":{"get":{"summary":"Blood Test Upload Page","description":"Upload form page.","operationId":"blood_test_upload_page_urine_test_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/lab-test":{"get":{"summary":"Blood Test Upload Page","description":"Upload form page.","operationId":"blood_test_upload_page_lab_test_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/blood-test/upload":{"post":{"summary":"Blood Test Upload","description":"Process uploaded lab test file.\n\nAccepts PDF, PNG, JPG, WEBP. Extracts biomarkers via GPT-4o vision,\ncross-references against bloodwork.db and sources.db, stores results\nin encrypted session cookie, redirects to results page.","operationId":"blood_test_upload_blood_test_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_blood_test_upload_blood_test_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/urine-test/upload":{"post":{"summary":"Blood Test Upload","description":"Process uploaded lab test file.\n\nAccepts PDF, PNG, JPG, WEBP. Extracts biomarkers via GPT-4o vision,\ncross-references against bloodwork.db and sources.db, stores results\nin encrypted session cookie, redirects to results page.","operationId":"blood_test_upload_urine_test_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_blood_test_upload_urine_test_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lab-test/upload":{"post":{"summary":"Blood Test Upload","description":"Process uploaded lab test file.\n\nAccepts PDF, PNG, JPG, WEBP. Extracts biomarkers via GPT-4o vision,\ncross-references against bloodwork.db and sources.db, stores results\nin encrypted session cookie, redirects to results page.","operationId":"blood_test_upload_lab_test_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_blood_test_upload_lab_test_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/blood-test/results":{"get":{"summary":"Blood Test Results Page","description":"Display lab test analysis results.\n\nLoad order:\n  1. explicit ?report_id= + device cookie (permanent storage)\n  2. signed session cookie (now holds report_id, loads from DB)\n  3. latest report for device_id (permanent storage)","operationId":"blood_test_results_page_blood_test_results_get","parameters":[{"name":"report_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/urine-test/results":{"get":{"summary":"Blood Test Results Page","description":"Display lab test analysis results.\n\nLoad order:\n  1. explicit ?report_id= + device cookie (permanent storage)\n  2. signed session cookie (now holds report_id, loads from DB)\n  3. latest report for device_id (permanent storage)","operationId":"blood_test_results_page_urine_test_results_get","parameters":[{"name":"report_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/urine-test/results/export-pdf":{"get":{"summary":"Blood Test Export Pdf","description":"Export a doctor-visit prep PDF for the current results.","operationId":"blood_test_export_pdf_urine_test_results_export_pdf_get","parameters":[{"name":"report_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/blood-test/results/export-pdf":{"get":{"summary":"Blood Test Export Pdf","description":"Export a doctor-visit prep PDF for the current results.","operationId":"blood_test_export_pdf_blood_test_results_export_pdf_get","parameters":[{"name":"report_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/blood-test/clear":{"post":{"summary":"Blood Test Clear","description":"Clear lab test results from session.","operationId":"blood_test_clear_blood_test_clear_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/urine-test/clear":{"post":{"summary":"Blood Test Clear","description":"Clear lab test results from session.","operationId":"blood_test_clear_urine_test_clear_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blood-test/status":{"get":{"summary":"Blood Test Status","description":"Check if blood test results are available (session cookie or device DB).","operationId":"blood_test_status_api_blood_test_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/account/export":{"get":{"summary":"Account Data Export","description":"GDPR Art. 20 Data Portability Export.\nReturns all stored reports, biomarker history, and supplement logs for the current device_id.","operationId":"account_data_export_api_account_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/urine-test/reports":{"get":{"summary":"Blood Test Reports List","description":"List all saved reports for this device.","operationId":"blood_test_reports_list_urine_test_reports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/blood-test/reports":{"get":{"summary":"Blood Test Reports List","description":"List all saved reports for this device.","operationId":"blood_test_reports_list_blood_test_reports_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/urine-test/reports/{report_id}/delete":{"post":{"summary":"Blood Test Report Delete","description":"Delete a single saved report for this device.","operationId":"blood_test_report_delete_urine_test_reports__report_id__delete_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/blood-test/reports/{report_id}/delete":{"post":{"summary":"Blood Test Report Delete","description":"Delete a single saved report for this device.","operationId":"blood_test_report_delete_blood_test_reports__report_id__delete_post","parameters":[{"name":"report_id","in":"path","required":true,"schema":{"type":"string","title":"Report Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/urine-test/reports/delete-all":{"post":{"summary":"Blood Test Reports Delete All","description":"Wipe all stored reports and clear device_id cookie.","operationId":"blood_test_reports_delete_all_urine_test_reports_delete_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/blood-test/reports/delete-all":{"post":{"summary":"Blood Test Reports Delete All","description":"Wipe all stored reports and clear device_id cookie.","operationId":"blood_test_reports_delete_all_blood_test_reports_delete_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/urine-test/supplement-log":{"post":{"summary":"Supplement Log Add","description":"Log that a user started taking a supplement.","operationId":"supplement_log_add_urine_test_supplement_log_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/blood-test/supplement-log":{"post":{"summary":"Supplement Log Add","description":"Log that a user started taking a supplement.","operationId":"supplement_log_add_blood_test_supplement_log_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/urine-test/supplement-log/{log_id}/stop":{"post":{"summary":"Supplement Log Stop","description":"Mark a supplement as stopped.","operationId":"supplement_log_stop_urine_test_supplement_log__log_id__stop_post","parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"integer","title":"Log Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/blood-test/supplement-log/{log_id}/stop":{"post":{"summary":"Supplement Log Stop","description":"Mark a supplement as stopped.","operationId":"supplement_log_stop_blood_test_supplement_log__log_id__stop_post","parameters":[{"name":"log_id","in":"path","required":true,"schema":{"type":"integer","title":"Log Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/blood-test/supplement-log":{"get":{"summary":"Supplement Log List Api","description":"JSON API: list supplement log entries for this device.","operationId":"supplement_log_list_api_api_blood_test_supplement_log_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/blood-test/intervention-insights":{"get":{"summary":"Intervention Insights Api","description":"JSON API: get intervention insights for this device.","operationId":"intervention_insights_api_api_blood_test_intervention_insights_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/urine-test/trends":{"get":{"summary":"Blood Test Trends Page","description":"Render biomarker trend sparklines for this device.","operationId":"blood_test_trends_page_urine_test_trends_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/blood-test/trends":{"get":{"summary":"Blood Test Trends Page","description":"Render biomarker trend sparklines for this device.","operationId":"blood_test_trends_page_blood_test_trends_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/biomarkers":{"get":{"summary":"Biomarker Directory","description":"Browse all tracked biomarkers with reference ranges.","operationId":"biomarker_directory_biomarkers_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","default":"","title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/biomarkers/{slug}":{"get":{"summary":"Biomarker Detail","description":"Detail page for a single biomarker — ranges, interpretation, linked resources.","operationId":"biomarker_detail_biomarkers__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wearables/connect/{vendor_slug}":{"get":{"summary":"Connect","description":"Start the OAuth dance by redirecting to the vendor's authorize URL.\n\nGenerates a CSRF-safe state token + PKCE verifier (for vendors that\nuse PKCE), persists them server-side keyed by state, then redirects.","operationId":"connect_wearables_connect__vendor_slug__get","parameters":[{"name":"vendor_slug","in":"path","required":true,"schema":{"type":"string","title":"Vendor Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wearables/callback/{vendor_slug}":{"get":{"summary":"Callback","description":"Vendor redirects back here with ?code= and ?state=.\n\nWe verify the state, swap the code for tokens, store encrypted, and\nredirect to a success page.","operationId":"callback_wearables_callback__vendor_slug__get","parameters":[{"name":"vendor_slug","in":"path","required":true,"schema":{"type":"string","title":"Vendor Slug"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wearables/disconnect/{vendor_slug}":{"post":{"summary":"Disconnect","operationId":"disconnect_wearables_disconnect__vendor_slug__post","parameters":[{"name":"vendor_slug","in":"path","required":true,"schema":{"type":"string","title":"Vendor Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wearables/status":{"get":{"summary":"Status","description":"JSON connection status for the current device (for UI state).","operationId":"status_wearables_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/wearables":{"get":{"summary":"Wearables Landing","description":"Landing page linking to Apple Health upload + available OAuth vendors.","operationId":"wearables_landing_wearables_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/wearables/apple-health":{"get":{"summary":"Apple Health Upload Page","operationId":"apple_health_upload_page_wearables_apple_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Apple Health Upload","description":"Accept an Apple Health export (ZIP containing export.xml, or raw XML).\n\nStream-parses into an AppleHealthBundle, maps FHIR clinical records to\nbiomarkers via LOINC, persists daily wearable vitals, and (if any\nbiomarkers were extracted) saves them as a normal report so they show\nup in the blood-test results flow with source_type='apple_health_xml'.","operationId":"apple_health_upload_wearables_apple_health_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_apple_health_upload_wearables_apple_health_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/wearables/success":{"get":{"summary":"Wearables Success","description":"Landing after a wearable-only upload (no lab records extracted).","operationId":"wearables_success_wearables_success_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/wearables/data":{"get":{"summary":"Wearables Data","description":"Show connections + imported-data summary + delete controls.","operationId":"wearables_data_wearables_data_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/wearables/data/delete-wearable-data":{"post":{"summary":"Delete Wearable Data Endpoint","description":"Wipe every wearable_daily row for this device.","operationId":"delete_wearable_data_endpoint_wearables_data_delete_wearable_data_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/wearables/data/delete-all":{"post":{"summary":"Delete All Endpoint","description":"Nuclear option — wipe every piece of device-scoped data:\nwearable_daily, OAuth connections, blood reports, supplement log.","operationId":"delete_all_endpoint_wearables_data_delete_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/developers":{"get":{"summary":"Developers Landing","operationId":"developers_landing_developers_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/developers/health-ai":{"get":{"summary":"Developers Health Ai","operationId":"developers_health_ai_developers_health_ai_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/developers/labs":{"get":{"summary":"Developers Labs","operationId":"developers_labs_developers_labs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/developers/supplement-retail":{"get":{"summary":"Developers Supplement Retail","operationId":"developers_supplement_retail_developers_supplement_retail_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/developers/playground":{"get":{"summary":"Developers Playground","operationId":"developers_playground_developers_playground_get","parameters":[{"name":"key","in":"query","required":false,"schema":{"type":"string","default":"","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developers/docs":{"get":{"summary":"Developers Docs","operationId":"developers_docs_developers_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/developers/reference":{"get":{"summary":"Developers Reference","operationId":"developers_reference_developers_reference_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/developers/sandbox":{"get":{"summary":"Developers Sandbox Form","operationId":"developers_sandbox_form_developers_sandbox_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"summary":"Developers Sandbox Issue","operationId":"developers_sandbox_issue_developers_sandbox_post","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/developers/dashboard":{"get":{"summary":"Developers Dashboard","description":"Per-key usage dashboard.\n\nThe dashboard accepts the bearer in the `?key=` query param OR the\n`Authorization` header so users can paste-link from the playground/sandbox\nflow without typing it again.","operationId":"developers_dashboard_developers_dashboard_get","parameters":[{"name":"key","in":"query","required":false,"schema":{"type":"string","default":"","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/developers/changelog":{"get":{"summary":"Developers Changelog","operationId":"developers_changelog_developers_changelog_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/developers/changelog.rss":{"get":{"summary":"Developers Changelog Rss","description":"RSS 2.0 feed of the changelog. Lets buyers/integrators subscribe.","operationId":"developers_changelog_rss_developers_changelog_rss_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/developers/eval-reports":{"get":{"summary":"Developers Eval Reports","description":"Public eval transparency page — auto-rendered from data/autoresearch/*.json.","operationId":"developers_eval_reports_developers_eval_reports_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/developers/usage":{"get":{"tags":["Developers"],"summary":"Api Developers Usage","description":"Return today's usage counters for the caller's key.","operationId":"api_developers_usage_api_developers_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/evidence/search":{"get":{"tags":["v1"],"summary":"Search the evidence corpus","description":"Retrieve ranked, citation-grounded evidence sources from the Priolix biomedical corpus. Results include quality scores, evidence tiers, PMID/DOI identifiers, and ranking rationale. Requires an API key.\n\nThe cross-encoder reranker activates automatically for long queries (>=10 words) and for queries with typo or drug-interaction signals. The `reranker_used` field indicates whether it ran.","operationId":"evidence_search_v1_evidence_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Search query (natural language or keywords)","title":"Q"},"description":"Search query (natural language or keywords)"},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Number of results to return (1-50)","default":15,"title":"Top K"},"description":"Number of results to return (1-50)"},{"name":"min_quality_tier","in":"query","required":false,"schema":{"type":"string","description":"Minimum quality tier filter: A, B, C, D (empty = no filter)","default":"","title":"Min Quality Tier"},"description":"Minimum quality tier filter: A, B, C, D (empty = no filter)"},{"name":"source_class","in":"query","required":false,"schema":{"type":"string","description":"Filter by source class: pubmed_article, clinical_trial, guideline, etc.","default":"","title":"Source Class"},"description":"Filter by source class: pubmed_article, clinical_trial, guideline, etc."},{"name":"vertical","in":"query","required":false,"schema":{"type":"string","description":"Filter by intervention-condition vertical (e.g. magnesium-sleep)","default":"","title":"Vertical"},"description":"Filter by intervention-condition vertical (e.g. magnesium-sleep)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceSearchResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AskRequest":{"properties":{"question":{"type":"string","title":"Question"},"output_type":{"type":"string","title":"Output Type","default":""},"top_k":{"type":"integer","title":"Top K","default":10}},"type":"object","required":["question"],"title":"AskRequest"},"AskResponse":{"properties":{"question":{"type":"string","title":"Question"},"output_type":{"type":"string","title":"Output Type"},"answer":{"type":"string","title":"Answer"},"sources":{"items":{},"type":"array","title":"Sources"},"confidence":{"type":"string","title":"Confidence"},"evidence_summary":{"type":"string","title":"Evidence Summary"}},"type":"object","required":["question","output_type","answer","sources","confidence","evidence_summary"],"title":"AskResponse"},"Body_apple_health_upload_wearables_apple_health_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_apple_health_upload_wearables_apple_health_post"},"Body_blood_test_upload_blood_test_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"medications":{"type":"string","title":"Medications","default":""},"health_consent":{"type":"string","title":"Health Consent","default":""},"patient_sex":{"type":"string","title":"Patient Sex","default":""}},"type":"object","required":["file"],"title":"Body_blood_test_upload_blood_test_upload_post"},"Body_blood_test_upload_lab_test_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"medications":{"type":"string","title":"Medications","default":""},"health_consent":{"type":"string","title":"Health Consent","default":""},"patient_sex":{"type":"string","title":"Patient Sex","default":""}},"type":"object","required":["file"],"title":"Body_blood_test_upload_lab_test_upload_post"},"Body_blood_test_upload_urine_test_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"medications":{"type":"string","title":"Medications","default":""},"health_consent":{"type":"string","title":"Health Consent","default":""},"patient_sex":{"type":"string","title":"Patient Sex","default":""}},"type":"object","required":["file"],"title":"Body_blood_test_upload_urine_test_upload_post"},"Body_upload_label_image_api_label_image__dsld_id__post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_label_image_api_label_image__dsld_id__post"},"ChatFeedbackRequest":{"properties":{"question":{"type":"string","title":"Question"},"answer":{"type":"string","title":"Answer"},"helpful":{"type":"boolean","title":"Helpful"}},"type":"object","required":["question","answer","helpful"],"title":"ChatFeedbackRequest"},"CreateApiKeyRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name","default":"default"},"is_admin":{"type":"boolean","title":"Is Admin","default":false},"plan":{"type":"string","maxLength":32,"minLength":1,"title":"Plan","default":"free"},"rpm_limit":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Rpm Limit"},"daily_limit":{"anyOf":[{"type":"integer","maximum":10000000.0,"minimum":0.0},{"type":"null"}],"title":"Daily Limit"},"scopes":{"type":"string","maxLength":500,"title":"Scopes","default":""}},"type":"object","title":"CreateApiKeyRequest"},"ErrorResponse":{"properties":{"error":{"type":"string","title":"Error"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"Standard error envelope for /v1 endpoints."},"EvidenceHit":{"properties":{"source_id":{"type":"string","title":"Source Id","description":"Internal source identifier (e.g. 'pmid-12345678' or 'interaction-xyz')"},"pmid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pmid","description":"PubMed ID, if available"},"doi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doi","description":"DOI, if available"},"title":{"type":"string","title":"Title","description":"Source title"},"abstract_or_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abstract Or Summary","description":"Abstract or summary excerpt (up to ~500 chars)"},"quality_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Quality Score","description":"Numerical quality score (0-100)"},"quality_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quality Tier","description":"Quality tier label: A (Strong), B (Moderate), C (Limited), D (Preliminary)"},"evidence_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Evidence Level","description":"Study design: meta_analysis, systematic_review, rct, clinical_trial, etc."},"source_class":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Class","description":"Source class: pubmed_article, clinical_trial, guideline, cochrane_review, etc."},"rank_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rank Score","description":"Composite ranking score (RRF + quality + recency bonuses)"},"rank_reasons":{"items":{"type":"string"},"type":"array","title":"Rank Reasons","description":"Ranking signals that contributed: bm25, semantic, rrf_primary, etc."},"year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year","description":"Publication year"},"vertical":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vertical","description":"Intervention-condition vertical (e.g. 'magnesium-sleep')"},"sample_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Size","description":"Study sample size descriptor"},"population":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Population","description":"Study population descriptor"}},"type":"object","required":["source_id","title"],"title":"EvidenceHit","description":"A single evidence source returned by the search pipeline."},"EvidenceSearchResponse":{"properties":{"query":{"type":"string","title":"Query","description":"The search query that was executed"},"retrieval_version":{"type":"string","title":"Retrieval Version","description":"Retrieval pipeline version identifier","default":"2026.04.27-rerank-router"},"index_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Index Version","description":"FAISS index build timestamp or hash"},"results":{"items":{"$ref":"#/components/schemas/EvidenceHit"},"type":"array","title":"Results","description":"Ranked evidence hits"},"total_returned":{"type":"integer","title":"Total Returned","description":"Number of results in this response","default":0},"latency_ms":{"type":"integer","title":"Latency Ms","description":"End-to-end retrieval latency in milliseconds","default":0},"reranker_used":{"type":"boolean","title":"Reranker Used","description":"Whether the cross-encoder reranker was applied to this query","default":false}},"type":"object","required":["query"],"title":"EvidenceSearchResponse","description":"Response envelope for GET /v1/evidence/search."},"FeedbackRequest":{"properties":{"query":{"type":"string","title":"Query"},"source_id":{"type":"string","title":"Source Id"},"relevant":{"type":"boolean","title":"Relevant"}},"type":"object","required":["query","source_id","relevant"],"title":"FeedbackRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"},"WebhookRegister":{"properties":{"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":[]}},"type":"object","required":["url"],"title":"WebhookRegister"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}