{"uid":"cap_biiVDdp3Kp2WEH8mptVWr","slug":"delx-parse-int-safe-9f0b8c7e","name":"Delx Parse Int Safe","description":"Parse int with default on failure. Call when you need fail-soft integer parsing for agent inputs. Returns value and ok for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.","url":"https://api.delx.ai/api/v1/x402/parse-int-safe","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input field: text."},"default":{"type":"integer","description":"Input field: default."}}},"responseSchema":{"type":"json","example":{"ok":true,"value":42,"schema":"delx/util-parse-int-safe/v1"}},"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_3X1SqwBYw1w3OW0FQUnsn","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":"Safely parses a string to an integer, returning a default value on failure instead of throwing an error","exampleAgentPrompt":"Parse the string '42abc' as an integer for me, and if it fails just use 0 as the default.","exampleUseCases":[{"title":"Agent form input sanitization","prompt":"I got a user input of 'twentyfive' for a quantity field — can you parse that as an integer and fall back to 1 if it's not valid?"},{"title":"Config value parsing with fallback","prompt":"Parse the config string 'timeout=notanumber' to pull out the integer, defaulting to 30 if it can't be read."},{"title":"Cleaning scraped numeric data","prompt":"Try to parse '7.5k' as an integer from a scraped page — if it can't be converted, just return -1 so I know it failed."}],"resultDescription":"Returns a JSON object with the parsed integer value and an 'ok' boolean indicating whether parsing succeeded. If parsing fails, the value field contains the supplied default integer and ok is false.","failureModes":["Text is null or missing — may return default with ok=false","Default field not provided — behavior may be undefined or return an error","Input is a float string like '3.14' — likely parsed as failure depending on strictness","Very large numbers exceeding integer bounds — may fail or truncate","Network or payment failure via x402 — call does not complete"],"whenToPreferThis":"Choose this endpoint when you need fail-safe integer parsing inside an agent pipeline and cannot afford a hard crash or exception on bad input. It is ideal for sanitizing untrusted user-supplied strings, scraped numeric data, or config values that may be non-numeric, providing a safe default without writing custom parsing logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:52.320Z","isFirstParty":false}