# Character & Word Count for Agents

> Character & Word Count for Agents is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-16).

Counts characters, words, lines, and bytes in a given text string, returning all metrics in a single JSON object.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/char-count
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/character-word-count-for-agents-b05bd743
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R36C3qQULgKoIiCouvppP

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 character-word-count-for-agents-b05bd743 -d '<json body>'
```

Example prompt: How many characters and words are in this text: 'The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.'?

## When to prefer this

Choose this endpoint when you need a fast, deterministic, first-party count of characters, words, lines, and bytes without relying on client-side logic or LLM estimation. Ideal for pre-flight checks before SMS sending, prompt truncation, token budget estimation, or content length validation. No API key or subscription required — pay $0.001 USDC per call via x402 on Base.

## Known failure modes

- Text exceeds 100,000 character limit — structured validation error returned, no charge
- Empty or missing text field — validation error
- Malformed JSON request body — 400-level error
- Payment not included or insufficient — x402 payment required response

## How this service works

Count characters, words, and lines. Call before truncating prompts, validating SMS length, or estimating token budget from raw text. Returns character, word, line, and byte-oriented counts in one JSON object. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.

## Output

A JSON object containing numeric counts for characters, words, lines, and bytes derived from the submitted text. All metrics are returned in a single response with no data retained.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 100000,
   "description": "Primary text input (max 100k chars). Processed first-party; not retained as a dataset."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chars": 17,
  "lines": 1,
  "words": 3,
  "schema": "delx/char-count/v1",
  "bytes_utf8": 17
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/character-word-count-for-agents-b05bd743/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
