REST API & Ecosystem Architecture¶
While saes is a standalone, zero-UI scientific Python library at its core, installing the optional [api] extra exposes a fully typed FastAPI REST server (saes-api, default port :8060) that powers the SAES Web/Desktop Studio (saes-ui) and SAES Conversational AI / MCP Server (saes-ai).
Ecosystem Architecture (API-First & Thin Client)¶
flowchart LR
PY["Python Scripts &<br/>Jupyter Notebooks"] -->|import saes| CORE["saes Core Engine<br/>NumPy · SciPy · Statsmodels · Pydantic V2"]
CORE --> REST["Optional FastAPI Server<br/>saes[api] (:8060)"]
REST -->|Typed JSON / SVG / PDF / LaTeX| UI["saes-ui (Thin Client)<br/>React 18 · TypeScript · Plotly · Tauri v2"]
REST -->|REST / MCP Tools| AI["saes-ai (:8070)<br/>Statistical AI Assistant & MCP Server"]
UI <-->|Streaming Chat + UI Actions| AI
Every statistical computation, assumption diagnostic, dataset capability check, and plot/table export lives strictly inside saes — guaranteeing 100% numerical parity between Python scripts, REST calls, AI tool calls, and the interactive UI.
Launching the Optional REST Server¶
pip install "saes[all]"
saes-api
# Interactive OpenAPI / Swagger UI available at http://127.0.0.1:8060/docs
Complete REST Endpoint Reference¶
(Auto-discovered live from saes.server.app for v2.1.1.)
| Path | Methods | Description |
|---|---|---|
/api/v1/analyze |
POST |
Execute full automated statistical analysis on uploaded CSV dataset. |
/api/v1/bayesian/correlated-ttest |
POST |
Run Bayesian Correlated t-test (Nadeau & Bengio 2003; Benavoli et al. 2017) on uploaded CSV. |
/api/v1/datasets |
GET |
List all saved benchmark datasets in the backend storage directory. |
/api/v1/datasets/upload |
POST |
Upload, validate, and save a CSV dataset file into backend storage (gitignore-backed). |
/api/v1/datasets/{filename} |
DELETE, GET, PUT |
Save or update CSV dataset content directly in backend storage. |
/api/v1/datasets/{filename}/analyze |
POST |
Execute statistical analysis on a saved dataset by loading directly from its server path. |
/api/v1/datasets/{filename}/bayesian/correlated-ttest |
GET, POST |
Run Bayesian Correlated t-test (Nadeau & Bengio 2003; Benavoli et al. 2017) on a stored dataset. |
/api/v1/datasets/{filename}/effect-sizes |
GET, POST |
Compute pairwise standardized effect sizes with exact 95% CIs for a stored dataset. |
/api/v1/datasets/{filename}/explore |
GET, POST |
Explore dataset observations via HTTP GET (cacheable by standard HTTP clients). |
/api/v1/datasets/{filename}/explore/export |
GET, POST |
Export an Observations & Data exploration view via HTTP GET. |
/api/v1/datasets/{filename}/plots/export |
POST |
Generate and export a statistical plot or diagram for a saved dataset in PNG, SVG, or PDF. |
/api/v1/datasets/{filename}/posthoc |
GET, POST |
Run Tukey HSD, Games-Howell, Dunnett, Dunn, or Conover-Iman post-hoc tests on a stored dataset. |
/api/v1/datasets/{filename}/power |
GET, POST |
Compute statistical power analysis, MDES sensitivity audit, and sample size planning. |
/api/v1/datasets/{filename}/profiles |
GET, POST |
Compute Dolan-Moré performance profiles and multiplicity-adjusted Win/Tie/Loss matrix. |
/api/v1/datasets/{filename}/ranking |
POST |
Compute Friedman, Aligned-Ranks, Quade, RM-ANOVA, Bayesian Simplex ROPE, and Plackett-Luce tests. |
/api/v1/datasets/{filename}/reproducibility |
GET, POST |
Generate reproducible Python script, Jupyter notebook, and FAIR manifest for a stored dataset. |
/api/v1/datasets/{filename}/tables |
GET, POST |
Generate a statistical benchmark table via HTTP GET (cacheable by standard HTTP clients). |
/api/v1/datasets/{filename}/tables/export |
GET, POST |
Export a statistical benchmark table via HTTP GET. |
/api/v1/datasets/{filename}/tost |
GET, POST |
Run Two One-Sided Tests (TOST) for statistical equivalence on a stored dataset. |
/api/v1/datasets/{filename}/validate |
POST |
Validate a saved benchmark dataset by loading directly from its server path. |
/api/v1/effect-sizes |
POST |
Compute pairwise standardized effect sizes with exact 95% CIs on uploaded CSV. |
/api/v1/explore |
POST |
Explore dataset observations, reveal multi-metric pivots, check normality, and get test recommendations. |
/api/v1/explore/export |
POST |
Export an Observations & Data exploration view in PDF, Word (DOCX), LaTeX, CSV, Markdown, or HTML. |
/api/v1/plots/export |
POST |
Generate and export a statistical plot or diagram in PNG, SVG, or PDF format. |
/api/v1/plugins |
GET |
List installed SAES Python plugins along with dynamically discovered tests, renderers, and plotters. |
/api/v1/plugins/pareto/collections |
GET |
List Collections |
/api/v1/plugins/pareto/collections/create-multi |
POST |
Build a Pareto study from multiple individual front files grouped by algorithm plus an optional reference. |
/api/v1/plugins/pareto/collections/demo |
POST |
Create Demo |
/api/v1/plugins/pareto/collections/upload |
POST |
Upload Collection |
/api/v1/plugins/pareto/collections/{name} |
DELETE, GET |
Get Collection Summary |
/api/v1/plugins/pareto/collections/{name}/attainment |
POST |
Attainment Endpoint |
/api/v1/plugins/pareto/collections/{name}/coverage |
POST |
Coverage Endpoint |
/api/v1/plugins/pareto/collections/{name}/eaf-diff |
POST |
Eaf Diff Endpoint |
/api/v1/plugins/pareto/collections/{name}/export-plot |
POST |
Export Plot Endpoint |
/api/v1/plugins/pareto/collections/{name}/plot |
POST |
Generate Plot |
/api/v1/plugins/pareto/collections/{name}/to-dataset |
POST |
To Dataset Endpoint |
/api/v1/posthoc |
POST |
Run Tukey HSD, Games-Howell, Dunnett, Dunn, or Conover-Iman post-hoc tests on uploaded CSV. |
/api/v1/power |
POST |
Compute statistical power analysis, MDES sensitivity audit, and sample size recommendations. |
/api/v1/profiles |
POST |
Compute Dolan-Moré performance profiles and multiplicity-adjusted Win/Tie/Loss meta-ranking. |
/api/v1/ranking |
POST |
Compute Friedman, Aligned-Ranks, Quade, RM-ANOVA, Bayesian Simplex ROPE, and Plackett-Luce rankings. |
/api/v1/reproducibility |
POST |
Generate reproducible standalone Python script, Jupyter notebook, and FAIR manifest. |
/api/v1/tables |
POST |
Generate a statistical benchmark table (ANOVA, Friedman, Wilcoxon, Pairwise Matrix) from uploaded CSV. |
/api/v1/tables/export |
POST |
Generate and export a statistical benchmark table in PDF, Word (DOCX), LaTeX, CSV, Markdown, or HTML. |
/api/v1/tost |
POST |
Run Two One-Sided Tests (TOST) for statistical equivalence on uploaded CSV. |
/api/v1/validate |
POST |
Validate uploaded CSV benchmark dataset. |
/health |
GET |
Return API health status. |
Example curl Request¶
# Run Games-Howell post-hoc test on stored dataset
curl "http://127.0.0.1:8060/api/v1/datasets/swarmintelligence.csv/posthoc?metric=HV&instance=DTLZ2&method=games_howell&alpha=0.05"
# Compute Bayesian Correlated t-test for 10-fold CV (rho = 1/9)
curl "http://127.0.0.1:8060/api/v1/datasets/ml_data.csv/bayesian/correlated-ttest?metric=accuracy&algo_a=RandomForest&algo_b=SVM&rope=0.01&rho=0.111111"