{"uid":"cap_jH1Ldvenkeg6FsyOQC6Eb","slug":"one-engine-cumulative-sum-1eeaa6ea","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/t7?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.0065","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.0065/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0065","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0065","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_V7DHAfu8QhJbEzXTi-R1n","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0065","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 numbers, with optional scaling, offsetting, and output constraints.","exampleAgentPrompt":"Can you compute the cumulative sum of these values: [3, 7, 2, 15, 8, 4] — keep results to 2 decimal places?","exampleUseCases":[{"title":"Running total for transaction ledger","prompt":"I have a list of daily transaction amounts [120.5, 45.0, 300.75, 89.25, 60.0] — can you give me the cumulative running totals so I can see how my balance grew over the week, rounded to 2 decimal places?"},{"title":"Prefix sum for algorithm computation","prompt":"I need prefix sums for this array of weights: [4, 8, 15, 16, 23, 42] — compute the cumulative sum and scale every result by a factor of 0.1."},{"title":"Capped cumulative score tracker","prompt":"Compute the cumulative sum of these game scores [50, 120, 75, 200, 30, 95] but cap the output at a maximum of 400 so I can see where the score ceiling gets hit."}],"resultDescription":"Returns a JSON object containing the computed cumulative (prefix) sum array, where each element represents the running total up to that index in the input, optionally scaled by a factor, shifted by an offset, rounded to a specified number of digits, and/or clamped between min and max bounds.","failureModes":["Input array exceeds 1000 elements — request rejected","Non-finite values (NaN, Infinity) in the values array — validation error","Missing required 'values' field — 400 bad request","Payment not included or insufficient USDC — 402 Payment Required","Malformed JSON body — parse error"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to compute cumulative/prefix sums on a numeric array as part of an automated workflow, especially when fine-grained control over output (scaling, offsetting, clamping, precision) is needed. It is ideal for lightweight pay-per-call numeric computation without spinning up your own compute, and works well in agentic pipelines on Base that already use x402 micropayments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:23.488Z","isFirstParty":false,"canonicalSlug":"one-engine-cumulative-sum-1eeaa6ea"}