# agent402.tools Text Hygiene Workflow

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

Cleans raw messy text by measuring quality, redacting PII, and normalizing it into a safe, searchable, pipeline-ready form

## Facts

- Endpoint: POST https://agent402.tools/api/skill/text-hygiene
- Price: $0.009/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-text-hygiene-workflow-de87ade3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UNoe9wNjphfKMaKjxy9L1

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-text-hygiene-workflow-de87ade3 -d '<json body>'
```

Example prompt: Can you clean up this wall of messy scraped text — it has chat logs, user comments, and some log lines mixed in — redact any PII you find, and give me back something safe to store and search through? Here's the raw dump: [paste text here]

## When to prefer this

Choose this endpoint when you need an all-in-one bundled text hygiene pass — measuring text quality, redacting PII, and normalizing in a single call — rather than chaining multiple separate cleaning or redaction steps. Ideal for pipelines ingesting untrusted or messy text sources like scraped pages, chat logs, or user-generated content that must be safe before storage or search.

## Known failure modes

- Input text exceeds 500KB limit — returns error indicating payload too large
- Malformed or non-string text field — returns schema validation error
- Service unavailable or payment failure (x402) — returns 402 Payment Required
- Empty text input — may return empty or unchanged output

## How this service works

Bundled execution of the Text hygiene workflow - Turn a wall of dirty text - chat logs, scraped pages, user-generated content, log dumps - into something safe to store, search, and pipe into the next step. Measure first, redact PII before anything else touches the data, then dedupe, sort, extract entities, surface keywords, and grade the readability of what's left.

## Output

Returns sanitized, PII-redacted, normalized text derived from the raw input, ready for storage, search indexing, or piping into a downstream workflow step

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "The raw text dump to clean (max 500KB)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "args": {
   "text": "support log dump"
  },
  "pack": "text-hygiene",
  "steps": [
   {
    "ok": true,
    "slug": "text-stats",
    "result": {}
   },
   {
    "ok": true,
    "slug": "redact",
    "result": {}
   },
   {
    "ok": true,
    "slug": "dedupe-lines",
    "result": {}
   },
   {
    "ok": true,
    "slug": "sort-lines",
    "result": {}
   },
   {
    "ok": true,
    "slug": "extract-entities",
    "result": {}
   },
   {
    "ok": true,
    "slug": "keywords",
    "result": {}
   },
   {
    "ok": true,
    "slug": "readability",
    "result": {}
   }
  ],
  "summary": "7/7 steps succeeded"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-text-hygiene-workflow-de87ade3/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)
