# ONE Engine Cumulative Sum API

> ONE Engine Cumulative Sum API is a paid API for AI agents from one-search.one-engine.workers.dev, paid per call via x402, $0.0015/call, status unknown (last checked 2026-10-02).

Computes the cumulative (running) sum of an array of up to 1000 numeric values, with optional scaling and filtering parameters.

## Facts

- Endpoint: POST https://one-search.one-engine.workers.dev/v3/numeric/cumulative-sum/t4?utm_source=zero.xyz
- Price: $0.0015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/one-engine-cumulative-sum-api-c77c2e4b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Qb9893Mc2oi6gmcOxtdaQ

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 one-engine-cumulative-sum-api-c77c2e4b -d '<json body>'
```

Example prompt: Can you compute the cumulative sum of these values for me: [10, 25, 5, 40, 15]? Round results to 2 decimal places.

## When to prefer this

Choose this endpoint when you need a quick, low-cost programmatic computation of cumulative sums for numeric arrays, especially in autonomous agent pipelines that already use x402 micropayments on Base. It is particularly useful when you need optional scaling, offsetting, or digit rounding applied to the running totals in a single call, avoiding the need for local computation logic. Prefer it over general-purpose code execution endpoints when you want a purpose-built, pay-per-call numeric utility without managing compute infrastructure.

## Known failure modes

- Input array exceeds 1000 elements — rejected with validation error
- Non-finite values (NaN, Infinity) in the input array — may cause error or undefined behavior
- Missing required 'values' field — returns 400-level error
- Payment not provided or insufficient USDC via x402 — returns 402 Payment Required
- Malformed JSON body — returns 400 error
- Network timeout on Cloudflare Worker edge — transient 5xx error

## How this service works

Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.

## Output

Returns a JSON object containing the cumulative sum sequence — each element represents the running total up to and including that position in the input array. Optional parameters may apply clamping (min/max), truncation to a specific size, rounding to a number of digits, multiplication by a factor, and addition of an offset to the results.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "values"
 ],
 "properties": {
  "max": {
   "type": "number"
  },
  "min": {
   "type": "number"
  },
  "size": {
   "type": "integer"
  },
  "digits": {
   "type": "integer"
  },
  "factor": {
   "type": "number"
  },
  "offset": {
   "type": "number"
  },
  "values": {
   "type": "array",
   "description": "Finite numbers, maximum 1000"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/one-engine-cumulative-sum-api-c77c2e4b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from one-search.one-engine.workers.dev](https://www.zero.xyz/host/one-search.one-engine.workers.dev/llms.txt)
