{"uid":"cap_xoTTgTDnuCWdKQbd6W5hN","slug":"delx-commerce-percent-clamp-utility-5fe9e1e4","name":"Delx Commerce Percent Clamp Utility","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/percent-clamp?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"max":{"type":"integer","description":"Input field: max."},"min":{"type":"integer","description":"Input field: min."},"value":{"type":"integer","description":"Input field: value."}}},"responseSchema":{"type":"json","example":{"ok":true,"max":100,"min":0,"value":120,"schema":"delx/util-percent-clamp/v1","clamped":100,"was_clamped":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Pk1s0AT2y5-o9bCdP5Ou4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Clamps an integer value to a specified min/max range and returns the clamped result with a flag indicating whether clamping occurred","exampleAgentPrompt":"Clamp the value 120 to be between 0 and 100 — I need to know the clamped result and whether it was actually clamped.","exampleUseCases":[{"title":"Cap progress percentage at 100","prompt":"My progress counter hit 120 — clamp it between 0 and 100 so I know the actual displayable percentage and whether it went out of range."},{"title":"Validate user-submitted score","prompt":"A user submitted a score of -5 for a quiz that should only allow values between 0 and 50. Can you clamp it and tell me if it was out of bounds?"},{"title":"Enforce API rate limit percentage","prompt":"I have a utilization reading of 87 and my allowed range is 10 to 80. Clamp 87 between 10 and 80 and tell me if it got clamped."}],"resultDescription":"Returns a JSON object with the original value, the min/max bounds, the clamped output value, and a boolean 'was_clamped' flag indicating whether the input exceeded the bounds, plus an 'ok' status and schema identifier.","failureModes":["Missing required fields (value, min, or max) returns a validation error","Non-integer inputs may be rejected or coerced unexpectedly","Payment failure via x402 protocol prevents execution","min greater than max may produce undefined or error behavior"],"whenToPreferThis":"Use this endpoint when an AI agent needs a verifiable, pay-per-use numeric clamping operation with guaranteed delivery confirmation via USDC on Base or Solana — particularly when auditability of the computation result matters or when integrating into a micropayment-native agent workflow. For pure in-process math, a local implementation is cheaper; choose this when you need on-chain verifiable computation provenance.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:44.805Z","isFirstParty":false,"canonicalSlug":"delx-commerce-percent-clamp-utility-5fe9e1e4"}