{"uid":"cap_8bSu9TjfrK8DlRkmC5kVY","slug":"one-engine-numeric-clamp-9679d4ba","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/t8?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.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PTn_kISG4OnSadh1WGxVq","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","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 numeric values between optional min/max bounds, with optional scaling, rounding, and offset transformation.","exampleAgentPrompt":"Clamp these values [150, -30, 72, 200, 55] to a min of 0 and max of 100, and round each result to 2 decimal places.","exampleUseCases":[{"title":"Constraining sensor data to valid range","prompt":"I have these temperature readings from sensors: [105, -10, 37, 88, 200, 22] — can you clamp them all between 0 and 100 so we filter out the bad readings?"},{"title":"Normalizing model confidence scores","prompt":"These are raw confidence scores from my model: [1.45, 0.02, 0.87, -0.1, 1.0, 0.65] — clamp them between 0 and 1 and round to 3 decimal places so they're valid probabilities."},{"title":"Scaling and bounding financial inputs","prompt":"I need to apply a factor of 0.5 and an offset of 10 to these values [80, 120, 300, -50, 45], then clamp the result between 0 and 200."}],"resultDescription":"Returns a JSON object containing the processed array of numbers, each clamped within the specified min/max bounds and optionally scaled by a factor, shifted by an offset, and rounded to the specified number of digits.","failureModes":["Missing required 'values' array returns a 400-level error","Array exceeds 1000 elements limit causes rejection","Non-finite numbers (NaN, Infinity) in the array may cause errors","Payment failure via x402 returns 402 Payment Required","Invalid types for min/max/factor/offset return schema validation errors"],"whenToPreferThis":"Use this endpoint when you need a pay-per-call, no-setup numeric clamping utility within an autonomous agent workflow — especially when combined with other ONE Engine math utilities on the same platform. Ideal for lightweight data normalization or bounding steps in a processing pipeline where infrastructure overhead should be zero.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:09.734Z","isFirstParty":false,"canonicalSlug":"one-engine-numeric-clamp-8845eb88"}