{"uid":"cap_Gzlqc9XY55qOrGpxnRxB1","slug":"delx-parse-size-strings-e2880c31","name":"Delx Parse Size Strings","description":"Parse size strings to bytes. Use when users type 1.5MB and your pipeline needs an integer byte budget. Returns integer bytes parsed from human size text. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.","url":"https://api.delx.ai/api/v1/x402/parse-bytes","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","maxLength":100000,"description":"Primary text input (max 100k chars). Processed first-party; not retained as a dataset."}}},"responseSchema":{"type":"json","example":{"bytes":1536,"input":"1.5KB","schema":"delx/parse-bytes/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_15BhpP-D6lZ6v6ExRJcXA","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":"Parses human-readable size strings (e.g. '1.5MB', '512KB') into integer byte counts","exampleAgentPrompt":"Convert '1.5MB' to its integer byte value for me — I need the exact number of bytes to pass into my pipeline's memory budget.","exampleUseCases":[{"title":"Pipeline memory budget from config","prompt":"My config file has a max_upload_size field set to '10MB' — can you convert that to an integer number of bytes so I can use it as a hard limit in my code?"},{"title":"Validating user-entered file size limit","prompt":"A user typed '256 KB' as their cache size limit. Convert that to bytes so I can validate it against our 200000-byte maximum."},{"title":"Normalizing mixed size strings in logs","prompt":"I've got a log entry that says 'allocated 3.75 GiB' — what's that in raw bytes as an integer?"}],"resultDescription":"Returns a JSON object containing the integer byte count parsed from the input size string (e.g. '1.5MB' → 1572864). Returns a structured validation error (not billed) if the input cannot be parsed as a valid size string.","failureModes":["Unparseable input string returns a structured validation error (not billed)","Input exceeds 100,000 character limit returns an error","Ambiguous units (e.g. 'MB' vs 'MiB') may be interpreted according to a fixed convention — callers should verify which standard is used","Payment failure (402) if x402 funds are insufficient"],"whenToPreferThis":"Use this endpoint when your agent or pipeline receives human-entered or config-file size strings (like '1.5MB', '512 KiB', '2GB') and needs a deterministic integer byte count without writing or maintaining a parsing library. Prefer it over regex hacks or custom parsers when correctness and consistency across size unit variants (KB, KiB, MB, MiB, etc.) matters. It requires no API key or subscription — only a tiny per-call micropayment via x402 on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:30.150Z","isFirstParty":false}