# Saylor Innovations JSON Schema Inference

> Saylor Innovations JSON Schema Inference is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-12-03).

Infers a JSON Schema from a sample JSON document, detecting types, nested structures, required fields, and common string formats like email, date, URI, and UUID

## Facts

- Endpoint: GET https://saylorinnovations.com/api/dev/json-schema?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saylor-innovations-json-schema-inference-95d74fd7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QCqrte-tJt4C5Kb6woyL1

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 saylor-innovations-json-schema-inference-95d74fd7
```

Example prompt: Can you infer the JSON Schema for this sample document I have — it's a user profile object with nested address and contact info fields, and I want to know which fields are required and whether any strings look like emails or dates?

## When to prefer this

Choose this endpoint when you need to quickly infer a JSON Schema from a concrete sample document without writing schema by hand — especially useful for unknown or undocumented API responses, webhook payloads, or database exports. It handles nested objects, arrays, and common string format detection automatically. Prefer this over manual schema authoring when you have an example document but no schema, and need draft 2020-12 compatibility.

## Known failure modes

- Missing required 'json' query parameter returns an error
- JSON document exceeds 6000 character limit after URL encoding
- Malformed or invalid JSON input that cannot be parsed
- Ambiguous types in arrays with mixed types may produce approximate schemas
- Single-sample inference may mark optional fields as required if they appear in the one example
- Network timeout or service unavailability

## How this service works

Infer a JSON Schema from a sample JSON document - types, nested objects and arrays, required fields and string formats like email, date, uri and uuid

## Output

Returns a JSON Schema (draft 2020-12) inferred from the sample, including root type, property types for nested objects and arrays, required field lists based on presence in the sample, and string format annotations (email, date, URI, UUID). Also returns a flattened list of dotted field paths with inferred types, a count of schema nodes, the identified root type, and optional caveats about the inference.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "json"
     ],
     "properties": {
      "json": {
       "type": "string",
       "description": "URL-encoded sample JSON document (up to 6000 characters)"
      },
      "title": {
       "type": "string",
       "description": "optional schema title"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "root_type",
      "schema",
      "fields"
     ],
     "properties": {
      "note": {
       "type": "string",
       "description": "Caveat or context for reading the result"
      },
      "fields": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "path": {
          "type": [
           "string",
           "null"
          ],
          "description": "Dotted path of the field"
         },
         "type": {
          "type": "string",
          "description": "Type or kind"
         }
        },
        "additionalProperties": true
       },
       "description": "Flattened list of field paths with inferred types"
      },
      "schema": {
       "type": "object",
       "properties": {
        "type": {
         "type": [
          "string",
          "null"
         ],
         "description": "Type or kind"
        },
        "title": {
         "type": [
          "string",
          "null"
         ],
         "description": "Title"
        },
        "$schema": {
         "type": [
          "string",
          "null"
         ],
         "description": "JSON Schema dialect"
        },
        "required": {
         "type": [
          "array",
          "null"
         ],
         "items": {
          "type": "string"
         },
         "description": "Fields present in every sample object"
        },
        "properties": {
         "type": "object",
         "properties": {
          "id": {
           "ty
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saylor-innovations-json-schema-inference-95d74fd7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
