For Agents
Manage PlanetScale serverless MySQL databases including branching, schema migrations, backups, deploy requests, and organization settings.
Use for: Create a new database branch for testing schema changes, Deploy schema migration from development branch to production, Generate a new database password for application connection, List all deploy requests pending review for a database
Not supported: Provides database lifecycle management and schema migration orchestration. Does not execute queries against database branches-use MySQL connection strings for application data access. Does not provide query optimization or index tuning-use PlanetScale Insights dashboard.
PlanetScale is a serverless MySQL platform built on Vitess, the horizontal scaling system that powers YouTube and Slack. The PlanetScale API provides comprehensive control over database lifecycle management, branching workflows, backup policies, deployment requests, and organization administration. Developers use it to automate database provisioning in CI/CD pipelines, implement schema change workflows with branch-based development, manage connection credentials programmatically, and monitor query performance through insights endpoints. The API supports multi-region deployments, automatic sharding, and zero-downtime schema migrations. It enables infrastructure-as-code patterns for database management, allowing teams to version database schemas alongside application code and execute deploy requests that safely apply changes to production branches.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the PlanetScale API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fplanetscale.com%2Fplanetscale-api" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fplanetscale.com%2Fplanetscale-api" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with PlanetScale API.
Create and manage database branches for development, staging, and production environments
Execute deploy requests to apply schema changes with automatic conflict detection
Configure backup policies with retention periods and automated schedules
Manage database passwords and connection strings programmatically
Monitor query insights including slow queries and connection pool metrics
GET STARTED
Administer organization members, teams, and service tokens with role-based access control
Configure regional database deployments and cluster sizing for performance tuning
Patterns agents use PlanetScale API for, with concrete tasks.
★ Branch-Based Schema Development Workflow
Development teams use PlanetScale's branching model to develop database schema changes in isolation, similar to Git workflows. The API allows creating feature branches from production, applying migrations to the branch, running integration tests against the branch database, and then submitting a deploy request. Automated CI pipelines use the API to create ephemeral branches for each pull request, enabling schema change review and testing before merging to production. This eliminates the risk of breaking changes and enables true database versioning alongside application code.
Create a new PlanetScale branch from production, apply schema migration SQL to the branch, wait for safe migrations to complete, create a deploy request to merge changes back to production.
Automated Infrastructure Provisioning
Platform engineering teams use the API to provision databases as part of application deployment workflows. Terraform providers and custom automation tools call the API to create databases, configure cluster sizes for expected load, set up backup policies, generate connection credentials, and inject them into application environments. This enables self-service database provisioning for developers while maintaining governance through organization-level policies. Each microservice or tenant can receive its own isolated database with standardized configuration.
Create a new database in PlanetScale organization, configure cluster size for production workload, create initial main branch, generate connection password, and return connection string for application configuration.
Zero-Downtime Schema Migration Orchestration
SRE teams orchestrate complex schema migrations using deploy requests that PlanetScale executes with zero downtime. The API enables creating a deploy request between branches, monitoring its status as PlanetScale validates the migration safety, and tracking the deployment progress. For changes PlanetScale cannot safely auto-deploy (like dropping columns with data), the API provides deployment instructions and allows manual approval workflows. This reduces risk for high-traffic databases where traditional migration tools cause seconds or minutes of downtime.
Create deploy request to merge schema changes from staging branch to production, poll deploy request status, check for migration warnings, and monitor deployment progress until schema change is live.
Database Backup and Disaster Recovery Automation
Infrastructure teams use the API to manage backup policies ensuring compliance with RTO/RPO requirements. The API configures automated backup schedules, sets retention periods based on regulatory needs, and provides endpoints to list available backup snapshots. In disaster scenarios, the API allows restoring databases from specific backup points, creating new branches from backup snapshots for forensic analysis, and auditing backup history. This enables automated disaster recovery runbooks that can restore service with minimal manual intervention.
Configure backup policy for production database with 30-day retention, verify automated backups are running on schedule, list available backup snapshots, and test restore process by creating new branch from backup.
106 endpoints — planetscale is a serverless mysql platform built on vitess, the horizontal scaling system that powers youtube and slack.
METHOD
PATH
DESCRIPTION
/organizations/{organization}/databases
Create a new database
/organizations/{organization}/databases/{database}/branches
List branches for a database
/organizations/{organization}/databases/{database}/branches/{branch}/deploy-requests
Create a deploy request to merge schema changes
/organizations/{organization}/databases/{database}/branches/{branch}/passwords
List passwords for a database branch
/organizations/{organization}/databases/{database}/branches/{branch}/passwords
Create a new database password
/organizations/{organization}/databases
Create a new database
/organizations/{organization}/databases/{database}/branches
List branches for a database
/organizations/{organization}/databases/{database}/branches/{branch}/deploy-requests
Create a deploy request to merge schema changes
/organizations/{organization}/databases/{database}/branches/{branch}/passwords
List passwords for a database branch
/organizations/{organization}/databases/{database}/branches/{branch}/passwords
Create a new database password
What agents get from Jentic-routed access to this vendor.
Setup
Wiring the PlanetScale API by hand means setting up its OAuth service-token auth and hand-building requests across its database, branch, deploy-request and password endpoints yourself. Through Jentic you install once, import PlanetScale from the API Directory, store the service token once, and your agent calls it.
Permission scoping
PlanetScale puts the organization, database and branch in the URL path (/organizations/{organization}/databases/{database}/branches/{branch}/...), so a rule can pin your agent to one organization or database: it manages branches and deploy requests there and nothing else. You choose the operations it may call, so ones like creating branch passwords are not included unless you add them.
Credential isolation
Your PlanetScale service token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'create a database branch for schema testing' or 'open a deploy request', and Jentic returns the matching PlanetScale operation with its input schema so the agent calls the right endpoint without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using PlanetScale API through Jentic.
What authentication does the PlanetScale API use?
The PlanetScale API uses OAuth 2.0 service tokens for authentication. You generate service tokens in the PlanetScale dashboard with organization or database-level permissions, then pass the token in the Authorization header as a Bearer token.
How does PlanetScale branching differ from traditional database environments?
PlanetScale branches are isolated database instances that share the same schema lineage. Unlike traditional staging databases that drift from production, branches track schema changes and enable merge-based deployments with conflict detection, similar to Git workflows.
What is a deploy request in PlanetScale?
A deploy request is a schema migration proposal that merges changes from one branch to another. PlanetScale analyzes the migration for safety, executes it with zero downtime when possible, and provides manual deployment instructions for changes requiring careful coordination.
Can I automate database provisioning in CI/CD with the PlanetScale API?
Yes. The API provides full lifecycle management including database creation, branch provisioning, password generation, and connection string retrieval. Many teams use it with Terraform, GitHub Actions, or custom automation to provision databases per pull request or environment.
How do AI agents use the PlanetScale API through Jentic?
Agents search Jentic for tasks like 'create a database branch for testing' and receive the PlanetScale API operation schemas. Jentic securely stores the service token and handles authentication, allowing agents to execute branching, migration, and provisioning workflows with natural language parameters.
Can I limit what my agent is allowed to do with the PlanetScale API?
Yes. Because you self-host Jentic One, your own rules decide which PlanetScale operations and credentials the agent may use. Since PlanetScale puts the organization, database, and branch in the URL path, a rule can pin the agent to a single organization or database so it only manages branches and deploy requests there. You also pick the exact operations it can call, so sensitive ones like creating branch passwords stay out of reach unless you add them.