repair_json
Repair malformed JSON (trailing commas, single quotes, truncation, markdown fences, comments, python literals) and optionally validate/coerce it against a JSON Schema. Deterministic repair is free. If it fails and allow_llm_fallback is true, a paid LLM repair is attempted (requires x402 payment; charged only on success).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The possibly-malformed JSON text | |
| schema | No | Optional JSON Schema the output must conform to | |
| allow_llm_fallback | No | Permit the paid LLM repair tier |