AI for self-hosted deployments
Learn about using AI with self-hosted deployments.
Self-hosted customers can deploy and embed Retool AI for use with apps and workflows. To learn more about how you can use Retool AI, refer to the Retool AI resource queries documentation.
Retool-managed and self-managed keys
LLM interactions work by making API requests with an AI provider. As with most other APIs, these requests require authorization credentials, such as an API key.
Retool provides access to Anthropic and OpenAI models using Retool-managed keys, which enable you to build without needing any additional tools or services. Usage is billed using AI credits. Using a Retool-managed key on a self-hosted instance requires additional configuration.
Enterprise organizations can bring their own key (BYOK) for any AI provider. Retool does not charge for BYOK usage, and all billing is done through your own agreements with the AI provider.
Retool-managed key configuration
To enable AI features on self-hosted deployments using a Retool-managed key, set the following environment variables.
| Environment variable | Value |
|---|---|
LICENSE_KEY | Your self-hosted Retool license key. |
OPENAI_PROXY_HOST | Set to https://ai-proxy.retool.com. |
OPENAI_PROXY_API_TOKEN | Contact your Retool account manager (or support@retool.com if you don't have an account manager) to generate a Retool-provided token. |
OPENAI_SECRET_KEY | Set to an empty string. |
For OPENAI_PROXY_API_TOKEN, contact your Retool account manager (or support@retool.com if you don't have an account manager) to generate a Retool-provided token. Keys provided by Retool are subject to restrictive rate limits and are not suitable for production use cases. If the rate limiting is an issue, bring your own key and set it from the Settings > AI resource page.
While this environment variable includes OPENAI in the title, you can use it for any available provider.
Retool-managed Vectors
Retool-managed Vectors for self-hosted deployments are built on Retool Database. To store vector data, you must configure and enable Retool-managed Vectors and Retool Database.
Data sharing and retention
When Retool AI is used to build or configure a query, application, or workflow (e.g., prompting Ask AI to help write queries), the input is shared with the applicable third-party LLM provider, listed in our Subprocessors page. Inputs are deleted within 30 days.
Any inputs or outputs that correspond to the categories above may continue to be used to inform product improvements. Retool does not use any inputs submitted to, or outputs generated from, Retool AI that is embedded within a deployed application or workflow (e.g., text stored in Retool-managed Vectors). These inputs and outputs are treated as "Customer Data" in accordance with the Customer Terms of Service, Security Practices, and Data Processing Addendum.
Learn more about data and security in the app builder and with Assist.
Additional resources
Refer to the following documentation for ways you can use AI within Retool: