Zed × AI Code With
Use AI Code With in Zed: third-party relay setup guide
Use the AI Code With OpenAI-compatible API inside Zed's Agent Panel. Add an OpenAI-compatible provider, enter your API key, API URL, and Model ID, and you can use DeepSeek, Gemini, GLM, Kimi, and more. This page covers the setup steps, common errors, and FAQ.
Download and install official Zed first, then add the AI Code With provider in Agent Settings; the API key is only entered in Zed, never on this page.
- Provider Name
- aicodewith
- API URL
- https://api.aicodewith.ai/v1
- API Key
- sk-xxxxxxxx
- Model ID
- deepseek-v4-flash
Quick setup
Add AI Code With as an OpenAI-compatible provider in Zed Agent Settings, and use DeepSeek, Gemini, GLM, Kimi, and more in the Agent Panel in about 3 minutes.
Zed natively supports OpenAI-compatible providers. Add AI Code With once in Agent Settings, and every model is available in the Agent Panel — no plugin required.
Download and install official Zed
Download the installer for your platform (macOS, Windows, or Linux) from the official page and install it. Launch Zed and open the Agent Panel. A Chinese UI is an optional third-party localization and is unrelated to this setup — skip it if you do not need it.
After launching Zed, the Agent Panel opens on the right. Click the top-right + button, or the bottom-right No model selected dropdown, to start provider and model setup. Add an OpenAI-compatible provider
Open Agent Settings (command agent: open settings). Under LLM Providers, click Add Provider and choose OpenAI-compatible. Complete four fields: ① Provider Name — enter aicodewith (for identification only); ② API URL — enter https://api.aicodewith.ai/v1 (keep /v1, do not append /chat/completions); ③ API Key — paste your AI Code With API key (stored in the system keychain; do not put it in settings.json); ④ Add Model — type a Model ID and a context window (128000 is common). Do not overwrite the built-in OpenAI API URL.
Quick copy
API URL
https://api.aicodewith.ai/v1
Provider ID
aicodewith
Model ID
deepseek-v4-flash
After copying, return to Zed: paste the API URL and Provider ID into Add Provider. Paste the API key only inside Zed.
Click … in the top-right of the Agent Panel and choose Settings (⌘C). You can also run the command agent: open settings. In Settings, click + Add Provider under LLM Providers. The listed OpenAI, Anthropic, and similar rows are built-in — do not overwrite their URLs. In the Compatible APIs dropdown, choose OpenAI. The next dialog states that this provider will use an OpenAI-compatible API. In Add LLM Provider, enter a Provider Name (aicodewith is a good ID), API URL, and API Key, then click Add Model and type a Model Name. The form also shows Max Completion Tokens, Max Output Tokens, Max Tokens, and Supports tools. Click Save Provider when done. Use the API URL on this page, https://api.aicodewith.ai/v1, and your AI Code With API key; copy the Model ID from the list below. Pick the model and verify
In the Agent Panel dropdown, pick the newly added AI Code With model and send a test message. A normal reply means the setup works — then match the call by time and model name in AI Code With usage records. Saving the provider is not enough.
Recommended models
After adding the provider, click Add Model and type one of these Model IDs (recommended models are selected by default and ready to copy). Zed does not auto-fetch the list:
1 selected
Claude
GPT
Gemini
DeepSeek
GLM
Kimi
The full model list follows the AI Code With docs and pricing page; this site does not maintain a separate model list. Zed also requires a context window (max_tokens); 128000 is a common value.
How does Zed connect to AI Code With?
Zed supports custom OpenAI-compatible providers. Connecting to AI Code With only needs 4 settings in Agent Settings:
- Provider Name
- A free-text name to identify the provider in the list (for example, AI Code With). This becomes the key under openai_compatible in settings.json; aicodewith is a good ID.
- API URL
- Enter https://api.aicodewith.ai/v1. Zed calls the AI Code With OpenAI-compatible API through this address. Keep /v1 and do not append /chat/completions or similar paths.
- API Key
- Paste your AI Code With API key in the provider settings UI. Zed stores keys in the system keychain — do not put them in settings.json.
- Model ID
- Click Add Model and enter an AI Code With Model ID (for example, deepseek-v4-flash) plus a context window. Zed does not auto-fetch the model list.
Flow: Zed Agent Panel → openai_compatible provider → AI Code With API. Prefer the Agent Settings UI. JSON should only contain api_url and available_models; the API key still lives in the keychain or an environment variable.
Frequently asked questions
Don't have Zed installed?
Download the macOS, Windows, or Linux build from the Zed website and install it.
Zed official download
Visit the official download page and pick the installer for your platform. Supported platforms: macOS (Intel and Apple Silicon), Windows, and Linux.
Download from the official pageFull install guidance follows the Zed official docs; this site does not host or modify installers. Use official Zed for this integration — do not overwrite the built-in OpenAI API URL with a relay address.
Common error troubleshooting
The most frequent problems fall into 4 categories.
401 / Invalid API Key
Symptom: The Agent Panel returns 401, Unauthorized, or Invalid API Key after sending a message.
Cause: Usually the API key is invalid, mistyped, or copied with extra characters.
- Open Agent Settings → LLM Providers, select AI Code With, and re-paste the API key (no extra spaces)
- Confirm the key is a valid AI Code With API key
- Do not put the key in settings.json; save and send a test message
Model Not Found / Wrong Model ID
Symptom: The request reports Model Not Found, unknown model, or the new model is missing from the dropdown.
Cause: The Model ID typed in Add Model is wrong, or the model is currently unavailable.
- Copy the exact Model ID from this page (e.g. deepseek-v4-flash) instead of typing it
- Confirm the current key can access that model
- Pick the newly added model in the Agent Panel dropdown before sending
API URL error
Symptom: Sending a message fails, times out, or reports a wrong endpoint path.
Cause: The API URL has a wrong path, is missing /v1, or you edited the built-in OpenAI provider instead of openai_compatible.
- Confirm the value is https://api.aicodewith.ai/v1 (with /v1)
- Remove any trailing /v1/chat/completions or guessed path
- Confirm you added an OpenAI-compatible provider, not overwritten built-in OpenAI
Requests are not going to AI Code With
Symptom: No usage record appears after sending, or traffic still hits official OpenAI / Zed-hosted models.
Cause: The Agent Panel selected the wrong provider, or only language_models.openai.api_url was changed.
- In the Agent Panel model list, pick the model under AI Code With
- Do not edit language_models.openai.api_url; add an openai_compatible entry instead
- After sending, match the call by time in AI Code With usage records
Need the full guide?
Every config parameter, the complete model list, and more troubleshooting live in the AI Code With docs.
Open the AI Code With docs