{"uid":"cap_RKGXmQkwIoejVKfZbqE4X","slug":"one-engine-numeric-clamp-6710fb77","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/t2?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.0007","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.0007/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0007","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0007","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ccjmVwHfDNAtOavBo6mPk","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0007","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, rounding, and offset transformations.","exampleAgentPrompt":"I have this list of sensor readings [120, -5, 300, 47, 999] and I need to clamp them all between 0 and 255, rounded to 0 decimal digits — can you run that through ONE Engine's numeric clamp?","exampleUseCases":[{"title":"Clamping sensor data to safe range","prompt":"I'm getting raw temperature sensor values like [−20, 15, 105, 200, 37] but my hardware only accepts values between 0 and 100. Can you clamp all of them to that range and round to 1 decimal place?"},{"title":"Normalizing scores for display","prompt":"I have a list of user scores [−300, 50, 1050, 720, 0, 999] and I want to constrain them all to a 0–100 range with no decimal places so they display cleanly on a leaderboard."},{"title":"Financial value bounding with offset","prompt":"Take these transaction deltas [−500, 200, 1500, −80, 750] and clamp them between −1000 and 1000, then apply an offset of 50 to each result, keeping 2 decimal digits."}],"resultDescription":"Returns a JSON object containing the transformed array of numbers after clamping each input value to the specified [min, max] range, with optional scaling by a factor, shifting by an offset, and rounding to a given number of decimal digits.","failureModes":["Input array exceeds 1000 elements — rejected with validation error","Non-finite values (NaN, Infinity) in the values array cause rejection","Missing required 'values' field returns a 400-level error","Invalid types for numeric fields (e.g. string instead of number) cause schema validation failure","Payment failure via x402 returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need a cheap, low-latency, pay-per-call numeric clamp operation for up to 1000 values at once, especially in autonomous agent pipelines where you want to avoid importing math libraries or writing custom code. Ideal when you also need combined scaling (factor), shifting (offset), and digit 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:10.588Z","isFirstParty":false,"canonicalSlug":"one-engine-numeric-clamp-8845eb88"}