Configure Providers
Only workspace admins and owners can configure model providers. The process is consistent across providers:Navigate to Settings → Model Providers
Access the model provider configuration in your workspace settings.
Supported Providers
Large Language Models:- OpenAI (GPT-4, GPT-3.5-turbo)
- Anthropic (Claude)
- Google (Gemini)
- Cohere
- Local models via Ollama
- OpenAI Embeddings
- Cohere Embeddings
- Azure OpenAI
- Local embedding models
- Image generation (DALL-E, Stable Diffusion)
- Speech (Whisper, ElevenLabs)
- Moderation APIs
Provider Configuration Examples
- OpenAI
- Anthropic
- Local (Ollama)
Required: API Key from OpenAI PlatformOptional: Custom base URL for Azure OpenAI or proxies, Organization ID for organization-scoped usageAvailable Models: GPT-4, GPT-3.5-turbo, DALL-E, Whisper, Text embeddings
Manage Model Credentials
Add multiple credentials for a model provider’s predefined and custom models, and easily switch between, delete, or modify these credentials. Here are some scenarios where adding multiple credentials is particularly helpful:- Environment Isolation: Configure separate model credentials for different environments, such as development, testing, and production. For example, use a rate-limited credential in the development environment for debugging, and a paid credential with stable performance and a sufficient quota in the production environment to ensure service quality.
- Cost Optimization: Add and switch between multiple credentials from different accounts or model providers to maximize the use of free or low-cost quotas, thereby reducing application development and operational costs.
- Model Testing: During model fine-tuning or iteration, you may create multiple model versions. By adding credentials for these different versions, you can quickly switch between them to test and evaluate their performance.
- Predefined Model
- Custom Model
After installing a model provider and configuring the first credential, click Config in the upper-right corner to perform the following actions:
- Add a new credential
- Select a credential as the default for all predefined models
- Edit a credential
- Delete a credential
If the default credential is deleted, you must manually specify a new one.

Load Balancing
When a model provider has multiple credentials, you can distribute requests across them automatically. Load balancing spreads traffic so no single credential hits its rate limit, which helps maintain throughput under heavy use. By default, Dify uses a round-robin strategy, routing each request to the next credential in the pool. If a credential triggers a rate limit, it is taken out of rotation for one minute before Dify retries it. To set it up:- In the model list, find the model, open its Config options, and choose Load Balancing.
- Add credentials to the load balancing pool, either by selecting existing credentials or adding new ones.
- Enable at least two credentials, then click Save. Models using load balancing are marked with a dedicated icon.


Access and Permissions
Team access follows workspace permissions:- Owners/Admins can configure, modify, and remove providers
- Editors/Members can view available providers and use them in applications


