x402

JSON to Zod (x402)

Convert JSON to Zod validation schemas. Auto-detects emails, URLs, UUIDs, dates for refined validators. Algorithmic.

get/x402/v2/json-to-zod

Request

  • Base URL: https://api.strale.io
  • URL: https://api.strale.io/x402/v2/json-to-zod
  • Auth: none required

Query parameters

jsonunknown required
root_namestring

Response

Success

zod_schemastring
root_schemastring
schema_countinteger

Example response

{
  "zod_schema": "import { z } from \"zod\";\n\nconst rootSchema = z.object({\n  name: z.string(),\n  age: z.number().int(),\n});",
  "root_schema": "rootSchema",
  "schema_count": 1
}

Changes

No recorded changes to this operation across all 1 revision of this API.