Preface¶
When using the DeepSeek Harness (DSH) web interface to call the DeepSeek API, the remaining quota, current conversation cost, and today’s spending often need to be checked separately. dsh-deepseek-quota is a DSH web GUI plugin that places this information in a floating card in the bottom-right corner of the page. Below, we introduce its features, installation methods, and typical configurations.
What Is This¶
dsh-deepseek-quota, maintained by yingjunnan, is a plugin for the DSH web interface, licensed under MIT. It registers a floating card in the shell.overlay slot to display the DeepSeek API remaining quota, current conversation cost, and today’s spending. The plugin requires pnpm, reads DEEPSEEK_API_KEY through the credential service, and the browser only accesses local routes.
Core Features¶
Floating Card Content¶
The card displays:
- Total balance
- Available status
- Current conversation cost
- Today’s spending
- Gifted balance
- Recharged balance
Automatic and Manual Refresh¶
- Balance automatically refreshes every 60 seconds
- Current conversation cost automatically refreshes every 5 seconds
- Manual refresh supported
Peak/Off-Peak Pricing Period Indicator¶
The plugin displays DeepSeek’s peak, idle, or regular pricing period indicators. Peak/off-peak pricing takes effect from 2026-08-17, with peak hours being Beijing time 09:00–12:00 and 14:00–18:00.
Current Conversation Cost¶
The current conversation cost is calculated per assistant/message based on the official DeepSeek price list and supports peak/off-peak pricing starting from 2026-08-17.
Today’s Spending Source¶
- When
DEEPSEEK_PLATFORM_TOKENis configured, the official today’s spending can be retrieved - When not configured, it estimates based on balance differences and labels it as approximate spending in the interface
Routes and Error States¶
The plugin registers host routes:
GET /api/deepseek-balanceGET /api/deepseek-session-cost
It provides error states for unconfigured keys, network failures, API errors, and automatically follows the application’s light or dark theme.
Installation and Enablement¶
pnpm is required before installation.
If the dsh CLI is installed:
dsh plugin --profile web add dsh-deepseek-quota
If the dsh CLI is not installed:
npx @deepseek-ai/dsh plugin --profile web add dsh-deepseek-quota
After installation, follow these steps to enable it:
- Restart the web application:
dsh web
Or use:
npx @deepseek-ai/dsh web
- Open
http://127.0.0.1:3080and refresh the page.
Once complete, the quota card will appear in the bottom-right corner.
You can also use the manual method: place the package in the profile’s node_modules and add the following to ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: deepseek-quota
name: dsh-deepseek-quota
Typical Usage¶
Configuring the DeepSeek API Key¶
Configure DEEPSEEK_API_KEY in the “Settings → Models” page, or write it to ~/.dsh/.credentials.yaml:
DEEPSEEK_API_KEY: <Your API Key>
The plugin reads the key through the credential service; the API key never leaves the local machine, and the browser only accesses local routes.
Viewing Quota and Costs¶
After opening http://127.0.0.1:3080, the bottom-right corner card will display the total balance, available status, current conversation cost, today’s spending, gifted balance, and recharged balance. The balance and current conversation cost will automatically refresh according to the periods mentioned above, and manual refresh is also supported.
Optional: Enabling Official Today’s Spending¶
To read the official today’s spending, configure DEEPSEEK_PLATFORM_TOKEN, for example, by writing it to ~/.dsh/.credentials.yaml:
DEEPSEEK_PLATFORM_TOKEN: <Token>
Once configured, the plugin reads the official today’s spending from platform.deepseek.com/api/v0/usage/cost. When this token is not configured, it will still estimate based on balance differences and label it as approximate spending.
Applicable Scenarios and Notes¶
Suitable for the following use cases:
- Using the DeepSeek API within the DSH web interface
- Wanting a persistent display of remaining quota, current conversation cost, and today’s spending
- Needing to view the current peak/off-peak pricing period
- Preferring that the browser only accesses local routes
Notes:
- The plugin runs with the current
dshprocess permissions; check the source code and license before installation. - The license is MIT.
pnpmis required.- After modifying
lib/client.js, restartdsh webto regenerate the bootstrap hash and force-refresh the page. - For local development, you can use:
dsh plugin --profile web add .
Related Links¶
Directory page: https://www.skillhub.cn/plugins/yingjunnan/dsh-deepseek-quota
GitHub repository: https://github.com/yingjunnan/dsh-deepseek-quota