# Byte 1-gram Frequency Counter

> Byte 1-gram Frequency Counter is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-29).

Counts the frequency of each byte value (0–255) in the provided text, returning a complete byte unigram histogram

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/ngram-byte-1?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/byte-1-gram-frequency-counter-423068d1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nFsw-IG1j1Hz87I5YiqLV

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 byte-1-gram-frequency-counter-423068d1 -d '<json body>'
```

Example prompt: Count the byte-level 1-gram frequencies in this text for me: 'Hello, world! This is a test string.' I need a complete histogram of how many times each byte value appears.

## When to prefer this

Choose this endpoint when you need exact, deterministic byte-level 1-gram counts without any LLM or network dependency — ideal for cryptographic preprocessing, compression analysis, or information-theoretic tasks. Prefer the free sandbox endpoint at /v1/sandbox/ngram-byte-1 first; use this paid endpoint when the sandbox is unavailable or rate-limited. For word-level or character-level frequency analysis, a different endpoint is more appropriate.

## Known failure modes

- Empty or missing text field returns a validation error
- Text exceeding 100,000 characters is rejected
- Payment of exactly $0.003 USDC via x402 is required; missing or incorrect payment results in 402 Payment Required
- Malformed JSON body returns a 400 error
- Non-UTF8 byte sequences may be handled differently than expected depending on server encoding

## How this service works

Call when an agent needs counts of byte 1-grams. No network and no LLM. Exact $0.003 USDC. Prefer unpaid POST /v1/sandbox/ngram-byte-1 first.

## Output

A mapping of byte values (0–255) to their counts within the submitted text, representing a complete byte unigram frequency histogram. Each byte that appears at least once is listed with its occurrence count.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "examples": [
    "ab ab"
   ],
   "maxLength": 100000,
   "minLength": 1,
   "description": "Input for this SKU. The route description says whether it is plain text, a URL, base64 bytes, or an already-encoded token."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/byte-1-gram-frequency-counter-423068d1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentshelf.syntexa.ch](https://www.zero.xyz/host/agentshelf.syntexa.ch/llms.txt)
