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

# Setup Guides

> Step-by-step guides for connecting models from Google Vertex AI, AWS Bedrock, Mistral, DeepSeek, Perplexity, Vercel AI Gateway, and OpenAI-compatible endpoints.

Select your provider below to see the setup steps.

<AccordionGroup>
  <Accordion title="Google Vertex AI / AI Studio">
    Langdock supports two ways to connect Gemini models:

    * **Google Vertex AI**: uses service account credentials. Best for enterprise setups with GCP infrastructure.
    * **Google AI Studio**: uses a simple API key. Easier to set up.

    ## Option 1: Google Vertex AI

    ### Google Cloud Setup

    1. Enable the Vertex AI API in your [Google Cloud Platform](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com).

    2. Go to "Service Accounts" in the Google Cloud Console IAM Settings.

    <img src="https://mintcdn.com/langdock-34/hDlYFjN4znXbKeFA/images/vertex-1.png?fit=max&auto=format&n=hDlYFjN4znXbKeFA&q=85&s=bc82aab0b2ac95f5ac0f4f00b1871063" alt="Go to Service Accounts in the sidebar" style={{borderRadius: '6px'}} width="2404" height="1674" data-path="images/vertex-1.png" />

    3. Click on "Create Service Account".

    4. Give the Service Account a name.

    <img src="https://mintcdn.com/langdock-34/hDlYFjN4znXbKeFA/images/vertex-3.png?fit=max&auto=format&n=hDlYFjN4znXbKeFA&q=85&s=8383dd25d7fbb015ba4d1b3fe7869609" alt="Give the Service Account a name" style={{borderRadius: '6px'}} width="2404" height="1674" data-path="images/vertex-3.png" />

    5. Assign the "Vertex AI User" Role.

    <img src="https://mintcdn.com/langdock-34/hDlYFjN4znXbKeFA/images/vertex-4.png?fit=max&auto=format&n=hDlYFjN4znXbKeFA&q=85&s=f5541283131a285885b8f7479cf9470f" alt="Assign the Vertex AI User Role" style={{borderRadius: '6px'}} width="2404" height="1674" data-path="images/vertex-4.png" />

    6. Create the Service Account.

    <img src="https://mintcdn.com/langdock-34/hDlYFjN4znXbKeFA/images/vertex-5.png?fit=max&auto=format&n=hDlYFjN4znXbKeFA&q=85&s=c07540a6fbc57e613cd4fe9798742c09" alt="Create the Service Account" style={{borderRadius: '6px'}} width="2404" height="1674" data-path="images/vertex-5.png" />

    7. You are brought back to the Service Account overview.

    <img src="https://mintcdn.com/langdock-34/hDlYFjN4znXbKeFA/images/vertex-6.png?fit=max&auto=format&n=hDlYFjN4znXbKeFA&q=85&s=58e96da270d580a87c7a181aeabfe0f0" alt="Service Account overview" style={{borderRadius: '6px'}} width="2404" height="1674" data-path="images/vertex-6.png" />

    8. On the overview page, click on "Manage keys".

    <img src="https://mintcdn.com/langdock-34/hDlYFjN4znXbKeFA/images/vertex-7.png?fit=max&auto=format&n=hDlYFjN4znXbKeFA&q=85&s=c38a552aedad87452a48038c60779beb" alt="Click Manage keys on the service account" style={{borderRadius: '6px'}} width="2404" height="1674" data-path="images/vertex-7.png" />

    9. Create a new JSON key.

    <img src="https://mintcdn.com/langdock-34/hDlYFjN4znXbKeFA/images/vertex-8.png?fit=max&auto=format&n=hDlYFjN4znXbKeFA&q=85&s=9f7ad3c0eb79f7a6ae19b2ea5b8193e0" alt="Select Create new key from the dropdown" style={{borderRadius: '6px'}} width="2404" height="1674" data-path="images/vertex-8.png" />

    10. Download and open the JSON file.

    <img src="https://mintcdn.com/langdock-34/hDlYFjN4znXbKeFA/images/vertex-9.png?fit=max&auto=format&n=hDlYFjN4znXbKeFA&q=85&s=cfdd5794e12deb32d3625201f558af68" alt="Download the key and open the JSON file" style={{borderRadius: '6px'}} width="2404" height="1674" data-path="images/vertex-9.png" />

    ### Langdock Setup

    1. Go to [Workspace Settings -> Models](https://app.langdock.com/settings/workspace/models) and click **Add custom model**.
    2. Use the prebuilt Langdock config or set up manually. Set the SDK to **Google Vertex**.

    <Info>
      When you select the Google Vertex SDK, the UI relabels the fields: "Base URL" becomes **Service Account Email** and "API Key" becomes **Service Account Private Key**.
    </Info>

    3. Fill in the connection fields:
       * **Service Account Email**: paste the `client_email` value from your JSON key file (e.g. `my-sa@my-project.iam.gserviceaccount.com`)
       * **Service Account Private Key**: paste the `private_key` value from your JSON key file (including `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----`)
       * **Region**: your Vertex AI region (e.g. `europe-west3`, `us-central1`). This determines which Vertex AI endpoint is used.
       * **Model ID**: the model ID from the Vertex portal (e.g. `gemini-2.5-flash`, `gemini-2.5-pro`)

    4. Click **Test & continue**, then click **Save model** after the test passes.

    <Info>
      The GCP project ID is automatically extracted from your service account email. You don't need to enter it separately.
    </Info>

    ## Option 2: Google AI Studio

    1. Get an API key from [Google AI Studio](https://aistudio.google.com/apikey).
    2. Go to [Workspace Settings -> Models](https://app.langdock.com/settings/workspace/models) and click **Add custom model**. Select **Google AI Studio** as the SDK.
    3. Paste your API key and set the Model ID.
    4. Click **Test & continue**, then click **Save model** after the test passes.

    ## Imagen (Image Generation)

    Follow the Vertex AI setup above, but set the model type to **Image Generation** and use an Imagen model ID (e.g. `imagen-4.0-generate-001`).
  </Accordion>

  <Accordion title="AWS Bedrock">
    AWS Bedrock allows you to access models like Claude through your own AWS infrastructure with enterprise-grade security and compliance.

    **Prerequisites:**

    1. An AWS account with Bedrock access enabled
    2. IAM credentials with Bedrock permissions
    3. Model access enabled in your AWS Bedrock console
    4. Admin access to your Langdock workspace

    ## AWS Setup

    ### 1. Enable Model Access

    1. Go to the [AWS Bedrock Console](https://console.aws.amazon.com/bedrock).
    2. Navigate to **Model access** in the left sidebar.
    3. Click **Manage model access** and enable the models you need.
    4. Wait for access to be granted (this may take a few minutes).

    ### 2. Create IAM Credentials

    1. Go to the [AWS IAM Console](https://console.aws.amazon.com/iam).
    2. Navigate to **Users** and click **Create user**.
    3. Give the user a descriptive name (e.g. `langdock-bedrock-access`).
    4. Attach the `AmazonBedrockFullAccess` policy, or create a custom policy with minimum required permissions:

    ```json theme={null}
    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "bedrock:InvokeModel",
                    "bedrock:InvokeModelWithResponseStream"
                ],
                "Resource": "*"
            }
        ]
    }
    ```

    5. Go to the user's **Security credentials** tab, click **Create access key**, select **Third-party service**, and save both the Access Key ID and Secret Access Key.

    <Warning>
      The Secret Access Key is only shown once. Store it securely before closing the dialog.
    </Warning>

    ## Langdock Setup

    1. Go to [Workspace Settings -> Models](https://app.langdock.com/settings/workspace/models) and click **Add custom model**.

    2. Select **Bedrock** as the SDK.

    3. Fill in the connection fields:
       * **Access Key ID**: your AWS Access Key ID
       * **Secret Access Key**: your AWS Secret Access Key
       * **Region**: your AWS region (e.g. `us-east-1`, `eu-central-1`)
       * **Model ID**: use the Bedrock model identifier (see below)
       * **Context Size**: set according to the model (see the [model configuration tables](/en/admin/byok/recommended-models#model-specific-configuration))

    4. Click **Test & continue**, then click **Save model** after the test passes.

    ## Model IDs

    | Provider  | Format                     | Example                                  |
    | --------- | -------------------------- | ---------------------------------------- |
    | Anthropic | `anthropic.{model-name}`   | `anthropic.claude-sonnet-4-6`            |
    | Meta      | `meta.{model-name}-v1:0`   | `meta.llama4-maverick-17b-instruct-v1:0` |
    | Amazon    | `amazon.{model-name}-v1:0` | `amazon.nova-pro-v1:0`                   |

    <Info>
      Check the [AWS Bedrock supported models page](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html) for exact model IDs.
    </Info>

    ## Cross-Region Inference Profiles

    Prefix the model ID with a geographic code to route across regions automatically:

    | Prefix    | Scope                  |
    | --------- | ---------------------- |
    | `us.`     | US regions             |
    | `eu.`     | European regions       |
    | `global.` | All commercial regions |
    | `apac.`   | Asia-Pacific regions   |

    Example: `eu.anthropic.claude-sonnet-4-6`

    Check the [inference profiles documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html) for available profiles per model.

    ## Supported Regions

    * **US East (N. Virginia)**: `us-east-1`
    * **US West (Oregon)**: `us-west-2`
    * **EU (Frankfurt)**: `eu-central-1`
    * **EU (Ireland)**: `eu-west-1`
    * **EU (Paris)**: `eu-west-3`
    * **Asia Pacific (Tokyo)**: `ap-northeast-1`
    * **Asia Pacific (Sydney)**: `ap-southeast-2`

    ## Network Configuration

    If your organization uses network allowlisting, add `bedrock.REGION.amazonaws.com` to your allowlist (replace `REGION` with your AWS region, e.g. `us-east-1`).

    ## Troubleshooting

    **"Access Denied" errors**: verify IAM permissions and that model access is enabled in the Bedrock console.

    **Model not available**: confirm the model is enabled in your AWS Bedrock model access settings and available in your selected region.

    **Authentication failures**: double-check that Access Key ID and Secret Access Key fields contain the correct values and that the region setting matches your Bedrock region.

    **Slow responses or timeouts**: consider using a region closer to your users. Check the [AWS Service Health Dashboard](https://health.aws.amazon.com/health/status) for any ongoing issues. Verify your AWS account has sufficient quotas for the model.
  </Accordion>

  <Accordion title="Mistral">
    Mistral models connect via the Mistral API or via Azure (for Azure-hosted Mistral).

    **Prerequisites:**

    1. A Mistral account at [console.mistral.ai](https://console.mistral.ai)
    2. An API key from the Mistral platform
    3. Admin access to your Langdock workspace

    ## Setup

    1. Go to [Workspace Settings -> Models](https://app.langdock.com/settings/workspace/models) and click **Add custom model**.

    2. Fill in the connection fields:
       * **SDK**: select **Mistral**
       * **Base URL**: leave empty to use the default (`https://api.mistral.ai/v1`) or specify a custom endpoint
       * **Model ID**: use the official model identifier (see below)
       * **API Key**: paste your Mistral API key

    3. Click **Test & continue**, then click **Save model** after the test passes.

    ## Model IDs

    | Model ID               | Use case                                                                |
    | ---------------------- | ----------------------------------------------------------------------- |
    | `mistral-large-latest` | Flagship model — complex reasoning, multilingual, instruction following |
    | `codestral-latest`     | Code-specialized — code generation, completion, and technical tasks     |
    | `mistral-small-latest` | Fast and cost-effective — good for everyday tasks                       |

    <Info>
      Check [Mistral's model documentation](https://docs.mistral.ai/getting-started/models/models_overview/) for the full list of available models.
    </Info>

    ## Using Mistral from Azure

    If you're using Mistral models hosted on Azure (via Azure AI Models-as-a-Service), you still need to select **"Mistral"** as the SDK in Langdock. The SDK selection refers to the API format, not the hosting provider.

    <Warning>
      When configuring Azure-hosted Mistral models:

      * Set the **Hosting provider** to Azure
      * Set the **SDK** to "Mistral" (not Azure OpenAI)
      * Use your Azure endpoint as the Base URL
      * Use your Azure API key
    </Warning>

    ## Configuration Notes

    * Mistral models support tool calling natively.
    * The default API endpoint `https://api.mistral.ai/v1` is used automatically when no custom Base URL is provided.
    * Mistral models are known for strong multilingual capabilities, particularly in European languages.

    ## Troubleshooting

    **Model not responding**: verify your API key is valid and that you have sufficient credits in your Mistral account. Ensure the model ID matches exactly (case-sensitive).

    **Authentication errors with Azure**: double-check that you're using "Mistral" as the SDK, not "Azure OpenAI". Verify your Azure endpoint URL is correct and accessible, and that your Azure API key has the necessary permissions.

    **Slow responses**: larger models may take longer for complex reasoning tasks. Consider using a smaller model for faster responses on simpler tasks.
  </Accordion>

  <Accordion title="DeepSeek">
    DeepSeek models connect via the DeepSeek API. All models are hosted in the US region.

    **Prerequisites:**

    1. A DeepSeek account with an [API key](https://platform.deepseek.com/api_keys)
    2. Admin access to your Langdock workspace

    ## Setup

    1. Go to [Workspace Settings -> Models](https://app.langdock.com/settings/workspace/models) and click **Add custom model**.

    2. Fill in the connection fields:
       * **SDK**: select **DeepSeek**
       * **Base URL**: `https://api.deepseek.com/v1`
       * **Model ID**: see table below
       * **API Key**: paste your DeepSeek API key
       * **Region**: US

    3. For reasoning models (R1), enable **Always show reasoning** to surface the model's thinking in the UI.

    4. Click **Test & continue**, then click **Save model** after the test passes.

    ## Model IDs

    | Model ID            | Type                                                                            |
    | ------------------- | ------------------------------------------------------------------------------- |
    | `deepseek-reasoner` | Reasoning model (R1 series) — excels at step-by-step problem solving and coding |
    | `deepseek-chat`     | General-purpose model (V3 series) — fast responses, good for everyday tasks     |

    <Info>
      Check [DeepSeek's API docs](https://api-docs.deepseek.com/quick_start/pricing) for the latest available models.
    </Info>

    ## Configuration Notes

    * DeepSeek models are hosted in the US region only.
    * DeepSeek R1 is a reasoning model — enable **Always show reasoning** to see its reasoning steps in the UI. DeepSeek models do not support image analysis.
    * The base URL must include the `/v1` path: `https://api.deepseek.com/v1`.

    ## Troubleshooting

    **Model not responding**: verify your API key is valid and that you have sufficient credits. Ensure the model ID matches exactly (case-sensitive).

    **Slow responses**: DeepSeek R1 (reasoning model) may take longer due to its step-by-step reasoning process. Consider using DeepSeek V3 for faster responses on simpler tasks.
  </Accordion>

  <Accordion title="Perplexity">
    Perplexity's Sonar models combine LLM capabilities with real-time web search. All models are hosted in the US region.

    **Prerequisites:**

    1. A Perplexity account at [perplexity.ai](https://www.perplexity.ai)
    2. An API key from your [Perplexity API settings](https://www.perplexity.ai/settings/api)
    3. Admin access to your Langdock workspace

    ## Setup

    1. Go to [Workspace Settings -> Models](https://app.langdock.com/settings/workspace/models) and click **Add custom model**.

    2. Fill in the connection fields:
       * **SDK**: select **Perplexity**
       * **Base URL**: leave empty to use the default (`https://api.perplexity.ai`)
       * **Model ID**: see table below
       * **API Key**: paste your Perplexity API key
       * **Region**: US

    3. Click **Test & continue**, then click **Save model** after the test passes.

    ## Model IDs

    | Model ID              | Type                                                                     |
    | --------------------- | ------------------------------------------------------------------------ |
    | `sonar-pro`           | Advanced search-augmented generation — detailed responses with citations |
    | `sonar`               | Fast search-augmented responses — good for general-purpose queries       |
    | `sonar-reasoning-pro` | Deep analysis with search — multi-step reasoning with citations          |
    | `sonar-reasoning`     | Reasoning with search augmentation                                       |

    <Info>
      Check [Perplexity's model documentation](https://docs.perplexity.ai/guides/model-cards) for the full list of available models.
    </Info>

    ## Configuration Notes

    * Perplexity models include built-in web search capabilities, so they always have access to current information.
    * The API endpoint `https://api.perplexity.ai` is automatically used when no custom Base URL is provided.
    * Sonar Pro models provide more detailed responses with better source citations.
    * Reasoning variants are best for complex analytical tasks that benefit from step-by-step thinking.
    * Perplexity models do not support image analysis.

    ## Troubleshooting

    **Missing citations**: Perplexity models include citations automatically when web search is used. If citations are missing, the model answered from its base knowledge rather than a web search.

    **Slow responses**: Perplexity models perform web searches, which adds latency. Sonar (non-Pro) variants are faster than Pro versions. For time-sensitive tasks without search needs, consider using a different model.

    **Model not responding**: verify your API key is valid and that you have sufficient credits. Ensure the model ID matches exactly (case-sensitive).
  </Accordion>

  <Accordion title="Vercel AI Gateway">
    The [Vercel AI Gateway](https://vercel.com/docs/ai-gateway) is a unified API that routes requests to many model providers (OpenAI, Anthropic, Google, xAI, and others) behind a single key. Use it when you want one credential to access models across providers, automatic provider failover, and centralised usage and billing through Vercel.

    When Langdock connects to a model through Vercel AI Gateway, every request is sent with **Zero Data Retention** and **prompt training disabled** at the gateway level. This makes it a good fit for teams that want broad model coverage without negotiating separate data-processing terms with each upstream provider.

    **Prerequisites:**

    1. A Vercel account with [AI Gateway](https://vercel.com/docs/ai-gateway) enabled
    2. An API key from your Vercel dashboard (starts with `vck_`)
    3. Admin access to your Langdock workspace

    ## Setup

    1. Go to [Workspace Settings -> Models](https://app.langdock.com/settings/workspace/models) and click **Add custom model**.

    2. Fill in the connection fields:
       * **SDK**: select **Vercel AI Gateway**
       * **Base URL**: leave empty to use the default (`https://ai-gateway.vercel.sh/v3/ai`)
       * **Model ID**: the gateway model identifier in `provider/model` form (e.g. `openai/gpt-5.2`, `anthropic/claude-sonnet-4.6`, `google/gemini-2.5-pro`)
       * **API Key**: paste your Vercel AI Gateway key (`vck_…`)
       * **Region**: the region where the upstream model is hosted (e.g. `eu`, `us`)

    3. Click **Test & continue**, then click **Save model** after the test passes.

    <Info>
      Browse the [Vercel AI Gateway model catalog](https://vercel.com/ai-gateway/models) for the full list of supported model IDs and their upstream providers.
    </Info>

    ## Configuration Notes

    * Langdock automatically attaches `zeroDataRetention: true` and `disallowPromptTraining: true` to every request sent through the gateway. You don't need to configure this yourself.
    * Use the **Hosting provider** field to keep upstream regions transparent to users — the model selector shows "Vercel" as the hoster.
    * Pricing in the Vercel AI Gateway typically follows the upstream provider's pricing. Configure the **Pricing** fields in Langdock to match so [usage limits](/en/admin/manage-usage/byok/usage-limits) reflect real costs.
    * The gateway supports streaming, tool calls, vision, and embeddings as long as the underlying model does.

    ## Troubleshooting

    **Authentication errors**: verify the key starts with `vck_` and is active in your Vercel dashboard. Gateway keys are separate from regular Vercel deployment tokens.

    **Model not found**: model IDs must include the provider prefix (e.g. `openai/gpt-5.2`, not just `gpt-5.2`). Check the [Vercel model catalog](https://vercel.com/ai-gateway/models) for the exact identifier.

    **Upstream provider errors**: errors from the underlying provider (rate limits, content filters, region restrictions) are passed through by the gateway. The error message indicates which upstream provider rejected the request.
  </Accordion>

  <Accordion title="OpenAI-compatible endpoints">
    Use this for any API that follows the OpenAI spec — including vLLM, LiteLLM, Ollama, and self-hosted models.

    Many LLM inference solutions implement the OpenAI API specification as a standard interface. This means they accept requests and return responses in the same format as OpenAI's API, making them interchangeable from an integration perspective.

    Common OpenAI-compatible solutions:

    * **vLLM**: high-throughput inference server for large language models
    * **LiteLLM**: proxy server providing a unified interface to 100+ LLM providers
    * **Ollama**: run large language models locally
    * **Text Generation Inference (TGI)**: Hugging Face's inference server
    * **LocalAI**: self-hosted, OpenAI-compatible API
    * **Custom deployments**: any service implementing the OpenAI chat completions API

    **Prerequisites:**

    1. A running OpenAI-compatible inference endpoint accessible over HTTPS
    2. The base URL of your endpoint
    3. The model ID/name as configured in your inference server
    4. An API key (if your endpoint requires authentication)
    5. Admin access to your Langdock workspace

    ## Setup

    1. Go to [Workspace Settings -> Models](https://app.langdock.com/settings/workspace/models) and click **Add custom model**.

    2. Fill in the connection fields:
       * **SDK**: select **OpenAI Compatible**
       * **Base URL**: your endpoint URL (e.g. `https://your-server.com/v1`). Required.
       * **Model ID**: the exact model identifier as configured in your inference server
       * **API Key**: your authentication key, or leave empty if not required
       * **Context Size**: the context window size of your model in tokens

    3. Click **Test & continue**, then click **Save model** after the test passes.

    <Warning>
      Your endpoint must be publicly accessible over HTTPS. Langdock blocks requests to private IPs, localhost, and internal hostnames. Contact [support@langdock.com](mailto:support@langdock.com) if you need to connect to an internal endpoint.
    </Warning>

    ## Example Configurations

    | Server        | Base URL                     | Model ID                                                                |
    | ------------- | ---------------------------- | ----------------------------------------------------------------------- |
    | vLLM          | `https://your-server.com/v1` | Model name from vLLM startup (e.g. `meta-llama/Llama-3.1-70B-Instruct`) |
    | LiteLLM proxy | `https://your-litellm.com`   | Alias from your LiteLLM config                                          |
    | Ollama        | `https://your-ollama.com/v1` | Name from `ollama list` (e.g. `llama3.1`)                               |

    <Info>
      For Azure OpenAI, use the dedicated **Azure** SDK instead. It handles API versioning and deployment-based URL routing automatically.
    </Info>

    ## Common Use Cases

    * **Data privacy**: run models on your own infrastructure so prompts and responses stay within your network.
    * **Cost optimization**: running open-source models on your own hardware can significantly reduce costs for high-volume use cases.
    * **Custom fine-tuned models**: deploy models fine-tuned for specific tasks or domains with vLLM or similar servers.
    * **Multi-provider abstraction**: use LiteLLM as a proxy to route requests to different providers from a single interface.

    ## Troubleshooting

    **Connection refused or timeout**: verify the endpoint is accessible from external servers over HTTPS. Check that your firewall allows incoming connections. Ensure your inference server is running and healthy.

    **Authentication errors**: verify your API key and check if your endpoint expects a specific `Bearer` token format.

    **Model not found**: ensure the Model ID matches exactly what your inference server expects (case-sensitive). Verify the model is loaded and available on your server.

    **Responses are cut off**: check the max output tokens setting in Langdock and verify your inference server's generation length limits.

    **Slow responses**: check your server's available GPU memory and compute resources. Consider using quantized model versions for faster inference. Monitor your server's queue length and scaling configuration.

    **Incompatible API format**: not all "OpenAI-compatible" servers implement the full API specification. Verify your server supports the `/v1/chat/completions` endpoint and check if your server requires specific API version headers.
  </Accordion>

  <Accordion title="Black Forest Labs (FLUX)">
    FLUX image models connect via the native Black Forest Labs API or via Azure AI Foundry (for Azure-hosted FLUX).

    **Prerequisites:**

    1. A Black Forest Labs API key from [api.bfl.ai](https://api.bfl.ai), **or** an Azure AI Foundry resource with a FLUX deployment
    2. Admin access to your Langdock workspace

    ## Setup

    1. Go to [Workspace Settings -> Models](https://app.langdock.com/settings/workspace/models) and click **Add custom model**.
    2. On the **Image** tab, select a FLUX model from the catalog (recommended) or set it up manually.
    3. Add a model key with the connection details for your hosting provider (see below).
    4. Click **Test & continue**, then **Save model** after the test passes.

    ## Using FLUX from Azure AI Foundry

    Azure AI Foundry serves FLUX models through the Black Forest Labs provider route, not the OpenAI-compatible route. Langdock handles this routing automatically when you set the SDK correctly.

    <Warning>
      When configuring Azure-hosted FLUX models:

      * Set the **SDK** to **Black Forest Labs** (not Azure OpenAI)
      * Use your Azure AI Foundry resource endpoint as the Base URL (e.g. `https://<resource>.services.ai.azure.com/openai`)
      * Use your Azure API key
      * The **Provider model name** in Langdock must match your **Azure deployment name exactly**, including capitalization and punctuation (e.g. `FLUX.2-pro`)
    </Warning>

    The deployment name match is required because Azure resolves the FLUX deployment from the request body. A mismatch results in a `DeploymentNotFound` error.

    ## Supported FLUX models

    | Provider model name | Notes                                        |
    | ------------------- | -------------------------------------------- |
    | `flux-2-pro`        | Supports HD (2K) output and aspect ratios    |
    | `flux-2-flex`       | Faster, cost-efficient FLUX.2 variant        |
    | `flux-1.1-pro`      | Output is capped at 1440px per side on Azure |
    | `flux-kontext-pro`  | Image editing and contextual generation      |

    <Info>
      Use the model name shown above when adding the model via the native Black Forest Labs API. On Azure AI Foundry, use your exact deployment name instead — Langdock maps it to the correct provider route.
    </Info>

    ## Configuration notes

    * Aspect ratio settings (e.g. 16:9, 1:1) are supported on both the native BFL API and Azure AI Foundry.
    * High-definition (2K) generation requires `flux-2-pro` with the HD toggle enabled in chat.
    * FLUX 1.1 dimensions are automatically clamped to 1440px on Azure to avoid validation errors.

    ## Troubleshooting

    **`DeploymentNotFound` on Azure**: verify that the Provider model name in Langdock matches your Azure deployment name character-for-character, including case and dots (e.g. `FLUX.2-pro`, not `flux-2-pro`).

    **Authentication errors on Azure**: confirm the SDK is set to **Black Forest Labs**, the Base URL points to your Azure AI Foundry resource, and the API key has access to the FLUX deployment.

    **Images always return 1:1**: ensure the SDK is set to **Black Forest Labs**. Aspect ratio is not supported on the OpenAI-compatible image route.
  </Accordion>
</AccordionGroup>
