Two ways to connect Zed
| Method | Zed setting | FreeLLMAPI endpoint | Key |
|---|---|---|---|
| OpenAI-compatible provider (recommended) | language_models.openai_compatible | http://localhost:3001/v1 | Unified key, in Zed's settings UI or an environment variable |
| Ollama provider | language_models.ollama | http://localhost:3001 (Ollama emulation) | None on loopback, or the unified key |
Both methods use the same router and the same free model pool. The OpenAI-compatible method needs no change on the FreeLLMAPI side. The Ollama method needs Ollama emulation, which is off by default.
First install FreeLLMAPI. Open http://localhost:3001, add at least two free provider keys on the Keys page and copy your unified key.
Install on macOS or Linux
curl -fsSL https://freellmapi.co/install.sh | bashMethod 1: OpenAI-compatible provider
Open your Zed settings.json and add this block. The provider id is freellmapi. max_tokens is the context window of the model.
Zed settings.json
{
"language_models": {
"openai_compatible": {
"freellmapi": {
"api_url": "http://localhost:3001/v1",
"available_models": [
{
"name": "auto",
"display_name": "FreeLLMAPI Auto",
"max_tokens": 128000,
"max_output_tokens": 8192,
"capabilities": {
"tools": true,
"images": false,
"parallel_tool_calls": false,
"prompt_cache_key": false,
"chat_completions": true
}
}
]
}
}
}
}Do not put the key in settings.json. Use one of these two methods:
- Run
agent: open settingsfrom the command palette. Go to the LLM providers, find the provider and enter the key. Zed keeps it in the system keychain. - Set an environment variable. Zed makes the name from the provider id in upper snake case plus
_API_KEY. For the idfreellmapi, the name isFREELLMAPI_API_KEY. The variable has priority over the keychain.
Key as an environment variable
export FREELLMAPI_API_KEY=<unified-key>
zedAdd one entry in available_models for each model that you want in the model menu. auto:smart and auto:fast are also valid names.
Method 2: Ollama emulation
FreeLLMAPI can act as an Ollama server. It serves /api/tags, /api/chat, /api/generate, /api/show, /api/version and /api/embed. Streaming uses newline-delimited JSON, as Ollama does.
- On the FreeLLMAPI dashboard, open Keys, Agents.
- Set Ollama emulation to
open-loopbackorkey-required. - Add the block below to Zed's
settings.json. - Open the agent panel and select a model.
Zed settings.json
{
"language_models": {
"ollama": {
"api_url": "http://localhost:3001",
"context_window": 128000
}
}
}open-loopbackneeds no key, but only for requests from this computer.- If FreeLLMAPI runs in Docker,
open-loopbackrefuses requests through a published port. Usekey-requiredand setOLLAMA_API_KEYto your unified key, or enter it in the provider UI. - Zed sends the context size as
num_ctx. The default is 4096 tokens, which is too small for agent work. Setcontext_window.
Choose models for the agent panel
The Zed docs say that each model and provider must support tool calling. A model without tool support shows a "No tools" label in the agent panel. Use models with tool calling and a large context window.
| Model | Free on | Context | Free limits (best offer) | Tools | Vision |
|---|---|---|---|---|---|
| GLM 5.3 | UnoRouter | 1M | 1 req/min 1 req/min per model | Yes | No |
| GLM 5.3 Flash | NVIDIA NIM, UnoRouter | 1M | 40 req/min 40 RPM | Yes | Yes |
| Gemini 3.8 Flash | Google AI Studio | 1M | Recurring provider quota | Yes | Yes |
| Qwen3.8 Flash Next | AMD Radeon Cloud | 262K | Recurring daily account allowance | Yes | No |
| Qwen3.8 Flash | ElectronHub | 1M | $0.25/week shared recurring credit | Yes | Yes |
| Gemini 3.7 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| GPT-5.6 Luna | ElectronHub | 1M | $0.25/week shared recurring credit | Yes | Yes |
| Dots3 Note Preview | Kilo Gateway, OpenRouter | 512K | 20 req/min 50 req/day 50 req/day account-wide (1,000 after a $10 purchase) | Yes | Yes |
| DeepSeek V4 Flash | AMD Radeon Cloud, BazaarLink, ElectronHub | 1M | 10 req/min 50 req/day Shared rate limit | Yes | No |
| Qwen3.8 27B | ElectronHub, Groq, OVH AI Endpoints | 262K | 30 req/min 250 req/day 70,000 tokens/min ~6M | Yes | Yes |
Showing 10 of 109 matching free models. See all models.
Live data from the FreeLLMAPI catalog (version 2026.11.19, checked 19 November 2026). Free limits change often. The catalog is checked every day.
Free tiers have limits per minute and per day. When a provider sends a 429 error, FreeLLMAPI tries the next model in your chain. Add keys from four or more providers for long agent sessions.
/v1/completions endpoint. FreeLLMAPI serves both. The Zed edit prediction docs show no API key field for these two providers. We have not confirmed this combination with FreeLLMAPI, so test it before you depend on it.JetBrains AI Assistant
JetBrains AI Assistant can use an OpenAI-compatible provider or a local Ollama server. Open Settings, Tools, AI Assistant, Providers & API keys. There are two options:
- Bring your own key, OpenAI-compatible: enter the base URL
http://localhost:3001/v1, your unified key and a model id such asauto. The JetBrains docs say that BYOK works with agents without a JetBrains AI subscription. - Ollama: in Third-party AI providers, select Ollama. Enter
http://localhost:3001in the URL field and click Test Connection. Then assign models in Models Assignment. Turn on Ollama emulation in FreeLLMAPI first.
The JetBrains docs give limits for local models: agents cannot use them, and AI Assistant cannot call MCP tools with them. Inline completion and next edit suggestions use JetBrains models by default. For agent work, use the BYOK option.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
401 "Invalid API key" | Zed has no key for the provider, or the wrong key | Set FREELLMAPI_API_KEY, or enter the key in the agent settings |
| "No tools" label on the model | Tools are off for the model, or the model has no tool calling | Set "tools": true and use a model from the table |
| Ollama provider shows no models | Ollama emulation is off in FreeLLMAPI | Turn it on in Keys, Agents |
| Ollama requests refused from Docker | open-loopback accepts only loopback peers | Use key-required with your unified key |
| Long prompts lose context | num_ctx is 4096 tokens | Set context_window in the Ollama settings |
| "All models rate-limited after N attempts" | All keys are at their limit | Add keys from more providers, or wait for the cooldowns |
Frequently asked questions
Can I use a custom LLM in Zed?
Yes. Add an openai_compatible provider with api_url and available_models to language_models in settings.json. Zed also supports an Ollama provider with a custom api_url.
How do I use free AI models in Zed?
Point an OpenAI-compatible provider at FreeLLMAPI on http://localhost:3001/v1. The gateway sends each request to free provider tiers, so inference costs $0.
Where does Zed store the API key for a custom provider?
Zed keeps a key that you enter in the agent settings in the system keychain. You can also set an environment variable named after the provider id, for example FREELLMAPI_API_KEY.
Does JetBrains AI Assistant work with free models?
Yes. Use Bring your own key with an OpenAI-compatible base URL, or the Ollama provider. The JetBrains docs say that agents cannot use local models, so use BYOK for agent work.
Related guides
- Free AI models in VS Code
- Continue with a free LLM API
- Cline, Roo Code and Kilo Code with a free API
- Best free coding model APIs
- Free OpenAI-compatible API base URLs
Sources
- Zed docs: use API access (OpenAI-compatible providers) (checked 20 November 2026)
- Zed docs: use a local model (Ollama) (checked 20 November 2026)
- Zed docs: agent panel (checked 20 November 2026)
- Zed docs: edit prediction (checked 20 November 2026)
- JetBrains AI Assistant: use custom models (checked 20 November 2026)
- JetBrains AI Assistant: bring your own key (checked 20 November 2026)
- FreeLLMAPI docs: Ollama clients (checked 20 November 2026)