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_KEYto your OpenAI API key
Anthropic (Claude)
Set
ANTHROPIC_API_KEYto your Anthropic API key
Gemini (Google)
Set
GEMINI_API_KEYto your Google API key
Available Model Providers (Enterprise)
If you are a Mito Enterprise user, you can configure Mito to use your enterprise LLM providers. If you have questions about Mito Enterprise, please contact [email protected].
There are several benefits to using enterprise model providers:
LLM Model Lockdown: AI calls ONLY go to IT-approved LLM models. End users cannot change to unapproved LLM models
Telemetry Elimination: No telemetry is sent to Mito servers
Azure Open AI
Set the following environment variables:
Set
AZURE_OPENAI_API_KEYto your Azure OpenAI API keySet
AZURE_OPENAI_API_VERSIONto specify the API versionSet
AZURE_OPENAI_ENDPOINTto your Azure OpenAI endpoint URLSet
AZURE_OPENAI_MODELto specify the deployed model name
Lite LLM
To use LiteLLM, you must set the following environment variables:
Set
LITELLM_BASE_URLto your LiteLLM server endpoint. ex:https://my-litellm-server.comSet
LITELLM_MODELSas 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_KEYto 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_URLto your Abacus endpoint. For most users, this will behttps://routellm.abacus.ai/v1Set
ABACUS_MODELSas 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_KEYto 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
Create a
.envfile in your Jupyter config directory:
Create or modify your
jupyter_server_config.pyfile 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.
Open the Jupyter config directory:
Open (or create) the file:
Update the main JSON object to include your environment variables under
serverEnvVars:Launch Mito Desktop.
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.
Click Environment Variables….
In the Environment Variables window, under User variables for <your username>, click New….
Enter the variable name and value, then click OK to save.
Fully restart Mito Desktop.
To verify the variable was set, open a notebook and run:

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:
Close any open terminals.
Restart Mito Desktop.
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?