Skip to main content

AI for self-hosted instances

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 variableValue
LICENSE_KEYYour self-hosted Retool license key.
OPENAI_PROXY_HOSTSet to https://ai-proxy.retool.com.
OPENAI_PROXY_API_TOKENContact your Retool account manager to generate a Retool-provided token.
OPENAI_SECRET_KEYSet to an empty string.
note

For OPENAI_PROXY_API_TOKEN, contact your Retool account manager to generate a Retool-provided token.

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 instances 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.

Additional resources​

Refer to the following documentation for ways you can use AI within Retool: