API & MCP
Everything a person can do on Curve Fitter & Regression Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://prooflinecurvefit.usefulweb.site/api/v1/calculate– run Curve Fitter & Regression CalculatorGET https://prooflinecurvefit.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Curve Fitter & Regression Calculator
Paste x/y data (CSV, tabs or spaces) and fit a straight line, polynomial, exponential, power-law, logarithmic, multiple linear or your own nonlinear model, or interpolate with a natural cubic spline. You get the parameters with standard errors, t and p values and confidence intervals, R² and adjusted R², an ANOVA table, a residual plot and predictions with confidence intervals. Verified against the NIST StRD reference datasets; part of the Proofline math notebook.
| Field | Type | Default | Description |
|---|---|---|---|
data (required) | textarea | — | Data. One row per line, values separated by commas, tabs, semicolons or spaces; an optional header row names the columns. Use a decimal point (1.5). |
model | select (linear, polynomial, exponential, power, logarithmic, multiple, custom, spline, interpolation) | "linear" | Model |
xColumn | text | — | x column. Column number (1 = first) or header name; default the first column. Multiple regression: a comma-separated list (default: every column except y). |
yColumn | text | — | y column. Column number or header name; default the second column. |
degree | integer | 2 | Polynomial degree |
intercept | boolean | true | Include an intercept (constant term). Straight line, polynomial and multiple regression. Without it the fit goes through the origin and R² is uncentred. |
expression | text | — | Custom model y =. Formula in x and your parameters. Use + − * / ^, implicit products (2x), sin, cos, tan, exp, ln (natural log), log (base 10), sqrt, abs, pi and e. Angles are in radians. |
parameters | text | — | Parameters with start values. Custom model: every parameter with a start value. Start values near the solution help Levenberg–Marquardt. |
evaluateAt | text | — | Evaluate the fit at x =. Optional list of x values: predicted y with standard error and confidence interval (interpolated value for splines). |
confidence | number | 0.95 | Confidence level |
Example request
Straight line with prediction
curl -X POST https://prooflinecurvefit.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"data":"x,y\n1,2.1\n2,3.9\n3,6.2\n4,7.8\n5,10.1","model":"linear","evaluateAt":"6"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://prooflinecurvefit.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
proofline_curve_fit - Local stdio connector:
node src/mcp-stdio.ts --tool=proofline-curve-fit
{
"mcpServers": {
"proofline-curve-fit": { "type": "http", "url": "https://prooflinecurvefit.usefulweb.site/mcp" }
}
}