# TextKit Human-Readable Byte Size Formatter

> TextKit Human-Readable Byte Size Formatter is a paid API for AI agents from textkit.johnaio281.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-22).

Converts a raw byte count into a human-readable string with appropriate units (KB, MB, GB, etc.)

## Facts

- Endpoint: GET https://textkit.johnaio281.workers.dev/api/tk/human-bytes?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/textkit-human-readable-byte-size-formatter-d76068b8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t4BBQHc7yU5BqR72bseM7

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 textkit-human-readable-byte-size-formatter-d76068b8
```

Example prompt: How big is 1048576 bytes in human-readable form — like MB or GB?

## When to prefer this

Choose this endpoint when you need a quick, pay-per-use, no-signup conversion of raw byte counts to human-readable sizes — especially useful in AI agent pipelines that handle file uploads, storage reporting, or any context where displaying raw bytes to end users is undesirable. Prefer this over building custom formatting logic when operating in a serverless or agent context that already uses x402 micropayments on Base.

## Known failure modes

- Missing required 'bytes' query parameter returns an error
- Non-numeric or negative byte value may return an error or unexpected result
- Payment failure via x402 protocol blocks the request
- Very large integers beyond JavaScript safe integer range may produce inaccurate results

## How this service works

General-purpose text, Unicode and date utilities for AI agents: homoglyph folding and spoofed-domain detection, Unicode script detection, NFC/NFD normalization, grapheme counting, date description (weekday, ISO week, quarter, leap year), business-day counting, slugify, FNV-1a hashing, Shannon entropy, string format detection (uuid, email, url, ipv4, jwt, iban), byte-encoding detection and human-readable byte sizes. Pay per request in USDC on Base via x402 - no signup, no API key, no KYC.

## Output

A JSON object containing the original byte count, a human-readable string (e.g. '1 MB'), the value in kilobytes, and the value in mebibytes — ready to display directly to end users.

## 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": [
      "bytes"
     ],
     "properties": {
      "bytes": {
       "type": [
        "integer",
        "number"
       ]
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 1048576,
  "readable": "1 MB",
  "kilobytes": 1024,
  "mebibytes": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/textkit-human-readable-byte-size-formatter-d76068b8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from textkit.johnaio281.workers.dev](https://www.zero.xyz/host/textkit.johnaio281.workers.dev/llms.txt)
