Balance Query
Query your DeepSeek API account balance to check available credits and currency information.
Through the balance query API, you can retrieve the current balance information for your DeepSeek API account, including total available balance, granted balance, and topped-up balance. Checking your balance before running long-duration tasks or batch calls helps avoid interruptions due to insufficient funds.
Basic Usage
Get your account balance via the model instance's balance() method:
Balance Information Details
The response contains two fields: is_available and balance_infos:
Balance Field Descriptions
| Field | Description |
|---|---|
currency | Currency type, 'CNY' or 'USD' |
total_balance | Total available balance, including granted and topped-up balances |
granted_balance | Unexpired granted balance |
topped_up_balance | Topped-up balance |
Balance Check Utility
Check your balance before executing batch tasks to ensure sufficient funds:
Custom Configuration
The balance() method supports passing custom configuration to override the default API Key, Base URL, or timeout:
API Reference
model.balance() Parameters
apiKeystring
baseURLstring
timeoutnumber
UserBalanceResponse
is_availableboolean
balance_infosBalanceInfo[]
BalanceInfo
currency'CNY' | 'USD'
total_balancestring
granted_balancestring
topped_up_balancestring
Model List
Query the list of available models on the DeepSeek API, retrieving model identifiers and ownership information.
Integration Overview
deepseek-kit can work alongside frameworks like AI SDK and LangChain — embedding DeepSeek agents as subagents in other frameworks, or bringing other frameworks' agents in as tools for deepseek-kit.

