---
title: Convert JSON to Prisma Schema API
slug: convert-json-to-prisma-schema
url: https://apyhub.com/apyhub/service/convert-json-to-prisma-schema
provider: ApyHub
categories: [Developer Tools, Smart Generation]
tags: [prisma, json-conversion, schema-generation, database-modeling, developer-tools]
auth: api_key
---

# Convert JSON to Prisma Schema API

Convert JSON from a body, file, or URL into Prisma schema text or a .prisma file. Supports PostgreSQL, MySQL, SQLite, and MongoDB.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/convert/json-url/prisma-url` | What it does Converts the JSON resource available at the provided URL into a Prisma schema file and… | 50 |
| POST | `/convert/json-file/prisma-raw` | What it does Converts an uploaded JSON file into a Prisma schema and returns the result as a JSON o… | 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 supplied JSON content into a downloadable Prisma schema (.prisma) file. T… | 50 |
| POST | `/convert/json-raw/prisma-raw` | What it does Converts the supplied JSON data into a Prisma schema and returns the generated result… | 50 |
| POST | `/convert/json-raw/prisma-url` | What it does Converts the provided JSON payload into a Prisma schema and returns a pre-signed S3 UR… | 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 |
| POST | `/convert/json-url/prisma-file` | What it does Converts the JSON file available at the provided URL into a downloadable Prisma schema… | 50 |
| POST | `/convert/json-url/prisma-raw` | What it does Converts the JSON document at the provided URL into a Prisma schema and returns the ge… | 50 |

## About

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

## Usage

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