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

# Connect LLM providers

> Connect large language model providers to power your Agent Studio agents.

<Callout icon="flask-conical" color="#14b8a6">
  This is a **beta feature** according to [Algolia's Terms of Service ("Beta Services")](https://www.algolia.com/policies/terms/).
</Callout>

Agent Studio lets you use your preferred large language model (LLM) provider.
This means you connect your own provider accounts to power your agents, giving you control over model selection, data governance, and costs.

## Advantages of using your own LLM

<Accordion title="Cost control">
  You pay only for the tokens you consume directly with your LLM provider.
  Optimize spending with Algolia's transparent pricing:
  there are no fees on top of provider costs.
</Accordion>

<Accordion title="Vendor flexibility">
  Switch between providers or models without rebuilding your entire system.
  You can use smaller models for simple tasks and larger ones for complex scenarios.

  * Route workflows based on demand, cost, or performance across various models and providers, and enable fallback strategies if there's a provider outage.
  * Reduce vendor lock-in and adapt to evolving model capabilities.
</Accordion>

<Accordion title="Data and context control">
  You maintain full ownership of your data and business logic.
  Algolia handles retrieval and orchestration,
  while you control which provider processes your data.
  This supports governance, compliance, and data sovereignty requirements.
  Benefit from observability, fine-tuning, and guardrails offered by your chosen provider.
</Accordion>

## Supported providers

Agent Studio supports multiple LLM providers.
Choose based on your requirements for regional compliance, model availability, and cost optimization.

### Provider overview

{/* vale Google.We = NO */}

| Provider              | Key requirement                    | Regional support   |
| --------------------- | ---------------------------------- | ------------------ |
| **Anthropic**         | Anthropic API key                  | Global             |
| **OpenAI**            | OpenAI API key                     | US, Europe         |
| **Azure OpenAI**      | Azure endpoint and deployment name | Your Azure region  |
| **Google Gemini**     | Gemini API key                     | Global             |
| **OpenAI-compatible** | Provider API key and base URL      | Varies by provider |

{/* vale Vale.Spelling = YES */}

<Note>
  Algolia provides free access to GPT-4.1 (from OpenAI) for creating and testing your first agents.

  While your own LLM provider is required for production environments,
  using the same model during development is strongly recommended to prevent unexpected behavior upon deployment.
</Note>

### Provider details

<Tabs>
  <Tab title="Anthropic">
    Agent Studio supports Anthropic's Claude latest models.

    #### Supported models

    `claude-opus-4-5`, `claude-haiku-4-5`, `claude-sonnet-4-5`, `claude-opus-4-1`, `claude-opus-4`, `claude-sonnet-4`, `claude-3-5-haiku`, `claude-3-opus`, `claude-3-haiku`

    #### Configuration requirements

    * Anthropic API key (required)
    * Custom endpoint URL (optional)

    #### Where to get your API key

    1. Go to [Claude Console](https://console.anthropic.com/settings/keys) and sign in with your Anthropic account.
    2. Click **Create Key**, then name the key.
    3. Copy the API key and store it securely.

    <Note>
      You can create API keys for free but you must add credits to your account before making API calls.
    </Note>

    For details about how to authenticate,
    see [Anthropic's API documentation](https://docs.anthropic.com/en/api/getting-started).
  </Tab>

  <Tab title="OpenAI">
    Agent Studio supports the latest OpenAI models.

    #### Supported models

    `gpt-5.1-chat-latest`, `gpt-5.1-codex`, `gpt-5.1-codex-mini`, `gpt-5.1`, `gpt-5`, `gpt-5-mini`, `gpt-5-nano`, `gpt-4.1`, `gpt-4.1-mini`, `gpt-4.1-nano`, `gpt-4`, `o4-mini`, `o3`, `o3-mini`, `gpt-3.5-turbo`

    #### Configuration requirements

    * OpenAI API key (required)
    * Region (required)

    **Regional considerations**

    Agent Studio supports the US and Europe regions when you add an OpenAI provider.

    * Ensure European data residency by directing requests to the `https://eu.api.openai.com/v1` base URL. This URL is configured automatically when you add an OpenAI provider from the Algolia dashboard and select the Europe region.
    * Your API key must match the region you select. A key issued for one region fails with a `401 incorrect_hostname` error ("Attempted to access resource with incorrect regional hostname") when used with the other. If you see this error, select the region that matches your key, or create a key in the region you want to use.
    * OpenAI processes data only in the US and Europe, even though it offers [data storage in more regions](https://developers.openai.com/api/docs/guides/your-data). If your data must stay in another region, use a provider that operates there instead.

    #### Where to get your API key

    1. Go to the [OpenAI Platform](https://platform.openai.com/api-keys) and sign in with your OpenAI account.
    2. Click **Create new secret key** and name it.
    3. Copy the API key and store it securely.

    <Note>
      Although API key setup is free, OpenAI requires an active payment method before you can use the key.
    </Note>

    For more information, see [OpenAI's API key documentation](https://platform.openai.com/docs/quickstart/account-setup).
  </Tab>

  <Tab title="Azure OpenAI">
    Agent Studio supports the Azure OpenAI service,
    which lets you deploy OpenAI models in your Azure environment with custom compliance, security, and access controls.

    #### Supported models

    Any model deployed in your Azure OpenAI resource can be used.
    Common examples are GPT-5, GPT-4.1, and GPT-4o.

    The model selection isn't limited to a fixed list.
    You specify your Azure deployment name,
    which can include custom configurations like rate limits and content filters.

    #### Configuration requirements

    * Azure OpenAI API key (required)
    * Azure endpoint URL (required)
    * Azure deployment name (required)
    * API version (required)

    #### Where to find your Azure OpenAI configuration

    {/* vale Algolia.Ampersand = NO */}

    1. Go to [AI Foundry](https://ai.azure.com/) and sign in with your Microsoft account.
    2. If you don't have an Azure OpenAI resource yet, create one:
       1. Select **Create a new project** or use an existing project.
       2. In your project, go to **Deployments** and create a new deployment with your chosen model (for example, GPT-4).
    3. Once you have a deployment, copy the following credentials to create a provider profile in Agent Studio:
       * **Azure endpoint URL**: found in your project settings (for example, `https://your-name-here.openai.azure.com/`).
       * **API key**: found under **Keys and Endpoint** (sometimes known as the subscription key).
       * **Azure deployment name**: the name you assigned to your deployment (for example, `my-gpt4-deployment`).
       * **API version**: the API version to use (for example, `2024-12-01-preview`).

    {/* vale Algolia.Ampersand = YES */}

    For more information, see [Azure OpenAI documentation](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/latest).
  </Tab>

  <Tab title="Google Gemini">
    Agent Studio supports Google Gemini models using the Generative AI API.

    #### Supported models

    `gemini-3.5-flash`, `gemini-3.1-flash-lite`, `gemini-3.1-pro-preview`, `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`

    <Note>
      Google manages the Gemini model lifecycle, including when a preview model is promoted to general availability (GA) or deprecated.
      Algolia keeps the selectable model list current on its side.

      When Google deprecates a preview model, agents still configured with that model ID are migrated automatically to the GA equivalent (for example, `gemini-3.1-flash-lite-preview` to `gemini-3.1-flash-lite`), so they keep working without changes.
      To switch to a newer model, select it in **Provider and model**.
    </Note>

    #### Configuration requirements

    * Google Gemini API key (required)

    #### Where to get your API key

    {/* vale Google.WordList = NO */}

    1. Go to [Google AI Studio](https://aistudio.google.com/api-keys) and sign in with your Google account.
    2. Click **Create API key** (or **Get API key**) and name it.
    3. For **Choose an imported project**, click **Create project** and name it (if you don't have a project yet).
    4. Click **Create key**.
    5. Copy the API key and store it securely.

    {/* vale Google.WordList = YES */}

    <Note>
      Google AI Studio offers a free usage tier for Gemini. However, be aware of the [usage limits](https://ai.google.dev/gemini-api/docs/rate-limits) for the Gemini API on the free tier.
    </Note>

    For more information, see [Gemini API documentation](https://ai.google.dev/gemini-api/docs/api-key).
  </Tab>

  <Tab title="OpenAI-compatible">
    Agent Studio supports any provider that implements the [OpenAI API specification](https://platform.openai.com/docs/api-reference/introduction).

    {/* vale Vale.Spelling = NO */}

    This includes, but is not limited to: OpenRouter, LiteLLM, Groq, Mistral AI, Together AI, DeepSeek, Hugging Face Inference API, and custom or self-hosted LLM deployments.

    {/* vale Vale.Spelling = YES */}

    #### Configuration requirements

    * API key for the compatible service (required)
    * Base URL endpoint (required)
    * Model name (required, as supported by your endpoint)

    #### Provider comparison

    {/* vale Vale.Spelling = NO */}

    | Provider         | Key benefits                                                                                                                                                                                                                                                       | Base URL                           |
    | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------- |
    | **Groq**         | Fast response times using hardware optimized for LLM inference. For more information about OpenAI compatibility, see [Groq's documentation](https://console.groq.com/docs/openai)                                                                                  | `https://api.groq.com/openai/v1`   |
    | **Hugging Face** | Access to multiple backend providers through one interface. [Official documentation](https://huggingface.co/docs/inference-providers/index#alternative-openai-compatible-chat-completions-endpoint-chat-only)                                                      | `https://router.huggingface.co/v1` |
    | **LiteLLM**      | Unified interface for multiple providers with standardized integration, routing, logging, and governance. For more information about OpenAI-compatible endpoints, see [LiteLLM's documentation](https://docs.litellm.ai/docs/providers/openai_compatible)          | Depends on deployment              |
    | **Mistral AI**   | Instruction-tuned models focused on accuracy and performance. For more information, see [Mistral's API documentation](https://docs.mistral.ai/api)                                                                                                                 | `https://api.mistral.ai/v1`        |
    | **OpenRouter**   | Access to numerous models (Grok, DeepSeek, and more) with routing and automatic fallback for consistent uptime. For more information about how to use the OpenAI SDK, see [OpenRouter's documentation](https://openrouter.ai/docs/quickstart#using-the-openai-sdk) | `https://openrouter.ai/api/v1`     |
    | **Together AI**  | Model-hosting ecosystem for open source models with flexible deployment options. For more information about OpenAI compatibility, see [Together AI's documentation](https://docs.together.ai/docs/openai-api-compatibility)                                        | `https://api.together.xyz/v1`      |
    | **DeepSeek**     | Cost-effective reasoning models with OpenAI-compatible API. For more information, see [DeepSeek's API documentation](https://platform.deepseek.com/api-docs)                                                                                                       | `https://api.deepseek.com/v1`      |

    {/* vale Vale.Spelling = YES */}

    #### Example use cases

    * **Groq**: Low-latency apps requiring fast response times.
    * **Mistral AI**: European data residency requirements with strong performance.
    * **OpenRouter**: route requests across multiple providers for redundancy.
    * **Together AI**: Experimentation with open source models.
    * **DeepSeek**: Cost-effective reasoning capabilities with competitive performance.
  </Tab>
</Tabs>

<Note>
  To request a provider that isn't listed here,
  contact the [Algolia support team](https://www.algolia.com/support/?contact=).
</Note>

## Add a provider

1. Go to the [**Settings**](https://dashboard.algolia.com/generativeAi/agent-studio/settings/providers) page in the Agent Studio dashboard
2. Click **Create provider profile**, and select your provider type
3. Enter a name for this provider configuration (for example, "OpenAI-Production" or "Azure-EU-Prod") and fill in the required configuration fields
4. Click **Save** to complete the setup

<img src="https://mintcdn.com/algolia/WOi5v-PGZrMZ2rOj/images/generative-ai/agent-studio/dashboard/agent-studio-profile.jpg?fit=max&auto=format&n=WOi5v-PGZrMZ2rOj&q=85&s=edfc209c646c8466ba8145c1c00cfe9d" alt="Add a provider" width="1340" height="1072" data-path="images/generative-ai/agent-studio/dashboard/agent-studio-profile.jpg" />

Your provider is now available for use when configuring agents.

## Use your provider

Go to the [Agent Studio page in the dashboard](https://dashboard.algolia.com/generativeAi/agent-studio/agents) and select your agent.
In **Provider and model**, select your LLM provider and choose a model.

<img src="https://mintcdn.com/algolia/WOi5v-PGZrMZ2rOj/images/generative-ai/agent-studio/dashboard/agent-studio-dashboard-model-selection.png?fit=max&auto=format&n=WOi5v-PGZrMZ2rOj&q=85&s=343973cc3e463843221fd4d594baae0d" alt="Screenshot of a 'Change provider' dialog with 'OpenRouteur' selected among options for 'OpenAI EU' and 'Algolia sandbox', and a 'Confirm' button." width="1308" height="946" data-path="images/generative-ai/agent-studio/dashboard/agent-studio-dashboard-model-selection.png" />

You can switch providers or models at any time.
Changes take effect immediately.

## Manage providers

To update or delete providers,
go to Agent Studio's [**Settings**](https://dashboard.algolia.com/generativeAi/agent-studio/providers) and click the provider's action menu  <Icon icon="ellipsis-vertical" />.

Provider updates affect all agents using that provider.
If you delete a provider that's in use, those agents will stop working until you assign a different provider.

## Advanced model capabilities

Different models support different configuration parameters.
Agent Studio automatically detects and applies appropriate settings based on the model you select.

<Tabs>
  <Tab title="Temperature support">
    Most models support [temperature](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create) configuration (0.0 to 2.0) to control randomness in responses.
    Use:

    * **Lower values (0.0-0.5)** for more deterministic, focused responses.
    * **Higher values (1.0-2.0)** for more creative and varied responses.

    By default, Agent Studio doesn't apply a temperature value. Models use their provider's default (typically 1.0).

    You can set the temperature in your agent configuration:

    ```json theme={"system"}
    {
      "config": {
        "temperature": 0.7
      }
    }
    ```

    **Models that support temperature:**

    * All Anthropic Claude models
    * All Google Gemini models
    * Most OpenAI GPT models (except GPT-5 and o-series)
    * Most OpenAI-compatible models

    **Models that don't support temperature:**

    * GPT-5 series models
    * o-series models (`o1`, `o3`, `o4`)

    When temperature isn't supported, it's automatically excluded from requests.
  </Tab>

  <Tab title="Reasoning models">
    Some models support advanced reasoning capabilities with different configuration options depending on the provider and model series.

    #### Turn reasoning on or off

    The parameter that controls reasoning differs by provider and model. To turn reasoning off:

    | Provider and model                 | Turn reasoning off                                                                                                 | Default                           |
    | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------- |
    | Google Gemini 2.5 (`gemini-2.5-*`) | `thinking_budget: 0`                                                                                               | `thinking_budget: -1` (automatic) |
    | Google Gemini 3.x (`gemini-3-*`)   | Not supported. The lowest setting is `thinking_level: "low"`, and `thinking_budget` isn't applied to these models. | `thinking_level: "high"`          |
    | Anthropic Claude                   | `thinking: {"type": "disabled"}`                                                                                   | Off                               |
    | OpenAI o-series and GPT-5          | Not supported. These models always reason.                                                                         | Reasoning on                      |

    `sendReasoning` controls whether reasoning *output* is returned to the caller, not whether the model reasons.

    #### OpenAI o-series models

    OpenAI o-series models (`o3`, `o3-mini`, `o4-mini`) use extended reasoning to solve complex problems.
    These models don't support temperature or custom [reasoning](https://platform.openai.com/docs/guides/reasoning) parameters.
    They analyze problems step-by-step before generating responses,
    which can improve accuracy for complex queries but increases latency and token usage.

    #### OpenAI GPT-5 series models

    GPT-5 models support specialized parameters for controlling text generation and reasoning behavior.

    **Text parameters:**

    * `text.verbosity`: Controls output verbosity
      * Valid values: `"low"`, `"medium"`, `"high"`

    **Reasoning parameters:**

    * `reasoning.effort`: Controls reasoning depth (defaults to `"minimal"`)
      * Valid values: `"minimal"`, `"low"`, `"medium"`, `"high"`
    * `reasoning.summary`: Controls summary format
      * Valid values: `"auto"`, `"concise"`, `"detailed"`

    Configure these parameters in your agent configuration:

    ```json theme={"system"}
    {
      "config": {
        "text": {
          "verbosity": "medium"
        },
        "reasoning": {
          "effort": "high",
          "summary": "detailed"
        }
      }
    }
    ```

    **Important notes:**

    * Temperature isn't supported for GPT-5 models.
    * Use `text.verbosity` instead of `reasoning.verbosity`.
    * Invalid values are logged as errors and ignored.

    For complete parameter specifications and valid values, see [OpenAI GPT-5 documentation](https://platform.openai.com/docs).

    #### Google Gemini reasoning models

    Google Gemini models support reasoning capabilities with different configuration options depending on the model version.

    **Gemini 3 models** (`gemini-3-pro-preview`)

    Gemini 3 uses the `thinking_level` parameter to control reasoning depth:

    * `thinking_level`: Controls reasoning effort (defaults to `"high"`)
      * Valid values: `"low"`, `"medium"`, `"high"`
      * Gemini 3.x can't turn reasoning off. The lowest setting is `"low"`, and `thinking_budget` isn't applied to these models.

    Configure in your agent configuration:

    ```json theme={"system"}
    {
      "config": {
        "thinking_level": "high"
      }
    }
    ```

    **Gemini 2.5 models** (`gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-2.5-flash-lite`)

    Gemini 2.5 models use the `thinking_budget` parameter to control reasoning token allocation:

    * `thinking_budget`: Controls reasoning token budget
      * `-1`: Automatic (default, lets the model decide)
      * `0`: Disabled (no reasoning)
      * `512-24576`: Custom token budget within Google's API limits

    Configure in your agent configuration:

    ```json theme={"system"}
    {
      "config": {
        "thinking_budget": 2048
      }
    }
    ```

    **Important notes:**

    * Invalid values are raised as errors.
    * Higher reasoning effort increases latency and token usage.
    * For complete specifications, see the [Gemini API documentation](https://ai.google.dev/gemini-api/docs).

    #### Other providers

    Configuration options for reasoning models are provider-specific.

    * For other OpenAI-compatible providers, consult their documentation for reasoning model support details.

    Agent Studio automatically detects and applies appropriate parameters based on the model and provider you select.
  </Tab>
</Tabs>

## See also

* [Get started with the Agent Studio dashboard](/doc/guides/algolia-ai/agent-studio/how-to/dashboard)
* [Tips for writing efficient prompts](/doc/guides/algolia-ai/agent-studio/how-to/prompting)
* [Integrate Agent Studio](/doc/guides/algolia-ai/agent-studio/how-to/integration)
