# Delx Dedent Text

> Delx Dedent Text is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Removes common leading whitespace from all lines of a text block and returns the dedented text along with the number of spaces stripped.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/dedent-text
- 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/delx-dedent-text-0aaf2248
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OeBgeDTH7x_6UEjTvqjKz

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-dedent-text-0aaf2248 -d '<json body>'
```

Example prompt: Can you dedent this YAML block for me and tell me how many spaces were stripped? It's been indented with 4 spaces on every line and I need it normalized before I pass it to the next step.

## When to prefer this

Choose this endpoint when you need a lightweight, stateless, single-call operation to strip common leading whitespace from a multiline string — especially for normalizing code fences, YAML blocks, or template output before further processing. Prefer it over implementing local dedent logic when operating in environments where you cannot ship utility libraries or want a consistent, auditable transformation with a known cost.

## Known failure modes

- Missing or empty 'text' field returns an error or no-op result
- Text with inconsistent indentation may only strip the minimum common leading whitespace
- Very large text payloads may be rejected or time out
- Non-string input for 'text' field may cause a validation error

## How this service works

Remove common leading whitespace from lines. Call when you normalize agent-held code fences or YAML blocks. Returns dedented text and stripped space count for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.

## Output

Returns the dedented text with common leading whitespace removed from all lines, plus an integer count indicating how many leading spaces were stripped per line.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Input field: text."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "text": "  a\n  b\nc",
  "schema": "delx/util-dedent-text/v1",
  "stripped": 2
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-dedent-text-0aaf2248/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
