<!-- Generated from public website sources; do not edit this file. -->

# Pi
Use DeepSeekSub models in the Pi terminal coding agent.

## Add the DeepSeekSub provider
Install Pi and create a [DeepSeekSub API key](https://deepseeksub.com/account/keys). Open `~/.pi/agent/models.json` or the `models.json` in your configured Pi agent directory. If the file already has providers, add the `deepseeksub` entry inside the existing `providers` object.

```json
{
  "providers": {
    "deepseeksub": {
      "baseUrl": "https://api.deepseeksub.com/v1",
      "api": "openai-completions",
      "apiKey": "DSSUB_API_KEY",
      "models": [
        { "id": "deepseek-flash", "name": "DeepSeek Flash" },
        { "id": "deepseek-v4-pro", "name": "DeepSeek V4 Pro" }
      ]
    }
  }
}
```

## Start Pi with your key
Set `DSSUB_API_KEY` in the same terminal session that starts Pi. Replace `your-api-key` with the key you created.

### macOS or Linux

```sh
export DSSUB_API_KEY="your-api-key"
pi --provider deepseeksub --model deepseek-flash
```

### Windows PowerShell

```powershell
$env:DSSUB_API_KEY = "your-api-key"
pi --provider deepseeksub --model deepseek-flash
```

## Verify the connection
Send “Reply with hello” and check [Usage](https://deepseeksub.com/account/usage) for your request. Use `/model` in Pi to switch to `deepseek-v4-pro` if your key allows it. If the model is missing, check the active agent directory and the JSON syntax. For authentication errors, check that `DSSUB_API_KEY` is set in the shell that launched Pi.

See the [Pi installation instructions](https://github.com/earendil-works/pi/tree/main/packages/coding-agent) and [custom models reference](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/models.md).

---

HTML source: [Pi — dssub Tutorials](https://deepseeksub.com/docs/pi/)
