{"uid":"cap_l4UU7fpE_XB2kUxMeqCLi","slug":"fastx402-lab-byte-size-parser-fe551816","name":"FastX402 Lab Byte-Size Parser","description":"FastX402 Lab: small pay-per-call tools for AI agents, paid per request in USDC on Base over x402. No signup, no API key.","url":"https://lab.fastx402.tools/byte-size-parse?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["size"],"properties":{"size":{"type":"string","description":"Human-readable size such as 1.5 MiB, 800 KB, 42 bytes. Units: B, KB..PB (decimal), KiB..PiB (binary). A bare number means bytes."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"si":{"type":"string"},"iec":{"type":"string"},"unit":{"type":"string"},"bytes":{"type":"integer"},"input":{"type":"string"},"system":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"si":"1.573 MB","iec":"1.5 MiB","unit":"MiB","bytes":1572864,"input":"1.5 MiB","system":"IEC"}},"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_2lgywNwohJpQXtx4z-Zll","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":"Converts a human-readable data size string (e.g. '1.5 MiB', '800 KB') into its exact byte count plus normalized SI and IEC representations","exampleAgentPrompt":"Can you parse the size '1.5 MiB' and tell me exactly how many bytes that is, along with both the SI and IEC representations?","exampleUseCases":[{"title":"Validate file upload size limit","prompt":"I need to check how many bytes '500 MB' actually is — can you parse that size and give me the exact byte count so I can compare it against our upload limit?"},{"title":"Disambiguate binary vs decimal size","prompt":"Someone reported a file is '2 GB' but I'm not sure if they mean gigabytes or gibibytes — can you parse '2 GB' and show me both the SI and IEC versions with exact byte counts?"},{"title":"Normalize mixed size units in a dataset","prompt":"I have a size value '4.7 GiB' from a log file and I need to normalize it — parse it and give me the canonical byte count plus how it looks in both SI and IEC notation."}],"resultDescription":"A JSON object containing: 'bytes' (exact integer byte count), 'si' (decimal SI string, e.g. '1.573 MB'), 'iec' (binary IEC string, e.g. '1.5 MiB'), 'unit' (detected unit string), 'system' (detected unit system, 'SI' or 'IEC'), and 'input' (echo of the original input string).","failureModes":["Missing or empty 'size' query parameter returns an error","Unrecognized or misspelled unit (e.g. 'megabytes' spelled out without abbreviation) may return a parse error","Non-numeric value before unit causes failure","Payment not completed via x402 protocol results in 402 response and no data returned"],"whenToPreferThis":"Use this endpoint when you need to parse an arbitrary human-readable size string into a precise byte count or normalized unit representation — especially when disambiguating between SI (decimal) and IEC (binary) interpretations. Ideal for agents processing file metadata, validating storage limits, or normalizing heterogeneous size data at low cost with no API key required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:40:24.874Z","isFirstParty":false,"canonicalSlug":"fastx402-lab-byte-size-parser-fe551816"}