Continue CLI setup: API key, Base URL, and models
Install Continue CLI, configure the BetterToken Base URL and API key, choose an available model, and troubleshoot common errors. Practical guidance.
To connect Continue CLI to BetterToken, prepare an API key, enter the Base URL shown below, and choose a current Model ID from the model plaza.
Key settings
| Field | Value |
|---|---|
| API Key | BetterToken API key |
| Base URL | https://bettertoken.ai/v1 |
| Model | A current Model ID from the model plaza |
Prerequisites
- The current version of the tool is installed
- A BetterToken API key: register and get one
- A Model ID from the model plaza
Already have an account? Sign in, top up, then create a key in the console.
Additional requirements
- Install Node.js 20 or later when using the npm installation method
Install
Install Continue CLI
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.sh | bashWindows PowerShell
irm https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.ps1 | iexnpm (cross-platform)
npm install -g @continuedev/cliAfter installation, confirm that cn is available:
cn --versionManual setup
| Field | Value |
|---|---|
| API Key | BetterToken API key |
| Base URL | https://bettertoken.ai/v1 |
| Model | A current Model ID from the model plaza |
Configure API Key and Base URL
Set the API Key environment variable
macOS / Linux
Run this in the same terminal that will start Continue CLI:
export BETTERTOKEN_API_KEY="YOUR_API_KEY"Windows PowerShell
Run this in the same PowerShell window that will start Continue CLI:
$env:BETTERTOKEN_API_KEY = "YOUR_API_KEY"Replace YOUR_API_KEY with your BetterToken API Key. Do not commit the key to Git or put it in a shared configuration file.
Create config.yaml
Create or edit this file in your user directory:
- macOS / Linux:
~/.continue/config.yaml - Windows:
%USERPROFILE%\.continue\config.yaml
Add this configuration:
name: BetterTokenversion: 0.0.1schema: v1
models: - name: BetterToken GPT provider: openai model: YOUR_MODEL_ID apiBase: "https://bettertoken.ai/v1" apiKey: ${{ secrets.BETTERTOKEN_API_KEY }} useResponsesApi: falseYOUR_MODEL_ID is only an example. Replace it with a current model ID from the model plaza.
useResponsesApi: false expresses Continue’s API preference. Continue may still choose Responses or Chat Completions based on the model. BetterToken supports both, so either route works with this Base URL. Check request records in the Dashboard when you need to confirm the actual path. In testing with Continue CLI 1.5.47 and a GPT model, both useResponsesApi: false and true sent requests to /v1/responses. Continue CLI 1.5.47 completed both text requests and file-reading tool calls through that path.
Start Continue CLI
macOS / Linux
cn --config ~/.continue/config.yamlWindows PowerShell
cn --config "$env:USERPROFILE\.continue\config.yaml"You can enter your project directory first, then run the command. Once the configuration loads, enter a task directly in Continue CLI.
Change the model
After changing model in config.yaml, end the current cn session and start it again. the Model ID must be compatible with the configured endpoint.
To use a separate configuration for one project, save it in that project and provide its path explicitly:
cn --config ./continue-bettertoken.yamlVerify the connection
Send a short test prompt. If the tool returns a response without an authentication or Model ID error, the connection works. Fully restart the tool after changing its configuration.
Switch models
Open the model selector or change the Model field in the configuration. Use the exact Model ID from the model plaza, then restart the current session.
Common errors
| Symptom | What to do |
|---|---|
401, Unauthorized, or an API Key error | Confirm BETTERTOKEN_API_KEY is set in the current terminal and is a BetterToken API Key. |
model not found | Check the exact Model ID in the model plaza and enter it in the client model settings. |
| Continue still uses an old configuration | Start with cn --config and the explicit file path. Check that the filename is config.yaml. |
Wrong request URL or 404 | Confirm apiBase is https://bettertoken.ai/v1. Do not append /chat/completions or a model name. |
| The API Key variable is not resolved | Set BETTERTOKEN_API_KEY in the same terminal that starts cn, then launch it again. |
| Agent mode is unavailable for a custom Model ID | If the model and endpoint support native tool calling, add capabilities: [tool_use] to that model entry in config.yaml. See Continue’s capability settings. This declares a capability; it does not add tool support to the model. |
Setup FAQ
Which Base URL should Continue CLI use?
Use https://bettertoken.ai/v1. This is BetterToken’s OpenAI-compatible Base URL.
Can I use a BetterToken API key?
Yes. Use provider: openai with your BetterToken API Key and Model ID. useResponsesApi: false expresses an API preference; Continue may choose Responses or Chat Completions based on the model. BetterToken supports both. To confirm the actual path, check request records in the Dashboard.
How do I view or switch saved configurations?
Enter /config inside a Continue CLI session to view and choose local configurations.
Advanced setup
Related guides
Technical details
Protocol, endpoint, and internal provider fields
This setup uses provider: openai, apiBase: "https://bettertoken.ai/v1", and useResponsesApi: false. The last setting expresses Continue’s API preference; Continue may choose /responses or /chat/completions based on the model. BetterToken supports both. Keep apiBase as shown without either suffix, and check request records in the Dashboard to confirm the actual path.

