# Halowerk Context Planner

> Halowerk Context Planner is a paid API for AI agents from modell.halowerk.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Plans how to split a long text into chunks that fit a language model's context window, accounting for system prompt, expected answer, and a safety margin, with optional overlap between chunks.

## Facts

- Endpoint: POST https://modell.halowerk.com/v1/context-plan
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-context-planner-c5cd093d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AvDWh2mh8ozFmrwlkHsID

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-context-planner-c5cd093d -d '<json body>'
```

Example prompt: I have a 50,000-word research report I need to process with GPT-4o — can you plan how to chunk it so each piece fits the context window, reserving 1,000 tokens for the system prompt and 2,000 tokens for the answer, with 200 tokens of overlap between chunks and cuts at paragraph boundaries?

## When to prefer this

Use this endpoint when you need to programmatically plan how to split long documents for LLM processing before actually calling the model — especially when you want paragraph-aware boundaries, controlled overlap, and accurate token budget reservations for system prompts and expected answers. Prefer this over ad-hoc splitting when token precision and boundary quality matter, such as in RAG pipelines, document summarization workflows, or any agentic loop that feeds long context to a model.

## Known failure modes

- Input text exceeds model's maximum context even in a single chunk after reservations — returns an error indicating the text is too large
- Unknown or unsupported model name — returns an error as token limits cannot be determined
- Invalid parameter values (e.g. negative overlap or margins larger than context window) — returns a validation error
- Empty input text — may return a single empty chunk or an error depending on implementation

## How this service works

Plans the division of a long input for a given model. It reserves room for the system prompt, the expected answer and a safety margin, then works out how many chunks are needed and where to cut, preferring paragraph boundaries over line and sentence boundaries and never cutting inside a word. Optional overlap carries context across the seams.

## Output

Returns a structured chunk plan specifying the total number of chunks, the start and end positions (character or token offsets) for each chunk, and any overlap regions — with cuts preferring paragraph, then line, then sentence boundaries, and never splitting inside a word.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 2000000,
   "minLength": 1,
   "description": "The document to split."
  },
  "model": {
   "type": "string",
   "description": "Target model id, e.g. claude-opus-5."
  },
  "boundary": {
   "enum": [
    "absatz",
    "zeile",
    "satz",
    "auto"
   ],
   "type": "string",
   "default": "auto",
   "description": "Where to cut. auto tries paragraph, then line, then sentence."
  },
  "safety_margin": {
   "type": "number",
   "default": 0.1,
   "maximum": 0.5,
   "minimum": 0,
   "description": "Fraction of the window held back against estimation error. 0.1 = 10 percent."
  },
  "overlap_tokens": {
   "type": "integer",
   "default": 0,
   "maximum": 20000,
   "minimum": 0,
   "description": "Tokens of the previous chunk repeated at the start of the next."
  },
  "system_prompt_tokens": {
   "type": "integer",
   "default": 500,
   "minimum": 0,
   "description": "Room to reserve for the system prompt per chunk."
  },
  "expected_output_tokens": {
   "type": "integer",
   "default": 2000,
   "minimum": 0,
   "description": "Room to reserve for the answer per chunk."
  }
 }
}
```

## More

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