Use cases
You can do the following with the Build with URL API:- Embed a Build with Lovable button on your website or application. When the user clicks it, Lovable opens and builds the app automatically.
- Recreate or iterate on an existing web page by passing its URL as a reference.
- Share predefined prompts via URLs with friends, colleagues, or social media.
- Automate app generation as part of internal workflows.
Base URL
autosubmit (boolean): Set this to true to process the request automatically on load.
URL with parameters
Parameters go in the URL hash fragment (after#), not the query string:
Parameters
| Parameter | Type | Description | Required/Optional |
|---|---|---|---|
prompt | string | Text describing the application to build. Maximum 50,000 characters. Use URL encoding (for example, %20 for spaces). Very long URLs might fail due to browser or parsing limits. | Required |
images | string | A publicly accessible image URL used as a visual reference. Repeat the key for several (images=URL1&images=URL2). Raster formats only: JPEG, PNG, and WebP. | Optional |
html | string | A publicly accessible web page URL. Lovable fetches the page and uses it as a reference for layout, content, and styling. Repeat the key for several. | Optional |
Attachment limits
imagesandhtmlshare a combined limit of 10 reference attachments per link.- Every
imagesandhtmlURL must be reachable over publichttporhttps, because Lovable’s servers fetch them. Lovable skips private, authenticated, orlocalhostURLs. - Lovable ignores non-raster image URLs (such as SVG and GIF) and malformed or non-
http(s)URLs. The rest of the link still builds.
Lovable Link Generator
Use the Lovable Link Generator to build shareable URLs that generate apps with your chosen prompt, images, and web pages. It also handles URL encoding so links stay valid.- Enter your prompt, which describes the application to build (up to 50,000 characters).
- Add reference images. The generator uploads each image to your Lovable account and references it in the link, so the image does not need to stay publicly hosted.
- Add reference web pages by URL. Each page must be publicly reachable, because Lovable fetches it server-side.
- Copy the generated Lovable URL and share it.
Generating a link requires you to sign in to Lovable, because uploads are tied to your account. Images and web pages share a limit of 10 references per link.
Build with URL examples
Basic app generationBest practices
- Keep prompts concise and focused on core features.
- For
html, point at a standard web page served as a normal HTML document. Lovable may skip pages without a recognizable HTML structure. - Make sure every image and page URL is publicly reachable.
- Use clear, descriptive language for the best generation results.
- URL-encode special characters in the prompt and in URLs to avoid parsing issues.
App creation and authentication flow for shared URLs
When you click a Build with URL link:- If you are signed in, you select a workspace and Lovable starts building the app automatically.
- If you are signed out, you sign up or log in first. After you authenticate, you select a workspace and Lovable builds the app automatically, preserving the original prompt and references.
Error handling
- Lovable silently drops reference URLs that are non-public, non-raster (for
images), or not validhttp(s). The app still builds from the prompt and the remaining attachments. - Very long or malformed URLs can cause browser “URL too long” errors, incomplete parameter parsing, or failed autosubmission. Keep prompts within the 50,000-character limit, and prefer the Link Generator for long inputs.
FAQ
Which image formats can I reference? JPEG, PNG, and WebP. Lovable ignores other formats, such as SVG and GIF. Do my image and page URLs need to be public? Yes. Lovable fetches them server-side, so it skips private, authenticated, orlocalhost URLs. The Link Generator works around this for images by uploading them to your account.
How many references can I add to one link?
Up to 10 in total, combining images and web pages.
Can the Link Generator reference a web page?
Yes. Add the web page URL in the generator, alongside any images. Each page must be publicly reachable, because Lovable fetches it server-side.
What happens when a signed-out user clicks a link?
They sign up or log in first. After they authenticate, they select a workspace, and the app builds automatically with the original prompt and references preserved.