Preface¶
When using the DSH web interface to access the DeepSeek API, balance, cumulative spending, and Token usage are usually scattered across different locations: some in the platform console, others requiring manual tallying from session logs. For those who frequently switch projects and need to quickly confirm quota, navigating back and forth between pages adds significant overhead.
dsh-liquid-glass-balance-card is a plugin designed for the DeepSeek Harness (DSH) web interface. It consolidates DeepSeek API balance, cumulative spending, and Token usage into a single draggable liquid glass card, which appears by default in the top-right corner of the page.
Below, we introduce what this plugin does, how to install it, how to configure the API Key and platform userToken, and important considerations for its usage.
What Is This¶
dsh-liquid-glass-balance-card is a balance and usage card plugin for the DSH web interface. Its purpose is straightforward: display DeepSeek API balance, cumulative spending, and Token usage within the DSH Web page, allowing users to drag the card’s position.
This plugin belongs to the DSH community plugin ecosystem. DSH emphasizes “everything is a plugin,” and the community directory is an independent site, not the official app store of DeepSeek or High-Flyer.
Verified information shows:
- Repository name:
dsh-liquid-glass-balance-card - Repository owner:
SoDaZilla-zzz - README and
package.jsonauthor fields indicate:sooodaaa package.jsondeclares version:0.2.0- License:
MIT - GitHub repository: https://github.com/SoDaZilla-zzz/dsh-liquid-glass-balance-card
Core Features¶
This plugin mainly provides the following capabilities:
- Displays a draggable liquid glass card in the top-right corner of the DSH web interface by default.
- Shows DeepSeek API total balance, availability status, gifted balance, and topped-up balance.
- Displays cumulative spending amount and cumulative Token usage.
- Supports time dimensions: today, yesterday, last 7 days, last 30 days, and all time.
- Provides dual-layer usage statistics: local DSH session log aggregation and DeepSeek platform online totals.
- Optional configuration of the DeepSeek platform
userTokento enable online totals. - The card settings allow toggling the display of online totals.
- Displays spending and Token trends for the last 7 and 30 days via liquid glass bar charts.
- Liquid glass effect parameters are adjustable in real-time, including transparency, background blur, saturation, highlight intensity, and flowing light.
- 3D thickness effect can be toggled, with adjustable thickness and lateral angle.
- Customizable glass color while maintaining the liquid glass aesthetic.
- Currency preference supports
CNY,USD, andAuto. - One-click navigation to the official DeepSeek top-up page.
- Supports manual entry of the DeepSeek API Key; falls back to the DSH-configured
DEEPSEEK_API_KEYif not provided. - Auto-refresh every 60 seconds, with manual refresh also available.
- The plugin configuration card allows separate auto-refresh intervals for balance and online totals.
- Follows DSH light/dark theme variables
--dsw-*.
Installation and Activation¶
Installing requires the DSH CLI and pnpm. First, run the installation command below:
dsh plugin --profile web add dsh-liquid-glass-balance-card
After installation, restart DSH Web:
dsh web
Open the browser and visit:
http://127.0.0.1:3080
After refreshing the page, the card will appear in the top-right corner.
If you choose manual installation, you need to do two things:
- Place the plugin package into the
node_modulesdirectory of the corresponding profile. - Add a loader entry to
~/.dsh/profiles/web/cordis.patch.yml.
A sample loader entry is as follows:
- insert:
- id: liquid-glass-balance-card
name: dsh-liquid-glass-balance-card
After completing these steps, start DSH Web again, and the card will be loaded into the web interface.
Typical Usage¶
Configuring the DeepSeek API Key¶
Before the card can display balance, a valid DeepSeek API Key is required. You can configure it through two entry points:
- The gear icon on the card.
Settings → Plugins → Plugin Configuration → DeepSeek Balance Card.
Steps:
- Paste the DeepSeek API Key.
- Click Save.
After saving, the manually entered Key takes precedence over the DSH-configured DEEPSEEK_API_KEY. If you click Clear, the manual Key is deleted, and the plugin falls back to using DSH’s own DEEPSEEK_API_KEY. If neither a manual Key nor the DSH-configured DEEPSEEK_API_KEY exists, the card will display a clear error message.
The Key is stored via the DSH official credential system, referenced as:
DSH_LIQUID_GLASS_API_KEY
It is not written to any plaintext file managed by the plugin, and the browser cannot view the plaintext value.
If you previously used v0.1 and the old Key was stored in:
$DSH_HOME/storages/dsh-liquid-glass-balance-card.json
It will be automatically migrated into the DSH credential system on the next startup, and the old file will be deleted afterward.
Enabling Online Totals¶
Online totals require the DeepSeek platform userToken. A regular API Key cannot read online totals because these totals come from the usage interface of a logged-in platform session.
The two endpoints used to read online totals are:
platform.deepseek.com/api/v0/usage/amount
platform.deepseek.com/api/v0/usage/cost
To obtain the userToken, follow these steps:
- Log in to the DeepSeek platform in your browser.
- Open Developer Tools.
- Navigate to
Application → Local Storage → platform.deepseek.com. - Copy the value of
userToken. - Paste this value into the card settings or plugin settings and save.
The platform userToken is stored via the DSH credential system, referenced as:
DSH_LIQUID_GLASS_PLATFORM_TOKEN
This Token is not returned in the traffic back to the browser UI. The browser only accesses the local host route; the host only sends it to the two usage endpoints of platform.deepseek.com.
Online totals are account-level statistics, including usage generated by non-DSH clients, and are aligned to Beijing time. Therefore, they typically do not equal the local statistics of a specific DSH session or project.
Adjusting Liquid Glass Effects¶
The liquid glass effects in the card can be adjusted in real-time from the settings panel. Adjustable parameters include:
- Transparency
- Background blur
- Saturation
- Highlight intensity
- Flowing light
- 3D thickness
- Lateral angle
- Glass color
Parameters are saved in the browser’s localStorage, and a “Restore defaults” button is provided.
Suitable Scenarios and Considerations¶
This plugin is suitable for the following scenarios:
- Frequently calling the DeepSeek API within the DSH web interface and needing to check balance at any time.
- Wanting to see local session statistics and platform online totals on the same page.
- Needing to view spending and Token usage across time dimensions: today, yesterday, last 7 days, last 30 days, and all time.
- Wanting a customizable card appearance that stays consistent with the DSH light/dark theme.
When using it, keep the following points in mind:
- The plugin runs with the current
dshprocess privileges. Before installation, inspect the source code, dependencies, and license. - A manually entered API Key takes precedence over the DSH-configured
DEEPSEEK_API_KEY. - Online totals require the platform
userToken, not a regular API Key. - Online totals are account-level statistics and will include usage from non-DSH clients.
- The platform
userTokenshould only be sent by the host to the DeepSeek platform usage endpoints; do not treat it as a regular API Key. - Glass parameters are saved in the browser’s
localStorage; switching browsers or clearing local data may require reconfiguration.
Conclusion¶
dsh-liquid-glass-balance-card addresses a very specific problem: quickly viewing DeepSeek API balance, cumulative spending, and Token usage within the DSH web interface. It unifies balance, local statistics, online totals, time dimensions, and trend charts into a single draggable card, while handing Key and platform Token management to the DSH credential system.
The verified materials do not provide a confirmable community directory page address. If you need to view the source code, submit an issue, or confirm installation details, visit the GitHub repository:
https://github.com/SoDaZilla-zzz/dsh-liquid-glass-balance-card