# WritersLogic Chunk Boundary Planner

> WritersLogic Chunk Boundary Planner is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-19).

Plans semantically-aware chunk boundaries for splitting long text into token-capped pieces suitable for feeding to an LLM, with verified token counts and multi-encoding span offsets.

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/chunk-boundaries?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-chunk-boundary-planner-c11ef1f4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__hmotYM17IsUc8MEDZNii

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 writerslogic-chunk-boundary-planner-c11ef1f4 -d '<json body>'
```

Example prompt: Split this 50,000-character markdown article into chunks of at most 4096 tokens using the o200k_base tokenizer, keeping sentence and heading boundaries intact, and give me the UTF-8 offsets for each chunk.

## When to prefer this

Choose this endpoint when you need semantically correct, token-verified chunk boundaries that respect sentence integrity, Markdown structure (headings, tables, code fences), and HTML tables. It is preferable to naive character- or token-splitting when you need guarantees that chunks tile the input exactly, boundaries never fall mid-sentence or mid-structure, and you need precise multi-encoding offsets (UTF-16, code points, UTF-8, graphemes) for downstream processing. Supports o200k_base (GPT-4o) and cl100k_base (GPT-4/GPT-3.5) tokenizers with verified counts.

## Known failure modes

- Unsupported tokenizer name (including Claude model names) returns status 'unsupported' for items requiring counting
- A single sentence, table, or code fence longer than maxTokens is returned alone with exceedsCap=true and status 'fail' — it is never cut
- Text exceeding 100,000 characters is rejected
- maxTokens below 32 or above 1,000,000 is rejected
- Sentence boundary detection may be incorrect after abbreviations due to ICU rule limitations

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

Returns an array of chunk spans, each with offsets in UTF-16 code units, Unicode code points, UTF-8 bytes, and grapheme clusters, along with verified token counts and an exceedsCap flag. The overall status is 'ok' if all chunks fit within maxTokens, or 'fail' if any single indivisible unit (sentence, table, code fence) exceeded the cap. Chunks tile the input exactly with no gaps or overlaps.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 100000,
   "minLength": 1,
   "description": "Text to chunk (Markdown, plain text or HTML tables)."
  },
  "maxTokens": {
   "type": "integer",
   "maximum": 1000000,
   "minimum": 32,
   "description": "Hard cap per chunk."
  },
  "tokenizer": {
   "type": "string",
   "maxLength": 64,
   "minLength": 1,
   "description": "o200k_base or cl100k_base. Any other name (including Claude models) returns status unsupported for items that need counting; caller token counts are always accepted."
  },
  "includeText": {
   "type": "boolean",
   "description": "Also return each chunk's text. Default false (slice by span)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-chunk-boundary-planner-c11ef1f4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
