{"uid":"cap_nAfcA5XI_k75x_75707cZ","slug":"one-engine-cumulative-sum-478e2c5d","name":"ONE Engine Cumulative Sum","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v3/numeric/cumulative-sum/t3?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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"}}},"responseSchema":{"type":"object","additionalProperties":true},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_IWwTv5JoBnr7qMpZplA-9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the cumulative (running) sum of an array of numeric values, with optional scaling, offset, clamping, and rounding controls.","exampleAgentPrompt":"Calculate the cumulative sum of these values: [10, 25, 5, 40, 15] — scale each step by a factor of 1.5 and round results to 2 decimal places.","exampleUseCases":[{"title":"Running balance for transaction history","prompt":"I have a list of daily transaction amounts: [120, -45, 200, -30, 80, -15]. Can you compute the running balance at each step, rounded to 2 decimal places?"},{"title":"Cumulative sales totals for reporting","prompt":"Here are our weekly sales figures: [3200, 4100, 2750, 5600, 3900]. Give me the cumulative sales total after each week so I can plot our progress."},{"title":"Prefix sums with scaling for signal processing","prompt":"Take this sensor reading array [0.5, 1.2, 0.8, 2.1, 1.5, 0.3] and compute the cumulative sum with a scale factor of 10 and offset of 100, clamped between 100 and 200, rounded to 1 decimal digit."}],"resultDescription":"Returns a JSON object containing the cumulative sum sequence — a running total array where each element is the sum of all preceding input values up to that index, optionally scaled by a factor, shifted by an offset, clamped to min/max bounds, and rounded to a specified number of decimal digits.","failureModes":["Array exceeds 1000 elements — request rejected","Non-finite values (NaN, Infinity) in input array — validation error","Missing required 'values' field — 400 bad request","Payment not provided or insufficient — 402 Payment Required","Invalid parameter types (e.g. string where number expected) — schema validation error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call cumulative sum computation without standing up your own numeric processing infrastructure. Ideal for AI agents that occasionally need prefix sums, running totals, or cumulative aggregations on small-to-medium arrays (up to 1000 elements) and want built-in scaling, offset, and clamping in a single call. Prefer this over general-purpose code execution when you want a minimal, predictable cost ($0.001 USDC) with no setup overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:40.081Z","isFirstParty":false,"canonicalSlug":"one-engine-cumulative-sum-1eeaa6ea"}