← DeepSeek Bot guide hub

DeepSeek Bot Personal Assistant: API Key Setup and Connection Fixes (November 2026)

Connect a model provider to DS Bot, understand endpoint formats, and troubleshoot the first failed response.

By Cameron Voss and West Mao · Documentation checked

Quick answer

Open Settings → Models in DS Bot or use Chief's model setup card. Choose the provider and a model it actually serves, enter the provider's credential in the designated field, save, and send a short test message. Match the API format and base URL to that provider; a DeepSeek web-chat login is not automatically an API key.

DS Bot is the local interface and agent layer. Your selected model service handles inference and sets its own authentication, usage rules and billing. This guide follows the project documentation available on November 11, 2026; provider forms and model catalogs can change.

What information do you need before setup?

ItemWhat to check
Provider and credentialUse a valid key or supported sign-in for that exact provider.
API formatUse the protocol expected by the provider and selected adapter.
Base URLCopy the provider's documented endpoint for that protocol; do not guess a path.
Model IDUse an exact ID the account and endpoint actually serve.
AllowanceCheck billing, balance or quota with the provider responsible for that key.

How do you connect the official DeepSeek API?

  1. Create an API key in the DeepSeek API platform and check the account's available balance or applicable allowance.
  2. In DS Bot, open Settings → Models or Chief's setup card. Select the appropriate provider or adapter. Available labels depend on the version.
  3. Enter the key in the provider configuration, rather than sending it in a normal chat. For a custom adapter, follow the selected protocol and provider instructions.
  4. As of this guide's check, DeepSeek documents https://api.deepseek.com for its OpenAI-compatible API and https://api.deepseek.com/anthropic for its Anthropic-compatible API. Select the matching adapter; these addresses are not interchangeable protocol labels.
  5. Choose an available model ID. DeepSeek's first-call documentation lists deepseek-flash and deepseek-v4-pro; availability and account access must be checked at the time you connect.
  6. Save, select the model for Chief, and send Reply with OK. A completed response establishes that this route worked for this request; it does not establish reliability for every task.

Do not put a real key in a prompt, screenshot, shared log, repository or shell history. If a credential is exposed, revoke or rotate it with the issuing provider. DS Bot's general-purpose Secrets feature is separate from model-provider configuration; use the model setup field for the provider connection.

How do you configure a different provider?

Obtain the provider's own base URL, API format, model ID and key. Some providers use an OpenAI-compatible endpoint; others support a different protocol. An API-compatible label does not guarantee support for every feature, tool call or model. Do not substitute the official DeepSeek endpoint for a third-party gateway, or assume an official DeepSeek API key works with another service.

For custom model definitions, the DS Bot documentation advises setting an accurate contextWindow and output reserve. An incorrect context window can affect its context management. Use the provider's actual model specifications rather than copying a value from another model.

What does the error tell you?

The following codes refer to the official DeepSeek API; other gateways can use different meanings or return different messages.

ResponseFirst checkNext action
400 / 422Request format or parametersCheck the adapter, model ID and exact response. Remove unsupported options.
401AuthenticationCheck the key and issuing provider; re-enter or rotate it if necessary.
402Official API balanceCheck the API account balance; web-chat access is separate.
429Request rate or concurrencyReduce concurrent work and retry after a pause; inspect the provider's limits.
500 / 503Provider-side error or loadRetry after a short wait; check provider status and contact support if it persists.

If the app cannot reach the endpoint at all, check the network, DNS, proxy and endpoint spelling before changing the key. Preserve the error code, time, app version, provider and model when asking for help; remove credentials and personal data from the report.

What should you check first when DeepSeek Bot does not reply?

