Database & ORM
API Key
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.
Base URL
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 and configuration |
| 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 |
| POST | /projects/{projectId}/migrations/{migrationId}/rollback | Rollback a specific migration |
| 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 |
| POST | /projects/{projectId}/seed/execute | Execute database seeding scripts |
| GET | /projects/{projectId}/metrics | Retrieve query performance metrics and statistics |
| DELETE | /projects/{projectId} | Delete a Prisma project and its configuration |
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"
}'
Connect Prisma to AI
Deploy a Prisma MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Prisma through these tools:
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
Deploy in 60 seconds
Describe what you need, AI generates the code, and IOX deploys it globally.
Deploy Prisma MCP Server →