Docs/Core concepts
Providers & models
Connect Gray to OpenAI, Anthropic, Google, OpenRouter, DeepSeek, Groq, xAI, Mistral, Ollama or any OpenAI-compatible endpoint, and switch models mid-session.
Source: crates/gray/src/setup/catalog.rs
Gray speaks the OpenAI chat-completions protocol over SSE, so any compatible endpoint works. /connect lists the built-in catalog; anything else goes in as a custom base URL. Claude models get Anthropic-style prompt caching.
| Provider | Sign-in | Base URL |
|---|---|---|
| OpenAI | ChatGPT login or API key | api.openai.com/v1 |
| Anthropic | API key | api.anthropic.com/v1 |
| Gemini API key | generativelanguage.googleapis.com | |
| OpenRouter | API key — 300+ models | openrouter.ai/api/v1 |
| CommandCode | API key | api.commandcode.ai/provider/v1 |
| DeepSeek | API key | api.deepseek.com |
| Groq | API key | api.groq.com/openai/v1 |
| xAI (Grok) | Grok login or API key | api.x.ai/v1 |
| Mistral | API key | api.mistral.ai/v1 |
| GitHub Copilot | token | api.githubcopilot.com |
| Ollama | none — local | localhost:11434/v1 |
Keys
/connect (aliases /provider, /key, /keys) stores keys per provider in ~/.gray/auth.json with 0600 permissions. Environment variables win over stored keys, and --api-key wins over both, so CI and one-off shells stay easy. Shift+Enter on a highlighted provider in the connect modal removes it.
$export GRAY_API_KEY=sk-... # or OPENAI_API_KEY$gray --model openrouter/<model-id>$gray --base-url http://localhost:8000/v1 # vLLM, LM Studio, a proxy…
Models
/model opens a searchable picker over the bundled models.dev catalog; /model provider/id sets one directly. Switching mid-session keeps the conversation.
Reasoning effort
/thinking (aliases /effort, /reasoning) picks how hard a reasoning model thinks. Only the levels the current model supports are accepted.
| Level | Meaning |
|---|---|
| off | no reasoning |
| minimal | very brief reasoning |
| low | light reasoning |
| medium | moderate reasoning |
| high | deep reasoning |
| xhigh | very deep reasoning |
| max | maximum reasoning |
Provider plugins
Sign-in flows that are more than a pasted key live in plugins speaking plugin protocol 1.2, where the host owns the credentials. Once installed they appear in /connect beside the built-ins. See Plugins.
Join the Discord
Chat with the people building and running Gray. Show what you made with it.
Join Discord →