Skip to main content

Connect DeepSeek to ZCode: Complete Guide

โฌ…๏ธ Coming from ยท Step 3 ยท Configure Plans and Models already set up a built-in plan and an everyday model โ†’ this guide adds a DeepSeek model on top.

๐Ÿ’ก What you'll finish here: confirm balance (top up a little if needed) โ†’ get an API key โ†’ connect and test it in ZCode. About 15 minutes.

๐Ÿ—บ๏ธ The Flowโ€‹

๐ŸŽฏ When to Use Itโ€‹

ZCode's built-in GLM Coding plan has a quota: Zhipu documents a dual cap of "every 5 hours and every week," and once it runs out you wait for the next window.

If you often work in long stretches (long tasks, organizing a batch of files, iterating on the same thing), you may hit the quota and have to stop.

DeepSeek bills differently: it charges your balance by actual usage, with no plan-style 5-hour/weekly quota pool, so it suits long continuous work.

โš ๏ธ That does not mean DeepSeek has no limits. It is still bound by balance, concurrency caps, risk control, and service rules โ€” follow the official pricing page and your own console.

๐Ÿค” DeepSeek or GLM?โ€‹

They do not conflict โ€” keep using the built-in plan and add DeepSeek as needed. The difference is billing and quota mechanics (not which is better):

Built-in GLM Coding planDeepSeek
BillingBuy a plan, spend its credit allowanceBalance charged by actual usage
Quota mechanicsVendor documents a per-5-hour + per-week dual cap; when used up, wait for the next 5-hour windowNo plan-style time-window quota pool; bound by balance and concurrency caps
Better forEveryday, spread-out workLong continuous tasks, batch processing
Extra setupNone, it comes with ZCodeYou apply for a key and top up

๐Ÿ’ก In short: use the built-in GLM for everyday work, switch to DeepSeek when you need to run for a long stretch. Each covers a different situation.

๐Ÿ“š Also: GLM can likewise be used without a plan, charged from API balance โ€” see Connect GLM API to ZCode (Pay-as-you-go).

๐Ÿ’ฐ What It Costsโ€‹

DeepSeek is pay-as-you-go. If the account already has usable balance, you can skip this step; for a new account, start with a small top-up and add more later.

About usage

How long it lasts depends on how many tasks you run, what you send, and the current price. This guide promises no specific duration or cost โ€” check the usage log in your console. Top-up only solves balance; it does not fix a wrong model ID, a format mismatch, or a permission problem.

๐Ÿ”‘ Get an API Keyโ€‹

1. Open API Keysโ€‹

Open the ๐Ÿ‘‰ DeepSeek platform, sign in, then go to the ๐Ÿ‘‰ API Keys page.

2. Create and copy itโ€‹

  1. Click Create API key at the top right;
  2. Give it any name you'll recognize (for example zcode) and click Create;
  3. In the dialog that appears, click Copy immediately โ€” the key is shown in full only once.

DeepSeek API Keys page - the copy dialog after creating a key: key shown with a Copy button, key list behind

An API key is a password
  • Put it only into ZCode; never paste it into chats, screenshots, tutorials, issues, or public repositories;
  • Mask it fully before taking any screenshot;
  • Never upload or share ZCode's config file (such as config.json);
  • If usage looks abnormal, disable the old key and create a new one in the console right away.

โš™๏ธ Connect It in ZCodeโ€‹

1. Open model settingsโ€‹

Path:

Gear icon (lower left) โ†’ Settings โ†’ Model Settings

If DeepSeek is already listed, click it; otherwise click Add Provider.

2. Fill in the connection fieldsโ€‹

FieldWhat to enter
Provider nameDeepSeek (anything you recognize)
API formatResponses (/responses)
Base URLhttps://api.deepseek.com
API keyThe key you copied above
Model IDdeepseek-flash (follow your ZCode list)

Input types are not part of this step โ€” the next section covers them.

ZCode Model Settings - DeepSeek setup six steps: (1) Model Settings, (2) Add Provider, (3) Base URL, (4) Responses, (5) paste Key, (6) add model

3. Which formatโ€‹

DeepSeek offers two formats with the same Base URL:

  • This guide follows what we tested: Responses (/responses);
  • If your ZCode dropdown only lists Chat Completions, use it, and verify capability against the same model and the official docs (the two formats are not guaranteed to be equivalent).

The one rule: the format and Base URL must be the same combination, and copy the address exactly (do not add or remove /v1).

4. The model IDโ€‹

Select it from the ZCode model list first; if it is not there, copy a real, available ID from the ๐Ÿ‘‰ DeepSeek console or the ๐Ÿ‘‰ official model docs. Case and symbols must match exactly โ€” never type it from memory.

The model name just changed โ€” don't copy old tutorials

