# SignalDesk AI Linear Regression

> SignalDesk AI Linear Regression is a paid API for AI agents from x402-agent.kariguetoazul.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-13).

Computes simple linear regression (slope, intercept, R²) over two paired numeric arrays

## Facts

- Endpoint: POST https://x402-agent.kariguetoazul.workers.dev/api/stats/linear-regression?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/signaldesk-ai-linear-regression-7ab307d0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CfNWnncBcpgu0Wp7nmwrJ

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 signaldesk-ai-linear-regression-7ab307d0 -d '<json body>'
```

Example prompt: Can you run a linear regression on my data? X values are [1, 2, 3, 4, 5] and Y values are [2.1, 3.9, 6.2, 7.8, 10.1] — I need the slope, intercept, and R-squared.

## When to prefer this

Choose this endpoint when you need a quick, cheap ($0.001 USDC) server-side linear regression computation without setting up a local statistics library. It handles up to 1000 paired observations and returns all key regression statistics in one call. Prefer this over client-side computation when the agent environment lacks numpy/scipy, or when you need a lightweight, pay-per-use statistical computation in an autonomous workflow.

## Known failure modes

- Arrays x and y have different lengths — request fails with validation error
- Fewer than 2 data points provided — minItems constraint violated
- Values exceed ±10^15 boundary — rejected by schema validation
- Payment of $0.001 USDC not completed via x402 — 402 Payment Required response
- Perfectly vertical data (all x values identical) — division by zero may cause error or undefined slope

## How this service works

Evidence-backed autonomous AI jobs and paid data tools. Queue/D1/cron run outside the chat; free quotas and bounded execution apply.

## Output

Returns a JSON object with four fields: slope (rate of change of Y per unit X), intercept (Y value when X is zero), r_squared (coefficient of determination, 0–1 indicating goodness of fit), and observations (count of data points used in the regression).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "x": {
   "type": "array",
   "items": {
    "type": "number",
    "maximum": 1000000000000000,
    "minimum": -1000000000000000
   },
   "maxItems": 1000,
   "minItems": 2,
   "description": "At least two observations."
  },
  "y": {
   "type": "array",
   "items": {
    "type": "number",
    "maximum": 1000000000000000,
    "minimum": -1000000000000000
   },
   "maxItems": 1000,
   "minItems": 2,
   "description": "At least two observations."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "slope": 2,
  "intercept": 0,
  "r_squared": 1,
  "observations": 3
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/signaldesk-ai-linear-regression-7ab307d0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent.kariguetoazul.workers.dev](https://www.zero.xyz/host/x402-agent.kariguetoazul.workers.dev/llms.txt)
