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_KEY

Nous Portal

300+ models + web search, image gen, TTS under one subscription

sarthi setup --portal

OpenAI

GPT models with your own key

OPENAI_API_KEY

NVIDIA NIM

Nemotron and hosted open models

NVIDIA_API_KEY

Hugging Face

Open models via Inference Providers

HF_TOKEN

Your own endpoint

Any OpenAI-compatible server — vLLM, llama.cpp, LM Studio

custom base URL

Configure 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.