# FastX402 Byte Size Parser

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

Parses a human-readable byte size string (e.g. '1.5 MiB', '800 KB') and returns its canonical SI and IEC representations along with the exact byte count.

## Facts

- Endpoint: GET https://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-byte-size-parser-3827b00e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1DDMVJU2gf2CKsVVQc73C

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-byte-size-parser-3827b00e
```

Example prompt: How many bytes is 1.5 MiB, and what does that look like in SI units (MB)?

## When to prefer this

Use this endpoint when you need to programmatically parse a human-readable byte size string into an exact integer byte count and get both SI and IEC canonical representations. It handles ambiguous unit prefixes (KB vs KiB, MB vs MiB) correctly, making it ideal for data pipelines, storage quota systems, or any agent that receives user-supplied file size strings and needs normalized, unambiguous values.

## Known failure modes

- Missing `size` query parameter returns an error
- Unrecognized unit suffix (e.g. 'ZZB') causes a parse failure
- Negative or zero values may be rejected
- Extremely large numbers beyond supported range may fail
- Malformed input like '1.5 MBKB' returns an error

## How this service works

146 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

Returns a JSON object with: `bytes` (exact integer byte count), `si` (SI-formatted string, e.g. '1.573 MB'), `iec` (IEC-formatted string, e.g. '1.5 MiB'), `unit` (detected unit, e.g. 'MiB'), `system` (detected system, 'SI' or 'IEC'), and `input` (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-byte-size-parser-3827b00e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
