LLMs

How to get your DeepSeek API usage, balance and spend programmatically

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.

What the DeepSeek API exposes

SignalDeepSeek
BalanceYes. GET /user/balance
Spend historyNo
Cost breakdownNo
Plan and quotaNo
Cost on each responseNo
Rate-limit headersNone
CredentialAPI 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

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.

Let your coding agent watch the meter.

Connect a provider key, point Claude Code or Cursor at the Argus MCP server, and ask what the last run cost.