DeepSeek Harness (dsh) is DeepSeek's coding agent, available both in the terminal and as a Web UI. Besides DeepSeek's own models, dsh supports custom providers, so you can point it straight at your ShopAIKey API key.
Worth noting: dsh speaks several API protocols, and ShopAIKey serves the two most common ones with the same key.
Endpoints
Each provider in
dshaccepts exactly one protocol. To use both, create two providers as shown below.
1. Run DeepSeek Harness
npx @deepseek-ai/dsh web
This starts the Web UI at http://127.0.0.1:3080 with a login token printed in the terminal. For the terminal build:
npx @deepseek-ai/dsh
On the welcome screen dsh offers to sign you into a DeepSeek account. Pick Configure later — you will be using a ShopAIKey key instead.
2. Create the OpenAI-protocol provider
Open Settings (bottom left) → Models tab → Add a custom provider, then fill in:
The Provider ID must be lowercase, start with a letter, and cannot be changed after creation.
Click Fetch available models: dsh calls ShopAIKey's GET /v1/models with the key you just entered and lists every model currently available. Tick the ones you need, for example:
deepseek-v4-pro
deepseek-v4-flash
Then click Create provider.
3. Create the Anthropic-protocol provider
Repeat the steps above for a second provider:
With anthropic-messages, the Fetch available models button reports:
pi-ai protocol "anthropic-messages" has no model listing this build can read;
enter this provider's models by hand
That is a limitation of dsh, not of ShopAIKey. Click Add model and type the model id manually, for example:
claude-sonnet-4-6
Then click Create provider.
4. Declaring providers in settings.yaml
To reproduce the setup on another machine, edit ~/.dsh/settings.yaml directly:
llm-pi-ai:
providers:
shopaikey:
displayName: ShopAIKey (OpenAI)
apiKeyEnv: SHOPAIKEY_API_KEY
api: openai-completions
baseURL: https://api.shopaikey.com/v1
models:
- id: deepseek-v4-pro
- id: deepseek-v4-flash
shopaikey-claude:
displayName: ShopAIKey (Claude)
apiKeyEnv: SHOPAIKEY_CLAUDE_API_KEY
api: anthropic-messages
baseURL: https://api.shopaikey.com
models:
- id: claude-sonnet-4-6
name: Claude Sonnet 4.6
With apiKeyEnv, the key is read from an environment variable instead of being stored in the config file:
export SHOPAIKEY_API_KEY="sk-your-api-key"
export SHOPAIKEY_CLAUDE_API_KEY="sk-your-api-key"
Keys entered through the UI are stored separately in ~/.dsh/.credentials.yaml, keyed by Provider ID.
5. Pick a workspace and run a test
Before chatting, dsh requires a working directory: click Choose workspace and point it at your project.
Open the model list at the right edge of the composer — models are grouped by the providers you just created. Pick one and send:
Read README.md in the workspace and summarise it in two sentences.
If the agent can call the file-reading tool and answers normally, the setup works. The Usage line under each reply shows how many tokens were spent.
To switch to Claude, just pick a model from the shopaikey-claude provider mid-session — no reconfiguration needed.
6. Notes
- The two base URLs differ: the OpenAI protocol needs the
/v1suffix, the Anthropic one does not. - Model ids must match models ShopAIKey currently serves — check the Models page.
- On
Invalid API Key, verify the key still has credit and has not been revoked. - On
Model Not Found, try another model from the Models page. - After editing
settings.yamlby hand, restartdshto load the new configuration.