# Environment Variables: Keep API Keys Out of Your Code

> Store API keys, tokens and account IDs as encrypted site variables. Functions and scheduled tasks read them on the server, and they never show up on your site.

- Canonical URL: https://uebfaqe.ai/features/environment-variables
- Section: Features one by one
- Language: en
- Publisher: Uebfaqe (https://uebfaqe.ai)

## Summary

Variables hold the API keys, tokens and settings your functions need. Each value is stored encrypted, stays on the server and never appears in the pages a visitor loads.

## Key facts

- Encrypted, never public: A value is shown only when you click Show the value yourself. The AI can use a variable by its name, but it can never read the value back.
- Import a .env file: Paste your variables as NAME=value, one per line, or drop a .env file. Lines starting with # are skipped, and you can replace the whole list at once.
- Used by functions and tasks: Functions read a variable by its exact name on the server, and scheduled tasks can place it in a URL, a header or a request body when they run.

A safe place for the keys and secrets your site needs

## How it works

1. **Open Variables**: In Studio, open the Variables tab and click Add a variable. Use uppercase letters, numbers and underscores, for example BOOKING_API_KEY.
2. **Paste the value**: Paste the key you got from the outside service and save. It is encrypted right away, and later you can search, copy or download your variables.
3. **Let the AI use it**: Ask the AI to connect the service. It writes the function so it reads the variable by name, and it asks you for a value only when one is missing.

## Frequently asked questions

### What are environment variables on a website?

They are named settings that live with the site instead of inside its code, usually secret keys and tokens. On Uebfaqe each site has its own, stored encrypted and read only by functions and scheduled tasks on the server.

### Where should I store an API key for my website?

Never in the page code, where any visitor can read it. Put it in the Variables tab and let a function make the call on the server. The key stays hidden and you can change it without touching the pages.

### What happens if I delete a variable?

It is removed for good, and every function that reads it stops working until you add it again. When you transfer a site its variables move with it, while a clone made from a shared link never copies them.

## Related features

- [Functions](https://uebfaqe.ai/features/serverless-functions): Add actions that really run, like sending a form or working out a price, written by the AI.
- [Scheduled tasks](https://uebfaqe.ai/features/scheduled-tasks): Set up jobs that run on their own on a schedule, like a report every morning or a cleanup every week, with a history of every run.
- [The code](https://uebfaqe.ai/features/code-editor): Open the real site files in a full editor with a folder tree and tabs, when you want control down to the detail.

---

Source: https://uebfaqe.ai/features/environment-variables
