Prisma REST API
Type-safe database ORM with auto-generated queries
Prisma is a next-generation ORM that makes database access easy with an auto-generated and type-safe query builder for Node.js and TypeScript. It supports PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, and CockroachDB, providing developers with intuitive data modeling, automated migrations, and a powerful query engine for building scalable applications.
https://api.prisma.io/v1
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /projects | Create a new Prisma project with database configuration |
| GET | /projects/{projectId} | Retrieve project details including database configuration and connection settings for the specified projectId. |
| GET | /projects/{projectId}/schema | Get the current Prisma schema for a project |
| PUT | /projects/{projectId}/schema | Update the Prisma schema and trigger migration generation |
| POST | /projects/{projectId}/migrations | Create and apply a new database migration |
| GET | /projects/{projectId}/migrations | List all migrations for a project with their status |
| POST | /projects/{projectId}/migrations/{migrationId}/apply | Apply a specific migration to the database using the migrationId, updating the schema to match the migration definition. |
| POST | /projects/{projectId}/migrations/{migrationId}/rollback | Rollback a specific migration identified by migrationId, reverting the database to its previous state. |
| GET | /projects/{projectId}/models | List all data models defined in the Prisma schema |
| POST | /projects/{projectId}/introspect | Introspect an existing database to generate Prisma schema |
| POST | /projects/{projectId}/generate | Generate Prisma Client based on the current schema |
| GET | /projects/{projectId}/seed | Get the current database seeding configuration including script paths and execution settings. |
| POST | /projects/{projectId}/seed/execute | Execute database seeding scripts to populate the database with initial or test data. |
| GET | /projects/{projectId}/metrics | Retrieve query performance metrics and statistics |
| DELETE | /projects/{projectId} | Delete a Prisma project and its configuration |
Sponsor this page
AvailableReach developers actively building with Prisma. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →Code Examples
curl -X POST https://api.prisma.io/v1/projects/proj_123/migrations \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "add_user_table",
"action": "create"
}'
Use Prisma from Claude / Cursor / ChatGPT
Get a hosted MCP endpoint for Prisma. Paste your Prisma API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls Prisma directly with your credentials — no local install, works on mobile.
prisma_generate_schema
Generate or update Prisma schema based on natural language model descriptions and relationships
prisma_create_migration
Create database migrations by analyzing schema changes and generating appropriate SQL
prisma_introspect_database
Introspect an existing database and generate corresponding Prisma schema models
prisma_optimize_queries
Analyze query patterns and suggest schema optimizations for better performance
prisma_seed_generator
Generate realistic seed data based on Prisma schema definitions and constraints
Connect in 60 seconds
Paste your Prisma key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.
Connect Prisma to your AI →