frontendintermediate

API Key

A password that proves your app is allowed to use a service.

What is API Key?

When you sign up for Stripe, Supabase, or OpenAI, they give you an API key. Your app sends this key with every request to prove it's authorized. Never share API keys publicly — store them in your .env file.

API keys are like hotel key cards. They prove you're a guest and let you access the right room. Without one, the door stays locked.

In Vibe Coding

When you sign up for Supabase, Stripe, or OpenAI, the first thing you do is copy your API key into your .env file. Lovable has a settings panel where you paste keys. Never put API keys directly in your code.

Example

For example: You sign up for OpenAI and get a key like sk-abc123. You put it in your .env file as OPENAI_API_KEY=sk-abc123. Your app uses this key every time it asks the AI a question.

Related Terms

Related Guides