AI providers
SayQL writes SQL with the AI provider you pick, using your own API key. Change it any time in Settings (the gear, top right). Back or esc returns to your work.
| Provider | What you need |
|---|---|
| Anthropic Claude (recommended) | An API key from the Claude Console. |
| OpenAI | An API key from the OpenAI platform. |
| Google Gemini | An API key from Google AI Studio. |
| OpenRouter | One key from OpenRouter for models from many labs. |
| Mistral, Groq, DeepSeek | An API key from that provider's console. |
| Ollama (on your computer) | Ollama installed and running, with a model pulled. No key. |
| LM Studio (on your computer) | LM Studio with its local server started. No key. |
| Other (OpenAI-compatible) | The base URL of any server with an OpenAI-compatible API (Azure, vLLM, LiteLLM, a company gateway), and a key if it needs one. |
Set it up
- Open Settings → AI provider and pick a Provider.
- Paste the API key. It's stored in your system keychain, never in a file.
- For providers other than Claude, click Load models. This also checks the key and address. Pick a model, then Save.
SayQL uses two models: Model while typing, a fast one that drafts SQL as you type, and Model for fixes and improvements, a stronger one for fixing a rejected query and for Improve. With Claude these default to Haiku and Opus. With other providers, leave the second empty to use the same model for both.
The status bar shows the models in use, or AI off — set up an AI provider in Settings when none is set up.
Local models
With Ollama or LM Studio, your questions and schema never leave your computer. For Ollama, install it, pull a model (for example ollama pull llama3.2) and keep it running. SayQL connects to http://localhost:11434/v1 by default. LM Studio's local server is at http://localhost:1234/v1. Change the base URL in Settings if yours runs elsewhere.
Claude API keys and workspaces. If your key isn't tied to a workspace, add the workspace's ID (it starts with wrkspc_) in Settings. Use the ID from the Claude Console, not the workspace's name.
Something missing or unclear? Ask in Discussions.