How do I connect my coding tool to Dartmouth Chat API?
Overview
Your preferred IDE (integrated development environment) may have extensions that will allow it to work directly with Dartmouth Chat through the API. This connection can be used to ask questions of Dartmouth Chat from within VS Code to create and improve your code.
Microsoft Visual Studio, for instance, has several extensions available. See the setup instructions below to connect via the Roo Code and/or Continue extensions:
Get your API Key
- To connect VS Code to Dartmouth Chat, you will need your Dartmouth Chat API Key.
- To get your API Key, log into Dartmouth Chat and navigate as follows: Profile Picture > Settings > Account > API Key
Connecting from Visual Studio (VS) Code: Roo Code
- Set up Roo Code (Extension)
- Search for and install Roo Code as an Extension within VS Code
- On the left-hand activity bar, click on the Roo Code (kangaroo) icon
- Click on Settings and enter the following:
- API Provider: OpenAI Compatible
- Base URL: https://chat.dartmouth.edu/api
- API Key: Enter your API key here (from above)
- Model: For best results, pick a Claude or GPT Model
Connecting from Visual Studio (VS) Code: Continue
- Set up Continue (Extension)
- Search for and install “Continue - open-source AI code agent” as an Extension within VS Code.
- On the left-hand activity bar, click on the Continue icon
- Click on Settings on the Continue Extension, open the Config File (config.json), and set the following parameters:
"models": [
{
"title": "Claude-Sonnet-4",
"provider": "openai",
"model": "anthropic.claude-sonnet-4-20250514",
"useLegacyCompletionsEndpoint": false,
"apiBase": "https://chat.dartmouth.edu/api",
"apiKey": "<ENTER YOUR DEVELOPER KEY (from above)>"
}
You can choose a model (or models) from the list of Model IDs that can be found at this endpoint: https://chat.dartmouth.edu/api/models. You can also mouse-over the model names in the Dartmouth Chat interface to find their ID.
Didn’t find what you needed? Please reach out to research.computing@dartmouth.edu.