Continue Relay Integration Tutorial: Practical Guide to Custom VS Code Providers
Continue extension integration tutorial: Add custom providers in config.yaml, configure your Base URL and sk- key, and unify your Claude / GPT / Gemini workflows.
1. What is Continue?
Continue is an open-source, free AI coding extension for VS Code that supports configuring multiple custom providers. By pointing the provider to our gateway, you can call Claude, GPT, and Gemini models under a unified billing system.
2. Preparation
- Log in to the Jizhi API console and create an
sk-xxxxxxAPI Key (it will be displayed only once, so please save it). - Confirm the model slug you wish to use (e.g.,
claude-sonnet-5,gpt-5.5,gemini-3.7-flash). - Confirm the gateway address:
https://www.relay-api.com.
3. Configure Continue
Edit ~/.continue/config.yaml (or .continue/config.yaml) and add a provider for each model:
models:
- title: Claude Sonnet 5
provider: anthropic
model: claude-sonnet-5
apiBase: "https://www.relay-api.com"
apiKey: sk-your-key
- title: GPT-5.4
provider: openai
model: gpt-5.5
apiBase: "https://www.relay-api.com/v1"
apiKey: sk-your-key
- title: Gemini 3.7 Flash
provider: gemini
model: gemini-3.7-flash
apiBase: "https://www.relay-api.com"
apiKey: sk-your-key
After saving, restart the extension and use /models to switch between models.
4. API Endpoint Reference
| Model Group | Gateway Entry (apiBase) | Protocol |
|---|---|---|
| Claude / Anthropic | https://www.relay-api.com | Anthropic Messages |
| GPT / OpenAI | https://www.relay-api.com/v1 | OpenAI Chat Completions |
| Gemini | https://www.relay-api.com | Google generateContent |
5. Troubleshooting Common Issues
| Issue | Solution |
|---|---|
| 401 / 403 | Invalid key, disabled, or insufficient balance; verify the sk- key is correct and check your balance. |
| 404 / Model Unavailable | Model name does not match the platform slug, or the model is not enabled; verify the model ID. |
Security Tip: Do not commit your API keys to public repositories. Generative tasks consume tokens quickly, so keep an eye on your balance.
Note on Base URL: Our site accepts both /v1beta/models/... and /v1beta/v1beta/models/... (as well as /v1/... and /v1/v1/...). Therefore, regardless of whether your client appends /v1beta automatically, using https://www.relay-api.com or https://www.relay-api.com/v1beta as the Base URL will work correctly. After configuration, click Connect / Test in Continue; if you still receive a 404, verify that the model ID matches the "Model ID" found in the top-right corner of the "Tokens" page in the console.
