How to Configure Continue with an API Model
Add a cloud model such as Claude or GPT to Continue by editing its YAML config and pasting an API key.
Continue does not ship with a model of its own. You point it at one through its config file. This guide adds a cloud model from an API provider, stores the API key safely, and confirms the model answers in the chat panel. The example uses Anthropic's Claude, but the same structure works for other providers.
What you need
- The Continue extension installed
- An API key from a model provider, such as the Anthropic Console
- A small amount of credit on that provider account
- About 7 minutes
Step 1: Get an API key
Sign in to your provider's console and create a new API key. Copy it once; most providers only show the full key at creation time. Keep it out of any file you commit to version control.
Step 2: Open config.yaml
Open the Continue panel, click the gear icon, and edit the config. The file lives at ~/.continue/config.yaml. The models section is a list, where each entry has a provider, a model id, and an apiKey.
Step 3: Add the model entry
Add a block under models with the provider, the exact model id from the provider's docs, and your key. The name field is just the label shown in the model picker. Save the file and Continue reloads the config automatically.
models:
- name: Claude Sonnet
provider: anthropic
model: claude-sonnet-4-5
apiKey: sk-ant-your-key-here
roles:
- chat
- edit
- applyStep 4: Pick the model and test it
Open the Continue chat panel. At the bottom of the input box is a model dropdown; select the name you set. Ask a simple question to confirm the connection works, such as asking it to explain a snippet of your code.
Result
Continue now talks to a cloud model using your API key. If a request fails, the most common causes are a typo in the model id, an empty key, or no credit on the provider account. Fix those and the chat responds normally.
Watch related tutorials
10:00
14:00
16:00
1:42:18
28:14
41:09