Use cases
You can do the following with Build with URL API:- Embed a Build with Lovable button on your website or application. When the user clicks the button, they are taken to Lovable and the app is built automatically.
- Share predefined prompts via URLs with friends, collegues, or on social media.
- Automate app generation as part of internal workflows.
- Rapidly prototype apps using URLs with prompts and reference images.
Base URL
autosubmit (boolean): Must be set to true to automatically process the request
URL with parameters
Parameters
| Parameter | Type | Description | Required/Optional |
|---|---|---|---|
prompt | string | Text describing the application to build. Max 50,000 characters. Use URL encoding (for example, %20 for spaces). Very long URLs might fail due to browser or parsing constraints. | Required |
images | string | Max 10 URL-encoded image URLs as references. Image URLs must be publicly accessible. Supported formats: JPEG, PNG, WebP. | Optional |
Lovable Link Generator
Use the Lovable Link Generator to easily build shareable URLs that generate apps with your chosen prompt and images.- Enter your prompt, which describes the application to build (up to 50k characters).
- Upload up to 10 public image URLs (JPEG, PNG, or WebP).
- Copy the generated Lovable URL and share it.
Build with URL examples
Basic app generationBest practices
- Keep prompts concise and focused on core features.
- Use clear, descriptive language for best generation results.
- Include reference images when relevant to help guide the generation process.
- Ensure special characters in prompts and image URLs are URL-encoded to avoid parsing issues.
App creation and authentication flow for shared URLs
When a user clicks a Build with URL link:- Logged in users: select the workspace for creating the project, then app creation starts automatically.
- Not logged in users: redirected to signup/login page. After successful authentication, select the workspace for creating the project, and then the app creation starts automatically, preserving the original prompt and images.
Error handling
If the URL is too long or malformed, you may encounter:- Browser “URL too long” errors
- Incomplete parameter parsing
- Failed autosubmission