# Delx HTML Escape

> Delx HTML Escape 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-13).

HTML-escapes a text string so it can be safely embedded in HTML without XSS risk

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/html-escape
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-html-escape-012f6517
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dLxbV_tcq7QIhIsSOrjYD

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-html-escape-012f6517 -d '<json body>'
```

Example prompt: HTML-escape this string for me so I can safely drop it into an HTML page without XSS risk: '<script>alert("hello")</script> — thanks, Johnson & Associates'

## When to prefer this

Choose this endpoint when your agent pipeline dynamically injects text into HTML and you need a lightweight, stateless, pay-per-call HTML-escaping step without managing a library or server-side dependency. It is ideal for agents that produce HTML emails, web snippets, or templated pages where user-generated or LLM-generated text must be sanitized on the fly. Prefer it over a full sanitization library when you only need character-level HTML entity encoding and not full HTML parsing or stripping.

## Known failure modes

- Empty or missing 'text' field returns an error or empty result
- Extremely large payloads may be rejected or time out
- Payment failure via x402 will block the call from completing
- Non-string input types may cause a validation error

## How this service works

HTML-escape text for safe embedding. Call when you inject agent text into HTML without XSS. Returns escaped text 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 input text with all HTML special characters converted to their safe entity equivalents (e.g. < becomes &lt;, > becomes &gt;, & becomes &amp;, " becomes &quot;), ready for direct embedding in HTML without XSS risk.

## 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 &lt;b&gt; &amp; &#x27;c&#x27; &gt; d",
  "schema": "delx/util-html-escape/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-html-escape-012f6517/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)
