Connect to Azure OpenAI
Connect to Azure OpenAI and use their models for AI-powered apps and automations in Retool.
Azure OpenAI Service provides REST API access to advanced AI models with enterprise-grade security, compliance, and regional availability. You can create an Azure OpenAI resource so you can build AI-powered apps and workflows while maintaining data residency and leveraging Azure's infrastructure.
What you can do with Azure OpenAI in Retool
After you create an Azure OpenAI resource in Retool, you can:
- Generate, summarize, classify, and extract information from text using GPT models deployed in your Azure environment.
- Build conversational, multi-turn chat experiences with context-aware responses.
- Maintain data residency and compliance by processing requests within your own Azure infrastructure.
Supported models
Azure OpenAI resources require you to bring your own key for authentication. Retool-managed keys aren't available for Azure OpenAI.
No models are available for use with your own API key.
Azure OpenAI provides access to OpenAI models deployed in Azure regions. You can use any OpenAI model you have deployed in your Azure OpenAI resource, including:
- All GPT models (GPT-5.x, GPT-4.x, GPT-4o, etc.).
- o-series reasoning models.
- DALL·E image generation models.
- Embedding models.
- Fine-tuned models.
- Regional model variants.
When configuring queries in Retool, specify the deployment name you created in Azure, not the underlying model ID. Deployment names are configured when you create model deployments in the Azure portal.
You must create model deployments in your Azure OpenAI resource before using them in Retool. Refer to Azure OpenAI deployment documentation and model availability for details on which models are available in your region.
Before you begin
Before creating an Azure OpenAI resource, you need:
- Retool permissions: Ability to create and manage resources in your Retool organization.
- Azure OpenAI access: An Azure subscription with Azure OpenAI Service enabled.
- Model deployments: At least one model deployed in your Azure OpenAI resource.
- API key: An API key from your Azure OpenAI resource.
- Endpoint URL: The endpoint URL for your Azure OpenAI resource (e.g.,
https://your-resource-name.openai.azure.com).
Create an Azure OpenAI resource
Create a resource to connect Retool to Azure OpenAI and configure authentication. Once connected, you can then select it when writing queries to make use of its available models.
Follow these steps to create an Azure OpenAI resource in Retool.
Create a new resource
Navigate to Resources in the main navigation and click Create new > Resource. Search for Azure OpenAI. Then, click the Azure OpenAI tile to create a new resource.
Configure connection settings
Specify a name for the resource that identifies it within your organization. Include a description that can provide more context to users about how to use the resource.
Configure authentication
This resource requires you to provide your own API key. Retool-managed keys are not available for Azure OpenAI.
Azure OpenAI resources require an API key and endpoint configuration.
- Endpoint URL: Your Azure OpenAI resource endpoint (e.g.,
https://your-resource-name.openai.azure.com). - API Key: Your Azure OpenAI API key. Retrieve this from the Keys and Endpoint section in your Azure OpenAI resource in the Azure portal.
- API Version: The Azure OpenAI API version to use (e.g.,
2024-02-15-preview). Leave blank to use the default stable version. Only set this if you need a specific API version. - Deployment Names: Specify the names of your model deployments. You'll reference these deployment names when creating queries.
Retrieve your endpoint URL and API key from the Azure portal by navigating to your Azure OpenAI resource and selecting Keys and Endpoint.
Create dedicated API keys for Retool to best manage and revoke access without disruption. All API keys used with Retool are encrypted and stored securely.
Save the resource
Click Create resource to save your Azure OpenAI resource. The resource is now available for use in apps and workflows.
AI resources do not have a Test connection button. To verify your configuration, create a new app and ask the agent to test the resource for you.
Interact with Azure OpenAI data
Once you've created an Azure OpenAI resource, you can interact with GPT models using Retool.
Retool recommends using the new app builder so you can use natural language to build React-based apps using AI.
- To use Azure OpenAI models in the app builder, reference the resource in the prompt with
@, such as@Azure OpenAI. Refer to the data and functions documentation to learn more. - For classic apps, workflows, and agents, refer to the AI queries documentation to learn how to write a resource query.
Best practices
Follow these best practices to keep your Azure OpenAI usage secure and cost-efficient.