Examples

Copy‑paste curl examples for the Validator API. For paid usage and an API key, go to validator.apexaistudio.app/buy.

Get an API key

1) Validate JSON with a JSON Schema

POST /v1/validate with {schema, data}.

curl -sS \
  -H 'content-type: application/json' \
  -H 'x-api-key: YOUR_KEY' \
  https://validator.apexaistudio.app/v1/validate \
  -d '{
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "email": {"type": "string", "format": "email"},
        "age": {"type": "integer", "minimum": 18}
      },
      "required": ["email", "age"],
      "additionalProperties": false
    },
    "data": {"email": "person@example.com", "age": 21}
  }' | jq

Tip: You can omit x-api-key for the free demo endpoint /v1/demo.

2) Normalize JSON (coerce types, defaults)

POST /v1/normalize with {schema, data}. The API returns normalized output when possible.

curl -sS \
  -H 'content-type: application/json' \
  -H 'x-api-key: YOUR_KEY' \
  https://validator.apexaistudio.app/v1/normalize \
  -d '{
    "schema": {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "active": {"type": "boolean", "default": false},
        "count": {"type": "integer"}
      },
      "required": ["count"],
      "additionalProperties": false
    },
    "data": {"active": "true", "count": "3"}
  }' | jq

3) Validate an OpenAPI document

POST /v1/openapi/validate with the OpenAPI JSON or YAML as a string.

curl -sS \
  -H 'content-type: application/json' \
  -H 'x-api-key: YOUR_KEY' \
  https://validator.apexaistudio.app/v1/openapi/validate \
  -d '{
    "openapi": "openapi: 3.0.3\ninfo:\n  title: Demo\n  version: 1.0.0\npaths: {}\n"
  }' | jq

Rate limits

Responses include RateLimit-* headers. If you get HTTP 429, upgrade at /buy.