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

# Harness Integrations

> Connect Deploy-hosted models to your agent harness.

***

All models hosted on Deploy can be used inside your agent harness of choice. This guide gives you two paths:

1. **Agent-assisted**: Prompt your current coding agent to generate a configuration for your model.
2. **Manual setup**: Merge the provided config snippet into the config file yourself.

***

# **Connect to your agent harness**

You will need to specify the following in your config:

<table>
  <colgroup>
    <col width="100" />

    <col width="666" />
  </colgroup>

  <thead>
    <tr>
      <th>Setting</th>
      <th>Value</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Base URL</td>
      <td>Region-dependent. <ul><li>**Closest**: [https://api.deploy.com/api/v1](https://api.deploy.com/api/v1)</li><li>**SF**: [https://api-sf1.deploy.com/api/v1](https://api-sf1.deploy.com/api/v1)</li><li>**VA**: [https://api-va1.deploy.com/api/v1](https://api-va1.deploy.com/api/v1)</li></ul> If you're accessing from outside the US, you may have lower latency with: <ul><li>**Closest**: [https://api-cdn.deploy.com/api/v1](https://api-cdn.deploy.com/api/v1)</li><li>**SF**: [https://api-sf1-cdn.deploy.com/api/v1](https://api-sf1-cdn.deploy.com/api/v1)</li><li>**VA**: [https://api-va1-cdn.deploy.com/api/v1](https://api-va1-cdn.deploy.com/api/v1)</li></ul></td>
    </tr>

    <tr>
      <td>Model ID</td>
      <td>Any model key listed under [Available models](https://docs.deploy.com/models-and-pricing.md#available-open-source-models). The guide below uses `deepseek-ai/deepseek-v4.1-flash-1017` as an example.</td>
    </tr>

    <tr>
      <td>API Key</td>
      <td>Your Deploy Secret Key from [Service API Keys](https://portal.deploy.com/?api_keys=1).</td>
    </tr>
  </tbody>
</table>

**OpenCode**

## Agent-assisted installation

Make sure your current OpenCode model works, then paste the prompt below. It installs Deploy as a provider, resolves your API key safely, and walks you through verification.

```text Prompt theme={null}
Install Deploy (https://deploy.com) as a model provider in my OpenCode setup. Follow these steps exactly:

1. Detect my OS (Windows, macOS, or Linux) and pick the right global config path:
   - macOS/Linux: ~/.config/opencode/opencode.json
   - Windows: %USERPROFILE%\.config\opencode\opencode.json
   If the file does not exist, create it with this content. If it exists, MERGE the block below into it, keeping every other key I already have. If a project-level opencode.json exists in the current repo, ask me whether to put it there or globally before writing.
2. Merge in exactly this provider block (replace {DEPLOY_API_KEY} below; if the DEPLOY_API_KEY environment variable is already set in my environment, use it without asking; otherwise STOP and ask for my Deploy Secret Key, guiding me to get it first: log in at deploy.com, open Service API Keys in the left nav, use an existing Secret Key if I saved one, or click Create API Key to generate one and copy the Secret Key (it is shown only once, at generation time; the page lists Access Key IDs later, never Secret Keys), then paste it to you when you ask; do not invent a value):
   {
     "$schema": "https://opencode.ai/config.json",
     "model": "deploy/deepseek-ai/deepseek-v4.1-flash-1017",
     "provider": {
       "deploy": {
         "npm": "@ai-sdk/openai-compatible",
         "name": "Deploy",
         "options": {
           "baseURL": "https://api.deploy.com/api/v1",
           "apiKey": "{DEPLOY_API_KEY}"
         },
         "models": {
           "deepseek-ai/deepseek-v4.1-flash-1017": {
             "name": "Deepseek 4.1 Flash 1017",
             "limit": { "context": 1000000, "output": 32768 },
             "modalities": {
               "input": ["text", "image"],
               "output": ["text"]
             }
           }
         }
       }
     }
   }
3. If I am a Virginia (VA1) customer, use baseURL https://api-va1.deploy.com/api/v1 for the provider instead. Otherwise keep https://api.deploy.com/api/v1.
4. Make sure the final file parses as valid JSON (validate it). Never print my API key back to me or commit it to any git repo.
5. Tell me to restart OpenCode, run /models, and select "Deploy / Deepseek 4.1 Flash 1017". Then ask me to send a short test message to confirm it works.
```

## Manual setup

**Config file**: `opencode.json` at the global path `~/.config/opencode/opencode.json` (macOS/Linux), `%USERPROFILE%.config\opencode\opencode.json` (Windows), or the project-level opencode.json in the repo root. Global and project configs merge.

1. Open or create the config file at one of the paths above. If a config already exists, keep every key you have (merge, don't overwrite). If your OpenCode version is older than 1.x, install or upgrade first with `npm i -g opencode-ai`.
2. If you are a Virginia (VA1) customer, use [https://api-va1.deploy.com/api/v1](https://api-va1.deploy.com/api/v1) as the base URL. Otherwise, use [https://api.deploy.com/api/v1](https://api.deploy.com/api/v1).
3. Merge in this provider block, replacing `{DEPLOY_API_KEY}` with your Deploy Secret Key (create the key at deploy.com → navigation sidebar → **Service API Keys** → **Create API Key**):

```json theme={null}
{
  "$schema": "https://opencode.ai/config.json",
  "model": "deploy/deepseek-ai/deepseek-v4.1-flash-1017",
  "provider": {
    "deploy": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Deploy",
      "options": {
        "baseURL": "https://api.deploy.com/api/v1",
        "apiKey": "{DEPLOY_API_KEY}"
      },
      "models": {
        "deepseek-ai/deepseek-v4.1-flash-1017": {
          "name": "Deepseek 4.1 Flash 1017",
          "limit": { "context": 1000000, "output": 32768 },
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          }
        }
      }
    }
  }
}
```

4. Restart OpenCode so the config reloads (quit and relaunch, or `/exit` and re-run `opencode`), open the model picker (`/models`), select **Deploy / Deepseek 4.1 Flash 1017**, and send:
   > Reply with the single word: connected

**Hermes**

## **Agent-assisted installation**

Paste the prompt below into your Hermes Agent chat. It installs Deploy as a provider, resolves your API key safely, and walks you through verification.

```text Prompt theme={null}
Connect Hermes Agent to Deploy (https://deploy.com) as a custom OpenAI-compatible provider. Follow these steps exactly:

1. Detect my OS and use the correct Hermes home:
   - macOS/Linux/WSL2: ~/.hermes/
   - Native Windows: %LOCALAPPDATA%\hermes\
2. Edit config.yaml in that Hermes home. MERGE the following into it, keeping every other key I already have:
   model:
     provider: custom
     default: deepseek-ai/deepseek-v4.1-flash-1017
     base_url: https://api.deploy.com/api/v1
     api_key: ${DEPLOY_API_KEY}
   If a model: block already exists, replace only its inner values.
3. Edit the .env file in the same Hermes home and add a line:
   DEPLOY_API_KEY=<key>
    If the DEPLOY_API_KEY environment variable is already set in my environment, use that value without asking; otherwise STOP and ask for my Deploy Secret Key, guiding me to get it first: log in at deploy.com, open Service API Keys in the left nav, use an existing Secret Key if I saved one, or click Create API Key to generate one and copy the Secret Key (it is shown only once, at generation time; the page lists Access Key IDs later, never Secret Keys), then paste it to you when you ask; never invent a value, never echo it back, never commit it to git.
4. If I am a Virginia (VA1) customer, use base_url https://api-va1.deploy.com/api/v1 for the provider instead. Otherwise keep https://api.deploy.com/api/v1.
5. The model ID is configured by hand in the block above; select it explicitly as custom:deepseek-ai/deepseek-v4.1-flash-1017, with the model name passed as shown.
6. Verify: tell me to run `hermes doctor` (fix anything it reports related to the model config), start a new session with `hermes`, run `/model` and pick custom:deepseek-ai/deepseek-v4.1-flash-1017, then send a test message.
```

## **Manual setup**

**Config files**: `~/.hermes/config.yaml` (model/provider) and `~/.hermes/.env` (keys) on macOS/Linux/WSL2; `%LOCALAPPDATA%\hermes\config.yaml` and `%LOCALAPPDATA%\hermes.env` on native Windows. Hermes uses YAML for its config.

1. If you are a Virginia (VA1) customer, use [https://api-va1.deploy.com/api/v1](https://api-va1.deploy.com/api/v1) as the base URL. Otherwise, use [https://api.deploy.com/api/v1](https://api.deploy.com/api/v1).
2. Edit `config.yaml` in your Hermes home, merging with anything already there. If a `model:` block exists, replace only its inner values:

```yaml YAML theme={null}
model:
  provider: custom
  default: deepseek-ai/deepseek-v4.1-flash-1017
  base_url: https://api.deploy.com/api/v1
  api_key: ${DEPLOY_API_KEY}
```

3. Add the key to `.env` in the same Hermes home:

```text Text theme={null}
DEPLOY_API_KEY={DEPLOY_API_KEY}

```

4. Verify. Run `hermes doctor` (fix anything it reports about the model config), start a new session with `hermes`, run `/model`, pick **custom:deepseek-ai/deepseek-v4.1-flash-1017**, and send:
   > Reply with the single word: connected

**Kilo Code**

## **Agent-assisted installation**

Paste the prompt below into your Kilo Chat. It registers Deploy as a provider, resolves your API key safely, and walks you through verification.

```text Prompt theme={null}
Add Deploy (https://deploy.com) as a model provider in my Kilo Code setup. Follow these steps exactly:

1. Detect my OS and find my Kilo config:
   - Global (recommended, trusted): macOS/Linux ~/.config/kilo/kilo.jsonc or kilo.json; Windows %USERPROFILE%\.config\kilo\kilo.jsonc
   - Workspace: kilo.json (or kilo.jsonc) in the current repo
   Prefer the global config for credentials. If the file does not exist, create it; if it exists, MERGE, keeping everything I already have. If both exist, put the provider in global and the model default wherever my existing config lives.
2. Merge in exactly (replace {DEPLOY_API_KEY} below; if the DEPLOY_API_KEY environment variable is already set in my environment, use it without asking; otherwise STOP and ask for my Deploy Secret Key, helping me get it first: log in at deploy.com, open Service API Keys in the left nav, use an existing Secret Key if I saved one, or click Create API Key to generate one and copy the Secret Key (it is shown only once, at generation time; the page lists Access Key IDs later, never Secret Keys), then paste it to you only when you ask, first; never invent a value, never echo it back, never commit it to git):
   {
     "$schema": "https://app.kilo.ai/config.json",
     "model": "deploy/deepseek-ai/deepseek-v4.1-flash-1017",
     "provider": {
       "deploy": {
         "name": "Deploy",
         "npm": "@ai-sdk/openai-compatible",
         "options": {
           "baseURL": "https://api.deploy.com/api/v1",
           "apiKey": "{DEPLOY_API_KEY}"
         },
         "models": {
           "deepseek-ai/deepseek-v4.1-flash-1017": {
             "name": "Deepseek 4.1 Flash 1017",
             "reasoning": true,
             "tool_call": true,
             "limit": { "context": 1000000, "output": 32768 },
             "modalities": {
               "input": ["text", "image"],
               "output": ["text"]
             }
           }
         }
       }
     }
   }
   Note that {env:VAR} references only resolve in the trusted global config, so in global config you may use "apiKey": "{env:DEPLOY_API_KEY}" if I prefer, with DEPLOY_API_KEY set in my shell.
3. Keep the limit block exactly as shown: without limit.context, Kilo disables conversation compaction, and without limit.output the output cap falls back to Kilo's default.
4. If I am a Virginia (VA1) customer, use baseURL https://api-va1.deploy.com/api/v1 for the provider instead. Otherwise keep https://api.deploy.com/api/v1.
5. Verify: tell me to reload the VS Code window (or restart the Kilo CLI), open Kilo, pick Deploy / Deepseek 4.1 Flash 1017 in the model picker, and run a task that edits a file (e.g. "create hello.txt containing hi") to confirm tool calling works over Deploy.
```

## **Manual setup**

**Config file**: `kilo.jsonc` (JSONC, comments allowed). Workspace level in the repo, or global at `~/.config/kilo/kilo.jsonc` (macOS/Linux) / `%USERPROFILE%.config\kilo\kilo.jsonc` (Windows).

1. Pick where the config lives. Prefer the global (trusted) config for credentials. If the file does not exist, create it; if it exists, merge, keeping everything you already have. If both global and workspace configs exist, put the provider in global and the model default wherever your existing config lives.
2. If you are a Virginia (VA1) customer, use [https://api-va1.deploy.com/api/v1](https://api-va1.deploy.com/api/v1) as the base URL. Otherwise, use [https://api.deploy.com/api/v1](https://api.deploy.com/api/v1).
3. Merge in this block, replacing \{DEPLOY\_API\_KEY} with your Deploy Secret Key:
   1. Two details to keep in mind. Keep the `limit` block: for custom providers not in the [models.dev](http://models.dev) catalog, it sets the context and output values Kilo uses for compaction and the output cap. \{env:VAR} interpolation resolves only in the global (trusted) config: in a repo-level `kilo.json` you must inline the key or reference a file, while in global config you may use `"apiKey": "{env:DEPLOY_API_KEY"}"` with DEPLOY\_API\_KEY exported in your shell instead of an inline literal.

```json JSON theme={null}
{
  "$schema": "https://app.kilo.ai/config.json",
  "model": "deploy/deepseek-ai/deepseek-v4.1-flash-1017",
  "provider": {
    "deploy": {
      "name": "Deploy",
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://api.deploy.com/api/v1",
        "apiKey": "{DEPLOY_API_KEY}"
      },
      "models": {
        "deepseek-ai/deepseek-v4.1-flash-1017": {
          "name": "Deepseek 4.1 Flash 1017",
          "reasoning": true,
          "tool_call": true,
          "limit": { "context": 1000000, "output": 32768 },
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          }
        }
      }
    }
  }
}
```

4. Verify. Reload the VS Code window (or restart the Kilo CLI), open Kilo, pick **Deploy / Deepseek 4.1 Flash 1017** in the model picker, and run a task that edits a file (e.g. "create hello.txt containing hi") to confirm tool calling works over Deploy.

**OpenClaw Gateway**

## **Agent-assisted installation**

Paste the prompt below into an agent chat. It adds Deploy as a model provider in your OpenClaw gateway, resolves your API key safely, and walks you through verification.

```text Prompt theme={null}
Add Deploy (https://deploy.com) as a model provider to my OpenClaw gateway. Follow these steps exactly:

1. Detect my OS and open the right config file:
   - macOS/Linux/WSL2: ~/.openclaw/openclaw.json
   - Native Windows: %USERPROFILE%\.openclaw\openclaw.json
   The file is JSON5 (comments allowed). If it does not exist, create it with the block below; if it exists, MERGE the block into it, keeping every existing key, channel config, and setting I already have.
2. Merge in exactly:
   {
     agents: {
       defaults: {
         model: { primary: "deploy/deepseek-ai/deepseek-v4.1-flash-1017" },
       },
     },
     models: {
       mode: "merge",
       providers: {
         deploy: {
           baseUrl: "https://api.deploy.com/api/v1",
           apiKey: "${DEPLOY_API_KEY}",
           api: "openai-completions",
           models: [
             {
               id: "deepseek-ai/deepseek-v4.1-flash-1017",
               name: "Deepseek 4.1 Flash 1017",
               reasoning: true,
               input: ["text", "image"],
               contextWindow: 1000000,
               maxTokens: 32768,
             },
           ],
         },
       },
     },
     env: {
       vars: {
         DEPLOY_API_KEY: "{DEPLOY_API_KEY}",
       },
     },
   }
   If I already define env.vars, add DEPLOY_API_KEY inside the existing block instead of duplicating it.
3. If the DEPLOY_API_KEY environment variable is already set in my environment, use that value without asking; otherwise STOP and ask for my key, and guide me to get one first: log in at deploy.com, open Service API Keys in the left nav, use an existing Secret Key if I saved one, or click Create API Key to generate one and copy the Secret Key (it is shown only once, at generation time; the page lists Access Key IDs later, never Secret Keys), then paste it to you when you ask, then substitute it for {DEPLOY_API_KEY}; never invent a key, never echo it back, never commit it to git. Alternatively offer me the choice of keeping the key in my shell environment instead of env.vars, and do whichever I pick.
4. If I am a Virginia (VA1) customer, use baseUrl https://api-va1.deploy.com/api/v1 for the provider instead. Otherwise keep https://api.deploy.com/api/v1.
5. Verify: run `openclaw gateway restart` (or tell me to restart the Gateway service on my OS), then run `openclaw models list` and confirm deploy/deepseek-ai/deepseek-v4.1-flash-1017 appears and is primary. Then have me send a short test message through the dashboard (`openclaw dashboard`) or any connected channel.
```

## **Manual setup**

**Config file**: `~/.openclaw/openclaw.json` (JSON5, comments allowed; on Windows native installs it is `%USERPROFILE%.openclaw\openclaw.json`). If a config exists, keep every existing key, channel config, and setting, and merge rather than overwrite.

1. If you are a Virginia (VA1) customer, use [https://api-va1.deploy.com/api/v1](https://api-va1.deploy.com/api/v1) as the base URL. Otherwise, use [https://api.deploy.com/api/v1](https://api.deploy.com/api/v1).
2. Merge in this block, replacing \{DEPLOY\_API\_KEY} with your Deploy Secret Key:
   1. There are two interchangeable ways to carry the key: the `env.vars` block below (OpenClaw injects it into the gateway process), or export `DEPLOY_API_KEY` in your shell and rely on the "\$\{DEPLOY\_API\_KEY}" interpolation. Pick one. If you already define `env.vars`, add `DEPLOY_API_KEY` inside the existing block instead of duplicating it.

```json JSON theme={null}
{
  agents: {
    defaults: {
      model: { primary: 'deploy/deepseek-ai/deepseek-v4.1-flash-1017' },
    },
  },
  models: {
    mode: 'merge',
    providers: {
      deploy: {
        baseUrl: 'https://api.deploy.com/api/v1',
        apiKey: '${DEPLOY_API_KEY}',
        api: 'openai-completions',
        models: [
          {
            id: 'deepseek-ai/deepseek-v4.1-flash-1017',
            name: 'Deepseek 4.1 Flash 1017',
            reasoning: true,
            input: ['text', 'image'],
            contextWindow: 1000000,
            maxTokens: 32768,
          },
        ],
      },
    },
  },
  env: {
    vars: {
      DEPLOY_API_KEY: '{DEPLOY_API_KEY}',
    },
  },
}
```

3. Apply and verify. Run `openclaw gateway restart`, then `openclaw models list` . Confirm **deploy/deepseek-ai/deepseek-v4.1-flash-1017** appears and is primary. Then, send a short test message through the dashboard (`openclaw dashboard`) or any connected channel.

**DeepSeek Harness**

## **Agent-assisted installation**

Paste the prompt below into an agent chat (it works from the DeepSeek Harness (dsh) Web UI's agent or any coding agent with file access). It registers Deploy as a provider, routes fresh agents to it, resolves your API key safely, and walks you through verification.

```text Prompt theme={null}
Add Deploy (https://deploy.com) as a custom model provider in my DeepSeek Harness (dsh) settings. Follow these steps exactly:

1. Locate $DSH_HOME/settings.yaml (the .dsh settings directory for my dsh workspace; ask me which workspace I run dsh from if it is ambiguous). If the file or llm-pi-ai section does not exist, create it; MERGE, keeping every key I already have.
2. Merge in exactly:
   agent-default-model:
     provider: deploy
     model: deepseek-ai/deepseek-v4.1-flash-1017
   llm-pi-ai:
     defaultModel:
       provider: deploy
       model: deepseek-ai/deepseek-v4.1-flash-1017
     providers:
       deploy:
         apiKeyEnv: DEPLOY_API_KEY
         api: openai-completions
         baseURL: https://api.deploy.com/api/v1
         compat:
           supportsDeveloperRole: false
           maxTokensField: max_tokens
         models:
           - id: deepseek-ai/deepseek-v4.1-flash-1017
             name: Deepseek 4.1 Flash 1017
             input: [text, image]
   (The agent-default-model block routes fresh agents to Deploy.)
3. Detect my OS and set the environment variable DEPLOY_API_KEY so the dsh server process can see it:
   - macOS/Linux: append `export DEPLOY_API_KEY=...` to my shell profile.
   - Windows: set it as a User environment variable via PowerShell and tell me to restart my terminal and the dsh server.
    If the DEPLOY_API_KEY environment variable is already set in my environment, use that value without asking; otherwise STOP and ask for my key, and guide me to get one first: log in at deploy.com, open Service API Keys in the left nav, use an existing Secret Key if I saved one, or click Create API Key to generate one and copy the Secret Key (it is shown only once, at generation time; the page lists Access Key IDs later, never Secret Keys), then paste it to you when you ask; never invent a value, never echo it, never commit it to git.
4. If I am a Virginia (VA1) customer, use baseURL https://api-va1.deploy.com/api/v1 instead. Otherwise keep https://api.deploy.com/api/v1.
5. Keep the compat switches exactly as shown. Do NOT add, invent, or stub any other provider (not even placeholder deepseek-official entries).
6. Verify: tell me to reload the dsh Web UI, open Settings, Models (the Deploy provider should show Deepseek 4.1 Flash 1017), select deploy / Deepseek 4.1 Flash 1017 in the model picker, and send the test task "Reply with the single word: connected". If I see MISSING_CREDENTIAL, the DEPLOY_API_KEY env var is not visible to the dsh process; re-check step 3.
```

## **Manual setup**

**Config file**: `$DSH_HOME/settings.yaml` (`$DSH_HOME` defaults to the `.dsh` directory of the workspace you run `dsh` from; the Models page in the Web UI writes the same file). Model changes apply on the next request, no restart needed.

1. If you are a Virginia (VA1) customer, use [https://api-va1.deploy.com/api/v1](https://api-va1.deploy.com/api/v1) as the base URL. Otherwise, use [https://api.deploy.com/api/v1](https://api.deploy.com/api/v1).
2. Edit `$DSH_HOME/settings.yaml`, merging with existing content and never removing keys you already have:
   1. The blocks matter as follows: `agent-default-model` routes fresh agents (including headless profiles) to Deploy; `llm-pi-ai.defaultModel` is the Web UI's model-picker fallback; `providers.deploy.compat` holds the two switches that shape dsh's requests for this provider. Keep all three exactly as shown, and do not add, invent, or stub any other provider (not even placeholder `deepseek-official` entries).

```yaml YAML theme={null}
agent-default-model: # routes fresh agents (incl. dsh --profile headless) to Deploy
  provider: deploy
  model: deepseek-ai/deepseek-v4.1-flash-1017
llm-pi-ai:
  defaultModel: # web-UI model picker falls back here
    provider: deploy
    model: deepseek-ai/deepseek-v4.1-flash-1017
  providers:
    deploy:
      apiKeyEnv: DEPLOY_API_KEY
      api: openai-completions
      baseURL: https://api.deploy.com/api/v1
      compat:
        supportsDeveloperRole: false
        maxTokensField: max_tokens
      models:
        - id: deepseek-ai/deepseek-v4.1-flash-1017
          name: Deepseek 4.1 Flash 1017
          input: [text, image]
```

3. Export `DEPLOY_API_KEY` in the environment where the `dsh` server process runs (macOS/Linux: `export DEPLOY_API_KEY= {DEPLOY_API_KEY}` in `.zshrc/.bashrc`; Windows PowerShell: `[Environment]::SetEnvironmentVariable('DEPLOY_API_KEY','{DEPLOY_API_KEY}','User')`, then restart the terminal and the dsh server).
4. Verify. Reload the dsh Web UI, open Settings, Models (the `deploy` provider should show **Deepseek 4.1 Flash 1017**). Select **deploy / Deepseek 4.1 Flash 1017** in the model picker and send:
   > Reply with the single word: connected

**Claude Code**

Claude Code speaks the Anthropic Messages API, so this guide connects it to Deploy through a small local LiteLLM proxy that translates between Claude Code and Deploy's OpenAI-compatible API. This harness is pending re-verification after Deploy's 2026-09-22 API update and is not currently surfaced on the Deploy site.

## **Agent-assisted installation**

The prompt below instructs your current model to set up the LiteLLM bridge end-to-end: it creates the proxy config, installs and starts the proxy, points Claude Code at it, resolves your API key safely, and runs verification.

```text Prompt theme={null}
Set up Claude Code to use Deploy (https://deploy.com) through a local LiteLLM proxy. Claude Code speaks the Anthropic Messages API and Deploy serves an OpenAI-compatible API, so the proxy translates between them. Follow these steps exactly:

1. Detect my OS (Windows, macOS, or Linux) and adapt all paths and shell commands accordingly.
2. Check Python: LiteLLM needs Python 3.10+ (run `python --version` or `python3 --version`; if too old, tell me how to install a newer Python for my OS before continuing).
3. Create a LiteLLM config file:
   - macOS/Linux: ~/.litellm/litellm-deploy.yaml
   - Windows: %USERPROFILE%\.litellm\litellm-deploy.yaml
   Write exactly:
    model_list:
      - model_name: deploy-deepseek-v4.1-flash-1017
        litellm_params:
          model: custom_openai/deepseek-ai/deepseek-v4.1-flash-1017
          api_base: https://api.deploy.com/api/v1
          api_key: os.environ/DEPLOY_API_KEY
    litellm_settings:
      drop_params: true
    (Keep drop_params: true; Claude Code sends some request fields this provider does not use, and drop_params keeps the translation smooth.)
4. Install and start the proxy:
   - Install: pip install 'litellm[proxy]' (or: uv tool install 'litellm[proxy]')
   - If the DEPLOY_API_KEY environment variable is already set in my environment, use it without asking; otherwise STOP and ask for my Deploy Secret Key, guiding me to get it first: log in at deploy.com, open Service API Keys in the left nav, use an existing Secret Key if I saved one, or click Create API Key to generate one and copy the Secret Key (it is shown only once, at generation time; the page lists Access Key IDs later, never Secret Keys), then paste it to you when you ask. Set it as the environment variable DEPLOY_API_KEY for the proxy process (macOS/Linux: export DEPLOY_API_KEY=...; Windows PowerShell: $env:DEPLOY_API_KEY="..."). Never invent a key, never echo it, never commit it to git.
   - Start: litellm --config <path from step 3> --port 4000
   - Verify the proxy is listening on http://127.0.0.1:4000.
5. If I am a Virginia (VA1) customer, use api_base https://api-va1.deploy.com/api/v1 in the config instead. Otherwise keep https://api.deploy.com/api/v1.
6. Point Claude Code at the proxy by MERGING this into my Claude Code settings file (macOS/Linux: ~/.claude/settings.json; Windows: %USERPROFILE%\.claude\settings.json) under "env", keeping all my existing settings:
   {
     "env": {
       "ANTHROPIC_BASE_URL": "http://127.0.0.1:4000",
       "ANTHROPIC_AUTH_TOKEN": "sk-litellm-local",
       "ANTHROPIC_MODEL": "deploy-deepseek-v4.1-flash-1017"
     }
   }
7. The proxy must be running whenever I use Claude Code with Deploy: give me the exact start command for my OS and offer to show how to run it in the background (e.g. nohup or a systemd user unit on Linux, a background shell or launchd on macOS, or a separate terminal on Windows).
8. Verify end-to-end: make a test request through the proxy (e.g. curl http://127.0.0.1:4000/v1/messages with headers x-api-key: sk-litellm-local and anthropic-version: 2023-06-01, body {"model":"deploy-deepseek-v4.1-flash-1017","max_tokens":64,"messages":[{"role":"user","content":"Say connected"}]}), confirm the reply, then tell me to launch or restart `claude` and send a short test message.
```

## **Manual setup**

The bridge has three pieces: the LiteLLM config, the Claude Code settings, and the process that runs the proxy.

1. Create the LiteLLM config at `~/.litellm/litellm-deploy.yaml` (Windows: `%USERPROFILE%.litellm\litellm-deploy.yaml`).
   1. If you are a Virginia (VA1) customer, use [https://api-va1.deploy.com/api/v1](https://api-va1.deploy.com/api/v1) as the base URL. Otherwise, use [https://api.deploy.com/api/v1](https://api.deploy.com/api/v1).
   2. The `custom_openai/` prefix routes Claude Code's requests through the OpenAI Chat Completions translation; `api_key: os.environ/DEPLOY_API_KEY` reads the key from your environment.

```yaml YAML theme={null}
model_list:
  - model_name: deploy-deepseek-v4.1-flash-1017
    litellm_params:
      model: custom_openai/deepseek-ai/deepseek-v4.1-flash-1017 # custom_openai/ prefix + the Deploy model key
      api_base: https://api.deploy.com/api/v1
      api_key: os.environ/DEPLOY_API_KEY
litellm_settings:
  drop_params: true # keeps the translation smooth when Claude Code sends extra request fields
```

2. Point Claude Code at the proxy. Merge into `~/.claude/settings.json` (Windows: `%USERPROFILE%.claude\settings.json`), keeping your existing settings:

```json JSON theme={null}
{
  "env": {
    "ANTHROPIC_BASE_URL": "http://127.0.0.1:4000",
    "ANTHROPIC_AUTH_TOKEN": "sk-litellm-local",
    "ANTHROPIC_MODEL": "deploy-deepseek-v4.1-flash-1017"
  }
}
```

3. Run the proxy. With `DEPLOY_API_KEY` exported:
   1. On Windows (PowerShell), install the same way, then `$env:DEPLOY_API_KEY="{DEPLOY_API_KEY}"` and `litellm --config $HOME.litellm\litellm-deploy.yaml --port 4000`. Keep the proxy running while you use Claude Code.

```shellscript Shell theme={null}
pip install 'litellm[proxy]'
export DEPLOY_API_KEY={DEPLOY_API_KEY}        # macOS/Linux
litellm --config ~/.litellm/litellm-deploy.yaml --port 4000
```

4. Verify. Test the proxy directly, then Claude Code:

```bash cURL theme={null}
curl http://127.0.0.1:4000/v1/messages \
  -H "x-api-key: sk-litellm-local" -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"deploy-deepseek-v4.1-flash-1017","max_tokens":64,"messages":[{"role":"user","content":"Say connected"}]}'
```

5. Launch (or restart) `claude` and send a short test message.

**Pi**

## **Agent-assisted installation**

Paste the prompt below into your Pi chat. It adds Deploy as a provider, resolves your API key safely, and walks you through verification.

```text Prompt theme={null}
Add Deploy (https://deploy.com) as a provider to my Pi coding agent. Follow these steps exactly:

1. Detect my OS and open (or create) the right file:
   - macOS/Linux: ~/.pi/agent/models.json
   - Windows: %USERPROFILE%\.pi\agent\models.json
   It is a JSON file keyed by "providers". If it already exists, MERGE a "deploy" provider into the existing "providers" object, keeping every existing provider. The file hot-reloads when /model is opened, so no restart is needed after editing.
2. Merge in exactly:
   {
     "deploy": {
       "baseUrl": "https://api.deploy.com/api/v1",
       "api": "openai-completions",
       "apiKey": "$DEPLOY_API_KEY",
       "models": [
         {
           "id": "deepseek-ai/deepseek-v4.1-flash-1017",
           "name": "Deepseek 4.1 Flash 1017",
           "reasoning": true,
           "input": ["text", "image"],
           "contextWindow": 1000000,
           "maxTokens": 16384,
           "compat": {
             "supportsDeveloperRole": false,
             "supportsReasoningEffort": false,
             "maxTokensField": "max_tokens"
           }
         }
       ]
     }
   }
   Keep the compat flags exactly as shown; pi relies on them to shape requests to this provider.
3. Set DEPLOY_API_KEY in my environment so "$DEPLOY_API_KEY" resolves:
   - macOS/Linux: append `export DEPLOY_API_KEY=...` to ~/.zshrc or ~/.bashrc
   - Windows: set a User environment variable (PowerShell: [Environment]::SetEnvironmentVariable('DEPLOY_API_KEY','<key>','User')) and restart the terminal
    If the DEPLOY_API_KEY environment variable is already set in my environment, use that value without asking; otherwise STOP and ask for my key, and guide me to get one first: log in at deploy.com, open Service API Keys in the left nav, use an existing Secret Key if I saved one, or click Create API Key to generate one and copy the Secret Key (it is shown only once, at generation time; the page lists Access Key IDs later, never Secret Keys), then paste it to you when you ask; never invent a value, never echo it, never commit it to git. Offer to put the literal key in models.json instead if I prefer.
4. If I am a Virginia (VA1) customer, use baseUrl https://api-va1.deploy.com/api/v1 for the provider instead. Otherwise keep https://api.deploy.com/api/v1.
5. Verify: tell me to run `pi` in a project directory, open /model, pick deploy / deepseek-ai/deepseek-v4.1-flash-1017, and send a short prompt. If a 400 error mentions the developer role or reasoning_effort, confirm the compat block is present and reload /model (the file hot-reloads).
```

## **Manual setup**

**Config file**: `~/.pi/agent/models.json` (all OS; on Windows `%USERPROFILE%.pi\agent\models.json`). The file hot-reloads whenever `/model` is opened, so you can edit mid-session with no restart.

1. Open (or create) the model registry file. It is a JSON file keyed by `"providers"`. If it exists, merge a `"deploy"` provider into the existing `"providers"` object, keeping every existing provider.
2. If you are a Virginia (VA1) customer, use [https://api-va1.deploy.com/api/v1](https://api-va1.deploy.com/api/v1) as the base URL. Otherwise, use [https://api.deploy.com/api/v1](https://api.deploy.com/api/v1).
3. Merge in this block:
   1. `apiKey` supports `$ENV_VAR/{ENV_VAR}` interpolation (`!command`, `$$`, `$!` for literals). The block above uses `$DEPLOY_API_KEY`, so export it in your shell (macOS/Linux: `export DEPLOY_API_KEY=...` in `.zshrc/.bashrc`; Windows PowerShell: `[Environment]::SetEnvironmentVariable('DEPLOY_API_KEY','...','User')` then restart the terminal). Keep the three `compat` flags as shown; they tell Pi how to shape requests for this provider. Fill `cost` with your Deploy pricing per million tokens if you want spend tracking (zeros are fine to start).

```json JSON theme={null}
{
  "providers": {
    "deploy": {
      "baseUrl": "https://api.deploy.com/api/v1",
      "api": "openai-completions",
      "apiKey": "$DEPLOY_API_KEY",
      "models": [
        {
          "id": "deepseek-ai/deepseek-v4.1-flash-1017",
          "name": "Deepseek 4.1 Flash 1017",
          "reasoning": true,
          "input": ["text", "image"],
          "contextWindow": 1000000,
          "maxTokens": 16384,
          "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
          "compat": {
            "supportsDeveloperRole": false,
            "supportsReasoningEffort": false,
            "maxTokensField": "max_tokens"
          }
        }
      ]
    }
  }
}
```

4. Verify. Run `pi` in a project directory, open `/model`, pick **deploy / deepseek-ai/deepseek-v4.1-flash-1017**, and send:
   > Reply with the single word: connected

***


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