Start with one Bot and a one-line text prompt. This removes group handoffs, web search and large files from the diagnosis. Before changing anything, note the error, the selected provider and model, the time, and whether the same Bot worked earlier. Then follow this order:

  1. Check the runtime. Open the Bot's details and see whether it uses a DSH model or a local agent. A local agent CLI uses its own sign-in and plan; changing an API key in DS Bot may not affect it.
  2. Check the selected model. In the Bot's details panel, confirm the model belongs to the provider you intended to configure. Team defaults for new Bots do not necessarily change an existing Bot's model.
  3. Check the route as a set. Confirm that the provider, API protocol, base URL, exact model ID and credential belong together. Changing only the key cannot fix a protocol mismatch.
  4. Check the symptom. A status code returned by the provider points to a different layer from DNS, connection or certificate errors. Use the relevant section below.
  5. Make one change and retry. Save it, send Reply with OK. again, and record whether the result changed. If it works, restore the original task in small steps.

A saved credential or a green environment-variable hint does not prove the key is valid. DSH's provider documentation says the hint detects a variable; it does not test authentication or connectivity.

How do you fix DeepSeek API 401 authentication errors?

A 401 from the official DeepSeek API means authentication failed; the documented cause is an incorrect API key. Confirm the destination before replacing anything, particularly if you use more than one provider.

  1. Identify which service issued the key and confirm the selected provider and endpoint are for that service. A key issued by a relay or another vendor should not be sent to the official DeepSeek API.
  2. In Settings → Models, re-enter the intended key in the provider's credential field and save. Check for leading or trailing whitespace when pasting. Never paste it into the Bot chat.
  3. If the provider uses an environment-variable fallback, check which credential source the application is using. A saved credential and a detected environment variable are different things; follow the authentication guidance shown for that provider.
  4. Check whether the key was revoked, expired or restricted in the issuing account. If it may have been exposed, revoke or rotate it there, then update the configuration.
  5. Retry the single-message test. If the error remains, send the provider a redacted error and request identifier if one is available, not the key itself.

Success check: the same Bot completes a text reply through the intended provider. A change from 401 to another status means authentication may have progressed, but the new error still needs diagnosis.

How do you fix 402 insufficient balance?

For the official DeepSeek API, 402 indicates insufficient balance. Sign in to the API account that issued the key and check its balance and applicable billing status. Access to the DeepSeek chat website is separate from the API account's billable allowance.

If the selected endpoint belongs to a gateway or subscription service, check that service's own quota, active entitlement and error documentation instead. Add funds or change plans only after confirming which account is responsible. Once the account issue is resolved, send the same short prompt again; a successful response is a stronger check than a balance screen alone.

What causes 400 or 422 invalid request errors?

The official API documents 400 for an invalid request format and 422 for invalid parameters. Read the message closely: it may identify the field or request body that needs attention. The same status from a gateway can mean something else.

  1. Confirm the selected API protocol matches the endpoint: an OpenAI Chat Completions route, an OpenAI Responses route and an Anthropic Messages route use different request formats. Compatibility with one does not imply compatibility with all three.
  2. Check the exact model ID and whether the provider allows it for this account and protocol. A display label is not necessarily the ID sent in the request.
  3. Reduce the task to plain text. Remove an image, file, tool request or unusual parameter, then add each back one at a time. This helps identify a capability or input mismatch; it does not prove which component is defective.
  4. For a custom model, compare the configured context window, maximum output and input types with the provider's documentation. Do not increase limits beyond what the service supports.
  5. Update the app or DSH if the provider explicitly requires a newer client. Record the old and new versions and keep a backup of settings before changing them.

What if the model is missing or says it is unavailable?

First distinguish an absent model in the picker from an error after a model has been selected. In DSH, the built-in DeepSeek provider can follow the published model list; a customized model list keeps the user's own entries instead. If you customized it, review the IDs or use the documented restore-defaults option only after saving a copy of your custom settings.

For a custom gateway, ask the provider for the exact model ID and supported protocol. Check account access and spelling, then select that model in the affected Bot's details. DS Bot documentation notes that a Bot whose model is no longer served may fall back to a previous working model or show its setup card. Verify the selection after the change rather than assuming the team default updated every existing Bot.

If you see CLIENT_UPGRADE_REQUIRED, the DSH provider guide says the error names the required version. Check your installed app and DSH versions, back up data, then update using the appropriate project's release instructions.

