DSH-DeepSeek-Quota: View Your Remaining DeepSeek API Quota in the DSH Web Sidebar and Navigate to the Top-Up Page

Preface

When developing or debugging agents with DeepSeek Harness, it’s often necessary to check how much quota remains on your DeepSeek API account. Manually switching to the official platform to check is less convenient than viewing it directly in the host sidebar. Below is an introduction to a DSH plugin: cn-scuo-oo/dsh-deepseek-quota. It adds a DeepSeek API remaining quota card to the DSH Web sidebar and provides a top-up entry.

It belongs to the community plugin ecosystem of DSH plugins and is not equivalent to a built-in feature of the DeepSeek official app store; the community directory is also an independent site with no official affiliation to DeepSeek / High-Flyer.

What This Is

cn-scuo-oo/dsh-deepseek-quota is published by cn-scuo-oo and open-sourced under the MIT License. It solves a specific problem: viewing DeepSeek API balance, top-up/gift composition, usage during the period, and update time directly in the DSH Web sidebar, and entering the top-up panel from the card to scan a QR code that opens the DeepSeek official top-up page to complete payment.

Core Features

The capabilities listed below all revolve around “balance display” and “top-up entry”:

  • Real-time balance display: Integrates with DeepSeek’s official GET /user/balance to show total balance, top-up/gift composition, usage during the period, and update time.
  • Auto-refresh and manual refresh: Automatically refreshes every 60 seconds, with manual refresh also available; old values are retained if refresh fails.
  • Low balance alert: The main number turns red when the balance is ≤ 0; an ! is shown in the collapsed sidebar state.
  • Top-up entry: The “Top Up” button in the card header opens a centered top-up panel, with amount tiers/payment methods consistent with the official website.
  • Official payment QR code: The panel generates a QR code for the official top-up page https://platform.deepseek.com/top_up for scanning and payment.
  • Key security: The API Key is only used within the Host process; the browser side fetches data via a same-origin route, and the Key never enters the browser.
  • Visual consistency: Reuses the design tokens from the sidebar’s “Settings” section, with pixel-level alignment in width.
  • Wide/narrow adaptive: The full card is displayed when the sidebar is expanded; when collapsed, it degrades to a 32px circular button, which can be clicked to expand the sidebar.

Installation and Enablement

First, confirm the runtime environment: Node 18+ is required; Windows (Git Bash / WSL), macOS, and Linux are supported.

The following commands are used to install the plugin:

git clone https://github.com/cn-scuo-oo/dsh-deepseek-quota.git
cd dsh-deepseek-quota
bash install.sh

After installation, a “DeepSeek Quota” card will appear at the bottom of the sidebar.

When configuring the API Key, fill it in within the DSH application:

Settings → Models → Fill in DEEPSEEK_API_KEY

This Key is used to call the DeepSeek official balance API.

If you don’t have a real Key, you can also use a local debugging address:

DEEPSEEK_BASE_URL=http://127.0.0.1:8899

This environment variable is used to override the official API address, suitable for local Mock or corporate proxy scenarios; the plugin will route to a local mock upstream when no valid Key is available.

Typical Usage

  1. View quota: The “DeepSeek Quota” card at the bottom of the sidebar displays the large ¥ Balance text, along with “Top-up X · Gift Y” and “Updated at HH:MM:SS”.

  2. Refresh: Click the refresh icon in the top-right corner of the card to fetch data immediately.

  3. Top up: Click the “Top Up” button in the card header, select the amount/payment method, click “Go to Payment” to display the official top-up page QR code, and scan it with your phone to open the DeepSeek official top-up page and complete payment.

  4. After the top-up is credited: Return to the sidebar and click the refresh icon, or wait 60 seconds for the auto-refresh.

Boundaries of the Top-Up Panel

DeepSeek does not provide a public “generate payment QR code by order” API, and the official top-up page also prohibits embedding. Therefore, this plugin does not collect funds on behalf of users, nor does it bypass official billing; the panel displays a QR code for the official top-up entry:

https://platform.deepseek.com/top_up

Users select the amount and payment method in the panel, then scan the QR code to open the official top-up page and complete payment. After payment is completed, return to the DSH sidebar and refresh the card to view the latest balance.

Security and Notes

  • Data source: DeepSeek official GET /user/balance, requiring a valid DEEPSEEK_API_KEY.
  • Key boundary: The API Key never leaves the Host process; the browser side fetches data via a same-origin route, and the API Key does not enter the browser, frontend code, or command strings.
  • Compliance boundary: Only integrates with DeepSeek’s official public API and official top-up page, with no involvement in crawling, bypassing official billing, or fund collection logic.
  • Installation boundary: The plugin runs with the current DSH process permissions; the source code and license should be reviewed before installation. This plugin is open-sourced under the MIT License and can be freely used, modified, and commercially deployed.

Links

  • Repository: https://github.com/cn-scuo-oo/dsh-deepseek-quota
  • Directory page clue (unverified): https://www.skillhub.cn/plugins/cn-scuo-oo/dsh-deepseek-quota
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye