# Roo Code - VStudio Code

[**Roo Code**](https://github.com/RooCodeInc/Roo-Code) is an AI-powered **autonomous coding agent** that seamlessly integrates into Visual Studio Code editor.

It can leverage the OpenAI compliant nexos.ai API gateway to provide responses.

To connect your nexos.ai API and Roo Code go through the following steps:

{% stepper %}
{% step %}

### Generate your personal API key

Log in to your nexos.ai account and head over to the User profile section by clicking on the profile bubble in top right corner of the UI.

{% hint style="danger" %}
Make sure to store your API key safely and securely. Never share it with anyone.&#x20;
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2F0LGvNLlyqKw42xaiWCWB%2F1_nexos_roocode_API00000000.mp4?alt=media&token=4699eed3-4720-464c-9a70-b960aa573c68>" %}
How to generate a personal API key
{% endembed %}
{% endstep %}

{% step %}

### Install Roo Code extension in your Visual Studio Code

You can install Roo Code in multiple ways:&#x20;

* **VSC extensions tab** - Open the extensions tab in Visual Studio Code and search for "Roo Code", once results appear select Roo Code from the list and click "Install"

{% hint style="warning" %}
You might be asked if you trust the publisher of the extension. Make sure you familiarize yourself with the risks of using extensions.
{% endhint %}

* **VSC CLI** - Use the following command within Visual Studio Code command line interface to download and install the Roo Code extension<br>

  ```
  code --install-extension RooVeterinaryInc.roo-cline
  ```

* **VSC Marketplace website** - Head over to the Visual Studio Code marketplace website to download and install the extension\
  <https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline>

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FW31KmmRtX4nCzJKDOnsE%2F2_nexos_roocode_install00000128.mp4?alt=media&token=8508c76d-3b6b-4242-a62d-471e5f6d0470>" %}
Installing Roo Code through the built-in extensions marketplace
{% endembed %}
{% endstep %}

{% step %}

### Configure the Roo Code extension

Finally, configure Roo Code to take advantage of your nexos.ai API Gateway access.

* Head over to the new Roo Code tab in the left navigation bar
* Select "OpenAI Compatible" as your API Provider
* Provide "`https://api.nexos.ai/v1` " as the Base URL
* Paste the API key generated in step 1 in the API Key section
* Click the "Let's go!" button at the bottom of the configuration screen

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FcvQSR3obkXRXXBtl1F2H%2F3_nexos_roocode_config.mp4_00000000.mp4?alt=media&token=9357c616-4487-4f6c-85b4-9524fa237358>" %}
Configuring Roo Code with nexos.ai API Gateway
{% endembed %}

{% hint style="info" %}
If you want to find all available models and their names you can use the `/models` endpoint. Learn more here -  <https://docs.nexos.ai/gateway-api#get-v1-models>
{% endhint %}
{% endstep %}

{% step %}

### Send first message

Make sure everything is working correctly by sending the first message.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nexos.ai/gateway-api/integrations/roo-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
