# agent402.tools Word Wrap

> agent402.tools Word Wrap is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Wraps text to a specified column width by breaking at word boundaries, with optional per-line indentation

## Facts

- Endpoint: POST https://agent402.tools/api/word-wrap
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-word-wrap-f251985a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-M4lPR7mCrcmfBPaGcGVY

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 agent402-tools-word-wrap-f251985a -d '<json body>'
```

Example prompt: Can you word-wrap this paragraph so each line is at most 60 characters wide, and prepend four spaces of indentation to every line: "The quick brown fox jumps over the lazy dog and then runs away into the forest where it disappears forever."

## When to prefer this

Choose this endpoint when you need a deterministic, pure-CPU text wrapping operation with precise column-width control and optional per-line indentation — especially when you want consistent, repeatable results without any AI or ML inference. Ideal for formatting terminal output, emails, code comments, or any fixed-width display context.

## Known failure modes

- Width exceeding maximum of 500 returns an error
- Non-integer width value causes a validation error
- Empty text input may return an empty string
- Payment failure (x402) prevents processing and returns a 402 response
- Extremely long single tokens are forcibly broken which may produce unexpected splits

## How this service works

Wrap text to a specified column width, breaking at word boundaries. Words longer than the width are forcibly broken. An optional indent string is prepended to each line. Deterministic, pure CPU.

## Output

Returns the input text reformatted with line breaks inserted at word boundaries so no line exceeds the specified width; words longer than the width are forcibly split. Each line is prefixed with the optional indent string. The result is a plain string ready for display in fixed-width contexts.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "The text to wrap"
  },
  "width": {
   "type": "integer",
   "description": "Maximum line width in characters (default 80, max 500)"
  },
  "indent": {
   "type": "string",
   "description": "String to prepend to each line (default \"\")"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "lines": 3,
  "result": "The quick brown fox\njumps over the lazy\ndog.",
  "longestLine": 19
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-word-wrap-f251985a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
