{"uid":"cap_A0_Bu2nEfnDlMWi9w2rDH","slug":"one-engine-numeric-clamp-34a108db","name":"ONE Engine Numeric Clamp","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/clamp/t6?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.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_G15Ek9N73lAKIbGCgHkKZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Clamps an array of numbers to a specified min/max range, with optional scaling, offset, rounding, and size controls.","exampleAgentPrompt":"Clamp these sensor readings [−50, 0, 42, 105, 999, −3] so no value falls outside 0 to 100, round results to 1 decimal place.","exampleUseCases":[{"title":"Clamping ML confidence scores","prompt":"I have these raw model confidence scores [−0.2, 0.45, 1.3, 0.88, −0.05, 1.01] — clamp them all to the range 0 to 1 and round to 3 decimal places."},{"title":"Constraining financial risk values","prompt":"Take these risk exposure numbers [−500, 200, 1050, 750, −30, 2000] and make sure none of them go below 0 or above 1000, keeping 2 decimal digits."},{"title":"Normalizing IoT sensor data","prompt":"I've got 8 temperature readings from my sensors [−12, 18, 23, 101, 37, −5, 65, 200] — clamp everything between −10 and 80 degrees and apply a scale factor of 0.5 before sending to my dashboard."}],"resultDescription":"Returns a JSON object containing the transformed array of numbers after clamping to the specified min/max bounds, with optional scaling by a factor, shifting by an offset, and rounding to a given number of decimal digits. The output size can be limited via the size parameter.","failureModes":["values array missing or empty — required field not provided","values array exceeds 1000 elements — hard limit enforced","non-finite values (NaN, Infinity) in input array — endpoint may reject or return errors","min greater than max — logically invalid range causing unexpected behavior","payment not provided or insufficient — 402 Payment Required response","malformed JSON body — 400 Bad Request"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call numeric clamping and transformation operation without standing up your own compute. Ideal for agent pipelines that occasionally need to sanitize or normalize small batches of numbers (up to 1000) before passing them to downstream tools, and where paying $0.004 USDC per call via x402 on Base is preferable to self-hosting math utilities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:57.916Z","isFirstParty":false,"canonicalSlug":"one-engine-numeric-clamp-8845eb88"}