# QuantOracle Polynomial Regression

> QuantOracle Polynomial Regression is a paid API for AI agents from api.quantoracle.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-09-13).

Fits a polynomial regression model of a specified degree to X/Y data and returns coefficients, predictions, and model quality statistics (R², AIC, BIC, MSE).

## Facts

- Endpoint: POST https://api.quantoracle.dev/v1/stats/polynomial-regression
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-quantoracle-dev-d1b772ba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nTOfPfd6mAU5AtXyrhEN4

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-quantoracle-dev-d1b772ba -d '<json body>'
```

Example prompt: Fit a degree-2 polynomial regression to my data — x values are [1, 2, 3, 4, 5] and y values are [2.1, 4.0, 9.2, 16.1, 25.3] — and give me the coefficients, predicted values, and R-squared.

## When to prefer this

Use this endpoint when you need to model a nonlinear (curved) relationship between two numeric variables and want full model diagnostics (AIC, BIC, MSE, R²) alongside predictions. Prefer it over linear regression when your data has curvature, and over generic ML models when you need interpretable polynomial coefficients and statistical model-selection criteria.

## Known failure modes

- Mismatched x and y array lengths returns a 400 validation error
- Degree greater than number of data points minus 1 causes underdetermined system error
- Non-numeric values in x or y arrays return a parsing/validation error
- Very large degree values may cause numerical instability or timeout
- Empty arrays return a 400 bad request error

## How this service works

QuantOracle: stats/polynomial-regression

## Output

Returns polynomial coefficients, predicted Y values for each input X, R-squared, adjusted R-squared, MSE, AIC, BIC, the polynomial degree used, and computation time in milliseconds.

## Example request

```json
{
 "input": {
  "body": {
   "x": [
    1,
    2,
    3,
    4,
    5
   ],
   "y": [
    2.1,
    4,
    9.2,
    16.1,
    25.3
   ],
   "degree": 2
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "x": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "title": "X",
   "description": "Independent variable array"
  },
  "y": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "title": "Y",
   "description": "Dependent variable array"
  },
  "degree": {
   "type": "integer",
   "title": "Degree",
   "default": 2,
   "maximum": 10,
   "minimum": 1,
   "description": "Polynomial degree (1=linear, 2=quadratic, etc.)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-quantoracle-dev-d1b772ba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.quantoracle.dev](https://www.zero.xyz/host/api.quantoracle.dev/llms.txt)
