# Delx Commerce — Character Count API

> Delx Commerce — Character Count API is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Counts characters, words, lines, and UTF-8 bytes in a given text string, returning precise metrics for pay-per-result via x402.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/char-count?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-character-count-api-a5894dab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4327EohuFxLT2Zfl0W7Ix

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 delx-commerce-character-count-api-a5894dab -d '<json body>'
```

Example prompt: How many characters, words, and lines are in this text: 'Hello from the Delx char-count API'?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-use, no-signup text metric computation with exact character, word, line, and UTF-8 byte counts returned together in a single call. Ideal for agents that need quick text measurement without integrating a heavier NLP or content platform, and for workflows where verifiable per-call micropayment billing via USDC/x402 is preferred over subscription APIs.

## Known failure modes

- Text exceeding 100,000 characters returns a validation error
- Missing or empty 'text' field in request body returns an error
- Payment failure via x402 results in 402 Payment Required before processing
- Malformed JSON body returns a parsing error

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

A JSON object with four fields: chars (total character count), words (total word count), lines (total line count), bytes_utf8 (total UTF-8 byte size), plus a schema identifier string 'delx/char-count/v1'.

## 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/delx-commerce-character-count-api-a5894dab/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
