Configuration
Connect any LLM
SARTHI is model-agnostic. Bring one API key — or point it at your own server — and switch models any time with no code changes.
Pick a provider
OpenRouter
200+ models behind one key — includes free-tier models
OPENROUTER_API_KEYNous Portal
300+ models + web search, image gen, TTS under one subscription
sarthi setup --portalOpenAI
GPT models with your own key
OPENAI_API_KEYNVIDIA NIM
Nemotron and hosted open models
NVIDIA_API_KEYHugging Face
Open models via Inference Providers
HF_TOKENYour own endpoint
Any OpenAI-compatible server — vLLM, llama.cpp, LM Studio
custom base URLConfigure in one command
sarthi model ? Choose a provider: openrouter ? API key: sk-or-… ? Model: anthropic/claude-sonnet-4.5 ✓ Saved. Switch anytime with /model
Everything lives in ~/.sarthi/cli-config.yaml — readable, versionable, yours. Set individual values with sarthi config set.
Switch models mid-conversation
/model openrouter:deepseek/deepseek-chat # cheap & capable /model openrouter:anthropic/claude-opus-4.6 # heavyweight /model nous:Hermes-4-405B # open frontier
Different models for different jobs — your agent's memory and skills stay the same underneath.
Skip the API-key collection
If you'd rather not manage separate keys for models, web search, image generation, and TTS, one subscription covers all of them:
sarthi setup --portal
This logs you in via OAuth and enables the full tool gateway. See Pricing — SARTHI itself is free either way.