How do you investigate 404 or a wrong endpoint?

A 404 can indicate that the requested route does not exist, but its meaning depends on the provider. Compare the base URL you entered, the selected API protocol and the provider's documentation as a set. SDKs and adapters can append endpoint paths themselves; pasting a full request path into a field expecting a base URL can produce the wrong address.

For the official DeepSeek API, the documented OpenAI-compatible base is https://api.deepseek.com and the Anthropic-compatible base is https://api.deepseek.com/anthropic. A third-party gateway may require a different base or version prefix. Use its instructions rather than adding or deleting /v1 by guesswork. A browser visit to a base URL is not a reliable test of an authenticated model request.

How do you reduce 429 rate-limit errors?

The official DeepSeek API says 429 can occur when request rate or concurrency limits are exceeded. A group of Bots can create overlapping requests even when you sent only one group message. Stop repeated retries, wait briefly, and test one Bot with one short prompt.

  1. Pause other running Bots, scheduled work and separate clients using the same provider account where practical.
  2. Retry once; if it works, add work back gradually and check your account's applicable limits.
  3. If 429 continues at low activity, inspect the provider's response and account limits. A gateway can impose its own limits independently of the upstream model.
  4. Use a bounded retry delay rather than a tight loop. If the provider supplies a retry time, follow its guidance.

Do not treat every 429 as a reason to buy more quota: the binding constraint may be concurrency or a gateway rule rather than balance.

What should you do for 500, 503, timeouts or network errors?

The official DeepSeek API describes 500 as a server error and 503 as server overload. Wait briefly, check the provider's status information and try the same minimal request. If repeated failures persist, report the time, model and redacted error to that provider.

A timeout, DNS failure, refused connection or certificate error may occur before any API status is returned. Check that the hostname and protocol are correct, your network or proxy allows the connection, and the endpoint is reachable from the machine running DS Bot. If a gateway runs locally or in a container, check that the service is running and that its address is reachable from that runtime; localhost inside a container can refer to the container itself.

For certificate errors, correct the system clock, trust configuration or endpoint with the service administrator. Do not disable certificate validation as a routine fix. A retry after a timeout can duplicate work or usage if the first request reached the provider, so check the result before repeating a costly task.

Why does a short message work but a long task fail?

A successful “OK” test verifies only a small text request. Long conversations, attachments, images and tool calls introduce additional conditions. Start a fresh chat with a short text prompt; if that works, add the original context or one capability at a time. Check the model's actual input types and context window, the configured output reserve, and the precise provider response.

If a tool call fails but plain text succeeds, check that the provider and model support the tool format used by the selected adapter. A model's ability to generate text does not establish tool-call or image support. Keep the original conversation and task files while you investigate; a fresh chat is a diagnostic comparison, not a replacement for a backup.

Why does Chief work while another Bot does not?

Each Bot can use its own model. Open the failing Bot's details and compare its runtime, provider and model with Chief's. If it is a local agent, inspect that CLI's sign-in and available plan separately. If the failing Bot is in a group, test it in its own chat to separate its model connection from group routing or permissions.

When the app says a team is read-only or open in another DSH instance, the problem may be the shared data lock rather than authentication. The project documents that the first DSH process using the team holds the lock. Close the other instance and retry; do not delete a lock file while a process may still be using it.

What information should you send to support?

Include the DS Bot version, DSH version where applicable, operating system, installation type, provider name, model ID, API protocol, redacted endpoint host, exact error and time including time zone. Say whether the one-line text test works and which single changes you tried. If the response includes a request ID, include it.

Remove API keys, authorization headers, cookies, private prompts and personal data. DS Bot documents a local diagnostics log with sensitive values removed, but review any log yourself before sharing it; redaction is not a guarantee that every private detail has been removed.

How can you check costs?

DS Bot's Settings → Usage breaks token counts down by time, Bot and model; it does not convert them into currency. Compare those counts with the provider's billing records and applicable input, output and cache rates. If you use a subscription or quota-based plan, use that provider's own allowance rules instead of assuming pay-per-token billing.