Skip to main content
Every Dify app needs at least one model provider. Install a provider, add your API key, and all apps in the workspace can use its models.
API keys grant workspace-wide model access and trigger direct billing through each provider’s account. Only the workspace owner and admins can manage providers.

Add a Provider

  1. In Integrations > Model Provider, browse the Install model providers section or visit the Marketplace for more options.
  2. After installing, click Setup on the provider card and enter your API key (and any other required credentials, such as a custom endpoint URL or organization ID). Dify validates the credentials before making the provider available.

Add a Custom Model

Most providers bring their own models, so once you authorize one, its models are ready to use. You add a model yourself only when the one you need isn’t there, typically in two situations:
  • You run your own inference server, such as Ollama or Xinference, and Dify has no way to know which models you’ve loaded.
  • A provider lists its models, but the specific one you want—such as a newly released or fine-tuned model—is missing.
Click Add Model on the provider card, then give the model a name and its credentials. If a provider only serves a fixed set of models, it won’t offer this option.
If you add a custom model whose name and type match one that already exists, Dify attaches the new key to the existing model instead of creating a duplicate.

Manage Credentials

Add more than one key or endpoint to a provider when you want to keep development and production separate, spread usage across accounts, or send different models to different servers. Where you manage keys depends on the model:
  • For a provider’s own models, click Configure on the provider card to manage the keys shared across all of them.
    Provider Credentials
  • For a custom model you added, click Configure on the model to manage its own keys.
    Custom Model Configuration
    Custom Model Credentials
    A model you added relies on its own credentials. Deleting its only credential removes the model too.
To view every custom model’s keys in one place, click Manage Credentials on the provider card.
Manage Credentials for All Custom Models
Keys stay here even after you remove a model, so you can re-add the model later without re-entering them.
Re-add a Removed Model

Set Default Models

Click Default Models in the toolbar to assign the fallback model for each category. Apps and nodes that don’t specify a model use these:
  • System Reasoning Model: the default LLM.
  • Embedding Model: used for knowledge base indexing and retrieval.
  • Rerank Model: re-ranks retrieval results by relevance.
  • Speech-to-Text Model: converts audio input to text.
  • Text-to-Speech Model: converts text responses to audio.
Last modified on June 25, 2026