{"uid":"cap_VMY9MDTZOJbSdLTP_Z7iU","slug":"one-engine-number-truncate-2a516b67","name":"ONE Engine Number Truncate","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v1/number/truncate?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"value":{"type":"number"}}},"responseSchema":{"type":"json","example":{"value":-12}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0009","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.0009/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0009","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0009","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lR2mVYdvtzbjjgkvNoudi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0009","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Truncates a floating-point number to its integer part by removing the decimal portion, returning the truncated value.","exampleAgentPrompt":"Truncate the number 47.83 for me — I need just the integer part with the decimal stripped off, not rounded.","exampleUseCases":[{"title":"Strip decimals from price calculation","prompt":"I have a computed price of 19.999 and I need to truncate it down to 19 — no rounding, just drop everything after the decimal."},{"title":"Truncate negative float in data pipeline","prompt":"Can you truncate -7.654 to its integer part? I need -7, not -8, so no rounding — just remove the fractional portion."},{"title":"Normalize sensor reading to whole number","prompt":"My sensor is outputting 102.37 and I need to truncate it to a plain integer for my log — just drop the decimal, don't round up."}],"resultDescription":"A JSON object with a 'value' field containing the truncated integer result of the input number (e.g., {\"value\": -12} for input -12.7). The fractional part is discarded, not rounded; negative numbers truncate toward zero.","failureModes":["Missing or non-numeric 'value' field in request body may return a validation error","Extremely large or Infinity/NaN values may produce unexpected results","Payment failure via x402 will result in a 402 response before computation occurs"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call truncation operation within an autonomous agent workflow that already uses x402 on Base for micropayments. It is ideal for numerical normalization steps inside pipelines where spinning up a compute environment is overkill and you want a simple, cheap utility call. Prefer it over Math.trunc implementations when your agent lacks a code execution sandbox.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:29.194Z","isFirstParty":false,"canonicalSlug":"one-engine-number-truncate-2a516b67"}