JSON to Zod Schema converts JSON input into a Zod schema you can use in TypeScript projects. Send a raw JSON body, an uploaded JSON file, or a public JSON URL, and get back generated Zod code as either a downloadable .ts file, a pre-signed S3 URL, or a raw explain payload.
Use the mode query parameter to choose annotated, clean, or explain output. The strict option controls whether the generator applies strict schema behavior. For file-based and URL-based flows, you can also set output when the endpoint returns a downloadable file or S3 link.
The service accepts only non-empty JSON objects. URL-based endpoints require a publicly accessible resource that serves JSON or a .json file path, and file-based endpoints require an uploaded JSON file. The raw-body endpoint accepts application/json and also parses text/plain when it contains JSON.
Use JSON to Zod Schema when you need to bootstrap validation from sample payloads, document an API response shape, or turn an existing config object into reusable runtime validation.
▣ ENDPOINT 01 / 09
POST
Convert JSON from URL to Zod schema (downloadable file)
Returns a binary file download: a Zod schema .ts file by default, or a JSON explain payload when mode=explain.
(binary file)
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
About this endpoint
What it does
Converts the JSON document retrieved from a public URL into a Zod schema file. The response is a downloadable binary file, with the file contents depending on the selected mode.
Output name for the generated schema.<br>Default: sample-output.<br>Example: my-schema.
strict
ENUM
No
Strictness flag as a string.<br>Allowed values: true, false.<br>Default: false.
Request Body
Parameter
Type
Mandatory
Description
url
String
Yes
Publicly accessible URL pointing to a JSON resource.<br>The URL must return application/json, text/plain, application/octet-stream, or binary/octet-stream, or the Content-Disposition / URL path must include .json.<br>The JSON content must be a non-empty object.
Response
Returns a binary file download. The output schema declares a top-level string with binary format: a downloadable Zod schema .ts file, or a JSON explain payload .json when mode=explain.
Parameter
Type
Mandatory
Description
binary content
String
Yes
Downloadable response body.<br>File type: Zod schema .ts file, or .json explain payload when mode=explain.
Query parameters
Name
Type
Description
modeOPTIONAL
string
annotated · clean · explain
—
DEFAULTannotated
outputOPTIONAL
string
—
DEFAULTsample-output
strictOPTIONAL
string
true · false
—
DEFAULTfalse
Body
Name
Type
Description
bodyREQUIRED
object
—
▣ ENDPOINT 02 / 09
POST
Convert JSON from URL to Zod schema (S3 signed URL)
Returns a JSON object with a data string field — a pre-signed S3 URL for downloading the generated schema file.
{
"data": "https://s3.amazonaws.com/..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
About this endpoint
What it does
Converts JSON fetched from the URL you provide into a Zod schema and returns a pre-signed S3 download URL for the generated file. The output file is a .ts schema file by default, or a .json file when mode is explain.
Output name for the generated schema.<br>Default: sample-output.<br>Example: my-schema.
strict
ENUM
No
Strictness flag for the conversion.<br>Allowed values: true, false.<br>Default: false.
Request Body
Parameter
Type
Mandatory
Description
url
String
Yes
Publicly accessible URL pointing to a JSON resource. The URL must return a content-type of application/json, text/plain, application/octet-stream, or binary/octet-stream, or the Content-Disposition / URL path must include .json.<br>The JSON content must be a non-empty object.
Response
Returns a JSON object with a data string field containing a pre-signed S3 URL for downloading the generated file. The URL points to the converted schema file as .ts output, or .json output when mode is explain.
Parameter
Type
Mandatory
Description
data
String
Yes
Pre-signed S3 URL to the converted file.<br>S3 pre-signed URL for downloading the generated .ts schema file (or .json file when mode is explain).
Query parameters
Name
Type
Description
modeOPTIONAL
string
annotated · clean · explain
—
DEFAULTannotated
outputOPTIONAL
string
—
DEFAULTsample-output
strictOPTIONAL
string
true · false
—
DEFAULTfalse
Body
Name
Type
Description
bodyREQUIRED
object
—
▣ ENDPOINT 03 / 09
POST
Convert uploaded JSON file to Zod schema (downloadable file)
Returns a downloadable file as a binary response: a .ts Zod schema file by default, or a .json explain payload when mode=explain.
(binary file)
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
About this endpoint
What it does
Converts an uploaded JSON file into a downloadable Zod schema file. The response is a binary file: a .ts Zod schema by default, or a .json explain payload when mode=explain.
JSON file to convert. The uploaded file must have mimetype application/json and must contain a non-empty JSON object.
Response
Returns a downloadable binary file. The output is a string with binary format: a Zod schema .ts file by default, or a .json explain payload when mode=explain.
Parameter
Type
Mandatory
Description
value
String
Yes
Downloadable Zod schema (.ts) file, or a JSON explain payload (.json) when mode=explain.
Notes
The mode query parameter changes the file type of the successful response: annotated and clean return a Zod schema file, while explain returns a JSON payload.
Query parameters
Name
Type
Description
modeOPTIONAL
string
annotated · clean · explain
—
DEFAULTannotated
outputOPTIONAL
string
—
DEFAULTsample-output
strictOPTIONAL
string
true · false
—
DEFAULTfalse
Body
Name
Type
Description
bodyREQUIRED
object
—
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
▣ ENDPOINT 04 / 09
POST
Convert uploaded JSON file to Zod schema (S3 signed URL)
Returns a JSON object with a data string field containing a pre-signed S3 URL for the converted file.
{
"data": "https://s3.amazonaws.com/..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
About this endpoint
What it does
Converts an uploaded JSON file into a Zod schema and returns a pre-signed S3 URL where the generated file can be downloaded. The request accepts one JSON file upload and optional query parameters that control the output mode, file name, and strictness.
JSON file to convert. Must be uploaded as binary data, have mimetype application/json, and contain a non-empty JSON object.
Response
Returns a JSON object with a data string field containing a URI to a pre-signed S3 URL for downloading the generated file. The file is a .ts schema file by default, or a .json file when mode is explain.
Parameter
Type
Mandatory
Description
data
String
Yes
Pre-signed S3 URL to the converted file.
Query parameters
Name
Type
Description
modeOPTIONAL
string
annotated · clean · explain
—
DEFAULTannotated
outputOPTIONAL
string
—
DEFAULTsample-output
strictOPTIONAL
string
true · false
—
DEFAULTfalse
Body
Name
Type
Description
bodyREQUIRED
object
—
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
▣ ENDPOINT 05 / 09
POST
Convert JSON from URL to Zod schema (raw text or explain JSON)
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
About this endpoint
What it does
Converts the JSON content fetched from a public URL into a Zod schema. The request sends the URL to inspect, and the response returns the generated schema text, along with metadata and assumptions when mode=explain.
Request Body
Parameter
Type
Mandatory
Description
url
String
Yes
Publicly accessible URL pointing to a JSON resource. The URL must return a content-type of application/json, text/plain, application/octet-stream, or binary/octet-stream, or the Content-Disposition / URL path must include .json. The JSON content must be a non-empty object.
Returns a JSON object with optional meta, schema, and assumptions fields. The documented output schema corresponds to the mode=explain response shape; meta is an object, schema is a string containing the generated Zod schema, and assumptions is an array of strings.
Parameter
Type
Mandatory
Description
meta
Object
No
Metadata about the request options. Contains mode and strict when present.
meta.mode
ENUM
No
Mode used for generation. Allowed values: annotated, clean, explain.
meta.strict
Boolean
No
Whether strict mode was applied.
schema
String
No
The generated Zod schema as a string, without annotations.
assumptions
String Array
No
Human-readable list of assumptions applied during schema generation.
Query parameters
Name
Type
Description
modeOPTIONAL
string
annotated · clean · explain
—
DEFAULTannotated
strictOPTIONAL
string
true · false
—
DEFAULTfalse
Body
Name
Type
Description
bodyREQUIRED
object
—
▣ ENDPOINT 06 / 09
POST
Convert uploaded JSON file to Zod schema (raw text or explain JSON)
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
About this endpoint
What it does
Converts an uploaded JSON file into a Zod schema. The request sends a JSON file plus optional generation options, and the response returns the generated schema and related metadata when mode=explain.
Whether strict mode is applied.<br>Allowed values: true, false.<br>Default: false.
Request Body
Parameter
Type
Mandatory
Description
file
String
Yes
JSON file to convert. The uploaded file must use mimetype application/json and must contain a non-empty JSON object.
Response
Returns a JSON object with meta, schema, and assumptions top-level fields. meta is an object containing the selected mode and a boolean strict flag, schema is the generated Zod schema as a string, and assumptions is an array of strings listing assumptions made during generation. The schema description indicates this response is returned when mode=explain.
Parameter
Type
Mandatory
Description
meta
Object
No
Metadata about the request options.<br>mode: annotated, clean, or explain.<br>strict: boolean indicating whether strict mode was applied.
schema
String
No
The generated Zod schema as a string, without annotations.
assumptions
String Array
No
Human-readable list of assumptions applied during schema generation.
Query parameters
Name
Type
Description
modeOPTIONAL
string
annotated · clean · explain
—
DEFAULTannotated
strictOPTIONAL
string
true · false
—
DEFAULTfalse
Body
Name
Type
Description
bodyREQUIRED
object
—
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
▣ ENDPOINT 07 / 09
POST
Convert raw JSON body to Zod schema (raw text or explain JSON)
Returns a JSON object with optional meta, schema, and assumptions fields. meta is an object containing the request mode and whether strict mode was applied, schema is the generated Zod schema as a string, and assumptions is an array of strings describing any assumptions made during generation.
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
About this endpoint
What it does
Converts a non-empty JSON request body into a Zod schema representation. The endpoint accepts the body as application/json or text/plain, and the response shape varies by the mode query parameter.
Any non-empty JSON object sent as the request body. The body must not be empty. Additional properties are allowed.
Response
Returns a JSON object. When mode=explain, the object can include meta (Object), schema (String), and assumptions (String Array) fields.
Parameter
Type
Mandatory
Description
meta
Object
No
Metadata about the request options. Contains mode (annotated, clean, or explain) and strict (Boolean).
schema
String
No
The generated Zod schema as a string, without annotations.
assumptions
String Array
No
Human-readable list of assumptions applied during schema generation.
Query parameters
Name
Type
Description
modeOPTIONAL
string
annotated · clean · explain
—
DEFAULTannotated
strictOPTIONAL
string
true · false
—
DEFAULTfalse
Body
Name
Type
Description
bodyREQUIRED
object
Any non-empty JSON object sent as the request body with Content-Type application/json (or text/plain, which is also accepted and parsed). The body must not be empty.
▣ ENDPOINT 08 / 09
POST
Convert raw JSON body to Zod schema (downloadable file)
Returns a binary file response: a downloadable Zod schema .ts file by default, or a JSON explain payload when mode=explain.
(binary file)
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
About this endpoint
What it does
Converts a raw JSON request body into a Zod schema and returns it as a downloadable file. The request body must be a non-empty JSON object, and the response is a binary file; when mode=explain, the output is a JSON explain payload instead.
Any non-empty JSON object sent as the request body with Content-Type: application/json (or text/plain, which is also accepted and parsed). The body must not be empty. Additional properties are allowed.
Response
Returns a binary response: a downloadable Zod schema .ts file, or a JSON explain payload .json when mode=explain.
Parameter
Type
Mandatory
Description
response
String
Yes
Binary file content in the response body. The exact payload depends on mode: .ts schema file by default, or .json explain output when mode=explain.
Query parameters
Name
Type
Description
modeOPTIONAL
string
annotated · clean · explain
—
DEFAULTannotated
outputOPTIONAL
string
—
DEFAULTsample-output
strictOPTIONAL
string
true · false
—
DEFAULTfalse
Body
Name
Type
Description
bodyREQUIRED
object
Any non-empty JSON object sent as the request body with Content-Type application/json (or text/plain, which is also accepted and parsed). The body must not be empty.
▣ ENDPOINT 09 / 09
POST
Convert raw JSON body to Zod schema (S3 signed URL)
Returns a JSON object with a data string field containing a pre-signed S3 URL to download the generated schema file.
{
"data": "https://s3.amazonaws.com/..."
}
TRY ITLIVE · 50 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
About this endpoint
What it does
Converts the raw JSON request body into a Zod schema file and returns a pre-signed S3 download URL for the generated output. The response contains the URL in a data string field; the file format depends on the selected mode.
Any non-empty JSON object. The body must not be empty. Content-Type application/json is accepted, and text/plain is also accepted and parsed. Additional properties are allowed.
Response
Returns a JSON object with a data string field containing a URI. This is a pre-signed S3 URL for downloading the generated file — a .ts schema file in normal modes, or a .json file when mode is explain.
Parameter
Type
Mandatory
Description
data
String
Yes
Pre-signed S3 URL to the converted file. The value is a URI.
Query parameters
Name
Type
Description
modeOPTIONAL
string
annotated · clean · explain
—
DEFAULTannotated
outputOPTIONAL
string
—
DEFAULTsample-output
strictOPTIONAL
string
true · false
—
DEFAULTfalse
Body
Name
Type
Description
bodyREQUIRED
object
Any non-empty JSON object sent as the request body with Content-Type application/json (or text/plain, which is also accepted and parsed). The body must not be empty.
▣ COMMON ERRORS
Errors any endpoint can return
400bad_request
Required parameter missing or malformed body.
401unauthorized
API key missing, revoked, or not authorized for this service.
429rate_limited
Your plan's per-second rate exceeded. Retry with exponential backoff.
503upstream_busy
Backend temporarily unavailable. Try again in a few seconds.