DeepSeek Harness

One key for every model, Claude included, as a Custom model API provider. Pay per token from prepaid credit, no subscription.

Checked 2026-10-28

·All guides·Models

At the end you have DeepSeek Harness with UplinkSwitch as a Custom model API provider at https://api.uplinkswitch.com/v1, one key from the console, and any model id on the list in the picker, Claude included. Each request bills per token to the prepaid balance behind the key, with no subscription, and the live table below is what each model costs today.

Before you start

You need Node.js and DeepSeek Harness running (npx @deepseek-ai/dsh web opens the Web UI at 127.0.0.1:3080), an account on the console with credit on it, and one key created there. Create the key for Harness alone, so its requests sit apart from any other tool on the Usage page. The base URL and the key are the whole configuration on this side.

Where the settings are

Settings → Models in the Web UI. The page writes what you enter to $DSH_HOME/profiles/web/cordis.patch.yml (the profile is web for dsh web) and stores the key in $DSH_HOME/.credentials.yaml; $DSH_HOME defaults to ~/.dsh. Headers, timeouts and the compatibility switches have no form field and go in the same patch file. Docs read 2026-10-28: Configure models.

Harness takes an OpenAI-compatible base URL here, so the Anthropic-style variables from the Claude Code guide do not apply.

Steps

  1. Open Settings → Models and choose Add model provider. Switch the card from Third-party model provider to Custom model API.
  2. Provider ID: uplinkswitch. Lowercase, and permanent: sessions and credential references use it.
  3. Display name: UplinkSwitch.
  4. Base URL: https://api.uplinkswitch.com/v1. Enter it exactly as shown, with /v1 on the end.
  5. API protocol: OpenAI Chat Completions (stored as openai-completions).
  6. API key: your UplinkSwitch key from the console.
  7. Models: under Model catalog choose Fetch available models. Harness calls GET /models with the key in the form, opens a searchable picker, and Update list adds what you tick. Or add ids by hand:
    model ids
    claude-sonnet-5-5
    claude-opus-5-5
    gpt-6.1-sol
    gemini-3.1-pro-preview
    deepseek-v4-pro-0813
    kimi-k3
  8. Save. The models appear in the picker without a restart.

The same provider as a patch file

Everything the form saves can be written in cordis.patch.yml directly, and two of the fields the form lacks live only there: headers, which the gateway records with each request in its usage log, and apiKeyEnv, which reads the key from an environment variable instead of the credentials file.

cordis.patch.yml
# $DSH_HOME/profiles/web/cordis.patch.yml  ($DSH_HOME defaults to ~/.dsh)
- id: llm-pi-ai
  config:
    providers:
      uplinkswitch:
        apiKeyEnv: UPLINKSWITCH_API_KEY
        api: openai-completions
        baseURL: https://api.uplinkswitch.com/v1
        headers:
          HTTP-Referer: https://uplinkswitch.ai
          X-Title: DeepSeek Harness
        models:
          - id: claude-sonnet-5-5
          - id: claude-opus-5-5
          - id: gpt-6.1-sol
          - id: gemini-3.1-pro-preview
            input: [text, image]
          - id: deepseek-v4-pro-0813
          - id: kimi-k3

A config override replaces the whole llm-pi-ai entry, so keep any other providers you already have in the same block. input: [text, image] marks a model as taking images; an omitted input means text. The adapters re-read the file on the next request. Harness reserves some header names for its own attribution and its value wins on those.

With apiKeyEnv, export the variable before you start the server:

shell
export UPLINKSWITCH_API_KEY="sk-uplink-live-..."
npx @deepseek-ai/dsh web

Which model to pick

Any chat id on the Models page. Tool calling works on every chat model here, and the Harness agent needs it for file reads, edits and commands, so no id on the list is a dead end. The six above are the usual coding set: Claude Sonnet 5.5 and Opus 5.5 for planning and hard edits, GPT-6.1 Sol and Gemini 3.1 Pro as second opinions, DeepSeek V4 Pro and Kimi K3 where the input price decides.

The Claude ids answer the OpenAI format as well as the Anthropic one, so claude-sonnet-5-5 sits in the same provider as gpt-6.1-sol, with no second entry. Each model page lists the context window and max output where the developer publishes them. The Models page takes both per model: contextWindow sizes the context compaction, and a maxTokens you set also becomes that model's per-request output cap.

