# AISkills402 Mojibake Repair

> AISkills402 Mojibake Repair is a paid API for AI agents from api.aiskills402.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-14).

Deterministically reverses broken character encoding (mojibake) caused by misreading UTF-8 text as Windows-1252, Latin-1, or Windows-1251, byte by byte, without any language model guessing.

## Facts

- Endpoint: POST https://api.aiskills402.com/v1/run/mojibake-repair?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aiskills402-mojibake-repair-235ade86
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IXbUmSFJAIx-boDfiCM0t

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 aiskills402-mojibake-repair-235ade86 -d '<json body>'
```

Example prompt: This text looks totally garbled — like it was read with the wrong encoding. Can you fix this mojibake: 'CafÃ© crÃ¨me'? It was originally UTF-8 but got read as Windows-1252.

## When to prefer this

Choose this endpoint when you need deterministic, lossless encoding repair — not AI-guessed reconstruction. It is ideal when you know the encoding mismatch pattern (UTF-8 read as Windows-1252/Latin-1, or Windows-1251 read as Windows-1252) and need a reliable CANNOT REPAIR signal for text that cannot be cleanly reversed, rather than a plausible but potentially wrong guess. Prefer it over LLM-based text cleanup when auditability, reproducibility, and exactness matter more than best-effort restoration of heavily damaged text.

## Known failure modes

- Mixed or partially-damaged text returns CANNOT REPAIR verdict (still a paid call) unless partial=true is set
- Text with lost bytes that cannot be deterministically reversed returns CANNOT REPAIR
- Input exceeding 60000 characters is rejected
- Invalid origin value other than null or 'windows-1251' causes a validation error
- Payment failure via x402 results in HTTP 402 with no processing

## How this service works

Mojibake Repair API: undoes broken encoding (UTF-8 read as Windows-1252, Latin-1 or Windows-1251, once or twice) byte by byte. Deterministic code, no language model: mixed, half-damaged or lost-byte text gets a CANNOT REPAIR verdict instead of a guess (still one paid call). $0.004 USDC per call, no account. POST JSON {input}, up to 60000 chars; free example at https://api.aiskills402.com/v1/run/mojibake-repair/example

## Output

A JSON object with a 'result' field containing the repaired text and the number of encoding layers unwound (1 or 2). If the text is mixed, half-damaged, or has lost bytes that cannot be cleanly reversed, the 'refusal' field contains a CANNOT REPAIR verdict instead of a guess. Also includes a receipt with the settlement transaction hash and an input SHA-256 for auditability.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "maxLength": 60000,
   "minLength": 1,
   "description": "The garbled text. Up to 60000 characters."
  },
  "origin": {
   "enum": [
    "windows-1251",
    null
   ],
   "type": [
    "string",
    "null"
   ],
   "default": null,
   "description": "Set to \"windows-1251\" only when the text was written in Windows-1251 (one byte per Cyrillic letter) and read as Windows-1252."
  },
  "partial": {
   "type": "boolean",
   "default": false,
   "description": "true = in mixed text repair only the groups that reverse cleanly and leave the rest as it is; false = refuse mixed text."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "skill": "mojibake-repair",
  "engine": "1.0.0",
  "replay": false,
  "result": {
   "text": "Café crème",
   "layers": 1
  },
  "receipt": {
   "tx": "0x<settlement transaction>",
   "settled": true
  },
  "refusal": null,
  "input_sha256": "<sha256 of the request>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aiskills402-mojibake-repair-235ade86/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.aiskills402.com](https://www.zero.xyz/host/api.aiskills402.com/llms.txt)
