{"openapi":"3.1.0","info":{"title":"ML API","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Index","operationId":"index__get","parameters":[{"name":"mode","in":"query","required":false,"schema":{"type":"string","default":"ml","title":"Mode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/system-info":{"get":{"summary":"System Info","operationId":"system_info_system_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/app-config":{"get":{"summary":"App Config","description":"Return runtime config consumed by the frontend.","operationId":"app_config_app_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/predict/{model_id}":{"post":{"summary":"Predict","operationId":"predict_predict__model_id__post","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/analyze":{"post":{"summary":"Analyze Csv","operationId":"analyze_csv_analyze_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyze_csv_analyze_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/explain":{"post":{"summary":"Explain Automl","description":"Generate an LLM explanation for an AutoML result.","operationId":"explain_automl_explain_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/models/{model_id}/export":{"get":{"summary":"Export Model","description":"Download the trained sklearn pipeline as a .pkl file.","operationId":"export_model_models__model_id__export_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/feature-engineer":{"post":{"summary":"Feature Engineer","description":"Apply feature engineering transforms to a CSV and return the result.","operationId":"feature_engineer_feature_engineer_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/optuna-explain":{"post":{"summary":"Optuna Explain","operationId":"optuna_explain_optuna_explain_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_optuna_explain_optuna_explain_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/automl/preprocess":{"post":{"summary":"Automl Preprocess","description":"Preprocess an uploaded AutoML CSV in-memory and return the result.","operationId":"automl_preprocess_automl_preprocess_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/train":{"post":{"summary":"Train Model","operationId":"train_model_train_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_train_model_train_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/model/{model_id}/download":{"get":{"summary":"Download Model","operationId":"download_model_model__model_id__download_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics":{"get":{"summary":"Get Metrics","operationId":"get_metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/models":{"get":{"summary":"List Models","operationId":"list_models_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/schemas/{model_id}":{"get":{"summary":"Get Schema","operationId":"get_schema_schemas__model_id__get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/{model_id}":{"delete":{"summary":"Delete Model","operationId":"delete_model_models__model_id__delete","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/models/{model_id}/actuals":{"get":{"summary":"Get Actuals","operationId":"get_actuals_models__model_id__actuals_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/unsupervised":{"post":{"summary":"Run Unsupervised","operationId":"run_unsupervised_unsupervised_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_run_unsupervised_unsupervised_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shap/{model_id}":{"post":{"tags":["shap"],"summary":"Compute Shap","operationId":"compute_shap_shap__model_id__post","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/shap/custom/upload":{"post":{"tags":["shap"],"summary":"Compute Shap Custom","description":"Compute SHAP for a user-uploaded sklearn Pipeline (.pkl) and a single-row CSV.","operationId":"compute_shap_custom_shap_custom_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_compute_shap_custom_shap_custom_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"}}}}}}},"/pipeline/{model_id}":{"get":{"tags":["pipeline"],"summary":"Get Pipeline","operationId":"get_pipeline_pipeline__model_id__get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/{model_id}":{"get":{"tags":["training"],"summary":"Get Training","operationId":"get_training_training__model_id__get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/drift/{model_id}":{"get":{"tags":["drift"],"summary":"Get Drift","operationId":"get_drift_drift__model_id__get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/drift/{model_id}/upload":{"post":{"tags":["drift"],"summary":"Upload Drift","operationId":"upload_drift_drift__model_id__upload_post","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional batch label, e.g. 'Week 3'","title":"Label"},"description":"Optional batch label, e.g. 'Week 3'"},{"name":"compare_to_training","in":"query","required":false,"schema":{"type":"boolean","description":"If true, always compare against training baseline instead of previous batch","default":false,"title":"Compare To Training"},"description":"If true, always compare against training baseline instead of previous batch"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_drift_drift__model_id__upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/drift/{model_id}/versions":{"get":{"tags":["drift"],"summary":"Get Drift Versions","operationId":"get_drift_versions_drift__model_id__versions_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/drift/{model_id}/history":{"get":{"tags":["drift"],"summary":"Get Drift History","operationId":"get_drift_history_drift__model_id__history_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/drift/{model_id}/explain":{"post":{"tags":["drift"],"summary":"Explain Drift","operationId":"explain_drift_drift__model_id__explain_post","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"provider","in":"query","required":false,"schema":{"type":"string","description":"LLM provider: mistral | groq | gemini | cohere","default":"mistral","title":"Provider"},"description":"LLM provider: mistral | groq | gemini | cohere"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline-builder/preprocess":{"post":{"tags":["pipeline-builder"],"summary":"Preprocess","operationId":"preprocess_pipeline_builder_preprocess_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreprocessRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreprocessResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline-builder/feature-eng":{"post":{"tags":["pipeline-builder"],"summary":"Feature Eng","operationId":"feature_eng_pipeline_builder_feature_eng_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FERequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FEResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline-builder/feature-select":{"post":{"tags":["pipeline-builder"],"summary":"Feature Select","operationId":"feature_select_pipeline_builder_feature_select_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FSRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FSResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline-builder/automl":{"post":{"tags":["pipeline-builder"],"summary":"Run Automl","operationId":"run_automl_pipeline_builder_automl_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoMLRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline-builder/optuna":{"post":{"tags":["pipeline-builder"],"summary":"Run Optuna","operationId":"run_optuna_pipeline_builder_optuna_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptunaRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline-builder/shap":{"post":{"tags":["pipeline-builder"],"summary":"Run Shap","operationId":"run_shap_pipeline_builder_shap_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SHAPRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline-builder/ensemble":{"post":{"tags":["pipeline-builder"],"summary":"Run Ensemble","operationId":"run_ensemble_pipeline_builder_ensemble_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnsembleRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline-builder/export-code":{"post":{"tags":["pipeline-builder"],"summary":"Export Code","operationId":"export_code_pipeline_builder_export_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pipeline-builder/compare":{"post":{"tags":["pipeline-builder"],"summary":"Compare","operationId":"compare_pipeline_builder_compare_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/query":{"post":{"tags":["rag"],"summary":"Rag Query","description":"Hybrid-retrieve relevant chunks then stream an LLM response as SSE.","operationId":"rag_query_rag_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/ingest":{"post":{"tags":["rag"],"summary":"Ingest Document","description":"Upload a .md, .txt, or .pdf file and index its contents.","operationId":"ingest_document_rag_ingest_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_ingest_document_rag_ingest_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/uploads":{"get":{"tags":["rag"],"summary":"List Uploads","description":"List user-uploaded document filenames (excludes the pre-seeded KB).","operationId":"list_uploads_rag_uploads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/rag/page-chunks/{source}":{"get":{"tags":["rag"],"summary":"Get Page Chunks","description":"All chunks (text/table/figure/image) sharing one source+page — powers\na citation's \"show everything else on this page\" drill-down.","operationId":"get_page_chunks_rag_page_chunks__source__get","parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}},{"name":"page","in":"query","required":true,"schema":{"type":"integer","title":"Page"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/uploads/{source}":{"delete":{"tags":["rag"],"summary":"Delete Upload","description":"Remove a previously uploaded document and its chunks from the knowledge base.","operationId":"delete_upload_rag_uploads__source__delete","parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-ingest":{"post":{"tags":["rag"],"summary":"Mm Ingest","description":"Ingest a PDF (tables/figures), a standalone image (PNG/JPG/GIF/WEBP), a\nCSV, a short video (MP4/MOV/WEBM/AVI/MKV), or a standalone audio file\n(MP3/WAV/M4A/OGG/FLAC/AAC — transcribed the same way as a video's audio\ntrack, just with no frames to sample) into the multimodal RAG index.\nStreams progress as SSE; final event carries page_images for citation\nthumbnails (empty for CSV/audio — no page to render). Pass the same\nsession_id your /rag/query calls use so the upload is retrievable from\nthat chat session; a fresh one is generated if omitted.","operationId":"mm_ingest_rag_mm_ingest_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_mm_ingest_rag_mm_ingest_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/video/{source}":{"get":{"tags":["rag"],"summary":"Get Video","description":"Serves the raw video with basic HTTP Range support — required for\nbrowsers to seek a <video> element rather than only play from 0:00.","operationId":"get_video_rag_video__source__get","parameters":[{"name":"source","in":"path","required":true,"schema":{"type":"string","title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-similar-figures":{"get":{"tags":["rag"],"summary":"Similar Figures","description":"Find figures visually similar to the one at (source, page). Returns an\nempty list (not an error) if CLIP was never opted into for this document.","operationId":"similar_figures_rag_mm_similar_figures_get","parameters":[{"name":"source","in":"query","required":true,"schema":{"type":"string","title":"Source"}},{"name":"page","in":"query","required":true,"schema":{"type":"integer","title":"Page"}},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","default":4,"title":"Top K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-inpaint":{"post":{"tags":["rag"],"summary":"Inpaint Region","description":"Covers the given region with plain white. Returns {\"image\": <b64 PNG>}\n— a disposable edit, never persisted server-side.","operationId":"inpaint_region_rag_mm_inpaint_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InpaintRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-ai-fill":{"post":{"tags":["rag"],"summary":"Ai Fill Region","description":"Fills the blank (white) region of `image` (mode=\"fill\", the citation-\ninpainting case) or applies a free-form edit to the whole image\n(mode=\"edit\"), via Gemini image editing, guided by `prompt`. Returns\n{\"image\": <b64>} — best-effort, never persisted server-side, same\ndisposable-edit contract as /mm-inpaint.","operationId":"ai_fill_region_rag_mm_ai_fill_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiFillRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-deblur":{"post":{"tags":["rag"],"summary":"Deblur Image","description":"Returns {\"image\": <b64>} for a whole-image sharpen, or\n{\"image\", \"confidence\", \"text\"} for a region-scoped one — best-effort,\nnever persisted server-side, same disposable-edit contract as\n/mm-inpaint and /mm-ai-fill.","operationId":"deblur_image_rag_mm_deblur_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeblurRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-steganography/visualize":{"post":{"tags":["rag"],"summary":"Visualize Steganography","description":"Returns {\"image\": <b64>} — the illustrative bit-plane image (see\nextract_lsb_visualization). Computed on demand, not at ingest, since\nit's only ever needed if a user actually opens the \"Possible hidden\ndata\" dropdown option.","operationId":"visualize_steganography_rag_mm_steganography_visualize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisualizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-moire/visualize":{"post":{"tags":["rag"],"summary":"Visualize Moire","description":"Returns {\"image\": <b64>} — the illustrative FFT spectrum image (see\nextract_moire_spectrum_visualization). Computed on demand, not at\ningest, since it's only ever needed if a user opens the \"Possible\nscreen/scan pattern\" dropdown option.","operationId":"visualize_moire_rag_mm_moire_visualize_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisualizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-text-to-image/enhance-prompt":{"post":{"tags":["rag"],"summary":"Enhance Prompt","description":"Best-effort prompt expansion via the same free-tier LLM cascade used\nelsewhere in this codebase (see generation.py) — not the paid image\nmodel, so no budget check. Returns the original prompt unexpanded (with\nok=False) rather than a hard error if every provider is unavailable, so\na flaky free-tier provider never blocks the user from generating with\nwhat they already typed.","operationId":"enhance_prompt_rag_mm_text_to_image_enhance_prompt_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhancePromptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-text-to-image/describe-image":{"post":{"tags":["rag"],"summary":"Describe Image","description":"Best-effort image -> prompt description via the same free vision\ncascade already used for document captioning (Groq -> Mistral -> Gemini,\nsee routers/document/_vision.py's _vision_cascade_raw) — NOT the paid\nimage-gen model, so no budget check. Mirrors enhance_prompt's contract:\nreturns ok=False with an empty description (not a hard error) if every\nprovider fails, so a flaky free-tier provider never blocks the user.","operationId":"describe_image_rag_mm_text_to_image_describe_image_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DescribeImageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-text-to-image":{"post":{"tags":["rag"],"summary":"Generate Image","description":"Returns {\"image\": <b64>, \"mime_type\": <e.g. \"image/jpeg\">} for a\nprompt-only Gemini generation — best-effort, never persisted\nserver-side, same disposable-result contract as /mm-deblur and\n/mm-ai-fill. mime_type is whatever Gemini actually returned (observed\n\"image/jpeg\" for pure generation, not PNG — see module docstring), not\nassumed, so the frontend can build a correct data URI.","operationId":"generate_image_rag_mm_text_to_image_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextToImageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-watermark/embed":{"post":{"tags":["rag"],"summary":"Watermark Embed Endpoint","operationId":"watermark_embed_endpoint_rag_mm_watermark_embed_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatermarkEmbedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-watermark/verify":{"post":{"tags":["rag"],"summary":"Watermark Verify Endpoint","operationId":"watermark_verify_endpoint_rag_mm_watermark_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatermarkVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-plant-growth":{"post":{"tags":["rag"],"summary":"Plant Growth Endpoint","operationId":"plant_growth_endpoint_rag_mm_plant_growth_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlantGrowthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-plant-growth-group/propose":{"post":{"tags":["rag"],"summary":"Plant Growth Group Propose","operationId":"plant_growth_group_propose_rag_mm_plant_growth_group_propose_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposeGroupsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-plant-growth-group/measure":{"post":{"tags":["rag"],"summary":"Plant Growth Group Measure","operationId":"plant_growth_group_measure_rag_mm_plant_growth_group_measure_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasureGroupsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-plant-growth-species":{"post":{"tags":["rag"],"summary":"Plant Growth Species Endpoint","operationId":"plant_growth_species_endpoint_rag_mm_plant_growth_species_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeciesIdRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-qr-phishing/scan":{"post":{"tags":["rag"],"summary":"Qr Phishing Scan","operationId":"qr_phishing_scan_rag_mm_qr_phishing_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-qr-phishing/scan-url":{"post":{"tags":["rag"],"summary":"Qr Phishing Scan Url","operationId":"qr_phishing_scan_url_rag_mm_qr_phishing_scan_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-photo-search/search":{"post":{"tags":["rag"],"summary":"Photo Search","operationId":"photo_search_rag_mm_photo_search_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-photo-search/duplicates":{"post":{"tags":["rag"],"summary":"Photo Duplicates","operationId":"photo_duplicates_rag_mm_photo_search_duplicates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicatesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-adversarial/run":{"post":{"tags":["rag"],"summary":"Adversarial Run","operationId":"adversarial_run_rag_mm_adversarial_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__rag__mm_adversarial__RunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-adversarial/categories":{"get":{"tags":["rag"],"summary":"Adversarial Categories","description":"The 1000 ImageNet label strings, for the frontend's targeted-attack\nlabel picker. Triggers the lazy model load if it hasn't happened yet\n(categories come from the loaded weights' metadata).","operationId":"adversarial_categories_rag_mm_adversarial_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/rag/mm-liveness":{"post":{"tags":["rag"],"summary":"Liveness Endpoint","operationId":"liveness_endpoint_rag_mm_liveness_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LivenessRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-captcha/solve":{"post":{"tags":["rag"],"summary":"Solve Captcha","operationId":"solve_captcha_rag_mm_captcha_solve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptchaSolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-malware-image/analyze":{"post":{"tags":["rag"],"summary":"Analyze Binary","operationId":"analyze_binary_rag_mm_malware_image_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-face-cloak/run":{"post":{"tags":["rag"],"summary":"Face Cloak Run","operationId":"face_cloak_run_rag_mm_face_cloak_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__rag__mm_face_cloak__CloakRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-face-reid-demo/search":{"post":{"tags":["rag"],"summary":"Face Reid Search","operationId":"face_reid_search_rag_mm_face_reid_demo_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReidSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-crime-scene/reconstruct":{"post":{"tags":["rag"],"summary":"Reconstruct Scene","operationId":"reconstruct_scene_rag_mm_crime_scene_reconstruct_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconstructRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-rotoscope/track":{"post":{"tags":["rag"],"summary":"Track Object","operationId":"track_object_rag_mm_rotoscope_track_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_track_object_rag_mm_rotoscope_track_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-astro-anomaly/detect":{"post":{"tags":["rag"],"summary":"Astro Anomaly Detect","operationId":"astro_anomaly_detect_rag_mm_astro_anomaly_detect_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_astro_anomaly_detect_rag_mm_astro_anomaly_detect_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-wildlife-reid/search":{"post":{"tags":["rag"],"summary":"Wildlife Reid Search","operationId":"wildlife_reid_search_rag_mm_wildlife_reid_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WildlifeReidRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-ppe-compliance/check":{"post":{"tags":["rag"],"summary":"Ppe Compliance Check","operationId":"ppe_compliance_check_rag_mm_ppe_compliance_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PpeCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-style-cloak/run":{"post":{"tags":["rag"],"summary":"Style Cloak Run","operationId":"style_cloak_run_rag_mm_style_cloak_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__rag__mm_style_cloak__CloakRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-robust-training/samples":{"get":{"tags":["rag"],"summary":"Robust Training Samples","operationId":"robust_training_samples_rag_mm_robust_training_samples_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/rag/mm-robust-training/run":{"post":{"tags":["rag"],"summary":"Robust Training Run","operationId":"robust_training_run_rag_mm_robust_training_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__rag__mm_robust_training__RunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-robust-training/run-upload":{"post":{"tags":["rag"],"summary":"Robust Training Run Upload","operationId":"robust_training_run_upload_rag_mm_robust_training_run_upload_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-depth":{"post":{"tags":["rag"],"summary":"Depth Endpoint","operationId":"depth_endpoint_rag_mm_depth_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/contradictions":{"post":{"tags":["rag"],"summary":"Check Contradictions","description":"Scan this session's uploaded documents for cross-document factual\ncontradictions. Always uses a fixed server-key-only provider (never the\ncaller's selected/BYOK provider) — same reasoning as query expansion.","operationId":"check_contradictions_rag_contradictions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContradictionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/reconciliation":{"post":{"tags":["rag"],"summary":"Check Reconciliation","description":"MMRAG-20: scan one contract against one or more invoices (all from\nthis session's own uploads) for amount/date/term discrepancies. Same\nfixed server-key-only judge provider as /rag/contradictions.","operationId":"check_reconciliation_rag_reconciliation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/mm-eval-run":{"post":{"tags":["rag"],"summary":"Rag Mm Eval Run","description":"Run the multimodal QA fixture through the full ingest → retrieve →\ngenerate → judge pipeline once. Not gating the build — a baseline number.","operationId":"rag_mm_eval_run_rag_mm_eval_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/rag/evaluate":{"post":{"tags":["rag"],"summary":"Rag Evaluate","description":"Evaluate retrieval + generation with LLM-judged RAGAS-style metrics.\n\nSet generate_answers=false to evaluate retrieval only (skips faithfulness,\nanswer_relevancy, and generation calls).","operationId":"rag_evaluate_rag_evaluate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/eval-run":{"post":{"tags":["rag"],"summary":"Rag Eval Run","description":"Run evaluation against the held-out QA set and append results to the log.\n\nLoads rag_eval_qa.json from /data/ (HF Space) or falls back to the local\ndata/ directory. Appends a timestamped aggregate to rag_eval_log.jsonl.","operationId":"rag_eval_run_rag_eval_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/eval-history":{"get":{"tags":["rag"],"summary":"Rag Eval History","description":"Return all logged eval runs as JSON.","operationId":"rag_eval_history_rag_eval_history_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/rag/eval-dashboard":{"get":{"tags":["rag"],"summary":"Rag Eval Dashboard","description":"Render a Chart.js line chart of all eval runs.","operationId":"rag_eval_dashboard_rag_eval_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/rag/agent":{"post":{"tags":["rag"],"summary":"Rag Agent","description":"LangGraph agentic RAG: route → retrieve → grade → (rewrite)* → stream.","operationId":"rag_agent_rag_agent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/share-session":{"post":{"tags":["rag"],"summary":"Create Share","operationId":"create_share_rag_share_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShareRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Share Rag Share Session Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/share-status/{token}":{"get":{"tags":["rag"],"summary":"Share Status","operationId":"share_status_rag_share_status__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Share Status Rag Share Status  Token  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/revoke-share":{"post":{"tags":["rag"],"summary":"Revoke Share","operationId":"revoke_share_rag_revoke_share_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeShareRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Revoke Share Rag Revoke Share Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/rag/health":{"get":{"tags":["rag"],"summary":"Rag Health","description":"Return RAG subsystem status.","operationId":"rag_health_rag_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/rag/prepare-jina":{"post":{"tags":["rag"],"summary":"Prepare Jina","description":"Trigger lazy loading of Jina v3 in a background thread.","operationId":"prepare_jina_rag_prepare_jina_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/rag/analytics":{"get":{"tags":["rag"],"summary":"Get Analytics","operationId":"get_analytics_rag_analytics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Analytics Rag Analytics Get"}}}}}}},"/imagenet-classes":{"get":{"tags":["vision"],"summary":"List Imagenet Classes","operationId":"list_imagenet_classes_imagenet_classes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/image-models":{"get":{"tags":["vision"],"summary":"List Image Models","operationId":"list_image_models_image_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/classify-image":{"post":{"tags":["vision"],"summary":"Classify Image","operationId":"classify_image_classify_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_classify_image_classify_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/image-operations":{"get":{"tags":["vision"],"summary":"List Image Operations","operationId":"list_image_operations_image_operations_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/process-image":{"post":{"tags":["vision"],"summary":"Process Image","operationId":"process_image_process_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_process_image_process_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/detect-models":{"get":{"tags":["vision"],"summary":"List Detect Models","operationId":"list_detect_models_detect_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/detect-objects":{"post":{"tags":["vision"],"summary":"Detect Objects","operationId":"detect_objects_detect_objects_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_detect_objects_detect_objects_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/seg-models":{"get":{"tags":["vision"],"summary":"List Seg Models","operationId":"list_seg_models_seg_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/segment-image":{"post":{"tags":["vision"],"summary":"Segment Image","operationId":"segment_image_segment_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_segment_image_segment_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document/analyze":{"post":{"tags":["document"],"summary":"Analyze Document","description":"Analyze a document and stream extracted fields as SSE events.\nprovider: \"auto\" (cascade) | \"groq\" | \"mistral\" | \"gemini\" | \"cohere\"\ncustom_fields: comma-separated extra field names to extract","operationId":"analyze_document_document_analyze_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_analyze_document_document_analyze_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document/chat":{"post":{"tags":["document"],"summary":"Chat With Document","description":"Answer a free-form question about an analyzed document.\npayload: {question, doc_text, fields?, history?: [{role, content}]}","operationId":"chat_with_document_document_chat_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document/correction":{"post":{"tags":["document"],"summary":"Submit Correction","description":"Record a human field correction (HITL feedback loop).\npayload: {doc_type, name, label?, original_value, corrected_value}\nRecent corrections per doc type are injected into future extraction\nprompts as few-shot guidance. In-memory; resets on restart.","operationId":"submit_correction_document_correction_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/document/types":{"get":{"tags":["document"],"summary":"Get Document Types","description":"Return supported document types and their field schemas.","operationId":"get_document_types_document_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/email-auth/check":{"post":{"tags":["email-auth"],"summary":"Email Auth Check","operationId":"email_auth_check_email_auth_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailAuthCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/prompt-injection/check":{"post":{"tags":["prompt-injection"],"summary":"Check Prompt Injection","operationId":"check_prompt_injection_prompt_injection_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptInjectionCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptInjectionCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ai-code-detect/judge":{"post":{"tags":["ai-code-detect"],"summary":"Judge Code","operationId":"judge_code_ai_code_detect_judge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiCodeJudgeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AiCodeJudgeVerdict"},{"type":"null"}],"title":"Response Judge Code Ai Code Detect Judge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/siem-triage/judge":{"post":{"tags":["siem-triage"],"summary":"Judge Alerts","operationId":"judge_alerts_siem_triage_judge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiemTriageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/TriageVerdict"},"type":"array"},{"type":"null"}],"title":"Response Judge Alerts Siem Triage Judge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tls-headers/check":{"post":{"tags":["tls-headers"],"summary":"Tls Headers Check","operationId":"tls_headers_check_tls_headers_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TlsHeadersScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/attack-surface/scan":{"post":{"tags":["attack-surface"],"summary":"Attack Surface Scan","operationId":"attack_surface_scan_attack_surface_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttackSurfaceScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/yara-scan/builtin":{"post":{"tags":["yara-scan"],"summary":"Scan Builtin","operationId":"scan_builtin_yara_scan_builtin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuiltinScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/yara-scan/custom":{"post":{"tags":["yara-scan"],"summary":"Scan Custom","operationId":"scan_custom_yara_scan_custom_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/security/status":{"get":{"tags":["security-status"],"summary":"Security Status","operationId":"security_status_security_status_get","parameters":[{"name":"window_seconds","in":"query","required":false,"schema":{"type":"integer","default":3600,"title":"Window Seconds"}},{"name":"x-admin-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentRequest":{"properties":{"query":{"type":"string","title":"Query"},"tool_context":{"type":"string","title":"Tool Context","default":""},"history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"History","default":[]},"provider":{"type":"string","title":"Provider","default":"gemini"},"model":{"type":"string","title":"Model","default":"gemini-3.6-flash"},"user_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Key"},"session_id":{"type":"string","title":"Session Id","default":""},"force_web":{"type":"boolean","title":"Force Web","default":false}},"type":"object","required":["query"],"title":"AgentRequest"},"AiCodeJudgeRequest":{"properties":{"code":{"type":"string","maxLength":20000,"minLength":1,"title":"Code"}},"type":"object","required":["code"],"title":"AiCodeJudgeRequest"},"AiCodeJudgeVerdict":{"properties":{"assessment":{"type":"string","title":"Assessment"},"confidence":{"type":"string","title":"Confidence"},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["assessment","confidence","explanation"],"title":"AiCodeJudgeVerdict"},"AiFillRequest":{"properties":{"image":{"type":"string","title":"Image"},"bbox":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Bbox"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"mode":{"type":"string","enum":["fill","edit"],"title":"Mode","default":"fill"}},"type":"object","required":["image"],"title":"AiFillRequest"},"AlertGroupIn":{"properties":{"template":{"type":"string","maxLength":300,"title":"Template"},"count":{"type":"integer","minimum":1.0,"title":"Count"},"example":{"type":"string","maxLength":500,"title":"Example"},"unique_ips":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Unique Ips"}},"type":"object","required":["template","count","example"],"title":"AlertGroupIn"},"AnalyzeRequest":{"properties":{"file":{"type":"string","title":"File"}},"type":"object","required":["file"],"title":"AnalyzeRequest"},"AttackSurfaceScanRequest":{"properties":{"host":{"type":"string","maxLength":253,"minLength":1,"title":"Host"}},"type":"object","required":["host"],"title":"AttackSurfaceScanRequest"},"AutoMLConfig":{"properties":{"models":{"items":{"type":"string"},"type":"array","title":"Models","default":["RandomForest","XGBoost","LightGBM","CatBoost"]},"n_folds":{"type":"integer","title":"N Folds","default":5}},"type":"object","title":"AutoMLConfig"},"AutoMLRequest":{"properties":{"csv_b64":{"type":"string","title":"Csv B64"},"target":{"type":"string","title":"Target"},"task_type":{"type":"string","title":"Task Type","default":"classification"},"config":{"$ref":"#/components/schemas/AutoMLConfig","default":{"models":["RandomForest","XGBoost","LightGBM","CatBoost"],"n_folds":5}}},"type":"object","required":["csv_b64","target"],"title":"AutoMLRequest"},"Body_analyze_csv_analyze_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_analyze_csv_analyze_post"},"Body_analyze_document_document_analyze_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"doc_type":{"type":"string","title":"Doc Type","default":"auto"},"provider":{"type":"string","title":"Provider","default":"auto"},"custom_fields":{"type":"string","title":"Custom Fields","default":""}},"type":"object","required":["file"],"title":"Body_analyze_document_document_analyze_post"},"Body_astro_anomaly_detect_rag_mm_astro_anomaly_detect_post":{"properties":{"images":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Images"}},"type":"object","required":["images"],"title":"Body_astro_anomaly_detect_rag_mm_astro_anomaly_detect_post"},"Body_classify_image_classify_image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"model_name":{"type":"string","title":"Model Name","default":"mobilenetv2"},"top_k":{"type":"integer","title":"Top K","default":5}},"type":"object","required":["file"],"title":"Body_classify_image_classify_image_post"},"Body_compute_shap_custom_shap_custom_upload_post":{"properties":{"model_file":{"type":"string","contentMediaType":"application/octet-stream","title":"Model File"},"data_file":{"type":"string","contentMediaType":"application/octet-stream","title":"Data File"}},"type":"object","required":["model_file","data_file"],"title":"Body_compute_shap_custom_shap_custom_upload_post"},"Body_detect_objects_detect_objects_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"model_name":{"type":"string","title":"Model Name","default":"tiny_yolov3"},"confidence":{"type":"number","title":"Confidence","default":0.3},"max_dets":{"type":"integer","title":"Max Dets","default":20}},"type":"object","required":["file"],"title":"Body_detect_objects_detect_objects_post"},"Body_ingest_document_rag_ingest_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_ingest_document_rag_ingest_post"},"Body_mm_ingest_rag_mm_ingest_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"embedding_mode":{"type":"string","title":"Embedding Mode","default":"caption"},"save_scope":{"type":"string","title":"Save Scope","default":"session"},"session_id":{"type":"string","title":"Session Id","default":""}},"type":"object","required":["file"],"title":"Body_mm_ingest_rag_mm_ingest_post"},"Body_optuna_explain_optuna_explain_post":{"properties":{"winner":{"type":"string","title":"Winner"},"task":{"type":"string","title":"Task","default":"classification"},"n_trials":{"type":"integer","title":"N Trials","default":0},"best_score":{"type":"number","title":"Best Score","default":0.0},"optuna_params_json":{"type":"string","title":"Optuna Params Json","default":"{}"},"param_importance_json":{"type":"string","title":"Param Importance Json","default":"{}"},"feature_importance_json":{"type":"string","title":"Feature Importance Json","default":"[]"},"winner_metrics_json":{"type":"string","title":"Winner Metrics Json","default":"{}"},"api_key":{"type":"string","title":"Api Key"},"provider":{"type":"string","title":"Provider","default":"gemini-2.5"}},"type":"object","required":["winner","api_key"],"title":"Body_optuna_explain_optuna_explain_post"},"Body_process_image_process_image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"operation":{"type":"string","title":"Operation"},"blur_radius":{"type":"number","title":"Blur Radius","default":3.0},"sharpen_factor":{"type":"number","title":"Sharpen Factor","default":2.0},"rotate_angle":{"type":"number","title":"Rotate Angle","default":90.0},"brightness_factor":{"type":"number","title":"Brightness Factor","default":1.5},"contrast_factor":{"type":"number","title":"Contrast Factor","default":1.5}},"type":"object","required":["file","operation"],"title":"Body_process_image_process_image_post"},"Body_run_unsupervised_unsupervised_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"algorithm":{"type":"string","title":"Algorithm"},"color_col":{"type":"string","title":"Color Col","default":""},"n_clusters":{"type":"integer","title":"N Clusters","default":3},"eps":{"type":"number","title":"Eps","default":0.5},"min_samples":{"type":"integer","title":"Min Samples","default":5},"perplexity":{"type":"number","title":"Perplexity","default":30.0},"n_dims":{"type":"integer","title":"N Dims","default":2}},"type":"object","required":["file","algorithm"],"title":"Body_run_unsupervised_unsupervised_post"},"Body_segment_image_segment_image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"model_name":{"type":"string","title":"Model Name","default":"segformer_b0"}},"type":"object","required":["file"],"title":"Body_segment_image_segment_image_post"},"Body_track_object_rag_mm_rotoscope_track_post":{"properties":{"video":{"type":"string","contentMediaType":"application/octet-stream","title":"Video"},"text_prompt":{"type":"string","title":"Text Prompt"}},"type":"object","required":["video","text_prompt"],"title":"Body_track_object_rag_mm_rotoscope_track_post"},"Body_train_model_train_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"model_name":{"type":"string","title":"Model Name"},"target_col":{"type":"string","title":"Target Col","default":""},"task":{"type":"string","title":"Task"},"algorithm":{"type":"string","title":"Algorithm"},"accent":{"type":"string","title":"Accent"},"n_clusters":{"type":"integer","title":"N Clusters","default":3},"feature_engineering":{"type":"string","title":"Feature Engineering","default":"{}"},"fe_b64":{"type":"string","title":"Fe B64","default":""},"pre_fe_cols_json":{"type":"string","title":"Pre Fe Cols Json","default":"[]"},"pre_fe_sample_json":{"type":"string","title":"Pre Fe Sample Json","default":"{}"},"tune":{"type":"string","title":"Tune","default":"false"},"n_trials":{"type":"integer","title":"N Trials","default":10},"selected_models":{"type":"string","title":"Selected Models","default":"[\"Random Forest\",\"XGBoost\",\"LightGBM\",\"CatBoost\",\"Extra Trees\"]"},"use_smote":{"type":"string","title":"Use Smote","default":"true"},"drop_cols_json":{"type":"string","title":"Drop Cols Json","default":"[]"},"opt_metric":{"type":"string","title":"Opt Metric","default":"auto"},"sampler":{"type":"string","title":"Sampler","default":"tpe"},"secondary_metric":{"type":"string","title":"Secondary Metric","default":"none"},"col_encoding_json":{"type":"string","title":"Col Encoding Json","default":"{}"},"preset_params_json":{"type":"string","title":"Preset Params Json","default":"{}"}},"type":"object","required":["file","model_name","task","algorithm","accent"],"title":"Body_train_model_train_post"},"Body_upload_drift_drift__model_id__upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_drift_drift__model_id__upload_post"},"BuiltinScanRequest":{"properties":{"file":{"type":"string","title":"File"}},"type":"object","required":["file"],"title":"BuiltinScanRequest"},"CalibrationPoint":{"properties":{"x":{"type":"number","title":"X"},"y":{"type":"number","title":"Y"}},"type":"object","required":["x","y"],"title":"CalibrationPoint"},"CaptchaSolveRequest":{"properties":{"image":{"type":"string","title":"Image"},"intensity":{"type":"number","title":"Intensity","default":50.0},"ground_truth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ground Truth"}},"type":"object","required":["image"],"title":"CaptchaSolveRequest"},"CompareRequest":{"properties":{"csv_b64":{"type":"string","title":"Csv B64"},"target":{"type":"string","title":"Target"},"task_type":{"type":"string","title":"Task Type","default":"classification"},"pipeline_a":{"$ref":"#/components/schemas/PipelineSpec","default":{}},"pipeline_b":{"$ref":"#/components/schemas/PipelineSpec","default":{}}},"type":"object","required":["csv_b64","target"],"title":"CompareRequest"},"ConfirmedGroup":{"properties":{"group_id":{"type":"integer","title":"Group Id"},"photo_indices":{"items":{"type":"integer"},"type":"array","title":"Photo Indices"}},"type":"object","required":["group_id","photo_indices"],"title":"ConfirmedGroup"},"ContradictionsRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["session_id"],"title":"ContradictionsRequest"},"CreateShareRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["session_id"],"title":"CreateShareRequest"},"CustomScanRequest":{"properties":{"file":{"type":"string","title":"File"},"rule_source":{"type":"string","title":"Rule Source"}},"type":"object","required":["file","rule_source"],"title":"CustomScanRequest"},"DeblurRequest":{"properties":{"image":{"type":"string","title":"Image"},"bbox":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Bbox"}},"type":"object","required":["image"],"title":"DeblurRequest"},"DepthRequest":{"properties":{"image":{"type":"string","title":"Image"}},"type":"object","required":["image"],"title":"DepthRequest"},"DescribeImageRequest":{"properties":{"image":{"type":"string","title":"Image"}},"type":"object","required":["image"],"title":"DescribeImageRequest"},"DuplicatesRequest":{"properties":{"photos":{"items":{"$ref":"#/components/schemas/PhotoItem"},"type":"array","title":"Photos"},"threshold":{"type":"number","title":"Threshold","default":0.97}},"type":"object","required":["photos"],"title":"DuplicatesRequest"},"EmailAuthCheckRequest":{"properties":{"raw_headers":{"type":"string","maxLength":50000,"title":"Raw Headers"}},"type":"object","required":["raw_headers"],"title":"EmailAuthCheckRequest"},"EnhancePromptRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"}},"type":"object","required":["prompt"],"title":"EnhancePromptRequest"},"EnsembleConfig":{"properties":{"ensemble_type":{"type":"string","title":"Ensemble Type","default":"voting"},"models":{"items":{"type":"string"},"type":"array","title":"Models","default":["RandomForest","XGBoost","LightGBM"]}},"type":"object","title":"EnsembleConfig"},"EnsembleRequest":{"properties":{"csv_b64":{"type":"string","title":"Csv B64"},"target":{"type":"string","title":"Target"},"task_type":{"type":"string","title":"Task Type","default":"classification"},"config":{"$ref":"#/components/schemas/EnsembleConfig","default":{"ensemble_type":"voting","models":["RandomForest","XGBoost","LightGBM"]}}},"type":"object","required":["csv_b64","target"],"title":"EnsembleRequest"},"EvalRequest":{"properties":{"qa_pairs":{"items":{"$ref":"#/components/schemas/QAPair"},"type":"array","title":"Qa Pairs"},"provider":{"type":"string","title":"Provider","default":"mistral"},"model":{"type":"string","title":"Model","default":"mistral-small-latest"},"user_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Key"},"generate_answers":{"type":"boolean","title":"Generate Answers","default":true}},"type":"object","required":["qa_pairs"],"title":"EvalRequest"},"EvalRunRequest":{"properties":{"provider":{"type":"string","title":"Provider","default":"mistral"},"model":{"type":"string","title":"Model","default":"mistral-small-latest"},"user_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Key"},"generate_answers":{"type":"boolean","title":"Generate Answers","default":true}},"type":"object","title":"EvalRunRequest"},"ExportRequest":{"properties":{"target":{"type":"string","title":"Target"},"task_type":{"type":"string","title":"Task Type","default":"classification"},"winner_algo":{"type":"string","title":"Winner Algo","default":"RandomForest"},"winner_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Winner Params"},"preprocess_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Preprocess Config"},"fe_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Fe Config"},"fs_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Fs Config"}},"type":"object","required":["target"],"title":"ExportRequest"},"FEConfig":{"properties":{"transforms":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Transforms"},"date_cols":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Date Cols"},"date_parts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Date Parts"},"cyclical":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Cyclical"},"interactions":{"anyOf":[{"items":{"items":{"type":"string"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Interactions"},"poly_cols":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Poly Cols"},"poly_degree":{"type":"integer","title":"Poly Degree","default":2}},"type":"object","title":"FEConfig"},"FERequest":{"properties":{"csv_b64":{"type":"string","title":"Csv B64"},"target":{"type":"string","title":"Target"},"config":{"$ref":"#/components/schemas/FEConfig","default":{"poly_degree":2}}},"type":"object","required":["csv_b64","target"],"title":"FERequest"},"FEResponse":{"properties":{"features_before":{"type":"integer","title":"Features Before"},"features_added":{"type":"integer","title":"Features Added"},"new_columns":{"items":{"type":"string"},"type":"array","title":"New Columns"},"processed_csv_b64":{"type":"string","title":"Processed Csv B64"}},"type":"object","required":["features_before","features_added","new_columns","processed_csv_b64"],"title":"FEResponse"},"FSConfig":{"properties":{"method":{"type":"string","title":"Method","default":"variance"},"top_k":{"type":"integer","title":"Top K","default":10}},"type":"object","title":"FSConfig"},"FSRequest":{"properties":{"csv_b64":{"type":"string","title":"Csv B64"},"target":{"type":"string","title":"Target"},"config":{"$ref":"#/components/schemas/FSConfig","default":{"method":"variance","top_k":10}}},"type":"object","required":["csv_b64","target"],"title":"FSRequest"},"FSResponse":{"properties":{"features_before":{"type":"integer","title":"Features Before"},"features_after":{"type":"integer","title":"Features After"},"dropped_features":{"items":{"type":"string"},"type":"array","title":"Dropped Features"},"kept_features":{"items":{"type":"string"},"type":"array","title":"Kept Features"},"processed_csv_b64":{"type":"string","title":"Processed Csv B64"}},"type":"object","required":["features_before","features_after","dropped_features","kept_features","processed_csv_b64"],"title":"FSResponse"},"GroupPhoto":{"properties":{"image":{"type":"string","title":"Image"}},"type":"object","required":["image"],"title":"GroupPhoto"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InpaintRequest":{"properties":{"image":{"type":"string","title":"Image"},"bbox":{"items":{"type":"number"},"type":"array","title":"Bbox"},"mask":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"title":"Mask"}},"type":"object","required":["image","bbox"],"title":"InpaintRequest"},"LivenessRequest":{"properties":{"image":{"type":"string","title":"Image"}},"type":"object","required":["image"],"title":"LivenessRequest"},"LlmVerdict":{"properties":{"is_injection":{"type":"boolean","title":"Is Injection"},"confidence":{"type":"string","title":"Confidence"},"category":{"type":"string","title":"Category"},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["is_injection","confidence","category","explanation"],"title":"LlmVerdict"},"MeasureGroupsRequest":{"properties":{"photos":{"items":{"$ref":"#/components/schemas/GroupPhoto"},"type":"array","title":"Photos"},"groups":{"items":{"$ref":"#/components/schemas/ConfirmedGroup"},"type":"array","title":"Groups"},"auto_detect":{"type":"boolean","title":"Auto Detect","default":true}},"type":"object","required":["photos","groups"],"title":"MeasureGroupsRequest"},"OptunaConfig":{"properties":{"n_trials":{"type":"integer","title":"N Trials","default":30}},"type":"object","title":"OptunaConfig"},"OptunaRequest":{"properties":{"model_id":{"type":"string","title":"Model Id"},"csv_b64":{"type":"string","title":"Csv B64"},"target":{"type":"string","title":"Target"},"task_type":{"type":"string","title":"Task Type","default":"classification"},"config":{"$ref":"#/components/schemas/OptunaConfig","default":{"n_trials":30}}},"type":"object","required":["model_id","csv_b64","target"],"title":"OptunaRequest"},"PatternHit":{"properties":{"category":{"type":"string","title":"Category"},"description":{"type":"string","title":"Description"},"matched_text":{"type":"string","title":"Matched Text"},"position":{"type":"integer","title":"Position"}},"type":"object","required":["category","description","matched_text","position"],"title":"PatternHit"},"PhotoItem":{"properties":{"filename":{"type":"string","title":"Filename"},"image":{"type":"string","title":"Image"}},"type":"object","required":["filename","image"],"title":"PhotoItem"},"PipelineSpec":{"properties":{"preprocess":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Preprocess"},"fe":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Fe"},"fs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Fs"},"automl":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Automl"}},"type":"object","title":"PipelineSpec"},"PlantGrowthFrame":{"properties":{"image":{"type":"string","title":"Image"},"label":{"type":"string","title":"Label","default":""}},"type":"object","required":["image"],"title":"PlantGrowthFrame"},"PlantGrowthRequest":{"properties":{"frames":{"items":{"$ref":"#/components/schemas/PlantGrowthFrame"},"type":"array","title":"Frames"},"auto_detect":{"type":"boolean","title":"Auto Detect","default":true}},"type":"object","required":["frames"],"title":"PlantGrowthRequest"},"PpeCheckRequest":{"properties":{"image":{"type":"string","title":"Image"}},"type":"object","required":["image"],"title":"PpeCheckRequest"},"PreprocessConfig":{"properties":{"mv_num":{"type":"string","title":"Mv Num","default":"mean"},"mv_cat":{"type":"string","title":"Mv Cat","default":"most_frequent"},"remove_duplicates":{"type":"boolean","title":"Remove Duplicates","default":true},"remove_outliers":{"type":"boolean","title":"Remove Outliers","default":false},"outlier_method":{"type":"string","title":"Outlier Method","default":"iqr"},"outlier_thresh":{"type":"number","title":"Outlier Thresh","default":1.5},"drop_cols":{"items":{"type":"string"},"type":"array","title":"Drop Cols","default":[]},"fix_skewness":{"type":"boolean","title":"Fix Skewness","default":false}},"type":"object","title":"PreprocessConfig"},"PreprocessRequest":{"properties":{"csv_b64":{"type":"string","title":"Csv B64"},"target":{"type":"string","title":"Target"},"config":{"$ref":"#/components/schemas/PreprocessConfig","default":{"mv_num":"mean","mv_cat":"most_frequent","remove_duplicates":true,"remove_outliers":false,"outlier_method":"iqr","outlier_thresh":1.5,"drop_cols":[],"fix_skewness":false}}},"type":"object","required":["csv_b64","target"],"title":"PreprocessRequest"},"PreprocessResponse":{"properties":{"rows_before":{"type":"integer","title":"Rows Before"},"rows_after":{"type":"integer","title":"Rows After"},"cols_before":{"type":"integer","title":"Cols Before"},"cols_after":{"type":"integer","title":"Cols After"},"missing_filled":{"type":"integer","title":"Missing Filled"},"duplicates_removed":{"type":"integer","title":"Duplicates Removed"},"outliers_removed":{"type":"integer","title":"Outliers Removed"},"processed_csv_b64":{"type":"string","title":"Processed Csv B64"},"dropped_cols":{"items":{"type":"string"},"type":"array","title":"Dropped Cols","default":[]},"imputed_cols":{"additionalProperties":{"type":"integer"},"type":"object","title":"Imputed Cols","default":{}},"skewed_cols":{"items":{"type":"string"},"type":"array","title":"Skewed Cols","default":[]},"outlier_clipped_cols":{"items":{"type":"string"},"type":"array","title":"Outlier Clipped Cols","default":[]}},"type":"object","required":["rows_before","rows_after","cols_before","cols_after","missing_filled","duplicates_removed","outliers_removed","processed_csv_b64"],"title":"PreprocessResponse"},"PromptInjectionCheckRequest":{"properties":{"text":{"type":"string","maxLength":20000,"minLength":1,"title":"Text"}},"type":"object","required":["text"],"title":"PromptInjectionCheckRequest"},"PromptInjectionCheckResponse":{"properties":{"heuristic_hits":{"items":{"$ref":"#/components/schemas/PatternHit"},"type":"array","title":"Heuristic Hits"},"llm_verdict":{"anyOf":[{"$ref":"#/components/schemas/LlmVerdict"},{"type":"null"}]},"overall_risk":{"type":"string","title":"Overall Risk"},"overall_reason":{"type":"string","title":"Overall Reason"}},"type":"object","required":["heuristic_hits","llm_verdict","overall_risk","overall_reason"],"title":"PromptInjectionCheckResponse"},"ProposeGroupsRequest":{"properties":{"photos":{"items":{"$ref":"#/components/schemas/GroupPhoto"},"type":"array","title":"Photos"},"auto_detect":{"type":"boolean","title":"Auto Detect","default":true}},"type":"object","required":["photos"],"title":"ProposeGroupsRequest"},"QAPair":{"properties":{"question":{"type":"string","title":"Question"},"ground_truth":{"type":"string","title":"Ground Truth"}},"type":"object","required":["question","ground_truth"],"title":"QAPair"},"QrScanRequest":{"properties":{"image":{"type":"string","title":"Image"}},"type":"object","required":["image"],"title":"QrScanRequest"},"QueryRequest":{"properties":{"query":{"type":"string","title":"Query"},"tool_context":{"type":"string","title":"Tool Context","default":""},"history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"History","default":[]},"provider":{"type":"string","title":"Provider","default":"mistral"},"model":{"type":"string","title":"Model","default":"mistral-small-latest"},"user_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Key"},"embedding_model":{"type":"string","title":"Embedding Model","default":"minilm"},"session_id":{"type":"string","title":"Session Id","default":""},"force_web":{"type":"boolean","title":"Force Web","default":false},"restrict_to_uploads":{"type":"boolean","title":"Restrict To Uploads","default":false},"answer_length":{"type":"string","title":"Answer Length","default":"normal"},"chunk_type_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Chunk Type Filter"},"entity_type_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Entity Type Filter"},"share_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Token"}},"type":"object","required":["query"],"title":"QueryRequest"},"ReconciliationRequest":{"properties":{"session_id":{"type":"string","title":"Session Id"},"contract_source":{"type":"string","title":"Contract Source"},"invoice_sources":{"items":{"type":"string"},"type":"array","title":"Invoice Sources"}},"type":"object","required":["session_id","contract_source","invoice_sources"],"title":"ReconciliationRequest"},"ReconstructRequest":{"properties":{"images":{"items":{"type":"string"},"type":"array","maxItems":6,"minItems":2,"title":"Images"},"calibration_point_a":{"anyOf":[{"$ref":"#/components/schemas/CalibrationPoint"},{"type":"null"}]},"calibration_point_b":{"anyOf":[{"$ref":"#/components/schemas/CalibrationPoint"},{"type":"null"}]},"calibration_real_distance_cm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Calibration Real Distance Cm"}},"type":"object","required":["images"],"title":"ReconstructRequest"},"ReidSearchRequest":{"properties":{"target":{"type":"string","title":"Target"},"gallery":{"items":{"type":"string"},"type":"array","title":"Gallery"}},"type":"object","required":["target","gallery"],"title":"ReidSearchRequest"},"RevokeShareRequest":{"properties":{"token":{"type":"string","title":"Token"},"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["token","session_id"],"title":"RevokeShareRequest"},"SHAPRequest":{"properties":{"model_id":{"type":"string","title":"Model Id"},"csv_b64":{"type":"string","title":"Csv B64"},"target":{"type":"string","title":"Target"}},"type":"object","required":["model_id","csv_b64","target"],"title":"SHAPRequest"},"SearchRequest":{"properties":{"photos":{"items":{"$ref":"#/components/schemas/PhotoItem"},"type":"array","title":"Photos"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"},"query_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query Image"},"exclude_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclude Filename"},"exclude_query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exclude Query"}},"type":"object","required":["photos"],"title":"SearchRequest"},"SiemTriageRequest":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/AlertGroupIn"},"type":"array","maxItems":20,"minItems":1,"title":"Groups"}},"type":"object","required":["groups"],"title":"SiemTriageRequest"},"SpeciesIdRequest":{"properties":{"image":{"type":"string","title":"Image"}},"type":"object","required":["image"],"title":"SpeciesIdRequest"},"TextToImageRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"style":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Style"},"aspect_ratio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aspect Ratio"},"negative_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Negative Prompt"}},"type":"object","required":["prompt"],"title":"TextToImageRequest"},"TlsHeadersScanRequest":{"properties":{"host":{"type":"string","maxLength":253,"minLength":1,"title":"Host"}},"type":"object","required":["host"],"title":"TlsHeadersScanRequest"},"TriageVerdict":{"properties":{"priority":{"type":"string","title":"Priority"},"reasoning":{"type":"string","title":"Reasoning"},"suggested_action":{"type":"string","title":"Suggested Action"}},"type":"object","required":["priority","reasoning","suggested_action"],"title":"TriageVerdict"},"UploadRunRequest":{"properties":{"image":{"type":"string","title":"Image"},"intended_label":{"type":"integer","title":"Intended Label"},"epsilon":{"type":"number","title":"Epsilon","default":0.2}},"type":"object","required":["image","intended_label"],"title":"UploadRunRequest"},"UrlScanRequest":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"UrlScanRequest"},"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"},"VisualizeRequest":{"properties":{"image":{"type":"string","title":"Image"}},"type":"object","required":["image"],"title":"VisualizeRequest"},"WatermarkEmbedRequest":{"properties":{"image":{"type":"string","title":"Image"},"label":{"type":"string","title":"Label","default":"MLU-VERIFIED"}},"type":"object","required":["image"],"title":"WatermarkEmbedRequest"},"WatermarkVerifyRequest":{"properties":{"image":{"type":"string","title":"Image"}},"type":"object","required":["image"],"title":"WatermarkVerifyRequest"},"WildlifeReidRequest":{"properties":{"target":{"type":"string","title":"Target"},"gallery":{"items":{"type":"string"},"type":"array","title":"Gallery"}},"type":"object","required":["target","gallery"],"title":"WildlifeReidRequest"},"routers__rag__mm_adversarial__RunRequest":{"properties":{"image":{"type":"string","title":"Image"},"epsilon":{"type":"number","title":"Epsilon","default":0.03},"method":{"type":"string","title":"Method","default":"fgsm"},"jpeg_quality":{"type":"integer","title":"Jpeg Quality","default":75},"target_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Label"},"check_transfer":{"type":"boolean","title":"Check Transfer","default":false},"patch_frac":{"type":"number","title":"Patch Frac","default":0.2},"max_queries":{"type":"integer","title":"Max Queries","default":1500}},"type":"object","required":["image"],"title":"RunRequest"},"routers__rag__mm_face_cloak__CloakRequest":{"properties":{"image":{"type":"string","title":"Image"},"epsilon":{"type":"number","title":"Epsilon","default":0.05}},"type":"object","required":["image"],"title":"CloakRequest"},"routers__rag__mm_robust_training__RunRequest":{"properties":{"sample_id":{"type":"integer","title":"Sample Id"},"epsilon":{"type":"number","title":"Epsilon","default":0.2}},"type":"object","required":["sample_id"],"title":"RunRequest"},"routers__rag__mm_style_cloak__CloakRequest":{"properties":{"image":{"type":"string","title":"Image"},"epsilon":{"type":"number","title":"Epsilon","default":0.06}},"type":"object","required":["image"],"title":"CloakRequest"}}}}