<?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: Russell Craft</title>
    <description>The latest articles on DEV Community by Russell Craft (@russell_craft_b3c1fd98bfb).</description>
    <link>https://dev.to/russell_craft_b3c1fd98bfb</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%2F4053205%2F921dbeb1-4f2e-496b-b655-87c5a4cc01ef.png</url>
      <title>DEV Community: Russell Craft</title>
      <link>https://dev.to/russell_craft_b3c1fd98bfb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/russell_craft_b3c1fd98bfb"/>
    <language>en</language>
    <item>
      <title>I metered Kimi K3 against 4 other models from actual billing, not list prices</title>
      <dc:creator>Russell Craft</dc:creator>
      <pubDate>Wed, 29 Jul 2026 13:02:34 +0000</pubDate>
      <link>https://dev.to/russell_craft_b3c1fd98bfb/i-metered-kimi-k3-against-4-other-models-from-actual-billing-not-list-prices-1nfh</link>
      <guid>https://dev.to/russell_craft_b3c1fd98bfb/i-metered-kimi-k3-against-4-other-models-from-actual-billing-not-list-prices-1nfh</guid>
      <description>&lt;p&gt;Kimi K3 landed two days ago and the timeline is full of parameter counts. I wanted a different number: what does it actually cost to run a real task on it, compared to the alternatives?&lt;/p&gt;

&lt;p&gt;So I ran the same coding task across five models and metered the cost. The result was not what I expected, and getting there surfaced a measurement problem worth writing up on its own.&lt;/p&gt;

&lt;h2&gt;
  
  
  The measurement problem (this matters more than the benchmark)
&lt;/h2&gt;

&lt;p&gt;My first attempt derived prices from the gateway's pricing endpoint, which exposes a model_ratio and a completion_ratio per model. The usual convention is &lt;code&gt;$/M = model_ratio * 2&lt;/code&gt;, so I used that.&lt;/p&gt;

&lt;p&gt;Then I sanity-checked it against models whose real prices I already knew:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;My formula said&lt;/th&gt;
&lt;th&gt;Reality&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;claude-sonnet-5&lt;/td&gt;
&lt;td&gt;$75 / M&lt;/td&gt;
&lt;td&gt;~$8 / M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;deepseek-v4-flash&lt;/td&gt;
&lt;td&gt;$0.44 / M&lt;/td&gt;
&lt;td&gt;I had $2 / M on file&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both wrong, in opposite directions. The formula was junk.&lt;/p&gt;

&lt;p&gt;So I threw it out and measured from ground truth instead: read the account's cumulative usage, make one call, read it again, take the difference.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;usage&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://&amp;lt;gateway&amp;gt;/dashboard/billing/usage &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | jq &lt;span class="nt"&gt;-r&lt;/span&gt; .total_usage
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="nv"&gt;before&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;usage&lt;span class="si"&gt;)&lt;/span&gt;
curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://&amp;lt;gateway&amp;gt;/v1/chat/completions &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"model":"Kimi-K3","messages":[...],"max_tokens":800}'&lt;/span&gt;
&lt;span class="nb"&gt;sleep &lt;/span&gt;4
&lt;span class="nv"&gt;after&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;usage&lt;span class="si"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With known token counts on both sides you can solve for the real per-million rates. Two independent models resolved to the same coefficient to three significant figures, which is how you know it is not a coincidence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$/M input  = model_ratio * 1.60
$/M output = model_ratio * completion_ratio * 1.60
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not &lt;code&gt;* 2&lt;/code&gt;. And claude-sonnet-5 does not obey the formula at all: its model_ratio entry (37.5) is on some other scale, so it has to be measured directly.&lt;/p&gt;

&lt;p&gt;Side effect: I found my own price table had deepseek marked up nearly 3x too high. If you display per-call costs to users, go verify your table against billing deltas. Mine was wrong and I had been showing it for days.&lt;/p&gt;

&lt;h2&gt;
  
  
  The benchmark
