{"uid":"cap_B1-rrUrZTuzJmcM7u64QJ","slug":"one-engine-numeric-clamp-8845eb88","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/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_8BGbzSUgZcC3llT_58LlE","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":"Clamps an array of numbers to a specified min/max range, with optional rounding and scaling transformations.","exampleAgentPrompt":"Clamp these sensor readings [−5.2, 0.8, 14.3, 99.1, −0.4] so nothing falls below 0 or above 10, rounded to 2 decimal places.","exampleUseCases":[{"title":"Sanitize sensor data to valid range","prompt":"I have these temperature sensor readings [−12.4, 23.1, 101.5, 37.8, −0.9] and I need to clamp them all between 0 and 100, rounded to 1 decimal place."},{"title":"Constrain ML model scores","prompt":"Can you clamp these confidence scores [1.32, 0.87, −0.05, 1.01, 0.55] so they all stay between 0 and 1 with 3 digits of precision?"},{"title":"Normalize financial percentage values","prompt":"I've got these percentage change values [−150.2, 4.5, 78.9, −3.1, 200.0] — please clamp them between −100 and 100 and scale by a factor of 0.01."}],"resultDescription":"Returns a JSON object containing the clamped (and optionally scaled, offset, and rounded) numeric values for each input element, with all values constrained to the specified [min, max] range.","failureModes":["Array exceeds 1000 element limit — request rejected","Non-finite values (NaN, Infinity) in input array — validation error","Missing required 'values' field — 400 bad request","Payment not included or insufficient — 402 Payment Required","min greater than max — undefined or error behavior"],"whenToPreferThis":"Choose this endpoint when you need a fast, pay-per-call serverless clamp operation on a numeric array without standing up your own infrastructure — especially useful in autonomous agent pipelines on Base/x402 where micro-payments are natural and you want to avoid managing compute resources. Ideal for small-to-medium arrays (up to 1000 values) needing simultaneous clamp, scale, offset, and rounding in one call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:34.218Z","isFirstParty":false,"canonicalSlug":"one-engine-numeric-clamp-8845eb88"}