# x402-convert JSON Validate

> x402-convert JSON Validate is a paid API for AI agents from x402-convert.arikanuk.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-31).

Validates a JSON value against a schema specifying field types and required fields, returning a validity flag and list of errors.

## Facts

- Endpoint: POST https://x402-convert.arikanuk.workers.dev/json-validate?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-convert-json-validate-6e5791bb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3HfQObRdHZy8Ctj-uH_Ej

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 x402-convert-json-validate-6e5791bb -d '<json body>'
```

Example prompt: Can you validate this JSON object against a schema where 'name' must be a string and 'age' must be a number, with both marked as required? The data is: {"name": "Alice", "age": 30}.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call JSON validation against a simple type-and-required-fields schema without standing up your own validation service. It is ideal for AI agents that occasionally need to verify data structure in a pipeline or before downstream processing, and where a $0.01 USDC micropayment per call is acceptable. Not suited for complex JSON Schema (e.g., pattern matching, nested conditionals, $ref) or high-volume batch validation scenarios.

## Known failure modes

- Malformed input JSON causes parsing error
- Schema type values that are unrecognized strings may not be validated correctly
- Empty or missing 'data' field may return unexpected results
- Payment failure via x402 blocks the request before validation occurs
- Network timeout on the Cloudflare Worker edge

## How this service works

Deterministic data-conversion API for AI agents. Pay-per-call in USDC on Base via x402 v2.

## Output

Returns a JSON object with a 'valid' boolean indicating whether the input data passes the schema, and an 'errors' array listing any validation failures such as missing required fields or type mismatches.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "description": "Any JSON value to validate"
  },
  "schema": {
   "type": "object",
   "properties": {
    "types": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "required": {
     "type": "array",
     "items": {
      "type": "string"
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-convert-json-validate-6e5791bb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-convert.arikanuk.workers.dev](https://www.zero.xyz/host/x402-convert.arikanuk.workers.dev/llms.txt)
