# FastX402 JSON Schema Generator

> FastX402 JSON Schema Generator is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-19).

Infers and returns a JSON Schema from a provided JSON data sample

## Facts

- Endpoint: GET https://fastx402.tools/json-schema-generate?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-json-schema-generator-3cd85f16
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JjxzD5ne8_XbrH2mtzUDv

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 fastx402-json-schema-generator-3cd85f16
```

Example prompt: Can you generate a JSON Schema from this JSON sample I have: {"name":"Alice","age":30,"active":true,"tags":["admin","user"]}?

## When to prefer this

Choose this endpoint when you need to quickly infer a JSON Schema from an example JSON payload without writing schema definitions by hand. Ideal for AI agents that need to dynamically understand the structure of arbitrary JSON data, auto-document APIs, or prepare validation schemas from sample responses.

## Known failure modes

- Invalid or malformed JSON string causes schema inference failure
- Empty JSON object returns minimal schema with no properties
- Deeply nested or complex JSON may produce incomplete schemas
- Missing 'json' query parameter results in a bad request error
- Ambiguous types (e.g. null values) may be inferred incorrectly

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

Returns a JSON Schema object with type definitions, a list of required fields, and property-level type specifications (string, number, boolean, array, object) inferred from the provided JSON sample.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "json"
     ],
     "properties": {
      "json": {
       "type": "string",
       "description": "JSON data to infer schema from"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "schema": {
       "type": "object",
       "properties": {
        "type": {
         "type": "string"
        },
        "required": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "properties": {
         "type": "object",
         "properties": {
          "age": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            }
           }
          },
          "name": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            }
           }
          },
          "tags": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            },
            "items": {
             "type": "object",
             "properties": {
              "type": {
               "type": "string"
              }
             }
            }
           }
          },
          "active": {
           "type": "object",
           "properties": {
            "type": {
             "type": "string"
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "schema": {
   "type": "object",
   "required": [
    "name",
    "age",
    "active",
    "tags"
   ],
   "properties": {
    "age": {
     "type": "number"
    },
    "name": {
     "type": "string"
    },
    "tags": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "active": {
     "type": "boolean"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-json-schema-generator-3cd85f16/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
