Hostinger AI Builder Secrets stores API keys and other credentials for agentic mode projects outside your project code and chat history. Add, edit, and delete secrets from the App menu, use the same secrets in the preview and on your published site, and save keys pasted into the chat as secrets in one click. Keys already in a project’s .env file move to Secrets automatically.
Before you start
- These steps apply to Hostinger AI Builder agentic mode projects.
- Have the API keys you want to store ready, such as your Stripe secret key or OpenAI API key.
What Hostinger AI Builder Secrets does
Hostinger AI Builder Secrets keeps API keys for services like Stripe or OpenAI out of the chat and out of your project files. When you save a key from the chat, the AI works with a reference to the secret, never the raw value.
Each secret has one name and one value, and the preview and your published site use the same value. Don’t start a secret name with VITE_, because values under those names are sent to the browser. Keep public values, such as an API URL, in your code instead.
Add a secret in Hostinger AI Builder
Add a secret from the Secrets panel in the Hostinger AI Builder editor.
- Open your project in Hostinger AI Builder and go to App menu → Secrets.

- Click Add secret.

- Enter the key’s name in the Name field and paste the key in the Value field.
- Click Add.
Use the name your integration expects, such as STRIPE_SECRET_KEY. The AI uses this name to find the secret.
Edit or delete a secret in Hostinger AI Builder
Edit or delete secrets in the same Secrets panel.
- Go to App menu → Secrets.
- Edit the value of a secret to replace a key, or delete a secret you no longer use.

Replace a key by editing the existing secret rather than adding a new one with a different name, so your integration keeps working without changes.
Save API keys from the chat as secrets
Hostinger AI Builder protects keys you enter in the chat in two ways: a secure card when the AI asks for a key, and a security warning when you paste a key into a message.
Enter a key in the Add your API key card
When Hostinger AI Builder needs a key for an integration, it shows an Add your API key card in the chat. The card shows the secret name, such as META_API_KEY. Paste the value into the Paste value field, and it’s saved as a secret instead of being sent to the chat.

Store pasted keys from the security warning
If you paste a key into your message, such as a Stripe, OpenAI, Anthropic, GitHub, AWS, or Google key, a Security warning appears before you send it.
- Click Add secrets.

- In the Store secrets securely window, check the name for each value.
- Click Add secrets.

The values are removed from your message and kept in Secrets. If a secret with the same name already exists, the window suggests a new name, such as STRIPE_SECRET_KEY_2. To replace the existing key instead, edit it in the Secrets panel.
Use secrets on your published Hostinger AI Builder site
Your published site uses the same secrets as the preview. Publishing syncs your secrets to the live site automatically, so you don’t need to add them again.
Move keys from a .env file to Hostinger AI Builder Secrets
Keys stored in a project’s .env file move to Secrets automatically the first time you open the project after Secrets became available. Non-sensitive settings, such as a site name or feature flag, stay in the .env file.
Your API keys are now stored in Secrets, separate from your project code and chat history. To connect a service that uses these keys, see How to integrate a third-party API in agentic mode.
NOTES
- Exporting a project includes your secret values, so keep exported files private.
- Generate a new key with the service provider and update the secret in the Secrets panel if an exported file was shared or a key may have leaked.
- To sell subscriptions with stored Stripe keys, see How to sell subscriptions with Stripe in agentic mode.