# API Usage Trailing Mean Series

> API Usage Trailing Mean Series is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-15).

Computes a trailing (rolling) mean series over API usage metrics (requests or latency) for up to 200 time-series records, grouped by endpoint.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-sector-analytics-api-usage-rolling?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-usage-trailing-mean-series-5cb253b2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_I-pCLxdknfqTRqXSpvCVm

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-usage-trailing-mean-series-5cb253b2 -d '<json body>'
```

Example prompt: Compute a trailing mean series for my API usage data — I have 4 rows of daily request counts for two endpoints (group-a and group-b), and I want the smoothed 'requests' field using a window of 2.

## When to prefer this

Choose this endpoint when you need a fast, low-cost ($0.01) locally-computed rolling/trailing mean over API usage time-series data (requests or latency) with up to 200 records. Ideal for smoothing noisy API metrics without external dependencies. Prefer alternatives if you need forecasting, anomaly detection, or more than 200 records.

## Known failure modes

- Fewer than 1 row submitted — violates minItems:1 constraint
- Window size exceeds number of rows — trailing mean may be undefined for early records
- Invalid date format (not YYYY-MM-DD pattern) — schema validation failure
- Numeric values outside allowed range (±1,000,000,000,000) — rejected
- More than 200 rows submitted — violates maxItems:200 constraint
- Field value not 'requests' or 'latency_ms' — enum validation error
- Payment failure — 402 response if USDC payment not included

## How this service works

API usage - Trailing mean series: Trailing mean series for API usage. Up to 200 supplied typed records. Local numeric and data-quality processing; no external enrichment or forecasting. One of 25 profiles or calculations across 20 shared operations in this sector. 0.01 USDC includes one bounded trailing mean series deliverable.

## Output

Returns a rolling/trailing mean series derived from the supplied typed records (up to 200), computing the windowed average of the selected numeric field (requests or latency_ms) over the specified window size, with local numeric and data-quality processing applied — no external enrichment or forecasting.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "rows": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "row_id",
     "endpoint",
     "date",
     "requests",
     "latency_ms"
    ],
    "properties": {
     "date": {
      "type": "string",
      "default": "",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      "maxLength": 10
     },
     "row_id": {
      "type": "string",
      "default": "",
      "maxLength": 80,
      "minLength": 1
     },
     "endpoint": {
      "type": "string",
      "default": "",
      "maxLength": 80
     },
     "requests": {
      "type": [
       "number",
       "null"
      ],
      "maximum": 1000000000000,
      "minimum": -1000000000000
     },
     "latency_ms": {
      "type": [
       "number",
       "null"
      ],
      "maximum": 1000000000000,
      "minimum": -1000000000000
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "date": "2026-10-01",
     "row_id": "row-1",
     "endpoint": "group-a",
     "requests": 10,
     "latency_ms": 1
    },
    {
     "date": "2026-10-02",
     "row_id": "row-2",
     "endpoint": "group-b",
     "requests": 20,
     "latency_ms": 2
    },
    {
     "date": "2026-10-03",
     "row_id": "row-3",
     "endpoint": "group-a",
     "requests": 15,
     "latency_ms": 3
    },
    {
     "date": "2026-10-04",
     "row_id": "row-4",
     "endpoint": "group-b",
     "requests": 30,
     "latency_ms": 4
    }
   ],
   "maxItems": 200,
   "minItems": 1
  },
  "field": {
   "enum": [
    "requests",
    "latency_ms"
   ],
   "type": "string",
   "default": "requests"
  },
  "window": {
   "type": "integer",
   "default": 2,
   "maximum": 200,
   "minimum": 2
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-usage-trailing-mean-series-5cb253b2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
