# JSON Schema Generator from Example JSON

> JSON Schema Generator from Example JSON is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-09).

Generates a JSON Schema (draft 2020-12) from an example JSON object, inferring types, properties, arrays, required fields, and formats like date, email, and URI.

## Facts

- Endpoint: POST https://api.vextorium.com/generar-esquema-json-pago?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-schema-generator-from-example-json-664c4497
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X7jk3t5jTuQnTqIOf8gwk

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 json-schema-generator-from-example-json-664c4497 -d '<json body>'
```

Example prompt: Take this example JSON — {"id": 1, "email": "user@example.com", "tags": ["beta", "vip"], "created": "2024-01-15"} — and generate a JSON Schema draft 2020-12 from it, inferring the types, required fields, arrays, and formats like email and date.

## When to prefer this

Choose this endpoint when you need to quickly auto-generate a JSON Schema draft 2020-12 from a concrete example JSON, especially for API documentation, LLM tool definitions, or output validation pipelines. It is ideal when you have a sample payload but no hand-written schema, and need format detection (email, date, URI) out of the box. Prefer this over hand-authoring schemas when working in automated or agentic workflows where a schema needs to be programmatically derived from example data at runtime.

## Known failure modes

- Missing 'ejemplo' field in request body results in validation error
- Non-parseable JSON text in 'ejemplo' field may produce incomplete or error schema
- Deeply nested or recursive structures may not be fully inferred
- Empty JSON object input may return a minimal schema with no properties
- Network or payment authentication failure returns 402 or 5xx error

## How this service works

Generate a JSON Schema (draft 2020-12) from an example JSON: types, properties, arrays, required fields and formats (date, date-time, email, uri). For API docs, tool definitions and output validation.

## Output

Returns a JSON Schema object conforming to draft 2020-12, with inferred `type`, `$schema`, `required` array, and `properties` for each field. Property definitions include type inference (integer, string, array, object) and format annotations (email, date, date-time, uri) where applicable. Array items are typed based on the example values.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "ejemplo"
     ],
     "properties": {
      "ejemplo": {
       "description": "Example JSON (object or text)"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": [
      "object",
      "null"
     ],
     "properties": {
      "esquema": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "type": {
         "type": [
          "string",
          "null"
         ]
        },
        "$schema": {
         "type": [
          "string",
          "null"
         ]
        },
        "required": {
         "type": [
          "array",
          "null"
         ],
         "items": {
          "type": [
           "null",
           "string"
          ]
         }
        },
        "properties": {
         "type": [
          "object",
          "null"
         ],
         "properties": {
          "id": {
           "type": [
            "object",
            "null"
           ],
           "properties": {
            "type": {
             "type": [
              "string",
              "null"
             ]
            }
           }
          },
          "tags": {
           "type": [
            "object",
            "null"
           ],
           "properties": {
            "type": {
             "type": [
              "string",
              "null"
             ]
            },
            "items": {
             "type": [
              "object",
              "null"
             ],
             "properties": {
              "type": {
               "type": [
                "string",
                "null"
               ]
              }
             }
            }
           }
          },
          "email": {
           "type": [
            "object",
            "null"
           ],
 
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "esquema": {
   "type": "object",
   "$schema": "https://json-schema.org/draft/2020-12/schema",
   "required": [
    "id",
    "email",
    "tags",
    "created"
   ],
   "properties": {
    "id": {
     "type": "integer"
    },
    "tags": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "email": {
     "type": "string",
     "format": "email"
    },
    "created": {
     "type": "string",
     "format": "date"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-schema-generator-from-example-json-664c4497/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
