# Yog x402 JSON Validate

> Yog x402 JSON Validate is a paid API for AI agents from api.gosyog.lol, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Validates a document against a provided JSON schema, returning validity status and any validation errors

## Facts

- Endpoint: POST https://api.gosyog.lol/api/service/yog/json_validate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/yog-x402-json-validate-9d9d2ede
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BxguprdyujPu1RMegGGiE

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 yog-x402-json-validate-9d9d2ede -d '<json body>'
```

Example prompt: Can you validate this order payload against our order schema and tell me if it's valid and list any errors: {"orderId": "123", "amount": "fifty"}?

## When to prefer this

Choose this endpoint when you need lightweight, fast JSON schema validation as a service without running a local validator — especially useful in agent pipelines where you want to verify LLM-generated or user-submitted JSON against a known schema before downstream processing, and when paying per-call via USDC on Base is acceptable.

## Known failure modes

- Malformed schema object causes validation to fail with an error
- Document type mismatch with schema may yield a list of errors rather than a clean fail
- parse_document flag misuse may result in incorrect document interpretation
- Missing required fields in request body returns a 400-level error
- Network or payment authorization failure prevents the call from completing

## How this service works

Yog x402 is a paid LLM-as-a-service API with three text capabilities plus a free-tier liveness ping, all paid via x402 USDC on Base. classify_text ($0.01) classifies text into one of your supplied labels — sentiment tagging, routing support tickets, labeling data for ML pipelines. json_repair ($0.02) fixes malformed/messy text into valid JSON — cleaning up LLM output or scraped JSON that's slightly malformed before further processing. extract_fields ($0.03) pulls named fields from source text and will not fabricate values — structured extraction from unstructured text (name/date/amount from invoices or emails).

## Output

Returns a JSON object with an 'ok' boolean and a 'result' object containing a 'valid' boolean and an 'errors' array listing any schema violations found in the document.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "schema": {
   "type": "object"
  },
  "document": {},
  "parse_document": {
   "type": "boolean"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "result": {
   "valid": true,
   "errors": []
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/yog-x402-json-validate-9d9d2ede/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gosyog.lol](https://www.zero.xyz/host/api.gosyog.lol/llms.txt)
