DeepSeek for developers

Use the company DeepSeek V4.1 in your coding agent

DeepSeek-V4.1-Flash runs on our own GPU server. You can use it from Claude Code, Codex, Hermes or any tool that speaks the OpenAI or Anthropic API. You need a personal API key; you get one by signing in with your Lark account. No tickets, no waiting.

1. Quick setup: one command (macOS, Linux, WSL)

Open a terminal and run:

curl -fsSL https://deepseek-dev.7.solutions/setup.sh | bash
  1. The script shows a short code and opens your browser.
  2. Sign in with Lark, check that the code matches, and click Approve.
  3. The script receives a new personal key and sets up the agents it finds on your computer (Claude Code, Codex, Hermes). Your existing settings are not changed.

Then start your agent:

Claude Codeclaude-deepseek (your normal claude stays as it is)
Codexcodex-deepseek, or codex --profile deepseek7
Hermeshermes chat --provider deepseek7, or pick “DeepSeek V4.1 (7 Solutions)” in hermes model
Script options
# only some agents
curl -fsSL https://deepseek-dev.7.solutions/setup.sh | bash -s -- --claude --codex
# also make DeepSeek the default model in Hermes
curl -fsSL https://deepseek-dev.7.solutions/setup.sh | bash -s -- --hermes --hermes-default
# remove everything the script added (then revoke the key on the My keys page)
curl -fsSL https://deepseek-dev.7.solutions/setup.sh | bash -s -- --uninstall

The script is plain bash: read it first with curl -fsSL https://deepseek-dev.7.solutions/setup.sh | less. It stores the key in ~/.config/deepseek7/credentials (readable only by you) and creates the wrappers in ~/.local/bin.

2. Manual setup (Windows, or if you prefer)

Get a key Sign in with Lark on the My keys page and create a key. It is shown once; copy it. In the snippets below, replace YOUR_KEY with it. After you create a key, the page shows the same snippets with the key already filled in.

Claude Code

Claude Code talks to the gateway's Anthropic-compatible endpoint. Put this in your shell profile (~/.zshrc or ~/.bashrc), or in a small wrapper script so your normal Claude login stays untouched:

export ANTHROPIC_BASE_URL=https://deepseek-api.7.solutions/anthropic
export ANTHROPIC_AUTH_TOKEN=YOUR_KEY
export ANTHROPIC_MODEL=gce-dsv41/deepseek-v4.1-flash
export ANTHROPIC_DEFAULT_OPUS_MODEL=gce-dsv41/deepseek-v4.1-flash
export ANTHROPIC_DEFAULT_SONNET_MODEL=gce-dsv41/deepseek-v4.1-flash
export ANTHROPIC_DEFAULT_HAIKU_MODEL=gce-dsv41/deepseek-v4.1-flash
export CLAUDE_CODE_SUBAGENT_MODEL=gce-dsv41/deepseek-v4.1-flash
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=262144
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
export API_TIMEOUT_MS=600000
claude

Every model slot (Opus, Sonnet, Haiku, sub-agents) points at DeepSeek, so nothing is sent to Anthropic. CLAUDE_CODE_MAX_CONTEXT_TOKENS sets when Claude Code compacts; raise it up to 1000000 for very large codebases.

Codex CLI

Create the profile file ~/.codex/deepseek7.config.toml (Codex 0.134 or newer; your main config.toml is not touched):

model_provider = "deepseek7"
model = "gce-dsv41/deepseek-v4.1-flash"
model_context_window = 262144

[model_providers.deepseek7]
name = "DeepSeek V4.1 (7 Solutions)"
base_url = "https://deepseek-api.7.solutions/v1"
env_key = "DEEPSEEK7_API_KEY"
wire_api = "responses"

Then run Codex with that profile:

export DEEPSEEK7_API_KEY=YOUR_KEY
codex --profile deepseek7

Codex prints “Model metadata … not found, defaulting to fallback metadata”. That warning is expected for a self-hosted model and harmless.

Hermes Agent

Adds a provider named deepseek7. The key goes to Hermes' .env, never to config.yaml:

hermes config set providers.deepseek7.name "DeepSeek V4.1 (7 Solutions)"
hermes config set providers.deepseek7.api https://deepseek-api.7.solutions/v1
hermes config set providers.deepseek7.key_env DEEPSEEK7_API_KEY
hermes config set providers.deepseek7.transport chat_completions
hermes config set providers.deepseek7.default_model gce-dsv41/deepseek-v4.1-flash
hermes config set providers.deepseek7.context_length 262144
hermes config set 'agent.reasoning_overrides.gce-dsv41/deepseek-v4\.1-flash' high
hermes config set DEEPSEEK7_API_KEY YOUR_KEY

Use it once with hermes chat --provider deepseek7 -m gce-dsv41/deepseek-v4.1-flash, or make it your default with hermes model and pick “DeepSeek V4.1 (7 Solutions)”. The reasoning override is required: DeepSeek V4.1 accepts low / high / xhigh / max, not Hermes' default “medium”.

Any other tool (OpenAI or Anthropic compatible)

OpenAI base URLhttps://deepseek-api.7.solutions/v1 (Chat Completions and Responses)
Anthropic base URLhttps://deepseek-api.7.solutions/anthropic (Messages)
Modelgce-dsv41/deepseek-v4.1-flash
API keyyour personal key, as Authorization: Bearer or x-api-key
curl https://deepseek-api.7.solutions/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"model":"gce-dsv41/deepseek-v4.1-flash","messages":[{"role":"user","content":"Hello"}]}'

Windows PowerShell: set the same variables with $env:NAME = "value" (for example $env:ANTHROPIC_AUTH_TOKEN = "YOUR_KEY"), or permanently with setx NAME value. The Codex profile file goes to %USERPROFILE%\.codex\deepseek7.config.toml.

3. Good to know

4. Troubleshooting

HTTP 401 “virtual key …”The key is wrong, revoked or expired. Run the setup command again, or create a new key.
HTTP 429More than 120 requests in a minute with one key. Slow down or wait a minute.
HTTP 502 / 503 / timeoutsThe GPU server is restarting (Spot reclaim). Try again in ~20–30 minutes.
Hermes: “reasoning_effort must be low, high …”Run hermes config set 'agent.reasoning_overrides.gce-dsv41/deepseek-v4\.1-flash' high.
Hermes: 401 right after setupRestart the Hermes gateway so it re-reads .env: hermes gateway restart.
claude-deepseek: command not foundAdd ~/.local/bin to your PATH: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc, then open a new terminal.