tota supports multiple AI providers. You can configure one or more providers, select a default model, and use automatic fallback when the primary fails.
#Quick setup (recommended)
- Create an API key from your provider (links below).
- Run the interactive setup:
tota setup llm - Paste the key when prompted and pick a model from the fetched list.
- Repeat for any extra providers you want in the fallback chain.
- Verify your configuration:
tota status
If you need to change providers later, rerun tota setup llm.
Keys are saved to ~/.tota/.env. Provider order and model defaults are saved to ~/.tota/tota.yaml.
#Supported providers and key links
| Provider | Key env var | Get API key | Local |
|---|---|---|---|
| OpenAI | OPENAI_API_KEY | https://platform.openai.com/api-keys | No |
| Anthropic | ANTHROPIC_API_KEY | https://console.anthropic.com/settings/keys | No |
| DeepSeek | DEEPSEEK_API_KEY | https://platform.deepseek.com/api_keys | No |
| Grok (xAI) | GROK_API_KEY | https://console.x.ai/ | No |
| Groq | GROQ_API_KEY | https://console.groq.com/keys | No |
| Ollama Cloud | OLLAMA_CLOUD_API_KEY | https://ollama.com/settings | No |
| Ollama Local | (none) | https://ollama.com/download | Yes |
| NVIDIA NIM | NVIDIA_API_KEY | https://build.nvidia.com/settings/api-keys | No |
| OpenRouter | OPENROUTER_API_KEY | https://openrouter.ai/keys | No |
| MiMo (Xiaomi) | MIMO_API_KEY | https://api.xiaomimimo.com | No |
| MiMo Token Plan | MIMO_TOKEN_PLAN_API_KEY | https://token-plan-cn.xiaomimimo.com | No |
| OpenAI-compatible (custom) | OPENAI_COMPAT_API_KEY | Use your provider console | Depends |
#Provider signup steps (official links)
Most pages require login. If a link redirects, sign in and look for API keys or Developer settings in the account menu.
#OpenAI
- Open https://platform.openai.com/api-keys and sign in.
- Click Create API Key.
- Copy the key and store it safely.
#Anthropic
- Open https://console.anthropic.com/settings/keys (redirects to Claude Console).
- Click Create key and copy it.
#DeepSeek
- Open https://platform.deepseek.com/api_keys and sign in.
- Create a new key and copy it.
#Grok (xAI)
- Open https://console.x.ai/ and sign in.
- Go to API keys and generate a key.
#Groq
- Open https://console.groq.com/keys and sign in.
- Click Create API Key, copy the key (starts with
gsk_).
#Ollama Cloud
- Open https://ollama.com/settings and sign in.
- Create an API key under API Keys.
#Ollama Local
- Install Ollama from https://ollama.com/download.
- Pull a model (example below).
#NVIDIA NIM
- Open https://build.nvidia.com/settings/api-keys and sign in.
- Create an API key in the settings page.
#OpenRouter
- Open https://openrouter.ai/keys and sign in.
- Create a key in your workspace.
#MiMo (Xiaomi)
- Sign in to the MiMo developer portal (start at https://api.xiaomimimo.com).
- Create an API key in your account settings.
#Manual configuration (optional)
If you prefer not to use the wizard, add keys and settings to ~/.tota/.env and restart tota. Model names are examples; choose from your provider's model list.
# OpenAI
OPENAI_API_KEY=sk-your-key
OPENAI_MODEL=gpt-4o-mini
# Anthropic
ANTHROPIC_API_KEY=your-key
ANTHROPIC_MODEL=claude-sonnet-4-20250514
# DeepSeek
DEEPSEEK_API_KEY=sk-your-key
DEEPSEEK_BASE_URL=https://api.deepseek.com/v1
DEEPSEEK_MODEL=deepseek-chat
# Grok (xAI)
GROK_API_KEY=your-key
GROK_BASE_URL=https://api.x.ai/v1
GROK_MODEL=grok-4
# Groq
GROQ_API_KEY=gsk_your-key
GROQ_BASE_URL=https://api.groq.com/openai/v1
GROQ_MODEL=llama-3.3-70b-versatile
# Ollama Cloud
OLLAMA_CLOUD_API_KEY=your-key
OLLAMA_CLOUD_BASE_URL=https://ollama.com/v1
OLLAMA_CLOUD_MODEL=gpt-oss:120b
# Ollama Local (no key required)
OLLAMA_LOCAL_BASE_URL=http://127.0.0.1:11434/v1
OLLAMA_LOCAL_MODEL=qwen3.5:2b
OLLAMA_LOCAL_ENABLED=true
# OpenAI-compatible (custom)
OPENAI_COMPAT_API_KEY=your-key
OPENAI_COMPAT_BASE_URL=https://your-openai-compatible-host/v1
OPENAI_COMPAT_MODEL=your-model
OPENAI_COMPAT_ENABLED=true
# NVIDIA NIM
NVIDIA_API_KEY=nvapi-your-key
NVIDIA_BASE_URL=https://integrate.api.nvidia.com/v1
NVIDIA_MODEL=nvidia/nemotron-3-super-120b-a12b
# OpenRouter
OPENROUTER_API_KEY=sk-or-your-key
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
OPENROUTER_MODEL=openrouter/auto
# MiMo (Xiaomi)
MIMO_API_KEY=sk-your-key
MIMO_BASE_URL=https://api.xiaomimimo.com/v1
MIMO_MODEL=mimo-v2.5-pro
# MiMo Token Plan
MIMO_TOKEN_PLAN_API_KEY=tp-your-key
MIMO_TOKEN_PLAN_BASE_URL=https://token-plan-cn.xiaomimimo.com/v1
MIMO_TOKEN_PLAN_MODEL=mimo-v2.5-pro
MIMO_TOKEN_PLAN_ENABLED=true
# Default provider (optional)
DEFAULT_PROVIDER=deepseek
#Provider-specific notes
#OpenAI-compatible (custom)
Use this when you have a self-hosted or third-party OpenAI-compatible endpoint.
- Set
OPENAI_COMPAT_BASE_URLto the provider base URL. - Set
OPENAI_COMPAT_MODELto the model name they expose. - Add
OPENAI_COMPAT_API_KEYif the endpoint requires it.
#Ollama Local
- Install Ollama from https://ollama.com/download.
- macOS: download the DMG from the site.
- Linux:
curl -fsSL https://ollama.com/install.sh | sh
- Pull a model:
ollama pull qwen3.5:2b - Keep
OLLAMA_LOCAL_BASE_URLpointed athttp://127.0.0.1:11434/v1(or/api).
#Ollama Cloud
Ollama Cloud uses the OpenAI-compatible endpoint at https://ollama.com/v1 and requires OLLAMA_CLOUD_API_KEY.
#Key format checks
tota validates API key formats before accepting them:
- OpenAI:
sk-,sk-proj-, orsk-svcacct- - Anthropic:
sk-ant- - DeepSeek:
sk- - MiMo:
sk- - MiMo Token Plan:
tp- - NVIDIA NIM:
nvapi- - OpenRouter:
sk-or- - Grok and Ollama Cloud: long token, no spaces
- Groq:
gsk_
#Common issues
| Error | Fix |
|---|---|
| Invalid API key | Recreate the key in the provider console and update ~/.tota/.env. |
| Model not found | Rerun tota setup llm and pick a model from the fetched list. |
| Connection failed | Check the base URL and your network or proxy settings. |
| Rate limit exceeded | Wait, then retry or add a fallback provider. |
If you configure multiple providers, tota automatically falls back to the next available provider. See the Provider Fallback doc for details.
