Skip to main content
RapidDev - Software Development Agency
lovable-issues

Lovable API & API Keys: What Exists and How to Use Them

Lovable does not have a classic public REST API with developer API keys for arbitrary automation. What exists instead is Build with URL, links that open Lovable with a prompt prefilled, and the Lovable MCP server, which lets tools like Claude or Cursor programmatically create and manage projects through OAuth. Your own third-party API keys (Stripe, OpenAI, etc.) go into the Cloud tab's Secrets, never into prompts or code.

Book a free consultation
4.9Clutch rating
1,000+Happy partners
20+Countries served
200+Team members
Beginner8 min read~10 minLovable MCP server: all plans, including Free (Enterprise requires admin enablement). Secrets: all plans. Build with URL: open beta, all plans.Last updated September 2026RapidDev Engineering Team
TL;DR

Lovable does not have a classic public REST API with developer API keys for arbitrary automation. What exists instead is Build with URL, links that open Lovable with a prompt prefilled, and the Lovable MCP server, which lets tools like Claude or Cursor programmatically create and manage projects through OAuth. Your own third-party API keys (Stripe, OpenAI, etc.) go into the Cloud tab's Secrets, never into prompts or code.

Quick facts about this guide
FactValue
ToolLovable
DifficultyBeginner
Time required~10 min
CompatibilityLovable MCP server: all plans, including Free (Enterprise requires admin enablement). Secrets: all plans. Build with URL: open beta, all plans.
Last updatedSeptember 2026

Why 'Lovable API' is a confusing search term

The phrase 'Lovable API' gets typed for at least three different reasons, and Lovable's own product surface has changed enough in 2026 that older answers are now wrong. Historically, the honest answer was simply 'no public API exists.' That is now only half true: a classic REST developer API with endpoints and static keys still does not exist, but two real programmatic surfaces were introduced in 2026 — Build with URL for one-shot prompt links, and the Lovable MCP server for genuine agent-driven project control through OAuth. Meanwhile, a much larger group of searchers are not looking for a way to automate Lovable at all — they are trying to use their own API keys (Stripe, a data provider, an AI model) inside an app they are building, and the correct answer for them has nothing to do with a Lovable-issued key. Their keys go into Secrets in the Cloud tab, full stop. Conflating these three intents is where most confusion, and most third-party misinformation about 'lov_ prefixed API keys,' comes from.

  • No classic REST developer API exists, so guides referencing 'Lovable API keys' for general automation are usually describing something unofficial or outdated
  • Build with URL is a one-shot prompt link, not a programmatic API for managing existing projects
  • The Lovable MCP server is the real automation surface, but it authenticates via OAuth, not a static issued key
  • Third-party API keys for your own integrations belong in Secrets, a completely separate system from any 'Lovable API'

Before you start

  • A Lovable account to use Build with URL or Secrets
  • An MCP-compatible client (Claude, Claude Code, Cursor, or VS Code) if connecting the Lovable MCP server
  • Any third-party API keys you plan to use (Stripe, OpenAI, etc.) ready to paste into Secrets, never into a prompt

How to fix it

1

Figure out which 'Lovable API' question you actually have

The keyword covers three unrelated things, and picking the wrong one wastes time searching for a feature that does not exist

There are three distinct intents hiding behind 'Lovable API': (1) is there a general REST API for automating Lovable itself, (2) how do I use my own third-party API keys, like Stripe or a weather API, inside a project I am building, and (3) what are the AI model keys Lovable uses internally or through its Cloud AI gateway. Each has a completely different answer, covered in the next three steps.

Expected result: You know which of the three questions applies to what you are trying to do.

2

Understand what actually exists: Build with URL and the Lovable MCP server

As of September 2026 there is no documented, classic REST developer API with endpoints and issued API keys for arbitrary automation

Instead, Lovable offers two programmatic surfaces. Build with URL (still in open beta) is a shareable link format, lovable.dev/build?prompt=your-prompt-here, that opens the editor with a prompt already typed in — useful for an embed button on a marketing site or a one-click prototype link, not for managing existing projects. The Lovable MCP server at mcp.lovable.dev is the real programmatic-control surface: it lets an AI agent create and list projects, send chat messages to the builder, inspect file diffs and edit history, publish apps and get live URLs, and even run SQL against a connected Lovable Cloud database. It authenticates through OAuth, not a static developer key, and is available on every plan, including Free, though Enterprise workspaces need an admin to enable it in Security settings.

Expected result: You can distinguish a one-shot prompt link (Build with URL) from actual programmatic project control (Lovable MCP server).

3

Use your own third-party API keys the correct way, through Secrets

Pasting a real key into a prompt or into code exposes it in chat history and risks it being committed to a public repository

If your app needs to call Stripe, OpenAI, a weather API, or any other third-party service, open the Cloud tab and go to Secrets. Add the key there with a clear name (like STRIPE_SECRET_KEY). Then, when you prompt Lovable to add the integration, tell it to read the key from Secrets rather than pasting the value directly. Lovable encrypts Secrets and injects them into Edge Functions at runtime; the platform also actively scans pasted text for hardcoded keys and automatically revokes any that get pushed to a public GitHub repository.

Expected result: Your third-party keys live only in Secrets, are never visible in chat history or exported code, and get auto-revoked if accidentally leaked.

4

Understand the AI model keys — there is nothing for you to manage

This is a separate concern from both the platform API and your own third-party keys, and no user-facing key exists for either

