> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ruapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How to use Roo Code with Claude, DeepSeek and GPT via RuAPI

> Step-by-step Roo Code setup in VS Code with RuAPI: Claude via the Anthropic provider with prompt caching; DeepSeek, GPT and Gemini via OpenAI Compatible; a separate profile for each mode. No VPN needed; pay in USDT.

[Roo Code](https://roocode.com) is an AI coding agent for VS Code: it writes and edits code across multiple files, runs commands and works in several modes — Architect, Code, Debug and more. It uses whichever model provider you configure. RuAPI gives you access to Claude, GPT, Gemini, DeepSeek, GLM, Qwen and Kimi with a single API key, and works from Russia without a VPN. You top up your balance in USDT; no foreign-issued card required.

## Choosing a connection method

| Models | API Provider | Base URL | Why |
| - | - | - | - |
| Claude: `claude-opus-5-5`, `claude-sonnet-5-5`, `claude-haiku-5-5` | **Anthropic** | `https://www.ruapi.ai` | Prompt caching works: context the agent re-sends at every step costs at least 10× less |
| DeepSeek, GPT, Gemini, GLM, Qwen, Kimi and others | **OpenAI Compatible** | `https://www.ruapi.ai/v1` | One URL for every other model |

<Warning>
  You can also connect Claude through **OpenAI Compatible**, but prompt caching won't work and long tasks will cost several times more. For Claude, use **Anthropic**.
</Warning>

Roo Code stores connection settings in **configuration profiles**. It's convenient to create two — for example, `RuAPI Claude` and `RuAPI DeepSeek` — and switch between them right from the chat.

## Before you start

<Steps>
  <Step title="RuAPI API key">
    Sign up at [www.ruapi.ai](https://www.ruapi.ai/?utm_source=docs\&utm_campaign=en-roo-code) and top up your balance ([how to top up](/en/topup)). Then go to Console → **API Keys** and click **Create API key**. Keys start with `sk-`.
  </Step>

  <Step title="Latest version of Roo Code">
    Install Roo Code from the VS Code Marketplace (search for “Roo Code”) or update it to the latest version.
  </Step>
</Steps>

<Tip>
  No bank card needed: you can top up your balance in USDT. If you don't have USDT yet, follow our [step-by-step guide to buying it with rubles](/en/buy-usdt). Foreign-issued cards are accepted too.
</Tip>

<Note>
  If your Roo Code interface is in another language, the field names will be translated, but their order and purpose are the same.
</Note>

## A profile for Claude (Anthropic provider)

<Steps>
  <Step title="Create a profile">
    Open Roo Code in the sidebar → ⚙️ → **Providers**. Click **+** next to the profile list and give the profile a name, for example, `RuAPI Claude`.
  </Step>

  <Step title="Fill in the fields">
    | Field | Value |
    | - | - |
    | **API Provider** | `Anthropic` |
    | **Anthropic API Key** | your RuAPI key `sk-...` |
    | **Use custom base URL** | check the box and enter `https://www.ruapi.ai` — **without** a trailing `/v1` |
    | **Model** | `claude-sonnet-5-5` for everyday work or `claude-opus-5-5` for complex tasks |
  </Step>

  <Step title="Save the profile">
    Click **Save**.
  </Step>
</Steps>

<Note>
  If the model you need isn't in the **Model** list, update Roo Code: the list of Anthropic models is bundled with the extension and updated with each release.
</Note>

## A profile for DeepSeek, GPT and other models (OpenAI Compatible)

<Steps>
  <Step title="Create another profile">
    ⚙️ → **Providers** → **+**, and name it, for example, `RuAPI DeepSeek`.
  </Step>

  <Step title="Fill in the fields">
    | Field | Value |
    | - | - |
    | **API Provider** | `OpenAI Compatible` |
    | **Base URL** | `https://www.ruapi.ai/v1` — **with** the trailing `/v1` |
    | **API Key** | your RuAPI key `sk-...` |
    | **Model** | the exact model name, e.g. `deepseek-flash`, `deepseek-v4-pro`, `gpt-5.4` or `glm-5.3` |
  </Step>

  <Step title="Check the model settings">
    In the model settings:

    * **Image Support** — enable it for GPT, Gemini and `deepseek-flash`. `deepseek-v4-pro` doesn't accept images.
    * **Context Window** — the model's context window. Don't set it higher than the model actually supports, or long tasks will fail with a context-length error.
    * **Input Price / Output Price** — optional. Enter the per-1M-token prices from the [pricing page](https://www.ruapi.ai/pricing?utm_source=docs\&utm_campaign=en-roo-code) and Roo Code will show an estimated cost for each task.
  </Step>

  <Step title="Save the profile">
    Click **Save**.
  </Step>
</Steps>

You'll find the exact names of all models on the [pricing page](https://www.ruapi.ai/pricing?utm_source=docs\&utm_campaign=en-roo-code). Enter them exactly as listed, including any prefix and capitalization (e.g. `kimi/kimi-k3`).

<Note>
  Roo Code only works with models that support tool calling. RuAPI's main text models — Claude, GPT, Gemini, DeepSeek, GLM, Qwen, Kimi — all do; image and video generation models won't work in Roo Code.
</Note>

## A model for each mode

Roo Code has several modes: **Architect** (design and planning), **Code** (writing and editing code), **Ask** (questions about the codebase), **Debug** (tracking down bugs) and **Orchestrator** (breaks a large task into subtasks). Each mode can use its own profile. Roo Code remembers which profile you last used in each mode, and you can pin a profile to a mode on the **Prompts** tab in the settings.

Combinations that work well:

| Mode | Profile and model |
| - | - |
| Architect, Orchestrator | `RuAPI Claude` with `claude-opus-5-5` |
| Code, Debug | `RuAPI Claude` with `claude-sonnet-5-5`, or `RuAPI DeepSeek` with `deepseek-flash` |
| Ask | `RuAPI DeepSeek` with `deepseek-flash` — cheap and fast |

## Your first task

Open a project folder, switch to **Code** mode and give it a task, for example:

```
Add error handling to the parseConfig function in config.ts
```

To confirm that requests are going through RuAPI, open Console → **Usage Logs**: you'll see an entry for each request with the model and cost. If Claude is connected via Anthropic, from the second or third step onward the entry details show how many tokens were read from the cache.

## Keeping costs down

* **New topic, new task.** The context grows with every step and is sent in full each time.
* **Save the strongest model for where it matters.** Use Opus for planning, and cheaper models for routine edits and questions.
* **Use a separate key with a spending limit.** Create a dedicated key for Roo Code and set a limit on it in Console → **API Keys**.

## Troubleshooting

<AccordionGroup>
  <Accordion title="401 / Invalid API Key">
    * Make sure you pasted the full RuAPI key (`sk-...`) with no extra spaces.
    * For the **Anthropic** provider, the URL is `https://www.ruapi.ai` **without** `/v1`; for **OpenAI Compatible**, it's `https://www.ruapi.ai/v1` **with** `/v1`.
  </Accordion>

  <Accordion title="Model Not Found / 404 / 503">
    The model name must match the one on RuAPI exactly — copy it from the [pricing page](https://www.ruapi.ai/pricing?utm_source=docs\&utm_campaign=en-roo-code).
  </Accordion>

  <Accordion title="400: “enabled” is not supported for this model">
    The newest Claude models (Opus 4.7 and later, plus all fifth-generation models) only support adaptive thinking. If an older version of Roo Code enables reasoning with a token budget for such a model, the request is rejected. Update Roo Code or turn off reasoning in the model settings.
  </Accordion>

  <Accordion title="Tool-calling errors">
    Make sure you've selected a text model, not an image or video generation model. If the error keeps happening with one model, try another — for example, `claude-sonnet-5-5` or `deepseek-flash`.
  </Accordion>

  <Accordion title="400: The reasoning_content in the thinking mode must be passed back">
    This can happen with DeepSeek in reasoning mode if you switch models or profiles mid-task. In most cases RuAPI automatically fixes and retries the request. If the error persists, start a new task.
  </Accordion>
</AccordionGroup>

## What's next

* [Cline](/en/integrations/cline) and [Kilo Code](/en/integrations/kilo-code) — similar VS Code agents.
* [Claude Code](/en/integrations/claude-code) — Anthropic's official terminal agent.
* [Models and prices](/en/models) — the full list of available models.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.