How to connect DeepSeek Harness to the Tokenator API
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.
What you end up with
Once configured, DeepSeek Harness stops talking to its default provider and sends every request to Tokenator. Billing comes out of your key's token limit, and the list of available models is defined by the key rather than by the tool.
| Tool | DeepSeek Harness |
| Protocol | OpenAI-compatible |
| Base URL | https://api.tokenator.top/v1 |
| Key | sk-your-tokenator-key |
Requirements and supported operating systems
- Windows 10/11, macOS 12+, or a modern 64-bit Linux.
- Outbound HTTPS access to the Tokenator domain.
- A Tokenator API key that looks like
sk-your-tokenator-key.
You need Node.js: the harness is started through npx. Building from source additionally needs pnpm. Everything is configured in the browser, and a DeepSeek account is not required for a third-party provider.
Installing DeepSeek Harness
npx @deepseek-ai/dsh web
The 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.
git clone https://github.com/deepseek-ai/deepseek-harness.git cd deepseek-harness pnpm install pnpm run build pnpm dsh web
Setting up Tokenator
- Register in your account and buy a token bundle.
- The key appears in the account right after the payment is confirmed — copy it whole, including the prefix.
- The examples below use the placeholder
sk-your-tokenator-key. Never publish a real key in repositories or screenshots.
Configuration
- Open Settings → Models in the web UI.
- Press Add model provider and switch the card to Custom model API.
- Provider ID in lowercase, for example
tokenator. The id is permanent: a provider cannot be renamed, only replaced by a new one. The display name, address, protocol, credential and models stay editable. - Base URL:
https://api.tokenator.top/v1 - API protocol:
openai-completions, which is OpenAI Chat Completions. A provider speaks exactly one protocol. - API key:
sk-your-tokenator-key - Under Model catalog press Fetch available models: the request goes to
GET https://api.tokenator.top/v1/modelswith the key currently in the form. Tick the models you want and press Add selected. IDs can also be typed by hand, for examplegpt-5.5. - Save the provider and pick a model in the picker — the selected model becomes the default for new sessions.
/v1/models. Tokenator does say in that reply which models take images, but DSH does not read those fields for a custom provider, and reasoning levels never travel through the model list at all. So every model — fetched or typed in by hand — starts out text-only and without reasoning: it will not accept a picture, and its Effort entry is missing from the menu. Turn these on by hand: open the provider, expand Customized settings, then the model's Model options, and tick Image under Input types. The Reasoning levels switch sits right there — see "Configuring reasoning". Tick Image only for models whose page in the catalog lists image under Input modalities: otherwise DSH sends the picture and the model refuses it.$DSH_HOME/.credentials.yaml, and the settings keep only a reference to it. Model changes take effect on the next request — the server does not need a restart.- id: llm-pi-ai
config:
providers:
tokenator:
apiKeyEnv: TOKENATOR_API_KEY
api: openai-completions
baseURL: https://api.tokenator.top/v1
models:
- id: gpt-5.5The same thing can be written straight into the profile file — the very document the settings page writes. When you start with dsh web the profile is called web, hence $DSH_HOME/profiles/web/cordis.patch.yml. The entry replaces the whole llm-pi-ai config, so keep any other providers already in the file next to it. For a model that takes images, add input: [text, image] under its id — the same thing the Image checkbox writes. The file also holds the fields the form has no place for: headers, timeouts and compatibility switches. When the browser runs on the same machine as the server, Open configuration file in the settings header opens it.
Your first request
Before starting the tool it helps to confirm that the key and the model both work. A single curl request answers both questions.
curl https://api.tokenator.top/v1/chat/completions \ -H "Authorization: Bearer sk-your-tokenator-key" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.5", "messages": [{"role": "user", "content": "ping"}] }'
Open http://127.0.0.1:3080, pick the model in the picker and send a message. A session that has already sent a request keeps the model recorded in its own log: the new model applies to new sessions.
A successful response means the key is valid, the model is allowed for it and the upstream is reachable. Usage appears in your account right after the request.
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. Picking a model in the picker makes it the default for new sessions. DSH does not pick up a new model's image input or reasoning levels: turn them on in that model's Model options, as described under "Configuration".
Examples of model IDs available right now:
claude-haiku-4-5claude-opus-4-6claude-opus-4-7claude-sonnet-4-6gpt-5.5deepseek-v4-pro
Current IDs and specs live in the AI model catalog, which also shows which models are available right now. The model comparison helps choose between close options.
Configuring reasoning
DSH does not learn reasoning levels from /v1/models: a model on a custom provider has none until you declare them, whether it came from Fetch available models or was typed in by hand. Until then its Effort entry does not appear in the menu and the endpoint alone decides whether the model thinks.
Levels are turned on in Settings → Models: open the provider, expand Customized settings, then the model's Model options, and switch on Reasoning levels. The rows start with off, low, medium and high. API value holds what travels on the wire as reasoning_effort and defaults to the level name. Keep at least one level besides off. Save the provider and the Effort entry appears in the menu.
The form writes reasoningEfforts into $DSH_HOME/profiles/web/cordis.patch.yml, where it can also be set by hand: the key is the menu entry and the value is the reasoning_effort on the wire. Only off may stay empty, because for most endpoints not thinking is the absence of the parameter.
- id: llm-pi-ai
config:
providers:
tokenator:
apiKeyEnv: TOKENATOR_API_KEY
api: openai-completions
baseURL: https://api.tokenator.top/v1
models:
- id: gpt-5.5
reasoningEfforts:
off:
low: low
medium: medium
high: highOn top of that the key itself has a reasoning switch in your account, which works independently of the tool. Thinking is billed as output tokens.
Common errors and how to fix them
| Symptom | Cause | Fix |
|---|---|---|
MISSING_CREDENTIAL | The provider has no stored key, or the environment variable named in apiKeyEnv is not set. | Store the key on the Settings → Models page, or set that environment variable. |
UNKNOWN_MODEL | The requested model is not among the ones configured on the provider. | Add its ID to the provider, or select a configured model in the picker. |
Model "…" does not support image input | The model does not have the Image input type ticked. DSH does not take image support from the model list, so every model on a custom provider starts out text-only. | Tick Image under Input types for that model (Customized settings → Model options) if the model really takes images. |
| Fetch available models answers 401 | Discovery calls GET /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 — typed IDs work just the same. |
401 or an invalid-key message | The key was copied with stray spaces, was revoked, has expired, or landed in the wrong environment variable. | Check the key in your account and make sure the environment variable actually reached the process running the tool. |
403 | The model is not in the key's allowed-model list. | Check the key's model list in your account and pick an ID from the model catalog. |
429 | The per-minute or per-hour request limit, or the concurrent-stream limit for the key, was exceeded. | Lower the agent's concurrency and retry with exponential backoff. Key limits are visible in your account. |
| Model not found / not supported | The request used an ID that is not in the catalog, or an alias unavailable to this key. | Copy the exact API ID from the model page — case and dots matter. |
| The request hangs or breaks on a long answer | The client closed the connection on its own timeout before the model finished generating. | Turn on streaming (stream: true) and raise the client timeout: with long reasoning answers the first token can take a while. |
| A bare "Request error" with no details | The upstream provider returned an error. Its text is not passed through to the client. | Retry: Tokenator fails over to the next provider for the model on its own. If it persists, contact support. |
FAQ
Do I need a DeepSeek Harness subscription or a separate provider account?
No. The tool talks to Tokenator, and billing comes from your Tokenator key's tokens.
Where do I see usage after connecting?
In your account: it shows requests, spent tokens and the key's remaining limit.
Can one key be used in several tools?
Yes. The limits are the key's own: requests per minute and hour, plus the number of concurrent streams.
What happens if tokens run out mid-session?
Requests start returning an error. Topping up the same key restores the limit — no need to reinstall the tool.
How do I switch back to the previous provider?
Remove the settings you added — the environment variables or the provider block in the config. The tool reverts to its default behaviour.
Where can I read about the API format itself?
In the Tokenator API documentation and on the OpenAI-compatible API page.