Zed on an OpenAI-compatible endpoint
Add a provider in Agent Settings
As of 2026-08-30 Zed’s official docs describe openai_compatible: provider name, api_url, model id, and context window. Next step: add https://api.qcode.cc/v1 and copy a model id from /models.
Takeaways
Fields you fill
Official OpenAI-compatible section: provider name, API URL, model id, and context window. Keys go in the settings UI or an env var — not settings.json.
Docs fetched
zed.dev/docs/ai/use-api-access, fetched 2026-08-30.
api_url shape
The official example is https://example.com/v1. For QCode that is https://api.qcode.cc/v1. Do not paste /chat/completions into the URL field.
Default capability
openai_compatible defaults tools: true and images: false. Follow the official capabilities table.
What API access means in Zed
Zed is a graphical editor with built-in Agent and Inline Assistant. Official docs call it API access when you have a provider API key or usage billing and wire it in Agent Settings. OpenAI-compatible endpoints are one documented path — not a client-id hack.
What people still search
In 2026-08 threads Zed shows up next to Cursor and OpenCode in “point the editor at an OpenAI-compatible gateway” recipes. This site still had no Zed page. This page answers how the official custom endpoint works, then what to do after you paste QCode.
Timeline
Use API Access lists OpenAI-compatible endpoints. Add them in the UI (agent: open settings) or under language_models.openai_compatible in settings.json.
Keys saved in the settings UI go to the system keychain. openai_compatible env vars are generated from the provider id (my-gateway → MY_GATEWAY_API_KEY). Do not put keys in settings.json.
That wording still holds on this fetch. custom_headers can add extra HTTP headers; headers Zed manages (including Authorization) are ignored with a warning if you try to override them.
Confirmed vs watch-outs
Confirmed
Zed documents openai_compatible: custom api_url, model id, context window. Keys via UI or env. Default tools: true. Docs fetched 2026-08-30.
Watch-outs
Official: do not put API keys in settings.json. custom_headers cannot override Authorization. External Agents and Terminal Threads often configure models in the agent itself — a different path from Zed-owned AI features.
Which path
openai_compatible (this page)
Use this when you have a custom base URL. QCode is an OpenAI-compatible gateway at https://api.qcode.cc/v1.
First-party providers
Anthropic / OpenAI / Google AI keys still use their own blocks. A ChatGPT Plus subscription is not an API key; official docs split subscription vs API access.
What to do next
Open Agent Settings (agent: open settings), Add Provider under LLM Providers. Fill a name, API URL https://api.qcode.cc/v1, a model id from /models, and the context window. Enter the API key in the UI or the generated env var. Then pick that model in the Agent panel. Switching models is an id change.
On QCode
QCode exposes https://api.qcode.cc/v1 as an OpenAI-compatible endpoint. Wire it with Zed’s official openai_compatible provider. Which model ids work is the live /models list — this page does not freeze a catalog as always-on-sale.
FAQ
Can Zed talk to a custom OpenAI-compatible gateway?
Yes. Use API Access has an OpenAI-compatible endpoints section. UI or settings.json.
How far down should api_url go?
Stop at /v1, e.g. https://api.qcode.cc/v1. Do not append /chat/completions.
Can I put the key in settings.json?
Official docs say no. Use the settings UI (keychain) or an environment variable.
Does ChatGPT Plus count as an API key?
Official docs split ChatGPT subscriptions from OpenAI API access. This page is the API-key / compatible-endpoint path.
Can I override Authorization with custom_headers?
Official observation: Zed-managed headers including Authorization are ignored with a warning if you try to override them. This page is not a bypass recipe.
Where do model ids come from?
The live /models catalog. Copy the id into available_models.name.
Sources
Zed Use API Access (zed.dev/docs/ai/use-api-access), fetched 2026-08-30. Sections: OpenAI-compatible endpoints, API Keys and Environment Variables, Custom Headers.
Add a provider in Zed
Official openai_compatible + QCode /v1. Model ids follow /models.
Related
Cline on OpenAI-compatible APIs
A VS Code extension with a custom Base URL, key, and model id.
OpenCode guide
Terminal agent with custom endpoints.
Aider guide
CLI agent OpenAI base URL.
Not affiliated with Zed Industries. Behavior follows zed.dev docs. This page is not a guide to bypassing any vendor subscription auth.