DeepSeek has released V4.1-Flash, and the official pricing page states to use deepseek-flash; the earlier deepseek-v4-flash and deepseek-v4-flash-vision-exp still work but are legacy names (requests route to V4.1-Flash).

What to do: use whichever ID your list shows. Do not hand-edit it just to match a tutorial.

๐Ÿงฉ Input Typesโ€‹

Edit the model: the UI offers four input switches โ€” Text / Image / Video / PDF. Enable all four, set the output type to Text, and save.

ZCode model editor for deepseek-flash: max output 128000, input types text/image/video/PDF all checked, output text

Enabled does not mean verified

The UI offering a switch only means ZCode provides the option. Before first using a given file type, test it once with an ordinary, non-sensitive file โ€” for example upload a random image and ask what is in it โ€” and only use it on real material after it works. If one type fails in your test, do not rely on it.

Do not guess capability from the model name

Rely on the vendor's official model list and the capability labels shown in ZCode. Do not upload business data just to test.

If your UI shows reasoning levels off / high / max, those are ZCode UI options, not DeepSeek API parameter names; defaults and effects follow your current ZCode version, and for direct API use follow the official documentation.

โœ… Test and Use Itโ€‹

1. Test the connectionโ€‹

Click Test in the model list; a green Connected means it works.

ZCode Model Settings - DeepSeek connected: green "Connected" and "Vision 1M" tag next to deepseek-flash

Test failed? Match the exact message first:

Insufficient Balance = your balance ran out โ€” top up first, don't rush to change settings

This message is DeepSeek's out-of-balance error (official code 402). Top up first: add funds at the ๐Ÿ‘‰ top-up page, then click Test again.

Don't keep editing the Base URL, API format, or API key just because of this message โ€” an empty balance is not fixed by changing configuration. If it still won't connect after topping up, work through the table below for the model, permissions, or service status.

For other test failures, match here:

MessageCauseWhat to do
"Model not found"The ID is wrong, retired, or not offered to this account / API formatCopy the current available ID from the ZCode list or console; if it still fails, check whether the model supports the selected format and your account permissions
Other connection failuresCould be an invalid key, format/address mismatch, permissions, rate limits, network, or a server hiccupCheck the full error first: 401 โ†’ check the key, 429 โ†’ stagger or retry later, 5xx โ†’ retry later; if the message is unclear, recheck the format and Base URL

Then send one text-only message (for example "Explain what a sales inquiry is in one sentence"); a normal answer means the basic setup is done. If you need image capability, send an ordinary test image and ask what is in it.

2. How to select itโ€‹

Below the prompt box in a new task there is a model menu; choose DeepSeek โ†’ the model you configured.

ZCode new task - bottom model menu expanded: deepseek-flash selected under the DeepSeek group with a Vision tag

3. Add it to the teamโ€‹

If you installed the ZCode AI agent team, installation or update reads the capability list and assigns roles automatically. DeepSeek may be assigned to reasoning-heavy roles โ€” follow the role list after install/update. To reassign: confirm the provider is enabled โ†’ copy the current "update" prompt from the agent-team repository โ†’ explicitly ask to reassign โ†’ start a new session and check the roles.

๐Ÿ“‹ Common Mistakesโ€‹

PitfallConsequenceHow to avoid
๐Ÿ”ด Leaking the API keySomeone else can spend your balanceKeep it only in ZCode; never paste it into chats/screenshots/repos; disable and recreate it if usage looks odd
๐ŸŸก Wrong or legacy model ID"Model not found" errorCopy the current available ID from the ZCode list or console
๐ŸŸก Format and Base URL mismatchConnection failsUse the matching pair; copy the address exactly
๐ŸŸก Treating a UI switch as capabilityVideo/PDF upload fails or is unreadableAn enabled switch is not a guarantee; confirm official capability, then test each item
๐ŸŸข No input types enabledModel cannot read uploaded imagesEnable all four; test each type with an ordinary file before first use
๐ŸŸก Balance exhausted (test shows Insufficient Balance)Requests rejected; long tasks cut off midwayTop up at the ๐Ÿ‘‰ top-up page and test again; if concurrency-limited, stagger or wait

โœ… Completion Checkโ€‹

  • DeepSeek account registered and signed in;
  • API key created, and confirmed it was not pasted anywhere public;
  • A small top-up made (or balance confirmed sufficient);
  • The DeepSeek provider in ZCode shows Enabled;
  • The API format and Base URL are the same combination;
  • The model ID was copied from the list or console;
  • All four input types enabled, with each type tested once before first use;
  • Clicking Test shows Connected, and the text test passes.
๐Ÿš€ Next

๐Ÿ“„ Step 4 ยท Install the ZCode AI Agent Team โ€” put DeepSeek to work alongside other models by role.

๐Ÿ“š Further Readingโ€‹