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

# Using Snowflake Cortex for Omni AI

> Configure Snowflake Cortex as an AI model provider in Omni.

Snowflake Cortex provides access to industry-leading large language models (LLMs) hosted directly within your Snowflake infrastructure. By connecting Cortex to Omni, you can power features like the [Workbook Agent](/ai/queries) and [Dashboard Agent](/ai/dashboard-assistant) without your data ever leaving the Snowflake security boundary. Because the LLMs are hosted within Snowflake, your metadata and query context remain governed by Snowflake's existing security and compliance framework.

## Limitations

Currently, only Claude models are supported for this integration:

* **Query models** - Claude 4.5 Sonnet, Claude 4 Sonnet, Claude 4.5 Opus, Claude 4 Opus, Claude 3.7 Sonnet, Claude 3.5 Sonnet.
* **Text models** - Claude 4.5 Haiku, Claude 3.5 Haiku.

## Requirements

To follow the steps in this guide, you'll need:

* **Organization Admin** permissions in Omni
* **In Snowflake, permissions that allow you to**:
  * Grant roles to database users
  * Manage network policies
  * Enable cross-region inference (for Claude model availability)
  * Create a Programmatic Access Token (PAT). This token serves as the **API Key** in your Omni configuration. See the [Snowflake PAT documentation](https://docs.snowflake.com/en/user-guide/programmatic-access-tokens) for how to create one.

    <Warning>
      Snowflake is phasing out single-factor password authentication by **October 2026**. Ensure you are using PATs for your Cortex API configuration to avoid future service interruptions.
    </Warning>

## Snowflake setup

Complete the following setup within your Snowflake instance before configuring Cortex in Omni.

<Steps>
  <Step title="Grant Cortex access">
    The Snowflake role used for your Omni connection must have the `CORTEX_USER` database role. Run the following to grant this role if the Omni user doesn't currently have it:

    ```sql theme={null}
    GRANT DATABASE ROLE SNOWFLAKE.CORTEX_USER TO ROLE <your_omni_role>;
    ```
  </Step>

  <Step title="Enable cross-region support">
    To ensure model availability (particularly for Claude models), enable cross-region inference. This allows Snowflake to route requests to regions where specific models are hosted:

    ```sql theme={null}
    ALTER ACCOUNT SET CORTEX_ENABLED_CROSS_REGION = 'ANY_REGION';
    ```
  </Step>

  <Step title="Configure network policies">
    If your Snowflake account uses network policies, you'll need to allow Omni's egress IP addresses to permit the API traffic. You can find these IPs on the **Connection** setup page in Omni.

    After you retrieve Omni's IP addresses, run the following:

    ```sql theme={null}
    CREATE NETWORK POLICY IF NOT EXISTS cortex_api_policy
      ALLOWED_IP_LIST = ('<omni_ips>');
    ```
  </Step>
</Steps>

## Omni configuration

After you complete the setup in Snowflake, you can add Snowflake as your AI provider in Omni.

<Steps>
  <Step>
    In Omni, navigate to **Settings > AI** and ensure **Enable AI** is toggled on.
  </Step>

  <Step>
    Select the **Model** tab.
  </Step>

  <Step>
    In the **Provider** dropdown, select **Snowflake Cortex**.
  </Step>

  <Step>
    Configure the following fields:

    | Field           | Description                                                                                                            |
    | :-------------- | :--------------------------------------------------------------------------------------------------------------------- |
    | **Base URL**    | Your Cortex API endpoint: `https://[account_identifier].snowflakecomputing.com/api/v2/cortex/v1`                       |
    | **API Key**     | Your Snowflake [Programmatic Access Token (PAT)](https://docs.snowflake.com/en/user-guide/programmatic-access-tokens). |
    | **Query model** | The model used for generating SQL (e.g., `claude-3-7-sonnet`).                                                         |
    | **Text model**  | The model used for text processing and summaries (e.g., `claude-3-5-haiku`).                                           |
  </Step>

  <Step>
    Click **Save**.
  </Step>
</Steps>

## Troubleshooting

* **Insufficient privileges:** Ensure the role associated with your PAT has been granted the `SNOWFLAKE.CORTEX_USER` database role.
* **Region errors:** If you receive errors regarding model availability, verify that `CORTEX_ENABLED_CROSS_REGION` is set to `'ANY_REGION'`.
* **Network blocks:** Double-check that all Omni egress IPs are included in your Snowflake Network Policy's `ALLOWED_IP_LIST`.

## Related

* [AI in Omni](/ai)
* [AI settings](/ai/settings)
* [Alternative model providers][model-providers]

[model-providers]: /ai/settings/model-providers
