apyhub
DEVELOPER TOOLS · SMART GENERATION

Convert JSON to Prisma Schema API

Hosted on ApyHub

What it does

JSON to Prisma Schema converts JSON into a Prisma schema, either from a raw JSON payload, an uploaded JSON file, or a JSON resource at a public URL. You can get the result back as raw JSON, a downloadable .prisma file, or a pre-signed S3 URL to the generated file.

Use it when you need to turn example data or an existing JSON payload into a starting Prisma data model. The service accepts JSON as a request body, a binary JSON file, or a url pointing to a publicly accessible JSON resource. For generation options, it supports provider (postgresql, mysql, sqlite, or mongodb) and an optional rootModelName. Some endpoints also accept an output name for the generated file.

The raw response includes the generated schema text plus supporting meta, enums, models, warnings, and confidence fields. That makes it useful when you want to inspect or post-process the generated schema in your own pipeline. If you prefer file delivery, the file endpoints return the .prisma content directly, or a data URL pointing to the saved file.

A typical use case is bootstrapping a Prisma model from API fixtures, import samples, or a JSON export before you wire it into a database migration workflow.

▣ ENDPOINT 01 / 09
POST
Convert JSON at URL → pre-signed S3 URL for .prisma file
http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-url-prisma-url
QUICKSTARTGUIDE

Quickstart

Convert a JSON file from a public URL into a Prisma schema by sending the source URL in the request body.

curl -X POST "http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-url-prisma-url?output=my-schema&provider=postgresql" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.json"}'

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted .prisma file.

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.prisma?..."
}
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.
body*
Publicly accessible URL pointing to a JSON resource.

About this endpoint

What it does

Converts the JSON resource available at the provided URL into a Prisma schema file and returns a pre-signed S3 URL where the generated .prisma file can be downloaded.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput file name prefix. Default: sample-output.
providerENUMNoTarget database provider. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name to use in the generated Prisma schema.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a JSON resource. Format: URI.

Response

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted .prisma file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file. Format: URI.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
providerOPTIONAL
string
postgresql · mysql · sqlite · mongodb
DEFAULT postgresql
rootModelNameOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 09
POST
Convert uploaded JSON file → Prisma schema
http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-file-prisma-raw
QUICKSTARTGUIDE

Quickstart

Upload a JSON file to generate a Prisma schema.

curl -X POST "http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-file-prisma-raw" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.json"

What you'll get back

Returns a JSON object with meta, enums, models, schema, warnings, and confidence fields. meta is an object with enumCount, fieldCount, and modelCount; schema is the full Prisma schema text; the other top-level fields contain the generated schema details and any warnings.

{
  "meta": {
    "enumCount": 0,
    "fieldCount": 0,
    "modelCount": 1
  },
  "enums": [],
  "models": [],
  "schema": "model User {\n  id Int @id @default(autoincrement())\n}",
  "warnings": [],
  "confidence": 0.98
}
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.
body*
JSON file to convert (MIME type must be `application/json`).

About this endpoint

What it does

Converts an uploaded JSON file into a Prisma schema and returns the result as a JSON object. The request uploads a JSON file and can optionally specify the Prisma provider and a root model name.

Query Parameter(s)

AttributeTypeMandatoryDescription
providerENUMNoPrisma provider to target. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot Prisma model name. Example: User.

Request Body

ParameterTypeMandatoryDescription
fileStringYesJSON file to convert. The MIME type must be application/json.

Response

Returns a JSON object with meta object, enums array, models array, schema string, warnings array, and confidence number fields. The schema field contains the full Prisma schema text, while the other fields provide counts, structured model data, warnings, and a confidence score.

ParameterTypeMandatoryDescription
metaObjectNoSummary counts for the generated schema.
meta.enumCountIntegerNoNumber of enums detected in the generated Prisma schema.
meta.fieldCountIntegerNoNumber of fields detected in the generated Prisma schema.
meta.modelCountIntegerNoNumber of models detected in the generated Prisma schema.
enumsObject ArrayNoArray of enum objects included in the generated result.
modelsObject ArrayNoArray of model objects included in the generated result.
schemaStringNoThe full Prisma schema text.
warningsString ArrayNoArray of warning messages produced during conversion.
confidenceNumberNoConfidence score for the generated schema, returned as a float.

Query parameters

Name
Type
Description
providerOPTIONAL
string
postgresql · mysql · sqlite · mongodb
DEFAULT postgresql
rootModelNameOPTIONAL
string

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 03 / 09
POST
Convert uploaded JSON file → pre-signed S3 URL for .prisma file
http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-file-prisma-url
QUICKSTARTGUIDE

Quickstart

Upload a JSON file to convert it into a Prisma schema, using the default PostgreSQL provider and sample output name.

