{"uid":"cap_a8ZZKE494Bt0VkdskRRkt","slug":"one-engine-cumulative-sum-91ac0c86","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/t9?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.018","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.018/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.018","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.018","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_LGkasIfKuyuvgFrhqtJWi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.018","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, offsetting, and output constraints.","exampleAgentPrompt":"Calculate the cumulative sum of these numbers for me: [3, 7, 2, 10, 5, 8] — round the results to 2 decimal places.","exampleUseCases":[{"title":"Running total for expense tracking","prompt":"I have a list of daily expenses for the month: [12.50, 34.00, 8.75, 22.10, 45.60] — can you give me the running total after each day, rounded to 2 decimal places?"},{"title":"Cumulative sales performance analysis","prompt":"Here are weekly sales figures: [1500, 2300, 1800, 3100, 2750] — compute the cumulative sum so I can see how total revenue builds up week over week."},{"title":"Scaled and offset prefix sums","prompt":"Take this array [10, 20, 30, 40, 50], compute the cumulative sum, apply a scale factor of 0.5, and add an offset of 100 to each result — give me everything rounded to 1 decimal digit."}],"resultDescription":"Returns an object containing the cumulative sum array derived from the input values, with each element representing the running total up to that index, optionally scaled by a factor, shifted by an offset, clamped to min/max bounds, resized to a specified output size, and rounded to the specified number of decimal digits.","failureModes":["Array exceeds 1000 elements — request rejected","Non-finite numbers (NaN, Infinity) in input values — validation error","Missing required 'values' field — 400 bad request","Payment not provided or insufficient — 402 Payment Required","Output size mismatch if 'size' parameter is inconsistent with input length"],"whenToPreferThis":"Choose this endpoint when you need a fast, pay-per-call cumulative sum computation without managing your own compute infrastructure, especially in autonomous agent pipelines on Base using x402 micropayments. It is ideal for small-to-medium arrays (up to 1000 elements) where you also need post-processing options like scaling, offset, clamping, and rounding in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:15.764Z","isFirstParty":false,"canonicalSlug":"one-engine-cumulative-sum-1eeaa6ea"}