> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Model Providers

> Add model providers to your workspace so your apps can use LLMs, embedding models, and other AI services

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.

<Warning>
  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.
</Warning>

## Add a Provider

1. In **Integrations** > **Model Provider**, browse the **Install model providers** section or visit the [Marketplace](https://marketplace.dify.ai/) 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

A provider's models are ready as soon as you connect it, so you only add one by hand when the model you need isn't listed, such as a brand-new or fine-tuned model.

Click **Add Model** on the provider's card, then give the model a name and its credentials. Providers that serve only a fixed set of models don't offer this option.

<Info>
  If the model you add matches the name and type of an existing one, Dify attaches the new key to that model instead of creating a duplicate.
</Info>

## Manage Your Keys

Add more than one key to a provider when you want to keep development and production apart or spread usage across several accounts.

* For a provider's own models, click **Configure** on its card to manage the keys they share.
  <Frame>
    <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workspace/predefined-model-credential.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=c5e7fae7edcb00ddce3def1b8caca031" alt="Manage Credentials for a Provider's Models" width="1538" height="678" data-path="images/use-dify/workspace/predefined-model-credential.png" />
  </Frame>
* For a custom model you added, click **Configure** on that model to manage its own keys.

  <Columns cols={2}>
    <Frame>
      <img src="https://mintcdn.com/dify-6c0370d8/9VIP3zTWmgwem0r-/images/use-dify/workspace/custom-model-config.png?fit=max&auto=format&n=9VIP3zTWmgwem0r-&q=85&s=b6bed4d82c48c2a69441113581896990" alt="Custom Model Configuration" width="1472" height="270" data-path="images/use-dify/workspace/custom-model-config.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workspace/custom-model-credential.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=3f63c1e3c35de77bed6bddda273e9594" alt="Custom Model Credentials" width="1328" height="722" data-path="images/use-dify/workspace/custom-model-credential.png" />
    </Frame>
  </Columns>

  <Warning>
    A custom model relies on its own keys. Deleting its only key removes the model too.
  </Warning>

  To view every custom model's keys in one place, click **Manage Credentials** on the provider card.

  <Frame>
    <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workspace/custom-model-credential-list.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=b477d28d20d9f58daf138f2cc2dc0b27" alt="Manage Credentials for All Custom Models" width="1528" height="692" data-path="images/use-dify/workspace/custom-model-credential-list.png" />
  </Frame>

  Keys stay here even after the custom model is removed, so you can re-add the model later without re-entering its keys.

  <Frame>
    <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workspace/removed-custom-model-re-add.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=6ae4e7288bd3267c0d1db1c6bf8f4b2b" alt="Re-add a Removed Model" width="1534" height="564" data-path="images/use-dify/workspace/removed-custom-model-re-add.png" />
  </Frame>

## Choose the Models Apps Use by Default

Apps and nodes that don't pick a model fall back to your workspace defaults. Click **Default Models** at the top-right corner to set one for each job:

* **System Reasoning Model**: the default for general LLM tasks.
* **Embedding Model**: indexes and retrieves knowledge base content.
* **Rerank Model**: reorders retrieval results by relevance.
* **Speech-to-Text Model**: turns audio into text.
* **Text-to-Speech Model**: turns text into audio.
