# Vextorium JSON Repair & Validation

> Vextorium JSON Repair & Validation is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-11).

Repairs malformed JSON (LLM output artifacts, fences, comments, trailing commas, unquoted keys, Python literals, unclosed brackets) and optionally validates the result against a JSON Schema

## Facts

- Endpoint: POST https://api.vextorium.com/v1/json-repair?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vextorium-json-repair-validation-d24e671c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jvbkK3avYiIozhXZWQPAG

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 vextorium-json-repair-validation-d24e671c -d '<json body>'
```

Example prompt: The model returned a JSON blob wrapped in ```json fences with trailing commas and Python True literals — can you repair it and validate it against my schema to make sure all required fields are present?

## When to prefer this

Choose this endpoint when you need to robustly parse JSON emitted by LLMs, which frequently includes markdown code fences, Python boolean/null literals, single-quoted strings, unquoted keys, trailing commas, or truncated structures. It is ideal for agentic pipelines where downstream steps require a clean parsed object. Prefer it over custom regex or ad-hoc parsing when you also need schema validation in the same call.

## Known failure modes

- Input text is so malformed it cannot be salvaged into any valid JSON structure — endpoint may return an error or null object
- Schema provided is itself invalid JSON Schema — validation result may be unreliable
- Input contains deeply nested truncated JSON — unclosed bracket repair may produce semantically incorrect output
- Empty or whitespace-only input — likely returns null object with repaired=false

## How this service works

Repair broken JSON, typical of LLM output: strips ```json fences, comments and surrounding text, trailing commas, single quotes, unquoted keys, Python True/None and unclosed brackets. Returns the object and clean JSON and, if you pass a JSON Schema, whether it validates and why not.

## Output

Returns an object with four fields: 'object' (the parsed JavaScript object), 'json' (the cleaned, valid JSON string), 'repaired' (boolean, true if any fixes were applied), and 'was_already_valid' (boolean). If a JSON Schema was provided, also returns whether the repaired object validates against it and the reason if it does not.

## 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": {
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string"
      },
      "schema": {
       "type": "object",
       "description": "optional JSON Schema"
      }
     }
    },
    "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",
      "null"
     ],
     "properties": {
      "json": {
       "type": [
        "string",
        "null"
       ]
      },
      "object": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "age": {
         "type": [
          "number",
          "null"
         ]
        },
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "tags": {
         "type": [
          "array",
          "null"
         ],
         "items": {
          "type": [
           "null",
           "string"
          ]
         }
        },
        "asset": {
         "type": [
          "boolean",
          "null"
         ]
        }
       }
      },
      "repaired": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "was_already_valid": {
       "type": [
        "boolean",
        "null"
       ]
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "json": "{\"name\": \"Ana\", \"edad\": 30, \"activo\": true, \"tags\": [\"a\", \"b\"]}",
  "object": {
   "age": 30,
   "name": "Ana",
   "tags": [
    "a",
    "b"
   ],
   "asset": true
  },
  "repaired": true,
  "was_already_valid": false
 }
}
```

## More

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