<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: yzx00123</title>
    <description>The latest articles on DEV Community by yzx00123 (@yzx00123).</description>
    <link>https://dev.to/yzx00123</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4277274%2F543d28f9-45d6-4561-bb23-723fd3ae662a.jpg</url>
      <title>DEV Community: yzx00123</title>
      <link>https://dev.to/yzx00123</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yzx00123"/>
    <language>en</language>
    <item>
      <title>I built a desktop dashboard for all my LLM API keys: latency, balance and daily spend in one screen</title>
      <dc:creator>yzx00123</dc:creator>
      <pubDate>Wed, 02 Dec 2026 00:33:04 +0000</pubDate>
      <link>https://dev.to/yzx00123/i-built-a-desktop-dashboard-for-all-my-llm-api-keys-latency-balance-and-daily-spend-in-one-screen-1ep9</link>
      <guid>https://dev.to/yzx00123/i-built-a-desktop-dashboard-for-all-my-llm-api-keys-latency-balance-and-daily-spend-in-one-screen-1ep9</guid>
      <description>&lt;p&gt;If you use more than one LLM provider, you know the ritual: DeepSeek for cheap calls, Moonshot for long context, MiMo or Qwen for experiments, plus a relay or two. Every day you open five or six dashboards just to answer three questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Which key is dead, rate-limited or out of credit?&lt;/li&gt;
&lt;li&gt;Which provider got slow since yesterday?&lt;/li&gt;
&lt;li&gt;How much did I actually burn this month?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I got tired of it, so I built LLM API Monitor - a small Electron desktop app that watches every key you own.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxz5gupusgfair0mt33lr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxz5gupusgfair0mt33lr.png" alt="dashboard" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it actually does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real latency probes.&lt;/strong&gt; Not a TCP ping: it sends a real completion request with max_tokens: 1 for each key, so the number is the time-to-first-token you would actually feel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Balance per key.&lt;/strong&gt; It reads the provider's own balance endpoint when there is one; a 429 "insufficient balance" answer is kept as a no-money state instead of being overwritten by the next successful probe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daily spend, reconstructed.&lt;/strong&gt; Most providers do not give you a per-day bill, so the app takes periodic balance snapshots and diffs them into a local ledger. Console-level bills (Xiaomi MiMo monthly bills, Alibaba Bailian free quota) are imported separately and merged into the same ledger.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;429 backoff.&lt;/strong&gt; Exponential backoff per key, so a rate-limited provider stops spamming and recovers by itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;21 providers built in:&lt;/strong&gt; OpenAI-compatible, Anthropic, Gemini, DeepSeek, Moonshot, Qwen, Zhipu, MiMo, Groq, OpenRouter and a few relays.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3vpu95igj6kpez3s0ypt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3vpu95igj6kpez3s0ypt.png" alt="bills" width="800" height="1077"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that was genuinely hard: multi-account bookkeeping
&lt;/h2&gt;

&lt;p&gt;Two bugs taught me the most.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Balance diffs are only meaningful per account.&lt;/strong&gt; One console account can hold several API keys. If you diff "balance now" against "the last sample, whichever account it came from", you get nonsense the moment a second account logs in: negative deltas get clamped to zero, and when you switch back the spend appears out of nowhere. Fix: every sample carries an accountId, and the report builds one series per account before summing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Console sessions are per account too.&lt;/strong&gt; A cookie jar per provider is not enough. The console login belongs to one account, and binding a new login to the wrong card silently shows one account's balance on another account's key. Now the session is keyed by account, and after login the app checks that the account really owns the key you clicked; if not, it tells you "wrong account, log in the one that owns this key".&lt;/p&gt;

&lt;p&gt;I ended up writing a 70-item audit and a small regression harness before calling it 1.0. The boring stuff - does deleting a key shift the other keys' history indices? do old bill rows without an account column double-count? - turned out to be where the real data corruption lived.&lt;/p&gt;

&lt;h2&gt;
  
  
  Export to coding agents
&lt;/h2&gt;

&lt;p&gt;It can also write a working config for Claude Code, Codex CLI, Gemini CLI, Kimi CLI, DeepSeek Harness and a few more, backing up the original file first - handy when you switch keys often.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Repo (MIT): &lt;a href="https://github.com/yzx00123/llm-api-monitor" rel="noopener noreferrer"&gt;https://github.com/yzx00123/llm-api-monitor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Latest Windows build: &lt;a href="https://github.com/yzx00123/llm-api-monitor/releases/latest" rel="noopener noreferrer"&gt;https://github.com/yzx00123/llm-api-monitor/releases/latest&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you keep more than two providers around, I would love to hear which number you actually need at a glance - that is what decides the next feature.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>productivity</category>
      <category>tools</category>
    </item>
  </channel>
</rss>
