apyhub
DEVELOPER TOOLS · FILE CONVERSION

Convert JSON to Prisma Schema API

What it does

JSON to Prisma Schema converts JSON objects, JSON arrays, or a JSON file into a Prisma schema. Send raw JSON, a JSON URL, or an uploaded .json file, and get back generated Prisma schema text or a downloadable .prisma file.

Use provider to target postgresql, mysql, sqlite, or mongodb. You can also set rootModelName to control the top-level Prisma model name. For raw JSON requests, the service accepts either a plain JSON object as the body or a wrapped payload with json and optional config fields. That wrapped form lets you override generation settings inline.

The raw-output endpoints return a JSON response with the generated schema string, plus meta, models, enums, warnings, and confidence. The file-output endpoints return the schema as a binary .prisma download, or a pre-signed S3 URL in a data field when you want to store or fetch the file separately.

Use JSON to Prisma Schema when you need to bootstrap a data model from an existing API payload, sample export, or customer dataset. It is useful for turning real-world JSON structures into a starting Prisma schema before you refine relations, naming, and types.

▣ ENDPOINT 01 / 09
POST
Convert raw JSON body → Prisma schema (raw JSON response)
https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-raw-prisma-raw

QUICKSTART

GUIDE

Quickstart

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

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-raw-prisma-raw?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 these top-level fields: meta (an object with enumCount, fieldCount, and modelCount integers), enums (an array of objects), models (an array of objects), schema (a string containing the full Prisma schema text), warnings (an array of strings), and confidence (a number).

