Skip to main content

Overview

Azure OpenAI Service provides REST API access to OpenAI models including GPT-4, GPT-3.5-Turbo, and embeddings through Microsoft’s Azure platform with enterprise-grade security and compliance.

Setup

1

Create Azure OpenAI Resource

In Azure Portal, create an Azure OpenAI resource in your subscription
2

Deploy a Model

Navigate to Azure OpenAI Studio and deploy a model (e.g., gpt-4, gpt-35-turbo)
3

Get Connection Details

Collect:
  • API Key (from Keys and Endpoint)
  • Instance Name (e.g., my-openai-resource)
  • Deployment Name (the name you gave your deployment)
  • API Version (e.g., 2024-02-01)
4

Add Credential in Flowise

Create an Azure OpenAI API credential with your details

Configuration

Basic Parameters

credential
credential
required
Azure OpenAI API credential containing:
  • Azure OpenAI API Key
  • Azure OpenAI API Instance Name
  • Azure OpenAI API Deployment Name
  • Azure OpenAI API Version
modelName
string
required
The deployed model name in your Azure OpenAI resource. Common deployments:
  • gpt-4
  • gpt-4-32k
  • gpt-35-turbo
  • gpt-35-turbo-16k
temperature
number
Sampling temperature between 0 and 2. Higher values increase randomness
streaming
boolean
default:true
Enable streaming for real-time token generation

Advanced Parameters

maxTokens
number
Maximum tokens to generate. Varies by model:
  • GPT-4: up to 8192
  • GPT-4-32k: up to 32768
  • GPT-3.5-Turbo: up to 4096
topP
number
Nucleus sampling parameter (0-1). Alternative to temperature
frequencyPenalty
number
Reduce repetition of token sequences (-2.0 to 2.0)
presencePenalty
number
Encourage talking about new topics (-2.0 to 2.0)
timeout
number
Request timeout in milliseconds

Vision & Multimodal

allowImageUploads
boolean
default:false
Enable image analysis for vision-capable models like GPT-4 Turbo with Vision
imageResolution
string
default:"low"
Image detail level: low, high, or auto

Reasoning Models

Azure OpenAI supports o1 and o3 reasoning models with special parameters.
reasoning
boolean
default:false
Enable reasoning mode for o1/o3 deployments
reasoningEffort
string
Set reasoning effort: low, medium, or high
reasoningSummary
string
Get reasoning summary: auto, concise, or detailed

Custom Configuration

basePath
string
Custom Azure OpenAI endpoint base path (overrides default)
baseOptions
json
Additional HTTP headers and configuration as JSON

Usage Examples

Basic Azure GPT-4 Setup

// Credential configuration
Azure OpenAI API Key: your-api-key
Azure OpenAI Instance Name: my-openai-instance
Azure OpenAI Deployment Name: gpt-4-deployment
Azure OpenAI API Version: 2024-02-01

// Node configuration
Model Name: gpt-4
Temperature: 0.7
Max Tokens: 2000

GPT-4 Vision

// Deploy gpt-4-vision-preview in Azure
Model Name: gpt-4-vision
Allow Image Uploads: true
Image Resolution: high
Max Tokens: 4096

Using Environment Variables

You can configure Azure OpenAI credentials via environment variables for server-wide defaults.
AZURE_OPENAI_API_KEY=your-api-key
AZURE_OPENAI_API_INSTANCE_NAME=my-instance
AZURE_OPENAI_API_DEPLOYMENT_NAME=gpt-4
AZURE_OPENAI_API_VERSION=2024-02-01
When these are set, the credential becomes optional in Flowise.

Private Endpoint

// For private Azure endpoints
Base Path: https://my-private-endpoint.openai.azure.com
Base Options: {
  "headers": {
    "Custom-Header": "value"
  }
}

Azure vs OpenAI Direct

FeatureAzure OpenAIOpenAI Direct
Data PrivacyStays in Azure regionSent to OpenAI
ComplianceAzure compliance certificationsOpenAI policies
SLAAzure SLA (99.9%)OpenAI uptime
PricingPay-as-you-go or reservedPay-per-token
Model UpdatesControlled deploymentAutomatic
Enterprise FeaturesVNET, Private LinkStandard

Best Practices

Security

  • Use Managed Identity when possible
  • Enable Private Endpoints for production
  • Rotate API keys regularly
  • Use RBAC for access control

Deployment

  • Deploy models in same region as app
  • Use provisioned throughput for production
  • Monitor quota and limits
  • Test in non-production first

Cost Management

  • Use reserved capacity for predictable workloads
  • Monitor token usage in Azure Portal
  • Set up budget alerts
  • Use appropriate model tiers

Performance

  • Use streaming for better UX
  • Implement caching where appropriate
  • Monitor latency metrics
  • Scale deployments based on demand

Common Issues

Ensure:
  • Deployment name matches exactly (case-sensitive)
  • Model is successfully deployed in Azure OpenAI Studio
  • Instance name is correct
  • API version is supported
Azure OpenAI has quota limits per region and subscription:
  • Check quota in Azure Portal
  • Request quota increase if needed
  • Consider multiple deployments
  • Use provisioned throughput
For private endpoints:
  • Verify VNET configuration
  • Check Private Link setup
  • Ensure DNS resolution
  • Verify firewall rules
Different API versions support different features:
  • Use latest stable version (2024-02-01+)
  • Check Azure OpenAI API changelog
  • Update version in credentials

Monitoring & Diagnostics

Azure provides built-in monitoring:
  • Metrics: Track requests, tokens, latency
  • Logs: Enable diagnostic logging
  • Alerts: Set up alerts for failures or quota
  • Cost Management: Track spending by deployment

Build docs developers (and LLMs) love