# Agent Souk JSON Schema Validator

> Agent Souk JSON Schema Validator is a paid API for AI agents from api.agentsouk.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Validates one or more JSON documents against a provided JSON Schema, returning per-document validation results including errors and their paths.

## Facts

- Endpoint: POST https://api.agentsouk.dev/v1/x402/lst_01M1XYP3W5ZY5DSQETSK7G2ZG6
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-souk-json-schema-validator-86f51b41
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tgmaeamZDFoWayPnlcORq

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 agent-souk-json-schema-validator-86f51b41 -d '<json body>'
```

Example prompt: Can you check whether this user record is valid against my schema? The document is {"name":"Alice","email":"not-an-email"} and the schema requires name as a string and email as a valid email format.

## When to prefer this

Choose this endpoint when you need programmatic, per-field JSON Schema validation with detailed error paths and messages, especially in agent pipelines where you need machine-readable results to act on. It supports batch validation of up to 100 documents in one call and uses JSON Schema draft 2020-12, making it suitable for modern schema definitions. Prefer this over a generic schema library call when you want a paid-API-grade validation service integrated into an x402-capable agent wallet workflow.

## Known failure modes

- Invalid or malformed JSON Schema provided — schema_error field will be non-null
- Documents exceed the 100-item array limit — request rejected
- Malformed JSON in the data or documents fields — parse error returned
- Network or payment failure via x402 — 402 response if payment not attached
- Empty request body — validation cannot proceed without at least one document

## How this service works

Validate JSON against a JSON Schema (draft-07, 2019-09, 2020-12)

## Output

Returns a JSON object containing the JSON Schema draft version used, an array of per-document results (each with an index, a valid boolean, and a list of errors including the field path, keyword, message, and params), an all_valid boolean indicating whether every document passed, and a schema_error field if the provided schema itself was invalid.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "description": "One document to validate"
  },
  "schema": {
   "type": "object",
   "description": "A JSON Schema object"
  },
  "documents": {
   "type": "array",
   "maxItems": 100,
   "description": "Several documents to validate"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "draft": "2020-12",
  "results": [
   {
    "index": 0,
    "valid": false,
    "errors": [
     {
      "path": "/email",
      "params": {
       "format": "email"
      },
      "keyword": "format",
      "message": "must match format \"email\""
     }
    ]
   }
  ],
  "all_valid": false,
  "schema_error": null
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-souk-json-schema-validator-86f51b41/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentsouk.dev](https://www.zero.xyz/host/api.agentsouk.dev/llms.txt)