{
  "meta": {
    "enumCount": 0,
    "fieldCount": 2,
    "modelCount": 1
  },
  "enums": [],
  "models": [],
  "schema": "model User {\n  id Int\n  name String\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.
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 generated Prisma schema and returns it as a JSON object. You can send either a plain JSON object as the raw body, or use the wrapped format with json plus optional inline config values.

Query Parameter(s)

AttributeTypeMandatoryDescription
providerENUMNoAllowed values: postgresql, mysql, sqlite, mongodb.<br>Default: postgresql.
rootModelNameStringNoExample: 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 that override query parameters. Supported fields:<br>provider — allowed values: postgresql, mysql, sqlite, mongodb; default: postgresql.<br>rootModelName — string; example: User.

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 summary metadata and generation notes.

ParameterTypeMandatoryDescription
metaObjectNoSummary counts for the generated schema.<br>Includes enumCount (integer), fieldCount (integer), and modelCount (integer).
enumsObject ArrayNoGenerated enums. Each item is an object.
modelsObject ArrayNoGenerated models. Each item is an object.
schemaStringNoThe full Prisma schema text.
warningsString ArrayNoWarning messages returned during generation.
confidenceNumberNoFloat confidence value.

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 02 / 09
POST
Convert JSON at URL → Prisma schema (raw JSON response)
https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-url-prisma-raw

QUICKSTART

GUIDE

Quickstart

Convert a JSON file from a public URL into a Prisma schema for the default PostgreSQL provider.

curl -X POST "https://api.eu.apyverse.com/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 the full Prisma schema text; the other fields provide the generated model details, warnings, and confidence score.

{
  "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 available at the provided URL into a Prisma schema representation, returned as a JSON object. You can optionally choose the Prisma provider and supply a root model name to influence the generated schema.

Query Parameter(s)

AttributeTypeMandatoryDescription
providerENUMNoPrisma provider to target. 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 containing generated Prisma schema data. The top-level fields are meta object, enums array, models array, schema string, warnings array, and confidence number.

ParameterTypeMandatoryDescription
metaObjectNoSummary statistics for the generated schema. Contains enumCount integer, fieldCount integer, and modelCount integer.
meta.enumCountIntegerNoNumber of enums generated.
meta.fieldCountIntegerNoNumber of fields generated.
meta.modelCountIntegerNoNumber of models generated.
enumsObject ArrayNoGenerated enums.
modelsObject ArrayNoGenerated models.
schemaStringNoThe full Prisma schema text.
warningsString ArrayNoWarning messages produced during conversion.
confidenceNumberNoConfidence score for the generated result.

Query parameters

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

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 09
POST
Convert uploaded JSON file → Prisma schema (raw JSON response)
https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-file-prisma-raw

QUICKSTART

GUIDE

Quickstart

Upload a JSON file to generate a Prisma schema, with PostgreSQL as the default provider.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-file-prisma-raw?provider=postgresql" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/schema.json"

What you'll get back

Returns a JSON object with these top-level fields: meta (an object with enumCount, fieldCount, and modelCount integers), enums (an array), models (an array), schema (a string containing the full Prisma schema text), warnings (an array of strings), and confidence (a number).

{
  "meta": {
    "enumCount": 0,
    "fieldCount": 0,
    "modelCount": 0
  },
  "enums": [],
  "models": [],
  "schema": "generator client {\n  provider = \"prisma-client-js\"\n}\n",
  "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.
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 generated result as a JSON object. You can optionally choose the target provider and the root model name used during schema generation.

Query Parameter(s)

AttributeTypeMandatoryDescription
providerStringNoPrisma provider used for generation. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name to use for the generated schema. Example: User.

Request Body

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

Response

Returns a JSON object containing generated Prisma schema data, including metadata, enums, models, the full schema text, warnings, and a confidence score.

ParameterTypeMandatoryDescription
metaObjectNoSummary metadata for the generated schema.
meta.enumCountIntegerNoNumber of enums detected.
meta.fieldCountIntegerNoNumber of fields detected.
meta.modelCountIntegerNoNumber of models detected.
enumsObject ArrayNoArray of enum objects generated from the input JSON.
modelsObject ArrayNoArray of model objects generated from the input JSON.
schemaStringNoThe full Prisma schema text.
warningsString ArrayNoArray of warning messages produced during conversion.
confidenceNumberNoConfidence score for the generated schema.

Notes

The request body expects a JSON file upload in the file field, and the file’s MIME type must be application/json.

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 04 / 09
POST
Convert raw JSON body → pre-signed S3 URL for .prisma file
https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-raw-prisma-url

QUICKSTART

GUIDE

Quickstart

Convert a JSON object to a Prisma schema file by sending the JSON in the request body and choosing the output filename in the query string.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-raw-prisma-url?output=sample-output&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 incoming JSON payload into a Prisma schema and returns a pre-signed S3 URL where the generated .prisma file can be downloaded. The request can be sent either as a plain JSON object/array body or in a wrapped format with json plus optional inline config overrides.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput identifier used in the generated file name; default: sample-output.
providerENUMNoDatabase provider. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name used during schema generation. Example: User.

Request Body

ParameterTypeMandatoryDescription
jsonObjectYes (if wrapped format is used)The JSON data to convert. Must be a non-empty object or array.
configObjectNoOptional inline generation options that override query parameters. Supports provider and rootModelName; provider allowed values are postgresql, mysql, sqlite, mongodb and defaults to postgresql.

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. The value is a 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 05 / 09
POST
Convert JSON at URL → pre-signed S3 URL for .prisma file
https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-url-prisma-url

QUICKSTART

GUIDE

Quickstart

Convert a JSON file from a public URL into a Prisma schema file for PostgreSQL.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-url-prisma-url?output=sample-output&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 — 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 JSON fetched from a publicly accessible URL into a Prisma schema file, then 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.
providerENUMNoPrisma provider to use. 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. Must be a valid 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. Must be a valid 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 06 / 09
POST
Convert uploaded JSON file → pre-signed S3 URL for .prisma file
https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-file-prisma-url

QUICKSTART

GUIDE

Quickstart

Upload a JSON file to convert it into a Prisma schema, then get back a pre-signed download URL.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-file-prisma-url?output=my-schema&provider=postgresql" \
  -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 — 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.

Query Parameter(s)

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

Request Body

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

Response

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

ParameterTypeMandatoryDescription
dataStringYesPre-signed S3 URL to the converted 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 07 / 09
POST
Convert raw JSON body → downloadable .prisma file
https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-raw-prisma-file

QUICKSTART

GUIDE

Quickstart

Convert a JSON object into a Prisma schema file, with the result returned as a downloadable .prisma binary.

curl -X POST "https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-raw-prisma-file?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 binary Prisma schema file (.prisma) as the response body.

// downloaded 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 submitted JSON payload into a downloadable Prisma schema file (.prisma). You can send the JSON either as the raw request body or wrapped under json with an optional config object for generation options.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename or identifier. Default: sample-output.
providerENUMNoPrisma provider to use. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
rootModelNameStringNoRoot model name. Example: User.

Request Body

ParameterTypeMandatoryDescription
idObjectNoPlain object format: the entire request body is treated as the JSON data to convert. Any valid non-empty JSON object is accepted; additional properties are allowed.
nameObjectNoPlain object format: the entire request body is treated as the JSON data to convert. Any valid non-empty JSON object is accepted; additional properties are allowed.
jsonObjectYes (if using wrapped format)The JSON data to convert. Must be a non-empty object or array.
configObjectNoInline generation options. provider and rootModelName may be provided here; body config values override query parameters.
config.providerENUMNoPrisma provider to use. Allowed values: postgresql, mysql, sqlite, mongodb. Default: postgresql.
config.rootModelNameStringNoRoot model name. Example: User.

Response

Returns a downloadable Prisma schema file as a binary string. The response is a single binary file payload, not a JSON object.

ParameterTypeMandatoryDescription
fileStringYesBinary Prisma schema file (.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 08 / 09
POST
Convert JSON at URL → downloadable .prisma file
https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-url-prisma-file

QUICKSTART

GUIDE

Quickstart

Convert a JSON file URL into a downloadable Prisma schema file.

curl -X POST "https://api.eu.apyverse.com/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 data (.prisma).

(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.
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 downloadable Prisma schema file (.prisma). The request takes a JSON file URL and optional query parameters that control the output file name, target provider, and root model name.

Query Parameter(s)

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

Header(s)

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

Response

Returns a downloadable Prisma schema file as a binary string (.prisma file). The success response is a binary payload, not a JSON object.

ParameterTypeMandatoryDescription
dataStringYesDownloadable 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
▣ ENDPOINT 09 / 09
POST
Convert uploaded JSON file → downloadable .prisma file
https://api.eu.apyverse.com/apyhub/convert-json-to-prisma-schema/json-file-prisma-file

QUICKSTART

GUIDE

Quickstart

Upload a JSON file and get back a downloadable Prisma schema for the selected provider.

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

What you'll get back

Returns a binary Prisma schema file (.prisma) as the response body.

my-schema.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 downloadable Prisma schema file (.prisma). The request sends the JSON file in the body, and the response returns the generated schema as a binary file.

Query Parameter(s)

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

Request Body

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

Response

Returns a binary response containing the downloadable Prisma schema (.prisma) file. The output schema is a single binary payload, not a JSON object.

ParameterTypeMandatoryDescription
responseStringYesDownloadable 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.

▣ 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.