Configuring AI Provider Keys

This page explains how to configure Mito Data Copilot to use your own AI API keys instead of the Mito server.

By default, Mito uses our server to send AI requests to the model provider. If instead you want to use your own AI API keys, you can set the following configuration options.

Available Model Providers (Open Source)

If you want to use your own API key instead of ours, you can set the following environment variables depending on which model you want to use. By setting your own API key, you can send unlimited AI requests with Mito without hitting the 150 completion request limit.

If you're not sure how to set an environment variable, read our instructions here.

OpenAI

  • Set OPENAI_API_KEY to your OpenAI API key

Anthropic (Claude)

  • Set ANTHROPIC_API_KEY to your Anthropic API key

Gemini (Google)

  • Set GEMINI_API_KEY to your Google API key

Available Model Providers (Enterprise)

If you are a Mito Enterprisearrow-up-right user, you can configure Mito to use your enterprise LLM providers. If you have questions about Mito Enterprise, please contact [email protected]envelope.

There are several benefits to using enterprise model providers:

  1. LLM Model Lockdown: AI calls ONLY go to IT-approved LLM models. End users cannot change to unapproved LLM models

  2. Telemetry Elimination: No telemetry is sent to Mito servers

Azure Open AI

Set the following environment variables:

  • Set AZURE_OPENAI_API_KEY to your Azure OpenAI API key

  • Set AZURE_OPENAI_API_VERSION to specify the API version

  • Set AZURE_OPENAI_ENDPOINT to your Azure OpenAI endpoint URL

  • Set AZURE_OPENAI_MODEL to specify the deployed model name

Lite LLM

To use LiteLLM, you must set the following environment variables:

  • Set LITELLM_BASE_URL to your LiteLLM server endpoint. ex: https://my-litellm-server.com

  • Set LITELLM_MODELS as a comma-separated list of approved model names for users to select from. ex: "litellm/openai/gpt-4o,litellm/anthropic/claude-4-5-sonnet"

    • Model names must be formatted as litellm/<provider>/<model> (e.g., "litellm/openai/gpt-4o")

    • Users will default to the first model that you provide.

  • Set LITELLM_API_KEY to the user's API key for authentication with the LiteLLM server.

Abacus AI

To use LiteLLM, you must set the following environment variables:

  • Set ABACUS_BASE_URL to your Abacus endpoint. For most users, this will be https://routellm.abacus.ai/v1

  • Set ABACUS_MODELS as a comma-separated list of approved model names for users to select from. ex: "abacus/gpt-4.1,abacus/abacus/gpt-5"

    • Model names must be prefixed by abacus (e.g., "abacus/gpt-4o")

    • Users will default to the first model that you provide.

    • For best performance with Abacus, use OpenAI models only.

  • Set ABACUS_API_KEY to the user's API key for authentication with the Abacus AI.

Setting Up Environment Variables

The following steps are only for the mito-ai pip package. If you are using Mito Desktop, please see the instructions below.

Note that environment variables must be set before launching JupyterLab, as they are read when the Mito server extension initializes during startup.

Method 1: System Environment Variables

Set environment variables at the system level before starting JupyterLab:

On Windows:

On macOS/Linux:

Method 2: .env File with jupyter_server_config.py

  1. Create a .env file in your Jupyter config directory:

  1. Create or modify your jupyter_server_config.py file to load these variables on startup:

Method 3: Shell Configuration

Add the environment variables to your shell's configuration file for permanent setup:

On Windows:

Add environment variables through System Properties > Environment Variables.

On macOS/Linux:

Add to your .bashrc, .zshrc, or equivalent:

Setting Environment Variables on Mito Desktop

When using Mito Desktop, the steps for setting environment variables vary by operating system. Follow the instructions below for your platform.

macOS

On macOS, environment variables can be configured directly through Mito Desktop’s Jupyter settings.

  1. Open the Jupyter config directory:

  2. Open (or create) the file:

  3. Update the main JSON object to include your environment variables under serverEnvVars:

  4. Launch Mito Desktop.

  5. In a new notebook cell, verify the variable was set:

Windows

Option 1: Using the Windows GUI (recommended)

From the Start Menu, search for “Edit the system environment variables” and open it.

  1. Click Environment Variables….

  2. In the Environment Variables window, under User variables for <your username>, click New….

  3. Enter the variable name and value, then click OK to save.

  4. Fully restart Mito Desktop.

To verify the variable was set, open a notebook and run:

Steps for adding a new environment variable on Windows

Option 2: Using the terminal

If you prefer the command line, you can set the environment variable using PowerShell or Command Prompt:

After running this command:

  1. Close any open terminals.

  2. Restart Mito Desktop.

  3. Verify the variable in a notebook cell:

Data Protection Considerations

Remember that when using external AI providers:

  • Private data in dataframe names, column headers, or the first five rows of data might be shared with the AI provider

  • To maximize data protection, Mito Enterprise users can connect to a self-hosted model

Last updated

Was this helpful?