BETA
How to connect DeepSeek Harness to Apily
DeepSeek Harness starts with a single command and opens a web UI. A third-party gateway is declared there as a custom provider: an id, an address, a protocol and at least one model. The key is stored apart from the settings and never comes back to the page.
https://apily.pro/v1apily_your-api-key$DSH_HOME/settings.yamlRequirements
- Windows 10/11, macOS 12+ or a modern 64-bit Linux.
- Node.js — the harness is started through
npx. Building from source additionally needspnpm. - An Apily API key — a DeepSeek account is not required for a third-party provider.
Install DeepSeek Harness
npx @deepseek-ai/dsh webThe command starts the web UI at http://127.0.0.1:3080 and opens it in the browser. Pass --no-open to keep the server without opening a tab. The project is in developer preview — if the provider form looks different after an update, the connection principle stays the same.
Configuration
- Open Settings → Models in the web UI and press Add a custom provider.
- Provider ID in lowercase, for example
apily. The id is permanent: a provider can't be renamed, only replaced by a new one. The display name, address, protocol, credential and models stay editable. - Base URL:
https://apily.pro/v1 - API protocol:
openai-completions— OpenAI Chat Completions. A provider speaks exactly one protocol. - API key:
apily_your-api-key - Under Model catalog press Fetch available models: the request goes to
GET /v1/modelswith the key from the form. Tick the models you want and press Add selected; IDs can also be typed by hand, e.g.gpt-5.6-sol. - Save the provider and pick a model in the picker — it becomes the default for new sessions.
Keys are write-only: after saving, the page receives a redacted descriptor rather than the secret itself. The key lives in $DSH_HOME/.credentials.yaml. The same provider can be written straight into $DSH_HOME/settings.yaml — the very document the settings page writes:
llm-pi-ai:
providers:
apily:
apiKeyEnv: APILY_API_KEY
api: openai-completions
baseURL: https://apily.pro/v1
models:
- id: gpt-5.6-solYour first request
curl https://apily.pro/v1/chat/completions \
-H "Authorization: Bearer apily_your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.6-sol","messages":[{"role":"user","content":"ping"}]}'Open http://127.0.0.1:3080, pick the model and send a message. A session that has already sent a request keeps its model recorded — the new model applies to new sessions.
Switching models
Models are edited in the provider card: Fetch available models asks the endpoint for the list, and an ID typed by hand works exactly the same. Examples from the Apily catalog:
gpt-5.6-sol·claude-opus-5·deepseek-v4-flash-0731·gemini-3.5-flash
Configuring reasoning
A model typed in by hand declares no reasoning levels, so its Effort entry doesn't appear in the menu and the endpoint alone decides whether the model thinks. Levels are declared with reasoningEfforts in $DSH_HOME/settings.yaml — the key is the menu entry and the value is what travels on the wire as reasoning_effort. Thinking is billed as output tokens.
llm-pi-ai:
providers:
apily:
models:
- id: gpt-5.6-sol
reasoningEfforts:
off: ""
high: high
max: maxCommon errors and how to fix them
| Symptom | Cause | Fix |
|---|---|---|
MISSING_CREDENTIAL | The provider has no stored key, or the variable named in apiKeyEnv is not set. | Store the key on the Settings → Models page, or set APILY_API_KEY in the environment. |
UNKNOWN_MODEL | The requested model is not among the configured ones. | Add its ID to the provider, or pick a configured model. |
| Fetch available models answers 401 | Discovery calls GET /v1/models with the key from the form, and the key was refused. | Check the key; the model list can always be filled in by hand. |
401 Invalid API key | Key copied with stray spaces, truncated, or revoked. | Copy the key whole from the API page in your Apily account, the apily_ prefix included. |
402 Insufficient balance | Your token balance can't cover the request's estimated cost. | Top up your balance on the Billing page in your Apily account. |