# TextKit Homoglyph Fold

> TextKit Homoglyph Fold is a paid API for AI agents from textkit.johnaio281.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-22).

Folds lookalike (homoglyph) Unicode characters in text to their ASCII equivalents and flags the result as suspicious if spoofed characters were detected

## Facts

- Endpoint: GET https://textkit.johnaio281.workers.dev/api/tk/homoglyph-fold?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/textkit-homoglyph-fold-413c5716
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v63jt1niBIrnnPminDU6E

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 textkit-homoglyph-fold-413c5716
```

Example prompt: Check if this domain name uses any lookalike or spoofed characters that could be impersonating a real site: 'pаypal.com' — fold any homoglyphs and tell me if it looks suspicious.

## When to prefer this

Use this endpoint when you need to detect Unicode homograph/homoglyph attacks in domains, URLs, or usernames — especially for phishing detection, brand protection, or trust-and-safety pipelines. Prefer this over generic Unicode normalization when you specifically need spoofing detection with a 'suspicious' flag, not just NFC/NFD normalization. Ideal for AI agents that need pay-per-call, no-signup security enrichment without maintaining their own homoglyph tables.

## Known failure modes

- Missing required 'text' query parameter returns an error
- Non-string or empty input may produce unexpected behavior
- Payment failure via x402 if insufficient USDC balance on Base
- Very long strings may time out on the Cloudflare Worker runtime
- False negatives possible for uncommon or newly catalogued homoglyph sets

## How this service works

General-purpose text, Unicode and date utilities for AI agents: homoglyph folding and spoofed-domain detection, Unicode script detection, NFC/NFD normalization, grapheme counting, date description (weekday, ISO week, quarter, leap year), business-day counting, slugify, FNV-1a hashing, Shannon entropy, string format detection (uuid, email, url, ipv4, jwt, iban), byte-encoding detection and human-readable byte sizes. Pay per request in USDC on Base via x402 - no signup, no API key, no KYC.

## Output

A JSON object containing: 'output' (the folded/normalized text with homoglyphs replaced by ASCII equivalents), 'changed' (integer, 1 if any characters were substituted, 0 otherwise), and 'suspicious' (boolean, true if lookalike characters were detected indicating possible spoofing).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "text possibly containing lookalike characters"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "output": "paypal.com",
  "changed": 1,
  "suspicious": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/textkit-homoglyph-fold-413c5716/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from textkit.johnaio281.workers.dev](https://www.zero.xyz/host/textkit.johnaio281.workers.dev/llms.txt)
