# LLM Output Validator & Auto-Repair

> LLM Output Validator & Auto-Repair is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054001/call, status unknown (last checked 2026-10-10).

Parses, validates, and auto-repairs raw LLM output JSON against an optional schema, fixing common LLM formatting mistakes algorithmically without any AI.

## Facts

- Endpoint: GET https://api.strale.io/x402/llm-output-validate?utm_source=zero.xyz
- Price: $0.054001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-6b5f69d4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pFVPW3qPeWS8p--wCMj9m

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 api-strale-io-6b5f69d4
```

Example prompt: Parse and validate this raw LLM output string — it's supposed to be JSON matching my schema — and auto-fix any common mistakes like trailing commas or unquoted keys: '{"name": "Alice", "age": 30,}'

## When to prefer this

Use this endpoint when you need a fast, deterministic, cost-effective way to validate and repair JSON produced by LLMs without involving another AI model. Ideal for agentic pipelines where LLM-generated structured data must conform to a schema before downstream use. Prefer over LLM-based repair when determinism, speed, and cost matter and the errors are common syntactic LLM mistakes.

## Known failure modes

- LLM output is so malformed it cannot be repaired algorithmically — returns error with details of unparseable content
- expected_schema is invalid JSON Schema — returns schema parse error
- llm_output parameter missing — returns 400 bad request
- Output fails strict_mode validation — returns error with full list of violations and no repaired output

## How this service works

Validate and auto-repair LLM output. Parse JSON, validate against schema, attempt fixes for common LLM mistakes. Algorithmic — no LLM needed.

## Output

Returns a parsed and optionally repaired JSON object, validation status, a list of schema violations if an expected_schema was provided, and a log of any automatic fixes applied to correct common LLM formatting errors.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "llm_output": "{\"name\": \"Alice\", \"age\": 30,}",
   "strict_mode": false
  }
 }
}
```

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "llm_output"
     ],
     "properties": {
      "llm_output": {
       "type": "string",
       "description": "Raw LLM output string"
      },
      "strict_mode": {
       "type": "boolean"
      },
      "expected_schema": {
       "type": "object",
       "description": "JSON Schema to validate against"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-6b5f69d4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
