Authentication
Configure credentials so SQLsaber can call an AI provider.
Providers
Section titled “Providers”| Provider | Environment variable | Notes |
|---|---|---|
| Anthropic | ANTHROPIC_API_KEY | |
| OpenAI | OPENAI_API_KEY | Uses Platform API billing |
| OpenAI Codex | Browser authentication | Uses a ChatGPT subscription |
GOOGLE_API_KEY | ||
| Groq | GROQ_API_KEY | |
| Mistral | MISTRAL_API_KEY | |
| Cohere | COHERE_API_KEY | |
| Hugging Face | HUGGINGFACE_API_KEY | |
| xAI | XAI_API_KEY | Recommended model xai:grok-4.6 |
openai: and openai-codex: are separate providers. An OpenAI API key does
not authenticate an openai-codex: model. A ChatGPT subscription does not
authenticate an openai: model.
Configure a provider
Section titled “Configure a provider”saber auth setupThis command:
- Lets you choose an AI provider
- Starts browser authentication for OpenAI Codex, or configures an API key for other providers
- Stores the resulting credentials
The default model is openai:gpt-5.6-sol. Save an OpenAI key for a fresh install, or run saber models set after you save a different provider.
To save an Anthropic key, run saber auth setup, choose Anthropic, and paste a key from the Anthropic Console. Use the same steps for the other providers.
Use a ChatGPT subscription
Section titled “Use a ChatGPT subscription”- Start browser authentication:
saber auth setup openai-codex-
Complete the OpenAI Codex sign-in in your browser.
-
Select the subscription-backed model:
saber models set openai-codex:gpt-5.6-sol- Check the saved authentication and model:
saber auth statussaber models currentsaber auth setup configures authentication but does not change the configured model.
First-launch onboarding performs both steps when you choose OpenAI Codex.
SQLsaber stores its own OpenAI Codex credentials. It does not reuse a Codex CLI login. SQLsaber currently supports browser authentication, not device-code authentication.
Check saved providers
Section titled “Check saved providers”saber auth statusThe output lists configured providers, API-key sources, and the OpenAI Codex connection state.
Remove stored credentials
Section titled “Remove stored credentials”saber auth reset
# Non-interactivesaber auth reset openai --yes
# Disconnect OpenAI Codexsaber auth reset openai-codex --yesIf you pass a provider, SQLsaber does not ask which one to reset. Destructive commands require confirmation in a terminal, or --yes in automation.
Resetting credentials does not change the configured model. Select another
model before your next query if you reset openai-codex.
Use more than one provider
Section titled “Use more than one provider”Configure several providers, then switch models with saber models set. SQLsaber stores each provider’s credentials separately.
Set a key in the environment
Section titled “Set a key in the environment”export ANTHROPIC_API_KEY="your-api-key"export OPENAI_API_KEY="your-api-key"export GOOGLE_API_KEY="your-api-key"export GROQ_API_KEY="your-api-key"export MISTRAL_API_KEY="your-api-key"export COHERE_API_KEY="your-api-key"export HUGGINGFACE_API_KEY="your-api-key"export XAI_API_KEY="your-api-key"Environment variables take precedence over stored credentials.
See saber auth status and saber auth --help, or Commands.