Lovable's own builder (the AI that writes your app's code from a chat prompt) runs on Anthropic Claude models internally. You do not see, choose, or pay for a model key here — it is entirely managed by Lovable and billed through your normal build credits. Separately, if you use Lovable Cloud's built-in AI gateway inside your published app (for a chatbot, summarizer, or similar feature), that also requires no API key from you; Lovable Cloud routes the model calls (Gemini by default for chat, with OpenAI variants available) and bills them from your AI credit grant, then your regular workspace credits.

Expected result: You stop looking for an AI provider key to paste in, because neither the builder nor the Cloud AI gateway requires one from you.

5

Automate Lovable itself, if that is your actual goal

Some users searching for a 'Lovable API' actually want to trigger builds or manage projects from an external system, not use keys inside a project

For that, the Lovable MCP server is the correct tool: connect it to Claude Code, Cursor, or another supported MCP client, authenticate with OAuth, and the agent can create projects, prompt the builder, and publish on your behalf, all metered through your normal credits. For teams that need this wired into an internal tool, CI pipeline, or a custom dashboard beyond what a single MCP client provides, RapidDev's engineers build custom Lovable automation on top of the MCP server as part of client engagements typically priced $13K-$25K.

Expected result: You have a working path to automate project creation or updates from outside the Lovable editor, using the MCP server rather than a nonexistent REST API.

Best practices to prevent this

  • Never paste a real API key directly into a chat prompt — always add it to Secrets first and reference it by name
  • Treat 'Lovable API key' claims from third-party blog posts skeptically — verify against official docs before assuming a static key exists
  • Use the Lovable MCP server, not Build with URL, if you need to manage or iterate on existing projects programmatically
  • Remember the builder's own AI model (Claude) and Lovable Cloud's AI gateway (Gemini by default) both require zero configuration from you — do not go looking for a key that isn't there
  • Name your Secrets clearly (STRIPE_SECRET_KEY, not KEY1) so future prompts and teammates know what each one does
  • Check Security settings if you are on Enterprise and the MCP server does not appear — it needs explicit admin enablement

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

I want to understand what's possible to automate with Lovable.dev. Here is what I am trying to do: - Goal: [e.g. trigger a new project from my own app, or manage several projects programmatically] - Current tools: [Claude Code / Cursor / a custom script / none yet] - Technical comfort level: [low/medium/high] Please help me: 1. Confirm whether Build with URL or the Lovable MCP server fits my goal better 2. Walk through connecting the Lovable MCP server to my chosen client 3. List what actions are actually possible through MCP (create, prompt, publish, run SQL, etc.) 4. Flag anything that still requires a manual step in the Lovable editor

Lovable Prompt

Add a Stripe secret key call to this Edge Function. Read the key from Secrets using the standard environment variable pattern, never hardcode the value, and confirm the Secret name you expect me to add in the Cloud tab.

Frequently asked questions

Does Lovable have a public API?

Not a classic REST API with documented endpoints and developer API keys for arbitrary automation. What Lovable does offer is Build with URL, shareable links with a prefilled prompt that create a new app when opened, and the Lovable MCP server, which lets AI agents like Claude or Cursor programmatically create, edit, and publish Lovable projects.

Where do I find my Lovable API key?

There is no general-purpose 'Lovable API key' issued to every user for calling a developer API, since that API does not exist in the classic sense. Lovable MCP server access uses OAuth sign-in rather than a static API key. If you have read about a lov_ prefixed API key for headless MCP auth, treat that as unverified — official docs describe OAuth-only access.

How do I use my own API keys (Stripe, OpenAI, etc.) inside a Lovable project?

Paste them into the Cloud tab, then Secrets. Never write a real API key directly into a prompt or into code. Lovable stores Secrets encrypted and injects them into Edge Functions at runtime; the platform also actively scans for and blocks hardcoded keys pasted into chat.

What is 'Build with URL' and how is it different from an API?

Build with URL is a link format (lovable.dev/build?prompt=...) that opens Lovable with a prompt already filled in, useful for embed buttons, internal tooling, or one-click prototyping. It creates a single project from a single link; it is not a programmatic API for managing many projects, listing files, or triggering deployments.

Can I control Lovable programmatically from another tool?

Yes, through the Lovable MCP server at mcp.lovable.dev. Official OAuth clients include Claude (desktop and claude.ai), Claude Code, Cursor, and VS Code, with support for other MCP clients still limited. Through it, an agent can create and list projects, send messages to the builder, inspect file diffs and edit history, publish apps, and even run SQL against a connected Lovable Cloud database.

Does using the Lovable MCP server cost extra?

It draws from your normal workspace credits, the same balance used for building in the editor. There is no separate MCP-specific charge; every project created or message sent through the MCP server consumes credits exactly as if you had typed the prompt in the editor yourself.

Are there AI model API keys involved in Lovable?

Two separate things get confused here. The builder itself runs on Anthropic Claude models internally, and you never see or manage a key for that. Lovable Cloud's built-in AI gateway (used for chatbots, summarization, and similar features inside your published app) also does not require your own AI provider key, since Lovable Cloud routes those calls and bills them through credits.

What if I can't fix this myself?

If you are trying to automate Lovable at scale, integrate it into a CI pipeline, or wire up complex Secrets across multiple environments, RapidDev's engineers have built custom automation and MCP-based workflows around Lovable for client projects, typically in the $13K-$25K range.

RapidDev

Talk to an Expert

Our team has built 1,000+ apps. Get personalized help with your issue.

Book a free consultation
Matt Graham

Written by

Matt Graham · CEO & Founder, RapidDev

1,000+ client projects delivered. Columbia University & Harvard Business School alumnus, U.S. Navy veteran. About the author →

Stuck on this for days?

Paste-and-pray debugging burns credits and weekends. Get a free 30-minute project audit — a senior engineer looks at your actual your platform project and tells you what's wrong, no strings attached.

Get a free project audit

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.