{"uid":"cap_3FxuES9k_BmKB6j7N_Yz_","slug":"delx-commerce-integer-clamp-utility-4bc03a14","name":"Delx Commerce — Integer 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/clamp-int?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":150,"schema":"delx/util-clamp-int/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_x0txG5YAXnENh2medl1m6","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, returning the bounded result and whether clamping occurred","exampleAgentPrompt":"Clamp the value 150 to be within 0 and 100 — tell me the result and whether it was actually clamped.","exampleUseCases":[{"title":"Enforcing UI slider range","prompt":"A user just submitted a slider value of -5, but the slider only goes from 0 to 255 — clamp it to that range and tell me if it was out of bounds."},{"title":"Capping API rate limit input","prompt":"Someone is trying to set a request rate of 9999 per minute, but our limit is between 1 and 500 — clamp 9999 to that range for me."},{"title":"Normalizing sensor reading","prompt":"I got a temperature sensor reading of 312 but valid readings are only between -40 and 85 degrees — clamp it and let me know if it was clamped."}],"resultDescription":"Returns a JSON object with: the clamped integer value, the original value, the min and max bounds used, a boolean 'was_clamped' indicating whether clamping was necessary, and a schema identifier ('delx/util-clamp-int/v1').","failureModes":["Missing required fields (value, min, max) result in a validation error","Non-integer inputs (floats, strings) may be rejected","min greater than max may cause undefined behavior or an error","Payment failure via x402 protocol blocks the response"],"whenToPreferThis":"Use this endpoint when you need a simple, pay-per-call, verifiable integer clamping operation without standing up your own math utility — especially useful in agent workflows on Base or Solana where deterministic numeric validation is needed as a composable primitive.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:51:51.446Z","isFirstParty":false,"canonicalSlug":"delx-commerce-integer-clamp-utility-4bc03a14"}