# FastX402 Lab Byte-Size Parser

> FastX402 Lab Byte-Size Parser is a paid API for AI agents from lab.fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-17).

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

## Facts

- Endpoint: GET https://lab.fastx402.tools/byte-size-parse?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-lab-byte-size-parser-fe551816
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_l4UU7fpE_XB2kUxMeqCLi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability fastx402-lab-byte-size-parser-fe551816
```

Example prompt: 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?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

FastX402 Lab: small pay-per-call tools for AI agents, paid per request in USDC on Base over x402. No signup, no API key.

## Output

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).

## Request schema (JSON Schema)

```json
{
 "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"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "si": "1.573 MB",
  "iec": "1.5 MiB",
  "unit": "MiB",
  "bytes": 1572864,
  "input": "1.5 MiB",
  "system": "IEC"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-lab-byte-size-parser-fe551816/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lab.fastx402.tools](https://www.zero.xyz/host/lab.fastx402.tools/llms.txt)
