Installation¶
Lumen works with Python 3.11+ on Linux, Windows, and Mac.
Already installed?
Jump to the Quick Start to start chatting with your data.
Using conda?
Lumen is on conda-forge, and the plain install is all you need for OpenAI and every OpenAI-compatible provider:
Providers with their own client library, such as Anthropic or Google, need that package too, for example conda install -c conda-forge anthropic.
Bring Your Own LLM¶
Lumen works with any LLM provider. Choose the approach that fits your needs:
- ☁️ Cloud providers — OpenAI, Anthropic, Google, Mistral, Azure, Groq (easiest to get started)
- 🖥️ Locally hosted — Ollama, Llama.cpp, MLX (free, runs on your machine, no API keys)
- 🔀 Router/Multi-provider — Kilo, OpenRouter, LiteLLM, AWS Bedrock (unified interface, many providers and models)
- 💻 Coding CLIs — Codex, Claude Code, GitHub Copilot, Antigravity (use a CLI you are already signed in to, no API key)
pip install lumen is all you need for OpenAI, every OpenAI-compatible provider (OpenRouter, Kilo, Groq, Ollama, AI Navigator, AI Catalyst) and the coding CLIs. Anthropic, Google, Mistral, AWS Bedrock, Llama.cpp and LiteLLM need their client library, which the matching extra below installs.
Cloud Service Providers¶
Use hosted LLM APIs from major providers. Fastest to set up, pay-per-use pricing.
Get your API key:
- Visit platform.openai.com/api-keys
- Click "Create new secret key"
- Copy the key (starts with
sk-) - Set environment variable:
Get your API key:
- Visit console.anthropic.com/settings/keys
- Click "Create Key"
- Copy the key (starts with
sk-ant-) - Set environment variable:
Get your API key:
- Visit aistudio.google.com/apikey
- Click "Create API key"
- Choose "Create API key in new project" or select existing project
- Copy the key (starts with
AIza) - Set environment variable:
# macOS/Linux
export GEMINI_API_KEY='your-key-here'
# Windows PowerShell
$env:GEMINI_API_KEY='your-key-here'
# Windows CMD
set GEMINI_API_KEY=your-key-here
Alternative: You can also use GOOGLE_API_KEY instead of GEMINI_API_KEY.
Get your API key:
- Visit console.mistral.ai/api-keys
- Click "Create new key"
- Copy the key
- Set environment variable:
pip install lumen
export AZUREAI_ENDPOINT_KEY=your-key
export AZUREAI_ENDPOINT_URL=https://your-resource.openai.azure.com/
Get your credentials:
- Visit portal.azure.com
- Navigate to your Azure OpenAI resource
- Go to "Keys and Endpoint"
- Copy KEY 1 or KEY 2 and your endpoint URL
- Set environment variables:
# macOS/Linux
export AZUREAI_ENDPOINT_KEY='your-key-here'
export AZUREAI_ENDPOINT_URL='https://your-resource.openai.azure.com/'
# Windows PowerShell
$env:AZUREAI_ENDPOINT_KEY='your-key-here'
$env:AZUREAI_ENDPOINT_URL='https://your-resource.openai.azure.com/'
# Windows CMD
set AZUREAI_ENDPOINT_KEY=your-key-here
set AZUREAI_ENDPOINT_URL=https://your-resource.openai.azure.com/
pip install 'lumen[ai-mistralai]'
export AZUREAI_ENDPOINT_KEY=your-key
export AZUREAI_ENDPOINT_URL=https://your-resource-endpoint.com/
Get your credentials:
- Visit portal.azure.com
- Navigate to your Azure AI resource with Mistral deployment
- Go to "Keys and Endpoint"
- Copy KEY 1 or KEY 2 and your endpoint URL
- Set environment variables (same as Azure OpenAI above)
Groq serves open models through an OpenAI-compatible API. Lumen uses openai/gpt-oss-120b by default.
Get your API key:
- Visit console.groq.com/keys
- Click "Create API Key"
- Set the
GROQ_API_KEYenvironment variable, then start Lumen with--provider groqor let it auto-detect the key
Locally Hosted¶
Run open-source LLMs on your own machine. No API keys required, full privacy, free to use.
Setup Ollama:
- Install Ollama from ollama.com
- Start the Ollama service (usually starts automatically)
- Pull a model:
- (Optional) Point Lumen at an Ollama server that is not on
localhost:11434:
No additional environment variables needed! Ollama works out of the box.
No setup required! The first time you use Llama.cpp, Lumen will automatically download the model you specify. No environment variables needed.
Optional: Set a custom model URL:
Runs models natively on Apple Silicon, either in-process or through a local mlx_lm.server. Start Lumen with --provider mlx. See MLX for both modes.
Anaconda AI Navigator runs models locally on your machine. No API key needed!
Setup AI Navigator:
- Open AI Navigator.
- Navigate to the API Server tab (⚡ icon).
- Select a model and click Start.
Default endpoint: http://localhost:8080/v1
Optional: Set custom endpoint:
Anaconda AI Catalyst provides enterprise-ready, governed models running on your private infrastructure.
Get your credentials:
- Log in to your AI Catalyst dashboard
- Go to Model Servers, launch or select a server, and copy the Server Address
- Go to your profile icon > API Keys and create/copy a key
- Set environment variables:
Router / Multi-Provider¶
Use a unified interface to access multiple LLM providers and models.
Kilo provides an OpenAI-compatible API for accessing models from multiple providers through a single API key or its free tier.
The free tier needs no API key: run lumen-ai serve --provider kilo and skip the steps below. Get a key to use paid models.
Get your API key:
- Visit app.kilo.ai/profile
- Scroll down and click copy API key
- Set environment variable:
# macOS/Linux
export KILO_API_KEY='your-key-here'
# Windows PowerShell
$env:KILO_API_KEY='your-key-here'
# Windows CMD
set KILO_API_KEY=your-key-here
Then use Kilo with any supported model:
OpenRouter provides an OpenAI-compatible API for accessing models from multiple providers through a single API key.
Get your API key:
- Visit openrouter.ai/keys
- Create or copy an API key
- Set environment variable:
# macOS/Linux
export OPENROUTER_API_KEY='sk-or-your-key-here'
# Windows PowerShell
$env:OPENROUTER_API_KEY='sk-or-your-key-here'
# Windows CMD
set OPENROUTER_API_KEY=sk-or-your-key-here
Then use OpenRouter with any supported model:
Supports 100+ models across OpenAI, Anthropic, Google, Mistral, and more.
Set environment variables for providers you want to use:
Then use any supported model:
AWS Bedrock is a managed gateway that provides access to foundation models from Anthropic, Meta, Mistral, Amazon, Cohere, and AI21 through a unified API.
pip install 'lumen[ai-anthropic,ai-bedrock]' # For AnthropicBedrock
# OR
pip install 'lumen[ai-bedrock]' # For Bedrock
Authentication:
Choose your Lumen provider:
Optimized for Claude models using Anthropic's SDK.
Universal access to all Bedrock models using boto3.
import lumen.ai as lmai
llm = lmai.llm.Bedrock(
model_kwargs={
"default": {"model": "us.anthropic.claude-haiku-4-5-20251001-v1:0"},
}
)
ui = lmai.ExplorerUI(data='data.csv', llm=llm)
ui.servable()
Available models:
- Anthropic (Claude), Amazon (Nova), Qwen, DeepSeek, Mistral, Meta (Llama), and more
- Model IDs:
us.anthropic.claude-*,us.amazon.nova-*,qwen.*,deepseek.*,mistral.* - Full model list
IAM Permissions:
Coding CLIs¶
Run Lumen through a command-line coding agent you are already signed in to, so no API key is needed. These providers are meant for local use, not shared deployments.
pip install lumen
lumen-ai serve penguins.csv --provider claude-code # Claude Code
lumen-ai serve penguins.csv --provider codex-cli # Codex CLI
lumen-ai serve penguins.csv --provider copilot-cli # GitHub Copilot CLI, any plan
lumen-ai serve penguins.csv --provider antigravity-cli # Antigravity CLI
Install and sign in to the CLI first; see Codex CLI and Claude Code, GitHub Copilot CLI and Antigravity CLI for setup and limits.
Optional extras¶
Add extras for data sources and features beyond the LLM provider:
| Extra | Adds |
|---|---|
sql |
SQLAlchemy, for PostgreSQL, MySQL, SQLite, Oracle and SQL Server |
snowflake |
Snowflake connector |
bigquery |
Google BigQuery |
xarray |
NetCDF, Zarr and HDF5 through xarray |
xarray-grib |
GRIB files, on top of xarray |
geo |
GeoJSON, WKT and shapefiles through GeoPandas |
chromadb |
ChromaDB vector store |
ai-transformers |
Local sentence-transformers embeddings |
ai-monty |
Sandboxed Python calculations for agents |
mcp |
MCPTool, to give agents tools from MCP servers |
Making Environment Variables Persistent¶
Set variables permanently so you don't have to export them every session:
Add to ~/.bashrc or ~/.bash_profile:
- Search for "Environment Variables" in Start Menu
- Click "Edit the system environment variables"
- Click "Environment Variables"
- Under "User variables", click "New"
- Add variable name (e.g.,
OPENAI_API_KEY) and value - Click OK
- Restart your terminal
Verify Installation¶
Test your LLM connection:
# Test script
import lumen.ai as lmai
llm = lmai.llm.OpenAI() # or Anthropic(), Google(), etc.
ui = lmai.ExplorerUI(data='test.csv', llm=llm)
ui.servable()
Next Steps¶
Ready to start? Head to the Quick Start guide to chat with your first dataset.
Missing Your Favorite LLM?¶
Missing your favorite LLM? Let us know by submitting a GitHub issue!