Normally, adding AI to an app means choosing a provider, managing API keys, setting up billing, securing credentials, and wiring model calls into your backend. Lovable’s built-in AI connector handles that setup for you, so you can add AI features to your app by describing what you want to build. These AI features run inside your app. They are separate from the Lovable agent that helps you build and edit your project. Some examples include:Documentation Index
Fetch the complete documentation index at: https://docs.lovable.dev/llms.txt
Use this file to discover all available pages before exploring further.
- Summaries: automatically condense long text into clear takeaways.
- Chatbots and assistants: build conversational helpers into your app.
- Sentiment detection: understand user feedback at scale.
- Document Q&A: let users ask questions directly against your content.
- Creative generation: brainstorm ideas, draft copy, or expand concepts.
- Translation: serve users across languages.
- Image and document analysis: extract, summarize, and interpret key information from unstructured content.
- Workflow automation: handle repetitive or multi-step tasks inside your app.
- Semantic search and retrieval-augmented generation (RAG): search documents, knowledge bases, and content by meaning instead of exact keywords.
Enabling the built-in AI connector
For the best experience, use the built-in AI connector with Lovable Cloud, so your app has the backend needed to make secure model calls.
Permission preferences
The default setting is Always allow, meaning the built-in AI connector can be used automatically in your projects. You can change your preference anytime from Connectors → App connectors → Lovable AI → Manage permissions. Choose between:- Always allow: Lovable automatically performs the action without asking for review or approval.
- Ask each time: Lovable asks for your approval whenever the action is needed. For example, if you want to add a chatbot, you can:
- Allow: enable the integration for the current project.
- Deny: decline the integration for this request. You may be asked again later.
- Adjust preferences: change the default behavior for future projects. This does not affect the current project.
- Never allow: Lovable blocks the action, informs you that AI is required, and instructs you to enable the built-in AI connector.
How it works
Lovable sets up the AI infrastructure for you:- API key: Lovable automatically generates and manages a
LOVABLE_API_KEYfor each project. You never need to create or provide it yourself. When a project is remixed, a fresh key is generated for the new project automatically. - Backend calls: AI calls run through a secure backend edge function that Lovable creates for you. Calls are never made directly from the browser, which keeps your credentials and prompts server-side.
- Streaming: the built-in AI connector supports streaming responses with server-sent events (SSE). Lovable uses streaming by default for chatbot and assistant features, so responses appear token by token rather than all at once.
Default model for AI features in your app
The built-in AI connector uses Gemini 3 Flash (preview) as the default model for AI features in your app. When asking Lovable to add or update an AI feature, you can specify a different supported model or combination of models for that feature.This default model applies to AI features inside your app. It is not the model Lovable uses to write, edit, or reason about your code.
Usage and pricing
The built-in AI connector runs on a usage-based pricing model. This means your costs scale with how much you use and are not covered by your subscription. The cost is exactly the same as going directly to the large language model (LLM) provider. There are no hidden fees. To verify costs, refer to the official sources linked in the model list below. Every workspace includes $1 of free AI usage per month to get started. After that, users on paid plans can top up their balance, with costs depending on the underlying model you choose.Temporary offering, subject to change: Until the end of May 2026, every workspace gets $25 Cloud and $1 AI per month, even for users on the Free plan.
Supported models for AI features in your app
These models are available for AI features inside the apps you build, such as chatbots, summaries, document Q&A, image generation, and semantic search. They are not the models Lovable uses to write, edit, or reason about your code.
| Model | Description | Best for |
|---|---|---|
| Gemini 3 Flash Preview (default) | A fast, efficient Gemini model optimized for responsive, general-purpose use. Balances speed, cost, and strong reasoning for chat-centric and iterative development. | Fast interactive builds, general use cases where responsiveness matters |
| Gemini 3.5 Flash | High-efficiency Gemini 3.5 model for fast coding, reasoning, and agentic workflows. | Fast coding, reasoning, and agentic workflows |
| Gemini 3.1 Pro Preview | Google’s most capable Gemini 3 model. Delivers stronger reasoning, improved token efficiency, and more grounded, factually consistent responses. Slower and premium-priced. | Advanced coding, long-context understanding, multimodal reasoning, and complex multi-step tasks |
| Gemini 3.1 Flash Lite Preview | The fastest and lowest-cost option in the Gemini 3 family, designed for simple, high-throughput tasks with limited reasoning depth. Currently in preview. | High-volume, lightweight tasks like classification, summarization, translation |
| Gemini 3.1 Flash Image Preview | Fast image generation and editing model. Combines strong visual quality with faster generation, improved subject consistency, accurate text rendering, and high-resolution support. Also known as Nano Banana 2. | Rapid image generation, iterative visual editing, product mockups, marketing assets |
| Gemini 3 Pro Image Preview | High-quality image generation and editing model optimized for detailed visuals, text rendering in images, and multi-image composition. Also known as Nano Banana Pro. | Visual asset creation, high-volume image workflows, infographics, creative content |
| Gemini 2.5 Pro | Google’s most capable Gemini 2.5 model. High reasoning, large context, slower and most expensive. | Deep reasoning, advanced coding, research, complex multimodal tasks |
| Gemini 2.5 Flash | A balanced Gemini 2.5 model offering good reasoning with lower latency and cost than Pro. | Assistants, analysis, general workflows where speed + intelligence balance matters |
| Gemini 2.5 Flash Lite | The fastest and lowest-cost option in the Gemini 2.5 family, designed for simple, high-throughput tasks with limited reasoning depth. | High-volume, lightweight tasks like classification, summarization, translation |
| Gemini 2.5 Flash Image | Optimized for generating images. Very cheap per image, not suited for text reasoning. | Image generation, quick visual outputs |
| GPT-5.5 Pro | OpenAI’s most capable GPT-5.5 model, built for the hardest reasoning, research, and engineering problems. Features a 1.05M-token context window; input and output above 272K tokens is billed at a higher rate. Slowest and most expensive in the GPT-5.5 family. | Frontier reasoning, in-depth research, complex engineering, and very long-context analysis |
| GPT-5.5 | OpenAI’s flagship GPT-5.5 model with strong general reasoning and a 1.05M-token context window; input and output above 272K tokens is billed at a higher rate. | Complex reasoning, advanced coding, and long-context knowledge work |
| GPT-5.4 Pro | OpenAI’s most capable GPT-5.4 model, optimized for deep reasoning and reliable multi-step execution. Features a 1.05M-token context window; input and output above 272K tokens is billed at a higher rate. Slower and premium-priced. | Advanced coding, deep research, and long-context multi-step reasoning |
| GPT-5.4 | OpenAI’s flagship GPT-5.4 model, designed for professional knowledge work and complex reasoning. Features a 1.05M-token context window; input and output above 272K tokens is billed at a higher rate. | Complex reasoning, coding and analytical workflows, long-context knowledge tasks |
| GPT-5.4 Mini | Balanced GPT-5.4. Cheaper and faster than GPT-5.4, with strong general-purpose performance. | Assistants, mid-complexity reasoning, business workflows |
| GPT-5.4 Nano | Cheapest and fastest GPT-5.4. Limited reasoning depth, best for quick or simple responses. | Summaries, classification, extraction, high-volume simple tasks |
| GPT-5.2 | A capable GPT-5 series model designed for professional knowledge work and complex multi-step tasks. | Complex reasoning, deep coding and analytical workflows, long-context knowledge tasks |
| GPT-5 | High-accuracy general-purpose model with strong reasoning capabilities. Higher latency and cost compared to smaller GPT-5 variants. | Accuracy-critical tasks, complex decision-making, and high-quality reasoning |
| GPT-5 Mini | Balanced GPT-5. Cheaper and faster than GPT-5, with strong general-purpose performance. | Assistants, mid-complexity reasoning, business workflows |
| GPT-5 Nano | Cheapest and fastest GPT-5. Very basic reasoning, best for quick or simple responses. | Summaries, classification, extraction, high-volume simple tasks |
Best and most cost-effective choices
- Best overall intelligence: GPT-5.5 Pro, GPT-5.4 Pro, Gemini 3.1 Pro, and Gemini 2.5 Pro (deep reasoning, but most expensive)
- Best balance (speed + cost + intelligence): Gemini 3.5 Flash, Gemini 3 Flash, GPT-5 Mini, and Gemini 2.5 Flash
- Most cost-effective for scale: GPT-5 Nano, Gemini 3.1 Flash Lite, and Gemini 2.5 Flash Lite (simple, fast, cheapest)
- Best for images: Gemini 3.1 Flash Image, Gemini 3 Pro Image, and Gemini 2.5 Flash Image
Embedding models for AI features in your app
Embedding models turn text into a format that can be searched by meaning instead of exact keywords. Use them to build semantic search, retrieval-augmented generation (RAG), FAQ bots, document search, and company knowledge bases. When you ask Lovable to build semantic search or a RAG workflow, the built-in AI connector handles the implementation for you. For example, you can ask Lovable to:- Build semantic search over uploaded documents.
- Create a FAQ bot that answers from your help content.
- Build a company knowledge base that finds relevant internal docs.
| Model | Best for |
|---|---|
| google/gemini-embedding-001 (default) | General-purpose semantic search, document retrieval, and recommendation use cases. Good default for most text-based retrieval workflows. |
| openai/text-embedding-3-small | Cost-sensitive or high-volume text embedding workloads. |
| openai/text-embedding-3-large | Higher-quality text retrieval when accuracy matters more than cost. |
| google/gemini-embedding-2-preview | Multimodal retrieval across text, images, video, audio, and PDFs. Currently in preview. |
Workspace rate limits
To ensure reliable performance and fair access for all users, the built-in AI connector applies rate limits per workspace. These limits help maintain system stability, prevent abuse, control costs, and provide a consistent experience for everyone. If your app’s requests exceed the allowed rate, the server returns a429 Too Many Requests status code and the request will not be processed.
If your workspace runs out of AI credits, the server returns a 402 Payment Required status code. Top up your balance in Settings → Cloud & AI balance to restore access.
Rate limits are more restrictive for free users, while paid plans include higher thresholds and greater flexibility.
- Free plan users: upgrade anytime to increase your limits.
- Paid plan users: contact Lovable Support if you need additional capacity.
FAQ
Is the built-in AI connector the same thing as the Lovable agent?
Is the built-in AI connector the same thing as the Lovable agent?
No. The built-in AI connector adds AI features to the apps you build with Lovable. The Lovable agent is what helps you build and edit your project.The models listed on this page are available for AI features inside your app. They are not the models Lovable uses to write, edit, or reason about your code.
Do I need my own OpenAI, Google, or other provider API key?
Do I need my own OpenAI, Google, or other provider API key?
No. Lovable automatically generates and manages the API key for each project. You do not need to create a provider account, configure billing with a model provider, or paste API keys into your app.
Where do AI calls run?
Where do AI calls run?
AI calls run through a secure backend edge function that Lovable creates for you. Calls are not made directly from the browser, which helps keep credentials and prompts server-side.
Can I choose which model my app uses?
Can I choose which model my app uses?
Yes. The built-in AI connector uses Gemini 3 Flash (preview) by default, but you can ask Lovable to use a different supported model or combination of models for a specific AI feature.
What happens if my app runs out of AI balance?
What happens if my app runs out of AI balance?
If your workspace runs out of AI balance, AI requests return a 402 Payment Required status code. You can restore access by topping up your balance in Settings → Cloud & AI balance.