Skip to main content
Many apps need to call external services — payment processors, mapping APIs, email providers, and others — and those services require an API key to authenticate your requests. Hardcoding a key directly into your app is risky because anyone who views the source could read it. Genie’s Secrets feature gives you a secure place to store these keys: they are encrypted, never exposed in your chat history or generated code, and injected as environment variables when your app runs.
Secrets require Genie Cloud to be connected to your project. If Genie Cloud is not connected, the Secrets tab will show a message asking you to set it up first. See Genie Cloud to get started.

How secrets work

A secret has two parts:
  • Name — the key your app uses to read the value (for example, STRIPE_SECRET_KEY). Use uppercase letters and underscores, following standard environment variable naming conventions.
  • Value — the actual sensitive string (the API key, token, or password).
Once saved, the value is stored encrypted and is never shown in full in the Genie interface. The secrets list displays the name, a masked value (••••••••), and the date the secret was last updated. When Genie runs your app, all of your project’s secrets are automatically available as environment variables. Your generated app code can read them with the appropriate method for the language or framework in use.

Opening the Secrets tab

1

Open your project

Navigate to the project you want to configure.
2

Click Settings

Click the Settings button (gear icon) in the project view.
3

Select Secrets

In the settings sidebar, click Secrets. The tab loads your existing secrets in a table with columns for Name, Value, Updated, and Actions.

Adding a secret

1

Click Add secret

In the Secrets tab, click the Add secret button in the top-right area of the tab. A two-step dialog opens.
2

Choose a service

Search for the service the key is for — OpenAI, Stripe, Google Maps, and other common services are recognized, and picking one fills in the right environment-variable name for you automatically. Don’t see the service you need? Choose Other to add a custom secret under any name.
3

Enter the value

Paste the API key or password into the value field. For a recognized service the name is already filled in; for a custom secret, also type the Secret name — uppercase letters and underscores, for example STRIPE_API_KEY.
4

Save

Click Save secret. The secret is encrypted and added to your project’s secrets list immediately.
Both the name and the value are required. If either is empty, the dialog will not allow you to save.

Viewing a secret

The Value column always shows •••••••• to protect the stored value. To see the actual value, click the eye icon (view action) next to the secret. A read-only dialog opens showing the name and value in plain text.

Editing a secret

1

Click the edit icon

In the secrets table, click the pencil icon next to the secret you want to change.
2

Update the name or value

The edit dialog opens with the current name and value pre-filled. You can change either or both fields.
3

Save

Click the confirm button. The secret is updated immediately. The Updated column in the table reflects the new timestamp.
If you rotate an API key with the external service, come back here to update the value. Your app will pick up the new value on its next run — no redeployment needed.

Deleting a secret

1

Click the delete icon

Click the trash icon next to the secret you want to remove.
2

Confirm deletion

A confirmation dialog appears with the secret’s name. Click Delete to confirm.
Deleting a secret is permanent. If your app reads that environment variable at runtime and the secret is gone, the app will receive an empty or undefined value and may stop working correctly. Make sure you update your app’s code before removing a secret it depends on.

Searching and paginating secrets

If you have many secrets, use the search bar at the top of the tab to filter by name. Results update as you type. The table shows up to 9 secrets per page; use the Previous and Next buttons at the bottom to navigate between pages.

Secrets vs. general settings

It is worth understanding the difference between secrets and the other fields in Settings > General: Never put sensitive values — API keys, passwords, or tokens — in the Name or Description fields in General settings. Those values are stored in plain text and may be visible to anyone who can view your project details.