# PrepLayer.ai JSON Schema Validator

> PrepLayer.ai JSON Schema Validator is a paid API for AI agents from api.maximusmediahouse.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-29).

Validates a JSON string against a JSON-Schema subset (type, required, properties, items, minLength, maxLength, pattern, enum, minimum, maximum, additionalProperties) and catches parse errors before they break a pipeline.

## Facts

- Endpoint: POST https://api.maximusmediahouse.com/v1/validate_json?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/preplayer-ai-json-schema-validator-1874e6e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ovKMgBddphA1y95RvmMxk

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 preplayer-ai-json-schema-validator-1874e6e1 -d '<json body>'
```

Example prompt: Can you validate this JSON string against my schema before I push it to the pipeline? The JSON is '{"name":"Alice","age":30}' and the schema requires 'name' as a string and 'age' as a number between 0 and 120, with no additional properties allowed.

## When to prefer this

Choose this endpoint when you need a lightweight, deterministic, dependency-free JSON validation step inside an automated pipeline or agent workflow — especially when you want to catch malformed or schema-violating payloads before they reach a database, downstream API, or LLM. It is ideal for validating webhook payloads, API inputs, or config objects against a known schema subset without spinning up a full JSON Schema library. Prefer it over general-purpose schema validators when you need a simple pay-per-call microservice with no infrastructure overhead.

## Known failure modes

- Unparseable JSON string returns a parse error before schema checks begin
- Schema constraints not in the supported subset (e.g. oneOf, allOf, $ref) are silently ignored or unsupported
- Overly large JSON payloads may be rejected or timeout
- Passing an invalid schema object itself may produce unexpected results
- Network or payment authorization failures return HTTP 402 or 5xx errors

## How this service works

Deterministic JSON-Schema subset validator. Catches malformed JSON before it breaks a pipeline. Supports: type, required, properties, items, minLength, maxLength, pattern, enum, minimum, maximum, additionalProperties. No external dependencies.

## Output

Returns a validation result indicating whether the JSON string is valid (parses correctly and satisfies all schema constraints). On failure, returns structured error details identifying which constraints were violated (e.g. missing required field, wrong type, value out of range, pattern mismatch, disallowed additional property). On success, confirms the JSON is well-formed and schema-compliant.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "type": "string",
   "description": "The JSON string to parse and validate."
  },
  "schema": {
   "type": "object",
   "properties": {
    "enum": {
     "type": "array"
    },
    "type": {
     "enum": [
      "string",
      "number",
      "integer",
      "boolean",
      "null",
      "array",
      "object"
     ],
     "type": "string"
    },
    "items": {
     "type": "object"
    },
    "maximum": {
     "type": "number"
    },
    "minimum": {
     "type": "number"
    },
    "pattern": {
     "type": "string"
    },
    "required": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "maxLength": {
     "type": "integer",
     "minimum": 0
    },
    "minLength": {
     "type": "integer",
     "minimum": 0
    },
    "properties": {
     "type": "object"
    },
    "additionalProperties": {
     "type": "boolean"
    }
   },
   "description": "JSON-Schema subset. Omit for parse-only validation."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/preplayer-ai-json-schema-validator-1874e6e1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.maximusmediahouse.com](https://www.zero.xyz/host/api.maximusmediahouse.com/llms.txt)
