Skip to content

Connect Lovable to PromptUnit

For a Lovable app that calls an AI company with your own key. You paste one ready message into the Lovable chat and it makes the change.

An app that runs on Lovable's built-in "Lovable AI" credits has no key of its own and cannot be connected.

1

Get your personal address

Sign up free at PromptUnit. There is no card to enter, and we never ask for your AI key. You answer two questions (which AI your app uses and where it runs) and your personal address appears, ready to copy. Later you find it on your dashboard under Connection.

Which AI does your app use?

For an app that uses OpenAI, the address looks like this:

https://www.promptunit.ai/api/proxy/openai/<your PromptUnit key>/v1

Treat it like a password: it is yours alone. Your OpenAI key stays in your app, exactly as it is today. PromptUnit uses it for each request and never stores it.

2

Paste it in Lovable

  1. This works for a Lovable app that calls OpenAI with your own OpenAI key.
  2. Paste the message below into the Lovable chat. It changes the address in your app's function.
  3. Your key stays where it is: "More", then "Settings", then "Secrets".

Message to paste to the AI tool that built your app

Change the base URL my app uses for OpenAI requests to https://www.promptunit.ai/api/proxy/openai/<your PromptUnit key>/v1 . Keep my OpenAI API key exactly as it is, and change nothing else.

Then: Lovable redeploys the app by itself.

3

Use your app as usual

Each request shows on your PromptUnit dashboard within seconds, with the model that answered and what it cost. PromptUnit checks every request and uses a cheaper model only when it would answer just as well. Otherwise the request goes to the model you asked for.

If nothing shows on your dashboard

  • The change has not taken effect yet: restart or redeploy the app, then send a request.
  • The app sets the address in its own code, so the setting is never read. Change it there.
  • The app uses a different AI company than the address you copied. Each AI company has its own address.

An error that names your key comes from OpenAI itself: PromptUnit passes its answer on unchanged. Still stuck? Write to igal@promptunit.ai.

Click path checked on November 11, 2026, in Lovable's own documentation.