curl -X POST "http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-file-prisma-url?output=my-schema&provider=postgresql&rootModelName=User" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.json"

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted Prisma file.

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.prisma?..."
}
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.
body*
JSON file to convert (MIME type must be `application/json`).

About this endpoint

What it does

Converts an uploaded JSON file into a Prisma schema and returns a pre-signed S3 URL for the generated .prisma file. The request accepts the JSON file in the body plus optional query parameters to control the output name, database provider, and root model name.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name used in the generated file URL. Default: sample-output.
providerENUMNoDatabase provider to target. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name to use in the generated schema.

Request Body

ParameterTypeMandatoryDescription
fileStringYesJSON file to convert. MIME type must be application/json.

Response

Returns a JSON object with a data string field containing a pre-signed S3 URL for the converted .prisma file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file. Format: URI.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
providerOPTIONAL
string
postgresql · mysql · sqlite · mongodb
DEFAULT postgresql
rootModelNameOPTIONAL
string

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 raw JSON body → downloadable .prisma file
http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-raw-prisma-file
QUICKSTARTGUIDE

Quickstart

Convert a JSON object into a Prisma schema file with the default PostgreSQL provider.

curl -X POST "http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-raw-prisma-file" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":1,"name":"Alice"}'

What you'll get back

Returns a downloadable Prisma schema file as a binary response (string with format: binary). The response body is the generated .prisma file content.

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.
The request body can be either: **Plain object** — the entire body is treated as the JSON data to convert: ```json { "id": 1, "name": "Alice" } ``` **Wrapped format** — use `json` for data and `config` for inline generation options. The body must have exactly the keys `json` and (optionally) `config`, where `json` is an object or array: ```json { "json": { "id": 1, "name": "Alice" }, "config": { "rootModelName": "User", "provider": "postgresql" } } ``` Body `config` values are merged with query parameters; body config takes precedence.
body*
Any valid non-empty JSON object as the raw body.

About this endpoint

What it does

Converts the supplied JSON content into a downloadable Prisma schema (.prisma) file. The request body can be sent either as a plain JSON object/array or in the wrapped { json, config } format, and query/body config options are used to control generation.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename/base name. Default: sample-output.
providerStringNoPrisma provider. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name. Example: User.

Request Body

ParameterTypeMandatoryDescription
jsonObject / Object ArrayYes (if using wrapped format)The JSON data to convert. Must be a non-empty object or array.
configObjectNoInline generation options. Supports provider and rootModelName; values here override query parameters.
config.providerENUMNoPrisma provider. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
config.rootModelNameStringNoRoot model name. Example: User.

Response

Returns a downloadable Prisma schema file as a binary response. The response body is a single binary string representing the generated .prisma file.

ParameterTypeMandatoryDescription
stringStringYesBinary file content for the generated Prisma schema (.prisma).

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
providerOPTIONAL
string
postgresql · mysql · sqlite · mongodb
DEFAULT postgresql
rootModelNameOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
any
The request body can be either: **Plain object** — the entire body is treated as the JSON data to convert: ```json { "id": 1, "name": "Alice" } ``` **Wrapped format** — use `json` for data and `config` for inline generation options. The body must have exactly the keys `json` and (optionally) `config`, where `json` is an object or array: ```json { "json": { "id": 1, "name": "Alice" }, "config": { "rootModelName": "User", "provider": "postgresql" } } ``` Body `config` values are merged with query parameters; body config takes precedence.
▣ ENDPOINT 05 / 09
POST
Convert raw JSON body → Prisma schema
http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-raw-prisma-raw
QUICKSTARTGUIDE

Quickstart

Send your JSON data in the request body to generate a Prisma schema.

curl -X POST "http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-raw-prisma-raw" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":1,"name":"Alice"}'

What you'll get back

Returns a JSON object with these top-level fields: meta (object), enums (array), models (array), schema (string), warnings (array), and confidence (number).

{
  "meta": {
    "enumCount": 0,
    "fieldCount": 2,
    "modelCount": 1
  },
  "enums": [],
  "models": [],
  "schema": "model User {\n  id Int\n  name String\n}",
  "warnings": [],
  "confidence": 1
}
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.
The request body can be either: **Plain object** — the entire body is treated as the JSON data to convert: ```json { "id": 1, "name": "Alice" } ``` **Wrapped format** — use `json` for data and `config` for inline generation options. The body must have exactly the keys `json` and (optionally) `config`, where `json` is an object or array: ```json { "json": { "id": 1, "name": "Alice" }, "config": { "rootModelName": "User", "provider": "postgresql" } } ``` Body `config` values are merged with query parameters; body config takes precedence.
body*
Any valid non-empty JSON object as the raw body.

About this endpoint

