Skip to content
Sign Up Free
Coding Agent setup

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

FieldValue
API KeyBetterToken API key
Base URLhttps://bettertoken.ai/v1
ModelA current Model ID from the model plaza

Prerequisites

Sign up and get a BetterToken API Key

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

Terminal window
curl -fsSL https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.sh | bash

Windows PowerShell

Terminal window
irm https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.ps1 | iex

npm (cross-platform)

Terminal window
npm install -g @continuedev/cli

After installation, confirm that cn is available:

Terminal window
cn --version

Manual setup

FieldValue
API KeyBetterToken API key
Base URLhttps://bettertoken.ai/v1
ModelA 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:

Terminal window
export BETTERTOKEN_API_KEY="YOUR_API_KEY"

Windows PowerShell

Run this in the same PowerShell window that will start Continue CLI:

Terminal window
$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: BetterToken
version: 0.0.1
schema: v1
models:
- name: BetterToken GPT
provider: openai
model: YOUR_MODEL_ID
apiBase: "https://bettertoken.ai/v1"
apiKey: ${{ secrets.BETTERTOKEN_API_KEY }}
useResponsesApi: false

YOUR_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

Terminal window
cn --config ~/.continue/config.yaml

Windows PowerShell

Terminal window
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:

Terminal window
cn --config ./continue-bettertoken.yaml

Verify 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

SymptomWhat to do
401, Unauthorized, or an API Key errorConfirm BETTERTOKEN_API_KEY is set in the current terminal and is a BetterToken API Key.
model not foundCheck the exact Model ID in the model plaza and enter it in the client model settings.
Continue still uses an old configurationStart with cn --config and the explicit file path. Check that the filename is config.yaml.
Wrong request URL or 404Confirm apiBase is https://bettertoken.ai/v1. Do not append /chat/completions or a model name.
The API Key variable is not resolvedSet BETTERTOKEN_API_KEY in the same terminal that starts cn, then launch it again.
Agent mode is unavailable for a custom Model IDIf 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

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.