MODULE 03LESSON 01 · 06:10

AI Gateway Intro

One API key, many models. No provider accounts needed.

SYSTEM_PLAYBACK_ACTIVEVideo placeholder

The Lovable AI Gateway is a single endpoint that routes requests to the best models from Google, OpenAI, and Anthropic. It's auto-provisioned when you enable Cloud, so there are no accounts to create and no keys to manage.

/Why route through a gateway

  • 01One key: One environment variable powers chat, images, embeddings, and speech.
  • 02Model swaps: Change models with one string — no code rewrites when a better one ships.
  • 03Unified billing: AI usage rolls into your Lovable plan; no per-provider invoices.
  • 04Sensible defaults: Lovable picks a strong default model per task so you don't have to.
Cost visibility

Every AI call is metered in your project dashboard. Set a spending cap so a runaway prompt can never surprise you.