# HALOWERK Text Statistics

> HALOWERK Text Statistics is a paid API for AI agents from agent.halowerk.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-21).

Counts word segments, code points, UTF-16 units, UTF-8 bytes, and line counts for a given text, using a locale-aware Intl.Segmenter.

## Facts

- Endpoint: POST https://agent.halowerk.com/v1/text-statistics?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-text-statistics-d8a360d3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NZKLvlpZKo9rm4Q1ryzPO

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 halowerk-text-statistics-d8a360d3 -d '<json body>'
```

Example prompt: Can you count the words, UTF-8 bytes, code points, and lines in this text using the Japanese locale: '日本語のテキストサンプルです。改行があります。'?

## When to prefer this

Use this endpoint when you need accurate, locale-aware word counts (using Intl.Segmenter rather than naive whitespace splitting) alongside multi-encoding byte and code point metrics in a single call. It is especially valuable for multilingual text (CJK, accented Latin scripts) where word boundaries are non-trivial, or when you need both byte-level and character-level measurements simultaneously. Prefer it over client-side counting when you need consistent, server-authoritative text statistics.

## Known failure modes

- Text exceeds 32,000 character limit — returns a validation error
- Invalid or unsupported locale value — returns an error (only en, de, fr, es, zh, ja accepted)
- Missing required 'text' field — returns a schema validation error
- Payment failure or insufficient USDC balance — returns 402 Payment Required

## How this service works

Counts word-like Intl.Segmenter segments, code points, UTF-16 units, UTF-8 bytes and CRLF/CR/LF lines for supplied text. Returns the selected segmentation locale.

## Output

Returns counts for word-like Intl.Segmenter segments, Unicode code points, UTF-16 code units, UTF-8 bytes, and CRLF/CR/LF line counts for the supplied text, along with the locale used for segmentation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 32000
  },
  "locale": {
   "enum": [
    "en",
    "de",
    "fr",
    "es",
    "zh",
    "ja"
   ],
   "default": "en"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/halowerk-text-statistics-d8a360d3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent.halowerk.com](https://www.zero.xyz/host/agent.halowerk.com/llms.txt)
