How to get your DeepSeek API usage, balance and spend programmatically
What the DeepSeek API exposes
| Signal | DeepSeek |
|---|---|
| Balance | Yes. GET /user/balance |
| Spend history | No |
| Cost breakdown | No |
| Plan and quota | No |
| Cost on each response | No |
| Rate-limit headers | None |
| Credential | API key |
Call it yourself
Credential. A normal DeepSeek API key from the platform's API keys page.
Balance
curl https://api.deepseek.com/user/balance \ -H "Authorization: Bearer $DEEPSEEK_API_KEY"
{
"is_available": true,
"balance_infos": [
{ "currency": "USD", "total_balance": "42.10", "granted_balance": "0.00", "topped_up_balance": "42.10" }
]
}Trimmed to the fields Argus reads. Values are examples.
Gotchas
- Balances are strings. Parse them before comparing.
- An account can hold more than one currency row. Argus reads the USD row when there is one.
- A zero balance returns 402 "Insufficient Balance". There is no auto-recharge; top-ups are manual.
- No rate-limit headers. Limits are per-account concurrency caps, not requests per minute.
How DeepSeek charges
Pure prepaid top-up, one price for everyone (no tiers). Automatic prompt caching; only differentiation is per-model concurrency caps.
At zero. Zero balance → 402 "Insufficient Balance"; manual top-up.
- 2,500 concurrency per second, per org. Per-account concurrency caps (2,500 flash / 500 pro), not RPM. No headers.
Or let Argus track it
Paste the key once. Argus keeps the ledger, and your coding agent reads it through the MCP server.
- Reads the DeepSeek balance every hour and keeps the series, so you get burn per day (top-ups never count as negative spend) and days until it hits zero.
- With the SDK, itemizes each call by endpoint and prices it at DeepSeek's per-operation rates.
- Emails you on low balance, days to zero, a spend spike, or projected overage.
- Hands all of it to your coding agent over MCP, so it can ask what a run cost or how much runway is left without leaving the editor.
> what has deepseek cost today, and how long until it runs out?
get_overview → deepseek: mtd spend, burn per day, days to zero
get_request_costs { "provider": "deepseek", "limit": 25 }
get_advisories → credits_low, spend_spike, rate_limit_low …Questions
- Does DeepSeek have an API for its balance?
- Yes. GET https://api.deepseek.com/user/balance with your normal API key returns total, granted and topped-up balance per currency. There's no usage history endpoint.
- Can I get DeepSeek spend per day from the API?
- Not as a series. Derive it from how much the balance drops each day, ignoring top-ups.
- What happens when DeepSeek credits run out?
- Zero balance → 402 "Insufficient Balance"; manual top-up.
- What key does Argus need for DeepSeek?
- A normal DeepSeek API key from the platform's API keys page.
Related
The balance endpoint, auth header and response field for every major metered API, and the ones that only show a balance in the console.
Days to zero is balance over burn rate. The hard part is the burn rate: top-ups, daily buckets and credits that aren't dollars.
The balance call for each provider, side by side.
Pricing and limits verified 2026-07-20 against api-docs.deepseek.com/quick_start/pricing, api-docs.deepseek.com/quick_start/rate_limit. Endpoints are the ones the Argus DeepSeek connector calls.
Connect a provider key, point Claude Code or Cursor at the Argus MCP server, and ask what the last run cost.