# fly.ai Time-Series Forecast API

> fly.ai Time-Series Forecast API is a paid API for AI agents from flyai-x402.fly.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-12).

Forecasts future values of a numeric time series with configurable horizon and confidence interval, billed per-request via x402

## Facts

- Endpoint: POST https://flyai-x402.fly.dev/forecast?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fly-ai-time-series-forecast-api-80c09f8d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LLV_OL8tFL49YZmRwoEMA

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 fly-ai-time-series-forecast-api-80c09f8d -d '<json body>'
```

Example prompt: I have this sequence of daily sales numbers (oldest first): [120, 134, 128, 145, 160, 155, 170] — each measured 86400 seconds apart — can you forecast the next 7 steps with a 0.9 confidence band?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-use numeric time series forecast without provisioning a dedicated ML infrastructure. It is ideal for agents that occasionally need forward projections on sensor data, business metrics, or any ordered numeric sequence, and want to avoid subscription costs. The x402 micropayment model at $0.03 USDC per call makes it cost-effective for low-to-medium frequency forecasting tasks where you only pay when you actually need a prediction.

## Known failure modes

- Missing required 'series' field returns a 400/422 validation error
- Series array too short for meaningful forecasting may return an error or low-quality result
- Confidence value outside 0.5–0.99 range triggers validation rejection
- Payment failure over x402 protocol results in 402 Payment Required before forecast is returned
- Invalid data types (non-numeric series values) cause schema validation errors
- Very large horizons relative to series length may yield high uncertainty or degenerate forecasts

## How this service works

Single answers, each paid on its own over x402. Guide: https://www.flyaiworld.com/x402-api.md

## Output

The endpoint returns forecasted numeric values for the requested number of steps ahead, along with a prediction band (upper and lower bounds) at the specified confidence level, allowing the agent to understand both the point forecast and the uncertainty range.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "series"
 ],
 "properties": {
  "series": {
   "type": "array",
   "description": "The numbers to forecast, oldest first"
  },
  "horizon": {
   "type": "integer",
   "description": "Steps ahead to forecast"
  },
  "confidence": {
   "type": "number",
   "description": "Width of the prediction band, 0.5 to 0.99"
  },
  "step_seconds": {
   "type": "integer",
   "description": "Seconds between two numbers"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fly-ai-time-series-forecast-api-80c09f8d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from flyai-x402.fly.dev](https://www.zero.xyz/host/flyai-x402.fly.dev/llms.txt)
