Why use the Lovable API?
Use the Lovable API to:- Publish and embed programmatically. Deploy projects and embed them inside your product without touching the Lovable UI.
- Monitor and govern your workspace. Query security scans, and read analytics across your workspace.
What you can do
The API covers these resource areas:- Projects: list, get, update settings, and delete projects.
- Deployments: publish or unpublish a project, check deploy status, and update publish settings.
- Embed: generate a one-hour URL for embedding a project’s built preview on a specified HTTPS origin. This does not embed the editor or the published app, and visitors do not need a Lovable login.
- Workspace: list workspaces, read workspace settings, and list members and groups.
- Analytics: read project-level and workspace-level analytics.
- Security: poll security scans per project, view workspace security insights, and read PII labels.
Other ways to use Lovable programmatically
The API is one of the ways to use Lovable programmatically, each from a different place:
You can also Build with URL: share a link with the prompt encoded in the URL. The link opens Lovable with the prompt prefilled, and the recipient clicks send to start the build. No API key needed.
FAQ
Is the Lovable API stable?
Is the Lovable API stable?
The
/v1 surface is versioned and stable. Lovable commits to a deprecation policy for the API, where deprecated endpoints keep working for a migration period and announce their sunset date.Which plans include API access?
Which plans include API access?
Creating API keys requires a Business or Enterprise plan, and an owner or admin role in the workspace.
Does the API cost extra?
Does the API cost extra?
No. There is no separate API pricing. The public API manages and deploys existing projects, and its current endpoints, including deployment builds, do not consume AI build credits. AI project creation and editing are available through the Lovable MCP server.
When should I use the API, and when should I use the MCP server?
When should I use the API, and when should I use the MCP server?
Use the API when workspace admins and owners need to manage the workspace and pull information from it, such as monitor security scans, get project information, or query workspace analytics from your own scripts and services. Use the MCP server when editors want to build out projects through a client such as Claude or Cursor.