# Mekler AI JSON Repair & Convert

> Mekler AI JSON Repair & Convert is a paid API for AI agents from api.mekler.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-30).

Conservatively repairs JSON syntax errors or converts between JSON and safe YAML, recording every transformation applied without inventing values.

## Facts

- Endpoint: POST https://api.mekler.ai/v1/data/json/repair-or-convert-document?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mekler-ai-json-repair-convert-f3e09d39
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TdB819OpU0lwKkdJwAkvr

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 mekler-ai-json-repair-convert-f3e09d39 -d '<json body>'
```

Example prompt: This JSON has trailing commas and a BOM at the start — can you repair it and convert the result to YAML, and give me a list of every change that was made? Input format is JSON, output format should be YAML.

## When to prefer this

Choose this endpoint when you need a conservative, auditable repair or format conversion of JSON or YAML with zero invented values — it is ideal for pipelines or compliance contexts where silent data mutation is unacceptable. Prefer this over generic JSON formatters when you need a full transformation log, when the input may contain BOM characters or markdown fences, or when you must distinguish between 'repaired', 'converted', and 'unchanged' outcomes. Unlike LLM-based fixers, this endpoint will explicitly abstain rather than guess at missing delimiters, keys, or values.

## Known failure modes

- Input exceeds 16000 UTF-8 bytes — service will not process
- Document nesting depth exceeds 24 levels — abstention returned
- Document contains more than 4000 values — abstention returned
- Duplicate keys in JSON/YAML — abstention returned instead of silently deduplicating
- Nonfinite numbers (NaN, Infinity) — abstention returned
- Numeric precision loss would occur on round-trip — abstention instead of rounding
- Unsupported YAML features (aliases, anchors, explicit tags, non-string keys, timestamps) — abstention returned
- Ambiguous or structurally broken input beyond supported repair operations — abstention returned
- Invalid request_id format (must be 16-64 alphanumeric/hyphen/underscore characters)

## How this service works

Conservatively repair JSON syntax or convert JSON and safe YAML while recording every repair. Remove only BOM, complete JSON markdown fences and trailing commas outside strings; abstain on ambiguous or unsupported data. Up to 16000 UTF-8 input bytes, depth 24 and 4000 values. No invented values, semantic validation or code execution. Numeric values that cannot be preserved without rounding return explicit abstention.

## Output

Returns a JSON object with: 'output' (the repaired or converted document string), 'status' (ok or abstained), 'outcome' (e.g. converted, repaired, unchanged), 'reason' (explanation if abstained), 'transformations' (array of operations with offset and type), 'limitations' (list of what the service does and does not do), 'input_format', 'output_format', and 'observed_at' timestamp. If the input contains ambiguous data, unsupported syntax, duplicate keys, nonfinite numbers, or numeric values that would require rounding, the service returns an explicit abstention rather than guessing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "maxLength": 16000
  },
  "request_id": {
   "type": "string",
   "pattern": "^[A-Za-z0-9_-]{16,64}$"
  },
  "input_format": {
   "enum": [
    "json",
    "yaml"
   ],
   "type": "string",
   "default": "json"
  },
  "output_format": {
   "enum": [
    "json",
    "yaml"
   ],
   "type": "string",
   "default": "json"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "output": "service: Mekler\n",
  "reason": null,
  "status": "ok",
  "outcome": "converted",
  "limitations": [
   "Only BOM removal, complete JSON markdown fences and trailing commas outside quoted strings are repaired; offsets refer to each transformation stage.",
   "No missing values, keys, closing delimiters or quotes are guessed. Duplicate keys, nonfinite numbers and unsupported syntax produce abstention.",
   "Numeric values must round-trip through their serialized representation without decimal-value loss; unsupported precision produces abstention instead of rounding.",
   "YAML uses safe YAML 1.1 scalar interpretation; timestamps remain strings, aliases/anchors/explicit tags are rejected, and only JSON-compatible string-keyed values are supported.",
   "Formatting and comments are not preserved. A completed conversion or abstention diagnostic is charged; no semantic truth or schema validity claim."
  ],
  "observed_at": "2026-10-20T00:00:00Z",
  "input_format": "json",
  "output_format": "yaml",
  "transformations": [
   {
    "offset": 19,
    "operation": "remove_trailing_comma"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mekler-ai-json-repair-convert-f3e09d39/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.mekler.ai](https://www.zero.xyz/host/api.mekler.ai/llms.txt)
