# Delx Commerce — Dedent Text API

> Delx Commerce — Dedent Text API is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Removes common leading whitespace (dedents) from a multi-line text string, returning the normalized text and the number of spaces stripped.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/dedent-text?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-dedent-text-api-38e6d160
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9Dkj6X0cL5TYqR9nobSsz

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-commerce-dedent-text-api-38e6d160 -d '<json body>'
```

Example prompt: Can you dedent this text block for me — it has 2 spaces of common indentation on every line that I want removed: '  hello\n  world\n  foo'?

## When to prefer this

Choose this endpoint when you need a reliable, pay-per-use, no-signup text dedenting utility with verifiable delivery. Ideal for AI agents that occasionally need to normalize indented text blocks without integrating a full text-processing library or managing dependencies. Particularly useful in agent workflows processing code snippets, pasted documents, or template strings that carry incidental indentation.

## Known failure modes

- Missing or empty 'text' field in request body — likely returns a 400 or validation error
- Text with inconsistent indentation where no common prefix exists — result may be unchanged or strip fewer spaces than expected
- Very large text strings may exceed payload limits
- Payment failure via x402 protocol if USDC balance is insufficient or wallet is misconfigured

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object containing the dedented text string, the number of leading spaces that were stripped (stripped field), and a schema identifier (delx/util-dedent-text/v1) confirming the operation type.

## 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-commerce-dedent-text-api-38e6d160/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