&lt;/h2&gt;

&lt;p&gt;Same prompt to all five, one run each, non-streaming, no max_tokens cap:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Write a JavaScript function that dedupes an array preserving order, plus 3 edge-case assertions. Code only.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;th&gt;Latency&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;deepseek-v4-flash&lt;/td&gt;
&lt;td&gt;$0.001404&lt;/td&gt;
&lt;td&gt;26.5s&lt;/td&gt;
&lt;td&gt;620 chars&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;claude-sonnet-5&lt;/td&gt;
&lt;td&gt;$0.002253&lt;/td&gt;
&lt;td&gt;9.3s&lt;/td&gt;
&lt;td&gt;570 chars&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM5.2&lt;/td&gt;
&lt;td&gt;$0.005437&lt;/td&gt;
&lt;td&gt;24.1s&lt;/td&gt;
&lt;td&gt;479 chars&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kimi-K3-codex&lt;/td&gt;
&lt;td&gt;$0.006650&lt;/td&gt;
&lt;td&gt;9.4s&lt;/td&gt;
&lt;td&gt;448 chars&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kimi-K3&lt;/td&gt;
&lt;td&gt;$0.017102&lt;/td&gt;
&lt;td&gt;35.8s&lt;/td&gt;
&lt;td&gt;571 chars&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Three things I did not expect
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. K3 is the most expensive option here, 12x the cheapest.&lt;/strong&gt; Measured output rate lands around $12/M. On one call that is noise. On a batch job of a few thousand calls it is the difference between $2 and $25.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. It is also the slowest.&lt;/strong&gt; 35.8s versus claude-sonnet-5's 9.3s. K3 is a reasoning model, it spends tokens thinking before answering. The variance is large: a similar prompt came back in 11.9s on another run. The reasoning budget floats.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The codex variant is the actual bargain.&lt;/strong&gt; Same list price as base K3, but on coding tasks it thinks far less: $0.0067 vs $0.0171, 9.4s vs 35.8s. Half the cost, roughly 4x faster. If you are reaching for K3 to write code, reach for Kimi-K3-codex instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  One trap if you cap max_tokens
&lt;/h2&gt;

&lt;p&gt;While probing I set max_tokens to 200 and got back a completely empty response, and still paid for 200 tokens. All of them went to reasoning_tokens; nothing was left for visible output.&lt;/p&gt;

&lt;p&gt;At 600 the reasoning took 57 tokens and the answer came through fine. At 2048 it took 229.&lt;/p&gt;

&lt;p&gt;This is not a K3 defect, it is how reasoning models behave when you starve them. But if your app applies a tight max_tokens ceiling across all models (mine did, at 2048), audit it. A user gets a blank reply and you still get billed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;p&gt;Single run per model. This is an order-of-magnitude read, not a statistically significant result. Latency in particular swings a lot between runs. The point is not the exact decimals, it is that the ranking was the opposite of what the launch-day discourse implied, and you only find that out by metering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproduce it
&lt;/h2&gt;

&lt;p&gt;All five models are running at &lt;a href="https://ainetcafe.com/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=kimi-k3" rel="noopener noreferrer"&gt;https://ainetcafe.com/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=kimi-k3&lt;/a&gt; — open-source AI apps hosted ready to use, no install and no API key needed to try. Every call shows its measured cost.&lt;/p&gt;

&lt;p&gt;There is also an MCP server if you would rather have an agent run the comparison itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; http ai-netcafe https://ainetcafe.com/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then ask it to compare_models on whatever prompt you actually care about. That is the tool I used to produce the table above.&lt;/p&gt;

&lt;p&gt;Full data and method: &lt;a href="https://ainetcafe.com/lab/kimi-k3?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=kimi-k3" rel="noopener noreferrer"&gt;https://ainetcafe.com/lab/kimi-k3?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=kimi-k3&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>benchmarking</category>
    </item>
  </channel>
</rss>
