Zed and Continue.dev attack the same problem from different sides. Zed is an editor with a built-in assistant. Continue.dev is an extension that installs into VS Code or JetBrains. Both accept a custom base URL, so both can point at the codexkey gateway. Setup for each follows.
Zed: the provider in settings.json
Open the editor settings with Cmd+, and switch to JSON. You can also open the file directly: Cmd+Shift+P, then the Zed: Open Settings command. Add a language_models section with the provider you need:
{
"language_models": {
"anthropic": {
"api_url": "https://api.codexkey.online"
},
"openai": {
"api_url": "https://api.codexkey.online/v1"
}
}
}
You do not need to set both providers, only the one whose models you plan to use. The Anthropic provider speaks the Claude format, and the OpenAI provider also gives you the GPT models.
Zed: key and model choice
By default Zed does not keep the key in settings.json. You paste it into the assistant panel: open the panel with Cmd+?, find the provider settings block and put sk_cdx_... into the API Key field. There is another way: set the ANTHROPIC_API_KEY or OPENAI_API_KEY environment variable before launching the editor, and Zed picks it up on its own.
After that you choose the model right in the assistant panel, from the dropdown or by typing its name if the editor's default list does not include it.
Continue.dev: config structure
Continue.dev settings live in ~/.continue/config.yaml. The same file opens through the Continue: Open Config command in the editor's command palette. A model is one block: provider, model name, address.
models:
- name: Claude via codexkey
provider: anthropic
model: claude-sonnet-5
apiKey: sk_cdx_your_key_here
apiBase: https://api.codexkey.online
roles:
- chat
- edit
To use GPT with the same key, add a second block with provider: openai and apiBase: https://api.codexkey.online/v1. Both blocks live in one file, and you can switch models right in Continue's chat with no editor restart.
Continue.dev: a separate model for autocomplete
Autocomplete in Continue.dev is set up as its own block with the autocomplete role. That block usually gets a faster, cheaper model, while chat and edits (the chat and edit roles) get a stronger one. Splitting models by role pays off: autocomplete fires on every keystroke, so the price gap between models shows up there far more than in chat.
Verifying the setup
In Zed, open the assistant panel, ask a simple question about the open file and make sure the answer comes back with no authorization error. Continue works the same way: open the chat sidebar and ask something about the current project.
You can also check the key apart from the editor with a quick curl request:
curl https://api.codexkey.online/v1/chat/completions \
-H "Authorization: Bearer sk_cdx_your_key_here" \
-H "content-type: application/json" \
-d '{"model":"claude-sonnet-5","messages":[{"role":"user","content":"hello"}]}'
Common problems
Zed sometimes keeps the old provider configuration cached until a restart. If the assistant still complains about authorization after you edit settings.json, restart the whole editor, not just the assistant panel.
In Continue.dev, a typo in the provider name (say, antropic instead of anthropic) fails quietly: the interface shows no clear error. Open the extension log with the Continue: View Logs command and the cause is visible right away.
Both tools share one trap: a trailing slash on apiBase or api_url. Providers handle it differently, so it is safer to write the address with no trailing slash from the start, as in the examples above.
In short
Zed takes the provider through language_models in settings.json, and the key goes into the assistant panel or an environment variable. Continue.dev keeps its config in YAML with provider, apiBase and apiKey fields, and the chat, edit and autocomplete roles can each run a different model. One codexkey key covers all of it, including switching between Claude and GPT without a second signup.