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)
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| provider | ENUM | No | Allowed values: postgresql, mysql, sqlite, mongodb.Default: postgresql. |
| rootModelName | String | No | Example: User. |
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| json | Object / Object Array | Yes (if using wrapped format) | The JSON data to convert. Must be a non-empty object or array. |
| config | Object | No | Inline generation options that override query parameters. Supported fields:provider — allowed values: postgresql, mysql, sqlite, mongodb; default: postgresql.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.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| meta | Object | No | Summary counts for the generated schema. Includes enumCount (integer), fieldCount (integer), and modelCount (integer). |
| enums | Object Array | No | Generated enums. Each item is an object. |
| models | Object Array | No | Generated models. Each item is an object. |
| schema | String | No | The full Prisma schema text. |
| warnings | String Array | No | Warning messages returned during generation. |
| confidence | Number | No | Float confidence value. |



