{"uid":"cap_Qb9893Mc2oi6gmcOxtdaQ","slug":"one-engine-cumulative-sum-api-c77c2e4b","name":"ONE Engine Cumulative Sum API","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/t4?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.0015","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.0015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ClEzgkh73flK5FkRC01ka","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0015","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 up to 1000 numeric values, with optional scaling and filtering parameters.","exampleAgentPrompt":"Can you compute the cumulative sum of these values for me: [10, 25, 5, 40, 15]? Round results to 2 decimal places.","exampleUseCases":[{"title":"Running total for sales figures","prompt":"I have daily sales numbers for last week — [1200, 850, 1400, 970, 1100, 600, 1350] — can you give me the running total so I can see how revenue accumulated day by day? Show 2 decimal places."},{"title":"Prefix sums for algorithm processing","prompt":"I need the prefix sum array for these integers [3, 7, 2, 9, 4, 6, 1] to feed into a range-query algorithm. Can you compute that for me?"},{"title":"Scaled cumulative totals with offset","prompt":"Take these sensor readings [0.5, 1.2, 0.8, 2.1, 0.3] and compute the cumulative sum, then scale everything by a factor of 100 and add an offset of 50. Give me 1 decimal digit in the results."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:31.586Z","isFirstParty":false,"canonicalSlug":"one-engine-cumulative-sum-api-c77c2e4b"}