# CanuVerify JSON Schema Repair

> CanuVerify JSON Schema Repair is a paid API for AI agents from api.canuverify.com, paid per call via x402, $0.25/call, status down (last checked 2026-09-16).

Applies deterministic, explicitly-requested repairs to malformed JSON text and returns the exact operations performed, diff metrics, and a stable canonical hash of the repaired output.

## Facts

- Endpoint: POST https://api.canuverify.com/v1/x402/services/json.schema.repair
- Price: $0.25/call
- Payment: x402
- Status: down
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/canuverify-json-schema-repair-fc2e40ee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_op9mfWdTZQiyLFlnvev17

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 canuverify-json-schema-repair-fc2e40ee -d '<json body>'
```

Example prompt: I have a JSON string that's broken and won't parse — can you repair it using CanuVerify's JSON repair service and show me exactly which operations were applied, the diff metrics, and the canonical hash of the fixed output?

## When to prefer this

Choose this endpoint when you need a fully deterministic, auditable JSON repair that documents every single change made and produces a verifiable canonical hash — ideal for pipelines requiring reproducibility, audit logs, or deduplication of repaired documents. Prefer it over generic JSON parsers or LLM-based fixers when you need provable, non-creative repairs (no hallucinated structure changes) and a stable fingerprint of the output.

## Known failure modes

- Input JSON is so severely malformed that no deterministic repair is possible — returns failed status
- Request body does not conform to the required schema (missing type, method, bodyType, or body fields) — returns 400-level error
- Payment not completed or USDC balance insufficient — returns 402 Payment Required
- Service temporarily unavailable — returns 5xx error
- Hash collision or canonicalization ambiguity in edge cases — repair may be marked compensated

## How this service works

JSON Schema Repair: Applies only explicitly requested, deterministic JSON text repairs and reports the exact operations, diff metrics and stable canonical hash.

## Output

Returns a job ID, service ID, and status (accepted/completed/failed/compensated/artifact), along with the repaired JSON text, an explicit log of every repair operation applied, diff metrics quantifying the changes, and a stable canonical hash of the repaired output for verification and deduplication purposes.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "description": "Compact header projection. Use the 402 response body or local OpenAPI for the exact closed request schema.",
     "additionalProperties": true
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "status",
      "job_id",
      "service_id"
     ],
     "properties": {
      "state": {
       "type": "string"
      },
      "job_id": {
       "type": "string"
      },
      "status": {
       "enum": [
        "accepted",
        "completed",
        "failed",
        "compensated",
        "artifact"
       ]
      },
      "service_id": {
       "type": "string"
      }
     },
     "description": "Compact PAYMENT-REQUIRED projection; the 402 JSON body and canonical OpenAPI publish the complete response contract.",
     "additionalProperties": true
    }
   }
  }
 }
}
```

## More

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