# Project x402 SchemaCheck Agent

> Project x402 SchemaCheck Agent is a paid API for AI agents from projectx402-production.up.railway.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Validates a JSON payload against a provided JSON Schema, with optional repair suggestions and plain-English explanations, requiring a USDC micropayment via x402.

## Facts

- Endpoint: POST https://projectx402-production.up.railway.app/v1/schema-check
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/project-x402-schemacheck-agent-d2126d37
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yVDQkK7nqL4W5ufgGlmDG

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 project-x402-schemacheck-agent-d2126d37 -d '<json body>'
```

Example prompt: Can you validate this JSON payload against my schema and tell me in plain English what's wrong, and also suggest a corrected version? Use normal strictness. Here's the schema: {"type":"object","properties":{"name":{"type":"string"},"age":{"type":"integer"}},"required":["name","age"]} and here's the payload: {"name":"Alice","age":"thirty"}.

## When to prefer this

Choose this endpoint when you need server-side JSON Schema validation with optional automated repair suggestions and human-readable explanations, especially in agentic pipelines where you want to validate API payloads or data records on-the-fly and can pay per-call micropayments via x402. Prefer it over client-side validators when you want repair suggestions or natural-language error explanations embedded in an automated workflow.

## Known failure modes

- Payment not included or insufficient — x402 payment required ($0.002 USDC); returns 402 with payment details
- Malformed json_schema — returns validation error if the schema itself is not a valid JSON Schema document
- Payload exceeds size limits — large payloads may be rejected
- Missing required fields — if json_schema or payload is absent, returns 400
- Strictness enum mismatch — invalid value for strictness field returns a 400 error

## How this service works

Validate JSON against a JSON Schema. Checks LLM and agent output and API request payloads, returning structured errors with error codes, JSONPath locations, and a plain-English summary. Optional automatic repair of invalid payloads.

## Output

Returns a JSON object with a boolean 'valid' field, an array of validation errors (empty if valid), a plain-English 'summary' of the result, a 'confidence' score (0-1), and an optional 'suggested_payload' with a repaired version of the input when repair=true was requested.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "repair": {
   "type": "boolean",
   "description": "If true, return a suggested corrected payload. Default: false"
  },
  "explain": {
   "type": "boolean",
   "description": "If true, include a plain-English summary. Default: true"
  },
  "payload": {
   "description": "The JSON value to validate against the schema"
  },
  "strictness": {
   "enum": [
    "strict",
    "normal",
    "lenient"
   ],
   "type": "string",
   "description": "Validation strictness. Default: normal"
  },
  "json_schema": {
   "type": "object",
   "description": "JSON Schema document to validate the payload against"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "errors": [],
  "summary": "Payload is valid against the supplied JSON Schema.",
  "confidence": 1,
  "suggested_payload": null
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/project-x402-schemacheck-agent-d2126d37/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from projectx402-production.up.railway.app](https://www.zero.xyz/host/projectx402-production.up.railway.app/llms.txt)
