A Retool AI integration connects an internal application to a language model or another AI service through a configured resource, allowing the application to generate text, interpret information or present model-assisted results alongside business data. Retool supports dedicated model-provider resources and generic API connections. The integration should use authorized data, approved credentials and clearly defined output requirements.
This guide focuses on connecting and testing the model and business data resources rather than building an autonomous agent or an entire backend workflow. Retool’s official documentation was reviewed on December 1, 2026. The setup and worked example are documentation-based, not a firsthand test in a paid Retool workspace. Check the current interface, product version and plan before following configuration steps.
What is Retool AI integration?
Retool provides tools for creating internal applications and connecting them to databases and services. A resource stores the connection configuration, including relevant authentication, so the application can use the service without requiring builders to embed credentials directly in interface code. A query uses a resource to request a particular operation. The AI model is one component of the resulting system, not the system of record.
For teams comparing enterprise-wide connectivity rather than model resources in a single application, see our AI integration platform comparison.
| Capability | What it does | When to use it |
|---|---|---|
| AI app building | Assists developers in creating application code and interfaces | Build or modify an internal tool |
| AI resource query | Calls a configured model to process input during application use | Summarize, classify or draft information |
| Workflow | Runs a defined backend sequence with queries and control logic | Automate an approved business process |
| Agent | Uses a model to select among permitted tools | Handle tasks requiring bounded tool selection |
Retool’s current documentation distinguishes its newer React-based app building experience from classic apps. The classic editor documentation describes direct AI resource query configuration; newer apps can use their own supported query and development interfaces. Check the documentation for the editor you are using rather than assuming controls or syntax are identical.
For scheduled or event-triggered processing, see our Retool AI Workflows guide. For model-directed tool selection, the Retool AI agent guide covers the separate agent setup.
Choose an AI provider and connection type
Start with an approved provider and a model that supports the required operation. Retool’s integration directory lists OpenAI, Anthropic, Google Gemini, Azure OpenAI, Amazon Bedrock, Cohere and other connection options. Provider availability and model capabilities vary by product, plan, configuration and deployment environment.
| Connection route | Appropriate situation | Check before connecting |
|---|---|---|
| Dedicated provider resource | The selected Retool feature supports the provider directly | Available models, authentication and entitlements |
| Retool-managed model credentials | Organization uses supported managed AI access | Credit pool, access policy and data-processing terms |
| Own provider credentials | Organization has approved provider access and eligible configuration | Provider billing, key rotation and usage restrictions |
| Generic REST API resource | An approved HTTP endpoint is not covered by a dedicated integration | Authentication, endpoint permissions and response contract |
The options in this table overlap: a dedicated resource may support managed credentials or customer-supplied credentials. They are not four mutually exclusive products. Retool documents custom AI providers for compatible configurations, while its newer app-building introduction states that custom AI providers are not supported in apps in that context. Do not assume that a provider available for a workflow or a separate API query is also selectable in the AI app builder.
A generic REST connection is useful when an organization operates an approved inference endpoint or a separate service that provides model results. It does not automatically add that service to the app builder’s model selector. The developer must implement and validate the endpoint’s input and response handling.
How to configure a Retool AI resource
1. Create or select the provider resource
Ask an authorized administrator to check the existing resources before creating another connection. The official OpenAI connection guide describes opening Resources, selecting the creation option for a resource and choosing the OpenAI integration. Use a descriptive resource name that identifies its approved purpose and environment. Other providers have their own connection requirements.
2. Configure authentication and allowed models
Select a supported key source. Retool’s OpenAI guide describes managed keys and customer-supplied API keys; confirm which option your subscription and feature allow. With your own key, use an approved provider account and preferably a dedicated credential for the integration. Do not copy keys into application prompts, client-side code or public repositories.
The guide also documents model restrictions in the resource’s advanced settings. Limit the selection to models required by the application where that control is available. If a restricted model was previously configured as a default for a building feature, check the default configuration again. The resource settings and the runtime application have different purposes.
3. Assign access and separate environments
Grant the appropriate group access to the model resource and the business-data resource. Access to an AI model must not automatically grant access to every company record. Where the deployment supports separate development and production environments, use distinct credentials and data scopes. Avoid using live customer records for an initial connection test.
4. Execute a small test query
The OpenAI connection guide notes that AI resources do not offer the ordinary connection-test button and describes testing through a new app. Create a harmless synthetic input and confirm that the intended model resource returns a result. This checks connectivity and configuration, not the accuracy of the model on real tasks. For classic apps, the AI resource query guide describes adding a query from the code panel, choosing the configured resource and selecting an action.
In a workflow, the documented equivalent is a resource query block. If using a generic REST resource instead, the REST guide documents its own connection-test option and authentication setup. A successful HTTP connection does not prove that a model endpoint produces valid business outputs.
Connect business data without exposing unnecessary records
Identify which system owns each business field. For an internal catalog application, a database may hold approved product facts while another service holds editorial descriptions. Retrieve only the records the user is authorized to see and pass only the fields needed for the task. Validate joins, record identity and field mappings using the principles in our AI data integration guide.
For example, a user may select a product from a table and request a suggested summary. The application should independently check the selected identifier and user’s access before retrieving the facts. The model receives a bounded representation of approved attributes rather than the entire database or a privileged connection credential.
| Integration component | Responsibility |
|---|---|
| Business-data query | Retrieve authorized, relevant records |
| Input preparation | Limit fields and validate expected formats |
| AI resource query | Produce a candidate result |
| Output validation | Check format, constraints and supporting facts |
| Review interface | Display the proposal and allow an authorized reviewer to decide |
| System of record | Store only approved changes under existing rules |
Do not allow model-generated queries or instructions to bypass existing access controls. Untrusted documents and generated content are data, not authorization. Review data-processing terms, logs and retention for both Retool and the selected provider. Our AI business integration guide explains the separation between a proposal and an authorized action.
Worked example: an internal product description assistant
Imagine an internal merchandising team using Retool to draft short product descriptions from a synthetic catalog. The application reads an approved product record, shows its source fields to an employee and sends a limited selection of facts to the configured AI resource. It cannot update the live storefront.
| Illustrative field | Synthetic value |
|---|---|
| Product identifier | DEMO-104 |
| Category | Desk organizer |
| Material | Powder-coated steel |
| Dimensions | 20 × 10 × 8 cm |
| Color | Dark blue |
A suitable test instruction might ask the model to prepare a description of no more than 45 words using only these supplied attributes, with no unsupported performance claims. Treat the result as a draft and display it beside the source. The employee can compare the dimensions, material and category before deciding whether to use it.
A possible accepted output is: A dark blue desk organizer made from powder-coated steel. Measuring 20 × 10 × 8 cm, it provides a compact way to arrange everyday desk items. This example illustrates the intended output rather than a recorded Retool response. If a generated description claims the product is waterproof or certified without source evidence, reject that claim.
The example does not require an autonomous agent or permission to modify a database. A separate authenticated action can submit a reviewed description to a staging system if the business later needs that feature. The system should enforce that permission independently of the model’s text.
Test integration quality and diagnose failures
Test the integration with a representative, approved set of inputs, including missing fields and unusual formats. Define acceptance rules before evaluating results. Check both the model behavior and the ordinary software integration. For example, verify that the application does not display stale output for a different product when the user changes the selected record during a request.
| Observed issue | What to investigate |
|---|---|
| Resource unavailable | Resource permissions and environment configuration |
| Authentication failure | Approved key source, credential validity and provider access |
| Model rejected | Allowed model list and supported action type |
| Invalid or incomplete output | Input requirements, response format and independent validation |
| Slow or failed request | Timeouts, provider availability and request size |
| Unexpected charge | Usage logs, repeated calls and configured model |
Avoid retrying every failed request automatically. Distinguish temporary service interruptions from invalid input or authorization errors. Use bounded retries for appropriate transient failures and provide a visible fallback. Do not replace a failed response with a fabricated successful result.
Track acceptance rate, unsupported claims, latency and the number of requests needed per successful task. Maintain a small reference dataset to compare model changes. Record the selected provider, model, configuration and review outcome in appropriate operational evidence; our AI audit trail guide describes what is useful to record without collecting unnecessary sensitive information.
AI usage costs and operational controls
Distinguish the cost of using AI to build an application from the cost of an application calling a model at runtime. Retool’s AI spend guidance documents credit-based managed usage and provider-billed usage for supported own-key configurations. Its documentation also describes monthly credits and usage monitoring. Do not assume that an app which was inexpensive to build will be free to operate.
Check plan-specific entitlements, resource permissions and current billing rules. Retool administrators can inspect relevant usage information through billing and monitoring settings, with additional controls described for eligible organizations. External provider usage may also be billed directly. Confirm the behavior when a credit allowance or provider limit is exhausted before deploying a feature that staff depend on.
For a hypothetical pilot, suppose 500 model requests generate 420 accepted descriptions. If measured AI usage costs $10 and review effort costs $42, the measured cost per accepted description is $52 divided by 420, approximately $0.124. These fictional amounts are not Retool or provider prices. Add any allocated subscription, development and maintenance costs when evaluating the complete business case.
For the first deployment, use a bounded input size, explicit user-triggered execution, approved model selection and a fallback when the provider is unavailable. Review usage and quality before expanding access. Compare the integration with a simpler non-AI alternative if the task can already be performed reliably using existing application logic.
Frequently asked questions
Can Retool connect to OpenAI?
Yes. Retool documents a dedicated OpenAI resource for supported AI applications and automation features. Check the available authentication options and model permissions for your account.
Does Retool support other AI providers?
Yes, its integration directory lists multiple dedicated providers and custom connection options. Support varies by feature and configuration, so verify the specific editor or runtime before choosing a model.
What is the difference between Retool AI integration and AI Workflows?
An integration configures access to an AI provider or endpoint and defines how an application exchanges data with it. Workflows coordinate a sequence of backend operations, which may include AI resource queries.
Can a Retool AI integration access a company database?
An application can retrieve data from configured business resources and pass selected information to a model. Enforce the user’s access rights and minimize the fields transmitted.
Is Retool AI integration free?
Do not assume so. Building features and runtime AI calls may consume credits or incur provider charges. Review current plan details, usage limits and other application costs before deployment.