Price per token

ModelInput / 1MOutput / 1MCached input / 1MList inputUnder list
Claude Sonnet 5.5$1.164$2.91$0.075$2.0041% on input
Claude Opus 5.5$2.716$9.70$0.1455$4.0032% on input
GPT-6.1 Sol$0.582$2.91$0.0582$2.0070% on input
Gemini 3.1 Pro Preview$1.20$7.20$0.12$2.0040% on input
DeepSeek V4 Pro 0813$0.792$1.188$0.0625$1.3240% on input
Kimi K3$0.90$4.50$0.12$3.0070% on input

USD per million tokens, live from GET /v1/catalog. List: the developer’s own published price. Cached input bills at the cache-read rate where the model has one; there is no switch to set.

An agent sends the conversation and every tool result back up on each step, so the input column decides what a session costs. The Claude Code pricing post works an hour, a day and a month of agent steps at these rates, and the price is locked for 30 days from each top-up.

Check it

Fetch available models in the form is the quick check: a list back means the base URL and key are right. From a shell, the same request is:

shell
curl https://api.uplinkswitch.com/v1/models -H "Authorization: Bearer $UPLINKSWITCH_API_KEY"

Then pick a model in the composer and send a message. The request shows on the console Usage page within seconds with its tokens and charge, filterable by key and model.

Errors you will see

  • 401 invalid_api_key, or Fetch available models returns 401: the key is wrong or revoked. Copy it again from the console and save the provider.
  • MISSING_CREDENTIAL: no key is stored for the provider and the variable named in apiKeyEnv is unset. Save the key on the Models page or export the variable before starting.
  • 402 insufficient_balance: the balance does not cover the request. Top up in the console.
  • 402 monthly_limit_reached: the key hit the monthly spend limit you set on it. Raise it in the console, or wait for the first of the month.
  • UNKNOWN_MODEL: the session names a model the provider does not list. Add it under models or pick a configured one.
  • 404 model_not_found: the id is not on the Models page at this base URL. Copy it from the page rather than typing it.
  • 403 scope_denied: the key carries a model allowlist and this id is not on it. Pick an allowed id or use a key without the limit.
  • 429 rate_limited: the key hit its requests-per-minute or concurrency limit. The response carries retry-after in seconds. Wait that long and resend.

Good to know

  • A provider speaks one protocol. Chat Completions covers every model here, so one provider is enough; the Anthropic Messages protocol on the same base URL would be a second provider.
  • The docs' compat.supportsDeveloperRole and compat.maxTokensField switches are for gateways that refuse the developer role or max_completion_tokens. This one accepts both, so leave them out.
  • Selecting a model also makes it the default for new sessions. A session that has already sent a request keeps its model.
  • Claude Code, Cline and OpenCode take the same base URL and key in their own settings. One balance serves all of them.

Questions

Yes. Add UplinkSwitch as a Custom model API with the OpenAI Chat Completions protocol, then list claude-sonnet-5-5, claude-opus-5-5 or gpt-6.1-sol as models. Every chat id on the Models page answers the OpenAI format at this base URL, so one provider entry covers all of them.

No. The DeepSeek key is one provider among several. A Custom model API provider takes any OpenAI-compatible base URL and its own key, and the model picker lists the models from every provider you configured.

The Models page writes the provider to $DSH_HOME/profiles/web/cordis.patch.yml and the key to $DSH_HOME/.credentials.yaml, where $DSH_HOME defaults to ~/.dsh (docs read 2026-10-28). The adapters re-read the patch file on the next request, so an edit needs no restart.

Each request bills per token to the balance behind the key, at the live rates in the table above. Today Claude Sonnet 5.5 is $1.164 in and $2.91 out per million tokens, and DeepSeek V4 Pro 0813 is $0.792 in and $1.188 out. The console Usage page shows every request within seconds with its token counts and charge.

The model the session asks for is not in the provider you configured. Add the id under models in the form or the patch file, or pick a configured model in the picker. Copy ids from the Models page rather than typing them, since a dash or date suffix out of place is enough to miss.

Yes. One key reaches every model from DeepSeek Harness, Claude Code, Cline, OpenCode and your own code, and every key on the account draws on the same prepaid balance. Create a key per tool so the spend sits apart on the Usage page.

Get a key in the console: prepaid credit, no subscription, 30-day price lock.

Join on Telegram
Help