What it does

Converts the supplied JSON data into a Prisma schema and returns the generated result as a JSON object. The request can be sent either as a raw JSON body or as a wrapped body with json data plus optional config overrides.

Query Parameter(s)

AttributeTypeMandatoryDescription
providerENUMNoDatabase provider used for schema generation. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name used during generation.

Request Body

ParameterTypeMandatoryDescription
idNumberNoRaw JSON data to convert when sending a plain object body. Any valid non-empty JSON object is accepted.
nameStringNoRaw JSON data to convert when sending a plain object body. Any valid non-empty JSON object is accepted.
jsonObjectNoJSON data to convert in wrapped format. Must be a non-empty object or array.
configObjectNoOptional inline generation options that override query parameters. Supported fields: provider, rootModelName.

Response

Returns a JSON object with meta as an object, enums as an array, models as an array, schema as a string, warnings as an array, and confidence as a number. The schema field contains the full Prisma schema text.

ParameterTypeMandatoryDescription
metaObjectNoSummary metadata for the generated schema. Contains enumCount, fieldCount, and modelCount as integer fields.
enumsObject ArrayNoGenerated enums. Each item is an object.
modelsObject ArrayNoGenerated models. Each item is an object.
schemaStringNoThe full Prisma schema text.
warningsString ArrayNoGeneration warnings, if any.
confidenceNumberNoFloat confidence score for the generated output.

Query parameters

Name
Type
Description
providerOPTIONAL
string
postgresql · mysql · sqlite · mongodb
DEFAULT postgresql
rootModelNameOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
any
The request body can be either: **Plain object** — the entire body is treated as the JSON data to convert: ```json { "id": 1, "name": "Alice" } ``` **Wrapped format** — use `json` for data and `config` for inline generation options. The body must have exactly the keys `json` and (optionally) `config`, where `json` is an object or array: ```json { "json": { "id": 1, "name": "Alice" }, "config": { "rootModelName": "User", "provider": "postgresql" } } ``` Body `config` values are merged with query parameters; body config takes precedence.
▣ ENDPOINT 06 / 09
POST
Convert raw JSON body → pre-signed S3 URL for .prisma file
http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-raw-prisma-url
QUICKSTARTGUIDE

Quickstart

Convert a small JSON object to a Prisma schema and download the generated file URL.

curl -X POST "http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-raw-prisma-url?output=my-schema&provider=postgresql&rootModelName=User" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":1,"name":"Alice"}'

What you'll get back

Returns a JSON object with a data string field containing a pre-signed S3 URL to the converted .prisma file.

{
  "data": "https://s3.amazonaws.com/bucket/uuid_sample-output.prisma?..."
}
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.
The request body can be either: **Plain object** — the entire body is treated as the JSON data to convert: ```json { "id": 1, "name": "Alice" } ``` **Wrapped format** — use `json` for data and `config` for inline generation options. The body must have exactly the keys `json` and (optionally) `config`, where `json` is an object or array: ```json { "json": { "id": 1, "name": "Alice" }, "config": { "rootModelName": "User", "provider": "postgresql" } } ``` Body `config` values are merged with query parameters; body config takes precedence.
body*
Any valid non-empty JSON object as the raw body.

About this endpoint

What it does

Converts the provided JSON payload into a Prisma schema and returns a pre-signed S3 URL for the generated .prisma file. You can send the JSON either directly as the raw request body or wrapped in a json field with optional inline generation settings.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name used when generating the .prisma file. Default: sample-output.
providerENUMNoDatabase provider for schema generation. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name used during generation. Example: User.

Request Body

ParameterTypeMandatoryDescription
jsonObject / String ArrayNoWrapped format only. The JSON data to convert. Must be a non-empty object or array.
configObjectNoWrapped format only. Optional inline generation options. Body config values are merged with query parameters and take precedence over them.
config.providerENUMNoWrapped format only. Database provider for schema generation. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
config.rootModelNameStringNoWrapped format only. Root model name used during generation. Example: User.

Response

Returns a JSON object with a data string field containing a pre-signed S3 URI for the generated .prisma file.

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted file. Format: URI.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
providerOPTIONAL
string
postgresql · mysql · sqlite · mongodb
DEFAULT postgresql
rootModelNameOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
any
The request body can be either: **Plain object** — the entire body is treated as the JSON data to convert: ```json { "id": 1, "name": "Alice" } ``` **Wrapped format** — use `json` for data and `config` for inline generation options. The body must have exactly the keys `json` and (optionally) `config`, where `json` is an object or array: ```json { "json": { "id": 1, "name": "Alice" }, "config": { "rootModelName": "User", "provider": "postgresql" } } ``` Body `config` values are merged with query parameters; body config takes precedence.
▣ ENDPOINT 07 / 09
POST
Convert uploaded JSON file → downloadable .prisma file
http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-file-prisma-file
QUICKSTARTGUIDE

