---
title: Convert JSON to Prisma Schema API
slug: convert-json-to-prisma-schema
url: https://apyverse.com/apyhub/service/convert-json-to-prisma-schema
provider: ApyHub
categories: [Developer Tools, File Conversion, Smart Generation]
auth: api_key
---

# Convert JSON to Prisma Schema API

Convert JSON objects, URLs, or files into Prisma schema text or .prisma downloads. Generate starter models from existing data structures.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/convert/json-raw/prisma-raw` | What it does Converts the provided JSON payload into a generated Prisma schema and returns it as a… | 50 |
| POST | `/convert/json-url/prisma-raw` | What it does Converts the JSON document available at the provided URL into a Prisma schema represen… | 50 |
| POST | `/convert/json-file/prisma-raw` | What it does Converts an uploaded JSON file into a Prisma schema and returns the generated result a… | 50 |
| POST | `/convert/json-raw/prisma-url` | What it does Converts the incoming JSON payload into a Prisma schema and returns a pre-signed S3 UR… | 50 |
| POST | `/convert/json-url/prisma-url` | What it does Converts JSON fetched from a publicly accessible URL into a Prisma schema file, then r… | 50 |
| POST | `/convert/json-file/prisma-url` | What it does Converts an uploaded JSON file into a Prisma schema and returns a pre-signed S3 URL fo… | 50 |
| POST | `/convert/json-raw/prisma-file` | What it does Converts the submitted JSON payload into a downloadable Prisma schema file (.prisma).… | 50 |
| POST | `/convert/json-url/prisma-file` | What it does Converts the JSON resource available at the provided URL into a downloadable Prisma sc… | 50 |
| POST | `/convert/json-file/prisma-file` | What it does Converts an uploaded JSON file into a downloadable Prisma schema file (.prisma). The r… | 50 |

## About

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

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyverse.com/apyhub/service/convert-json-to-prisma-schema
