> ## 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.

# DeepSeek Harness (dsh) + RuAPI: DeepSeek, Claude and GPT in one agent

> How to connect DeepSeek Harness (dsh) to RuAPI: custom model API, deepseek-flash, Claude and GPT with one key, turning thinking off, common errors.

[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (the `dsh` command) is an open-source AI agent from DeepSeek with a web UI (MIT license). It writes and reads files, runs terminal commands and works a task through to the end — much like Claude Code, but in the browser.

Through RuAPI, dsh can use `deepseek-flash`, Claude, GPT and other models with a single key, and you can pay in crypto (USDT) without a foreign bank card. A short overview is on [www.ruapi.ai/deepseek-harness-v-rossii](https://www.ruapi.ai/deepseek-harness-v-rossii?lng=en\&utm_source=docs\&utm_campaign=en-deepseek-harness).

> [!NOTE]
>
> The built-in **DeepSeek** card in dsh does not work with RuAPI: it talks to DeepSeek's own endpoint and uses file uploads (`/v1/files`), which RuAPI does not offer. Connect RuAPI through **Custom model API** as shown below.

> [!WARNING]
>
> dsh runs the commands the model suggests and edits files on its own. Run it in a **separate empty folder** (or on a separate server / VM), not in a folder with important data. dsh is a developer preview and its UI may change.

## What you need

**1. A RuAPI key**

[Console → API keys](https://www.ruapi.ai/console/token?utm_source=docs\&utm_campaign=en-deepseek-harness) → create a key `sk-...`. Right after sign-up you can use the trial models `deepseek-flash`, `claude-haiku-5-5` and `gpt-6-luna`.

**2. Node.js 24.9 or newer**

Check the version:

```bash theme={null}
node -v
```

You need `v24.9.0` or later. If it is older or the command is not found, install Node.js as described [below](#install-node-js).

**3. An empty working folder**

For example `dsh-test`. dsh will create and change files there.

## Install Node.js

You need 24.9 or newer. We tested on Node.js 24; the version currently marked **LTS** on the [nodejs.org download page](https://nodejs.org/en/download) is 26 — it meets dsh's requirement too, but we haven't tested it separately. Take the one marked **LTS**. `npm` and `npx` come with Node.js — no separate install needed.

> [tab] Windows
>
> 1. Download the **Windows Installer (.msi)** from the [nodejs.org download page](https://nodejs.org/en/download) (x64 for most computers).
> 2. Run it and click **Next**; the defaults are fine.
> 3. **Close and reopen** your terminal (PowerShell or Command Prompt), otherwise it won't see Node.js.
>
> Or with one command in PowerShell (if `winget` is available):
>
> ```powershell theme={null}
> winget install OpenJS.NodeJS.LTS
> ```
>
> Close and reopen the terminal after this too. If winget asks you to accept the source agreements, answer `Y`.
>
> > [!WARNING]
> >
> > If PowerShell says “File …\npx.ps1 cannot be loaded because running scripts is disabled on this system”, type `npx.cmd` instead of `npx`: `npx.cmd -v` for the check and `npx.cmd @deepseek-ai/dsh web` to start dsh. Or use Command Prompt (cmd).

> [tab] macOS
>
> 1. Download the **macOS Installer (.pkg)** from the [nodejs.org download page](https://nodejs.org/en/download) — it works on both Apple Silicon and Intel Macs.
> 2. Open it and follow the installer.
> 3. Open a new Terminal window.
>
> With Homebrew:
>
> ```bash theme={null}
> brew install node
> ```

> [tab] Linux (Ubuntu / Debian)
>
> The `nodejs` package from the default repository is often older than 24.9 (version 22, for example). If it is installed, remove it and install Node.js 24 from the NodeSource repository:
>
> ```bash theme={null}
> sudo apt remove -y nodejs && sudo apt autoremove -y
> sudo apt update && sudo apt install -y curl
> curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
> sudo apt install -y nodejs
> ```
>
> If you are logged in as `root`, drop `sudo` (and `-E`). This is how we installed Node.js on an Ubuntu server when testing this guide.

Check the install:

```bash theme={null}
node -v
npx -v
```

`node -v` should show `v24.9.0` or later; `npx -v` just prints a version number (e.g. `11.19.1`), which means npx is in place.

> [!TIP]
>
> If [nodejs.org](https://nodejs.org/) is slow or the download breaks off, you can try the same installer from the [npmmirror.com/mirrors/node](https://npmmirror.com/mirrors/node/) mirror: open the folder for the version you want (for example `v24.22.2/`) and pick `node-v…-x64.msi` for Windows or `node-v….pkg` for macOS. It mirrors the nodejs.org files.

## Step 1. Start dsh

In a terminal, create an empty folder, go into it and start dsh:

```bash theme={null}
mkdir dsh-test
cd dsh-test
npx @deepseek-ai/dsh web
```

On the first run npm asks whether to install the package — answer `y`. The `npm warn deprecated node-domexception` warning is harmless.

dsh opens your browser at `http://127.0.0.1:3080`.

> [!WARNING]
>
> If you open the page yourself, copy **the whole line** from the terminal, including `?token=...`:
>
> ```
> dsh web: http://127.0.0.1:3080/?token=...
> ```
>
> Without the token the page shows `dsh web authentication required`. The token is the password to your dsh — keep it out of screenshots. It changes every time dsh restarts.

> [accordion] dsh on a remote server (no graphical desktop)
>
> Connect to the server with port forwarding (replace `user@server` with your login and server address):
>
> ```bash theme={null}
> ssh -L 3080:127.0.0.1:3080 user@server
> ```
>
> In the same window, start dsh without opening a browser:
>
> ```bash theme={null}
> mkdir -p ~/dsh-test && cd ~/dsh-test && npx @deepseek-ai/dsh web --no-open
> ```
>
> Keep the window open and, on your own computer, open the token line dsh printed in your browser. Better run dsh as a regular user rather than `root`, so the agent has fewer rights on the server.

> [!TIP]
>
> If `npx` cannot download the package for a long time, try another npm mirror, for example:
>
> ```bash theme={null}
> npm config set registry https://registry.npmmirror.com
> ```
>
> To go back to the default registry: `npm config set registry https://registry.npmjs.org`.

## Step 2. First launch

1. A preview notice appears — close it with the button at the bottom of the window.
2. Pick a workspace: click the folder selector above the input box, choose your folder (for example `dsh-test`) and click **Open**. Until a folder is chosen, dsh shows a message that it could not create a default workspace.
3. dsh picks the interface language from your browser. To change it: **More** (bottom left) → **Settings** → **General** → **Language**. Russian, Chinese and several other languages are available.

![dsh settings: interface language list](https://mintcdn.com/no-d0cfaf14/WrUTbT3Z7Mkwzwdf/images/dsh/language-en.webp?fit=max\&auto=format\&n=WrUTbT3Z7Mkwzwdf\&q=85\&s=71aee4c9b7619914e5ca1fa93bac9464)

## Step 3. Connect RuAPI

**More** → **Settings** → **Models** → **Add model provider** → **Custom model API** tab.

| Field | Value |
| - | - |
| Provider ID | `ruapi` (lowercase; cannot be changed later) |
| Display name | `RuAPI` |
| Base URL | `https://www.ruapi.ai/v1` |
| API protocol | **OpenAI Chat Completions** (the default) |
| API key | your `sk-...` key |

![dsh: Custom model API form](https://mintcdn.com/no-d0cfaf14/WrUTbT3Z7Mkwzwdf/images/dsh/add-provider-en.webp?fit=max\&auto=format\&n=WrUTbT3Z7Mkwzwdf\&q=85\&s=e3c4b1a21ee2c1005a7f221a4904df40)

Click **Fetch available models**. The full RuAPI model list opens — clear the selection first, then use search to tick the models you want. Three are enough to start: `deepseek-flash`, `claude-haiku-5-5` and `gpt-6-luna`.

![dsh: Choose models dialog with the RuAPI model list](https://mintcdn.com/no-d0cfaf14/WrUTbT3Z7Mkwzwdf/images/dsh/fetch-models-en.webp?fit=max\&auto=format\&n=WrUTbT3Z7Mkwzwdf\&q=85\&s=cf9b9d9c072e0264c5e4c5f4b60dff7a)

Click **Update list**, then **Create provider**. RuAPI should show a green dot in the provider list.

![dsh: RuAPI provider with base URL https://www.ruapi.ai/v1 and three models](https://mintcdn.com/no-d0cfaf14/WrUTbT3Z7Mkwzwdf/images/dsh/provider-config-en.webp?fit=max\&auto=format\&n=WrUTbT3Z7Mkwzwdf\&q=85\&s=7d0d3eba0b1c75526fbea17f7f4641fb)

All model names are on the [pricing page](https://www.ruapi.ai/pricing?utm_source=docs\&utm_campaign=en-deepseek-harness). To add a model later: **Models** → **Edit** next to RuAPI → **Customized settings** → **Fetch available models**.

## Step 4. First task

1. **New Session** (top left).
2. Click the model button at the bottom right of the input box and choose, for example, `deepseek-flash`.

![dsh: model menu with RuAPI models](https://mintcdn.com/no-d0cfaf14/WrUTbT3Z7Mkwzwdf/images/dsh/model-picker-en.webp?fit=max\&auto=format\&n=WrUTbT3Z7Mkwzwdf\&q=85\&s=ad92af9ec5610a391fa8eccbe88a87fe)

3. Send a task, for example:

```
Create a file hello.txt in the current folder with the text "Hello", then list the files in the folder.
```

dsh creates the file, runs a command and reads the result. In our test `deepseek-flash` did it in 9 seconds, `claude-haiku-5-5` in 6, `gpt-6-luna` in 14.

![dsh: deepseek-flash via RuAPI created hello.txt and listed the files](https://mintcdn.com/no-d0cfaf14/WrUTbT3Z7Mkwzwdf/images/dsh/task-done-en.webp?fit=max\&auto=format\&n=WrUTbT3Z7Mkwzwdf\&q=85\&s=ff6006f8c7482917ed1507a55d99b6c9)

> [!TIP]
>
> To switch models mid-work, start a **new session**: the new model then starts with a clean context instead of continuing another model's history.

## Reasoning levels for deepseek-flash

`deepseek-flash` thinks before answering by default. To switch levels right in the chat:

1. **Settings** → **Models** → **Edit** next to RuAPI → **Customized settings**.
2. Click the arrow next to `deepseek-flash` → turn on **Reasoning levels** (off / low / medium / high) → **Apply**.

![dsh: reasoning levels for deepseek-flash](https://mintcdn.com/no-d0cfaf14/WrUTbT3Z7Mkwzwdf/images/dsh/reasoning-levels-en.webp?fit=max\&auto=format\&n=WrUTbT3Z7Mkwzwdf\&q=85\&s=05370e890f818a955bf4039bc53cc7c2)

The model menu at the bottom right now has two levels: **Model** to pick the model and **Effort** to pick the level.

![dsh: Effort menu with Off, Low, Medium, High](https://mintcdn.com/no-d0cfaf14/WrUTbT3Z7Mkwzwdf/images/dsh/effort-menu-en.webp?fit=max\&auto=format\&n=WrUTbT3Z7Mkwzwdf\&q=85\&s=f95e6bb461443aff596a81d3a2c55ef5)

> [!WARNING]
>
> **Off alone does not turn thinking off.** With Off, dsh simply sends nothing, and DeepSeek keeps thinking unless told not to. One setting has to be added to the config file — it is not in the form.

Open `~/.dsh/profiles/web/cordis.patch.yml` (on Windows `%USERPROFILE%\.dsh\profiles\web\cordis.patch.yml`) and add two `compat` lines under `name: deepseek-flash`:

```yaml theme={null}
          - id: deepseek-flash
            name: deepseek-flash
            compat:
              thinkingFormat: deepseek
            reasoningEfforts:
```

Indent with spaces, exactly like the neighboring lines. Save the file, stop dsh (`Ctrl+C`) and run `npx @deepseek-ai/dsh web` again in the same window (in a new terminal, `cd dsh-test` first); the token in the address will be new.

In our test Off then answered in 3 seconds without thinking (before the change: 9 seconds, 3 of them thinking), and High in 6 seconds.

> [!TIP]
>
> The easiest way is the **Open configuration file** button at the top right of the Settings window — it works on the computer where dsh runs. On Windows you can also press `Win+R`, paste `%USERPROFILE%\.dsh\profiles\web\cordis.patch.yml` and choose Notepad. On a server: `nano ~/.dsh/profiles/web/cordis.patch.yml` (save with `Ctrl+O` and `Enter`, exit with `Ctrl+X`).

## Claude via the native Anthropic format (optional)

Claude models already work through the `ruapi` provider above. If you use Claude a lot, you can add a second provider with the native Anthropic protocol — prompt caching then kicks in one turn earlier.

**Add model provider** → **Custom model API**:

| Field | Value |
| - | - |
| Provider ID | `ruapi-claude` |
| Display name | `RuAPI Claude` |
| Base URL | `https://www.ruapi.ai` (**without** `/v1`) |
| API protocol | **Anthropic Messages** |
| API key | the same `sk-...` key |

**Fetch available models** → tick the Claude models you need (for example `claude-haiku-5-5`) → **Update list** → **Create provider**. They appear in the model menu under **RuAPI Claude**.

![dsh: RuAPI Claude provider with Anthropic Messages protocol and base URL https://www.ruapi.ai](https://mintcdn.com/no-d0cfaf14/WrUTbT3Z7Mkwzwdf/images/dsh/anthropic-en.webp?fit=max\&auto=format\&n=WrUTbT3Z7Mkwzwdf\&q=85\&s=090b0146b61e4afecf3cd2a459e4c29b)

What our test showed (three short questions in a row in one session, `claude-haiku-5-5`):

| Turn | Cache via `ruapi` (OpenAI format) | Cache via `ruapi-claude` (Anthropic format) |
| - | - | - |
| 1st | 0% | 0% |
| 2nd | 0% | 100% |
| 3rd | 100% | 100% |

The only difference is the second turn of each session, so one `ruapi` provider is enough for most people.

## Costs

* On every step dsh sends the model its system prompt, tool definitions and history — 26–36K input tokens per step in our test.
* Most of that input usually comes from the cache (70–97% in our test; for Claude via the OpenAI format caching starts only from the third turn, see the table above), and cached tokens cost far less. More in [Prompt caching](https://docs.ruapi.ai/en/prompt-caching.md).
* The cheapest model for dsh is `deepseek-flash`. You can see the cost of every request in the RuAPI console → **Usage Logs**.

## Common problems

> [accordion] dsh web authentication required
>
> The page was opened without the token. Copy the whole `http://127.0.0.1:3080/?token=...` line from the terminal.

> [accordion] dsh says it cannot create a default workspace
>
> Pick the folder yourself with the folder selector above the input box → your folder → **Open**.

> [accordion] npx complains about the Node.js version
>
> You need Node.js 24.9 or newer. Check `node -v` and update Node.js.

> [accordion] Fetch available models returns 401
>
> The key is wrong or deleted. Check it in the RuAPI console and paste it again: **Models** → **Edit** → **API key**.

> [accordion] The model menu is empty
>
> No model is ticked for the provider. **Edit** → **Customized settings** → **Fetch available models** → tick models → **Update list** → **Apply**.

> [accordion] deepseek-flash thinks even on Off
>
> Add `compat: thinkingFormat: deepseek` to the config file and restart dsh — see “Reasoning levels for deepseek-flash” above.

> [accordion] “Try a trial model first…” when choosing another model
>
> Before the first top-up only the trial models work (`deepseek-flash`, `claude-haiku-5-5`, `gpt-6-luna`). To unlock all models, [top up your balance](https://www.ruapi.ai/console/topup?utm_source=docs\&utm_campaign=en-deepseek-harness) — USDT works, no foreign card needed.

## Security

* dsh stores your RuAPI key in the `~/.dsh` folder on your computer. Do not share that folder.
* A separate key for dsh is handy — you can delete it in the console if something goes wrong.
* dsh runs commands as your user. Do not run it in folders with important data, and do not give it tasks you are not ready to review.

## Next

* [Claude Code on DeepSeek](https://docs.ruapi.ai/en/integrations/claude-code-deepseek.md) — the same `deepseek-flash` in Claude Code.
* [Hermes Agent](https://docs.ruapi.ai/en/integrations/hermes.md) — another agent that works with RuAPI.
* [API error codes](https://docs.ruapi.ai/en/errors.md) — if a request returns an error.


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