Quickstart

Convert a JSON file into a Prisma schema by uploading the file and choosing the output format.

curl -X POST "http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-file-prisma-file?output=my-schema&provider=postgresql&rootModelName=User" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/file.json"

What you'll get back

Returns a downloadable Prisma schema file as a binary .prisma response.

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.
body*
JSON file to convert (MIME type must be `application/json`).

About this endpoint

What it does

Converts an uploaded JSON file into a downloadable Prisma schema file (.prisma). The request sends the source JSON file and optional query parameters to control the output name, target provider, and root model name.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name. Default: sample-output.
providerStringNoDatabase provider. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name.

Request Body

ParameterTypeMandatoryDescription
fileStringYesJSON file to convert. MIME type must be application/json.

Response

Returns a downloadable Prisma schema file (.prisma) as a binary response. The success response is a single binary payload with no JSON wrapper.

ParameterTypeMandatoryDescription
fileStringYesDownloadable Prisma schema (.prisma) file.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
providerOPTIONAL
string
postgresql · mysql · sqlite · mongodb
DEFAULT postgresql
rootModelNameOPTIONAL
string

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 08 / 09
POST
Convert JSON at URL → downloadable .prisma file
http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-url-prisma-file
QUICKSTARTGUIDE

Quickstart

Generate a Prisma schema file from a public JSON URL.

curl -X POST "http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-url-prisma-file?output=my-schema&provider=postgresql&rootModelName=User" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.json"}'

What you'll get back

Returns a downloadable Prisma schema file as binary content (.prisma).

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.
body*
Publicly accessible URL pointing to a JSON resource.

About this endpoint

What it does

Converts the JSON file available at the provided URL into a downloadable Prisma schema (.prisma) file. You send the source JSON URL in the request body and can control the output name and target provider through query parameters.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput name for the generated file. Default: sample-output.
providerENUMNoTarget Prisma provider. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name to use in the generated schema.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a JSON resource. Must be a URI.

Response

Returns a downloadable Prisma schema (.prisma) file as binary content.

ParameterTypeMandatoryDescription
fileStringYesBinary file content for the generated Prisma schema (.prisma).

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT sample-output
providerOPTIONAL
string
postgresql · mysql · sqlite · mongodb
DEFAULT postgresql
rootModelNameOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 09 / 09
POST
Convert JSON at URL → Prisma schema
http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-url-prisma-raw
QUICKSTARTGUIDE

Quickstart

Convert a JSON file URL into a Prisma schema by sending the JSON URL in the request body.

curl -X POST "http://localhost:8080/apyhub/convert-json-to-prisma-schema/json-url-prisma-raw?provider=postgresql" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://assets.apyhub.com/samples/sample.json"}'

What you'll get back

Returns a JSON object with meta, enums, models, schema, warnings, and confidence fields. meta is an object with enumCount, fieldCount, and modelCount; schema is a string containing the full Prisma schema text.

{
  "meta": {
    "enumCount": 0,
    "fieldCount": 0,
    "modelCount": 0
  },
  "enums": [],
  "models": [],
  "schema": "string",
  "warnings": [],
  "confidence": 0
}
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.
body*
Publicly accessible URL pointing to a JSON resource.

About this endpoint

What it does

Converts the JSON document at the provided URL into a Prisma schema and returns the generated result as a JSON object. You can optionally choose the target provider and set a root model name for the generated schema.

Query Parameter(s)

AttributeTypeMandatoryDescription
providerENUMNoTarget Prisma provider. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name to use for generation.

Request Body

ParameterTypeMandatoryDescription
urlStringYesPublicly accessible URL pointing to a JSON resource. Format: URI.

Response

Returns a JSON object with meta object, enums array, models array, schema string, warnings array, and confidence number fields. The schema field contains the full Prisma schema text.

ParameterTypeMandatoryDescription
metaObjectNoSummary counts for the generated schema.
meta.enumCountIntegerNoNumber of enums in the generated output.
meta.fieldCountIntegerNoNumber of fields in the generated output.
meta.modelCountIntegerNoNumber of models in the generated output.
enumsObject ArrayNoGenerated enums.
modelsObject ArrayNoGenerated models.
schemaStringNoThe full Prisma schema text.
warningsString ArrayNoGeneration warnings, if any.
confidenceNumberNoConfidence score for the generated schema.

Query parameters

Name
Type
Description
providerOPTIONAL
string
postgresql · mysql · sqlite · mongodb
DEFAULT postgresql
rootModelNameOPTIONAL
string

Body

Name
Type
Description
bodyREQUIRED
object
▣ 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.