L
🤖AI Web Application

AI-Powered Tool

Build an AI-powered web tool that calls the OpenAI API to process user input and return results.

OpenAI API integrationUsage limitsAuth gatingCopy to clipboardTone selectionLoading states

The Prompt

✨ Ready-to-use Lovable Prompt

Open Lovable
Build an AI-powered web tool with the following features:

**Core Functionality:**
- Input form where users enter their request (textarea, 3-5 lines minimum)
- A "Generate" button that calls the OpenAI API (GPT-4o) via a Supabase Edge Function
- Results displayed below in a formatted output card
- Loading state with spinner while the AI is processing
- Copy to clipboard button on the results

**Prompt Customisation:**
- Dropdown to select tone: Professional, Casual, Persuasive, Technical
- Dropdown to select output format: Paragraph, Bullet Points, Short, Detailed
- Optional: example input shown as placeholder text

**Usage Limits:**
- Free users get 5 uses per day (tracked in Supabase)
- Sign up required to unlock unlimited uses (Supabase Auth)
- Clear UI showing "3 of 5 free uses remaining"

**Landing Page:**
- Above-the-fold tool interface so users can try immediately without sign-up
- Below: short description of what the tool does, 3 use cases, and a "How it works" section

**Design:**
- Clean, centred layout
- White background with your brand colour as accent
- Fully responsive
- Inter font

Use OpenAI GPT-4o via a Supabase Edge Function (store the API key as a Supabase secret, never expose it on the frontend).

How to Use This Prompt

  1. 1

    Copy the prompt

    Click the 'Copy Prompt' button above to copy the full prompt to your clipboard.

  2. 2

    Open Lovable

    Go to lovable.dev and create a new project. If you're on the free plan, you get 5 credits/day.

  3. 3

    Paste and send

    Paste the prompt into the Lovable chat input and press enter. Lovable will start building your app immediately.

  4. 4

    Iterate and refine

    Review what Lovable builds. Use follow-up prompts to refine the design, add features, or fix anything that's off.

Pro Tips

  • Always use 'Supabase Edge Function' to call OpenAI — never expose your API key on the frontend
  • Include 'usage limits for free users' upfront so you can monetise with a freemium model
  • Ask for 'loading spinner with cancel button' — AI calls can be slow and users need feedback

Prompt Variations

Different versions of this prompt for specific use cases.

Writing assistant

Build an AI writing assistant. Input: a topic or rough draft. Output: polished, professional prose. Options: Choose writing style (Blog post, LinkedIn post, Email, Press release, Tweet thread). Tone selector: Professional, Conversational, Persuasive. Word count slider: 100-500 words. Show a character/word count on the output. Include a 'Regenerate' button for alternatives.

Frequently Asked Questions

Does Lovable support OpenAI API integration?
Yes. Lovable can build apps that call the OpenAI API via Supabase Edge Functions. Your API key stays secure on the server side and is never exposed to users.
Can I build a ChatGPT-style chatbot with Lovable?
Yes. Ask Lovable to 'build a chat interface with message history, streaming responses from OpenAI GPT-4o, and a clear chat button.' Lovable will build the full chat UI and API integration.

Ready to build?

Copy the prompt above, then paste it into Lovable. Your app starts building instantly.

Try Lovable Free