<?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: IteraCompute</title>
    <description>The latest articles on DEV Community by IteraCompute (@iteracompute).</description>
    <link>https://dev.to/iteracompute</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%2F4193060%2F6a549702-5ecd-4332-bf8f-a3909630d4b8.png</url>
      <title>DEV Community: IteraCompute</title>
      <link>https://dev.to/iteracompute</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iteracompute"/>
    <language>en</language>
    <item>
      <title>A tiny acceptance gate before comparing LLM API prices</title>
      <dc:creator>IteraCompute</dc:creator>
      <pubDate>Sun, 15 Nov 2026 02:19:08 +0000</pubDate>
      <link>https://dev.to/iteracompute/a-tiny-acceptance-gate-before-comparing-llm-api-prices-3hk8</link>
      <guid>https://dev.to/iteracompute/a-tiny-acceptance-gate-before-comparing-llm-api-prices-3hk8</guid>
      <description>&lt;p&gt;An input price per million tokens is a useful filter, but it is not the cost of getting a correct result. If a cheaper route fails the task or requires retries, the bill for an accepted answer can be different from the price sheet.&lt;/p&gt;

&lt;p&gt;We ran a deliberately small document-QA check on two model routes through one API on 11 November 2026. This is a method example, not a benchmark or a claim that either model is generally better.&lt;/p&gt;

&lt;h2&gt;
  
  
  Define the answer gate first
&lt;/h2&gt;

&lt;p&gt;We wrote a synthetic five-line document and four questions before sending any request. The questions tested:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Grounding:&lt;/strong&gt; Can the model answer a fact actually stated in the document?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Abstention:&lt;/strong&gt; Does it say &lt;code&gt;unknown&lt;/code&gt; when the document does not specify a region?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache math:&lt;/strong&gt; Does it reject the claim that an 80% input-cache hit necessarily cuts the entire bill by 80%?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate arithmetic:&lt;/strong&gt; Can it choose the lower token subtotal from rates provided inside the synthetic document?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We requested a JSON object with one short &lt;code&gt;answer&lt;/code&gt; field, then compared that answer with a fixed expected string. Each route received each question once. No automatic retry was allowed.&lt;/p&gt;

&lt;p&gt;Both Qwen3.8 Flash and GLM-5.3 Flash returned four HTTP 200 responses with parseable JSON and matched all four expected short answers. Eight calls and invented questions cannot establish production quality, repeatability, long-context behavior, uptime, or a latency distribution. Your own sanitized task examples are the next test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Record attempts, not just successful answers
&lt;/h2&gt;

&lt;p&gt;For every request, keep the route ID, prompt version, expected answer, observed answer, HTTP status, elapsed time, retry count, and the complete usage object. An attempt that fails still belongs in the cost of the workflow. In a decoded Chat Completions JSON response, if &lt;code&gt;completion_tokens_details&lt;/code&gt; reports &lt;code&gt;reasoning_tokens&lt;/code&gt;, treat it as a subset of &lt;code&gt;completion_tokens&lt;/code&gt;; adding the two would double-count output.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;usage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"usage"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;completion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"completion_tokens"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;details&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"completion_tokens_details"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;reasoning&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"reasoning_tokens"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;reasoning&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Inspect the provider's usage fields"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;billable_output_from_response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;completion&lt;/span&gt;  &lt;span class="c1"&gt;# Do not add reasoning again.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That variable records a response field, not an independently verified invoice. Keep cached input, uncached input, cache creation, tool fees, and any retry or batch condition in separate columns if the route exposes them. The &lt;a href="https://developers.openai.com/api/docs/guides/token-counting" rel="noopener noreferrer"&gt;OpenAI token-counting guide&lt;/a&gt; also explains why reported output can exceed visible text; check the exact provider's semantics before applying the same logic to another API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make the comparison only after reconciliation
&lt;/h2&gt;

&lt;p&gt;For each route, divide the total bill for &lt;strong&gt;all&lt;/strong&gt; attempts by the number of accepted tasks. Do that only after the acceptance rule represents the work you actually need. We have not independently reconciled the response cost fields with a final account ledger, so we are not presenting a measured dollar saving or a model ranking here. The final account charge and tariff version still need checking.&lt;/p&gt;

&lt;p&gt;The exact route names and current conditions should be rechecked in the API's live model catalog before rerunning this example. The document, refund window and example rates in our test were synthetic inputs, not real customer records or company policy.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>api</category>
      <category>python</category>
    </item>
    <item>
      <title>Qwen3.8-Max vs Alibaba international</title>
      <dc:creator>IteraCompute</dc:creator>
      <pubDate>Fri, 06 Nov 2026 01:30:17 +0000</pubDate>
      <link>https://dev.to/iteracomputeai/qwen38-max-vs-alibaba-international-3fmk</link>
      <guid>https://dev.to/iteracomputeai/qwen38-max-vs-alibaba-international-3fmk</guid>
      <description>&lt;p&gt;Alibaba's Singapore (international) list for Qwen3.8-Max is about $2.00 input / $0.25 cached input / $6.00 output per 1M tokens. That is a solid flagship price. On a month that sends every token to Max, switching hosts for a few cents per million barely moves the bill. What does move it is putting the easy steps on Flash and keeping Max for the hard ones, on one OpenAI-compatible key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;List prices used (USD per 1M tokens, checked 2026-11-06)&lt;/strong&gt;&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;Source&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Cached input&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;Qwen3.8-Max&lt;/td&gt;
&lt;td&gt;Alibaba Model Studio Singapore&lt;/td&gt;
&lt;td&gt;~$2.00&lt;/td&gt;
&lt;td&gt;~$0.25&lt;/td&gt;
&lt;td&gt;~$6.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3.8-Max&lt;/td&gt;
&lt;td&gt;IteraCompute&lt;/td&gt;
&lt;td&gt;$1.95&lt;/td&gt;
&lt;td&gt;$0.25&lt;/td&gt;
&lt;td&gt;$5.70&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3.8-Flash&lt;/td&gt;
&lt;td&gt;Alibaba Model Studio Singapore&lt;/td&gt;
&lt;td&gt;$0.15&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;$0.47&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3.8-Flash&lt;/td&gt;
&lt;td&gt;IteraCompute&lt;/td&gt;
&lt;td&gt;$0.11&lt;/td&gt;
&lt;td&gt;$0.016&lt;/td&gt;
&lt;td&gt;$0.38&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Alibaba Flash cache rates depend on implicit vs explicit mode on Model Studio; the tables below only apply a Flash cache price on the IteraCompute rows. Max cache is shown at $0.25 on both sides so the host comparison is apples-to-apples. Pull the live Model Studio sheet before you budget.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One month: 100M input + 10M output, all on Max&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cache-hit rate&lt;/th&gt;
&lt;th&gt;Alibaba Singapore Max&lt;/th&gt;
&lt;th&gt;IteraCompute Max&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;$260.00&lt;/td&gt;
&lt;td&gt;$252.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;td&gt;$172.50&lt;/td&gt;
&lt;td&gt;$167.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;80%&lt;/td&gt;
&lt;td&gt;$120.00&lt;/td&gt;
&lt;td&gt;$116.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;90%&lt;/td&gt;
&lt;td&gt;$102.50&lt;/td&gt;
&lt;td&gt;$99.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Host choice on Max alone saves about 3% here. Useful, not decisive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Same month, 70% Flash / 30% Max (easy steps vs hard steps)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Workload assumption: 70% of tokens on Flash, 30% on Max, same 10:1 input-to-output ratio on both. That is a typical agent split (classify / summarise / extract / format on Flash; plan / patch / final answer on Max).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setup&lt;/th&gt;
&lt;th&gt;0% cache&lt;/th&gt;
&lt;th&gt;50%&lt;/th&gt;
&lt;th&gt;80%&lt;/th&gt;
&lt;th&gt;90%&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;70/30 on Alibaba Singapore (Flash cache not applied)&lt;/td&gt;
&lt;td&gt;$91.79&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;70/30 on IteraCompute (one key)&lt;/td&gt;
&lt;td&gt;$85.96&lt;/td&gt;
&lt;td&gt;$57.17&lt;/td&gt;
&lt;td&gt;$39.90&lt;/td&gt;
&lt;td&gt;$34.14&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;All Max on Alibaba Singapore&lt;/td&gt;
&lt;td&gt;$260.00&lt;/td&gt;
&lt;td&gt;$172.50&lt;/td&gt;
&lt;td&gt;$120.00&lt;/td&gt;
&lt;td&gt;$102.50&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The number to notice: &lt;strong&gt;routing 70% of tokens to Flash cuts the all-Max Alibaba bill by about two thirds&lt;/strong&gt; even before you change hosts ($260 → ~$92 at 0% cache). On one OpenAI-compatible key the same mix is a single &lt;code&gt;model=&lt;/code&gt; flip per step — no second client, no second top-up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to route without a fancy router&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.iteracompute.com/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;EASY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;classify&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;summarize_tool_output&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;extract&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;commit_message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;format_check&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;qwen/qwen3.8-flash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;EASY&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;qwen/qwen3.8-max&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same pattern works with GLM-5.3-Flash or DeepSeek V4.1 Flash as the cheap side if that family fits the easy steps better. Keep a fallback: if a Flash step fails validation, retry once on Max and count those retries in the bill.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Caveats&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Thinking / reasoning tokens usually bill as output. Default high effort on Max inflates the output column faster than the input price suggests.&lt;/li&gt;
&lt;li&gt;Put the stable prefix (system prompt, tools, repo context) first so cache hits stay high. A request ID at the top of the system prompt resets the hit rate.&lt;/li&gt;
&lt;li&gt;This is not a claim that any host is the cheapest in the world. fp8 / promo / multi-provider pin setups can undercut a single-host mix. Measure on your own traffic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is IteraCompute. We serve &lt;code&gt;qwen/qwen3.8-max&lt;/code&gt; and &lt;code&gt;qwen/qwen3.8-flash&lt;/code&gt; through one OpenAI-compatible API. On 2026-11-06 our Max price is $1.95 input / $0.25 cached input / $5.70 output per 1M tokens, a little under Alibaba's international list (~$2.00 / $0.25 / $6.00). Flash is $0.11 / $0.016 / $0.38. The combined bill comes from routing, not from shaving Max by a few cents: &lt;a href="https://iteracompute.com/models/qwen3-8-max/?utm_source=dev&amp;amp;utm_medium=social&amp;amp;utm_campaign=one_api_mix_202611&amp;amp;utm_content=20261106_dev_max_01" rel="noopener noreferrer"&gt;Iteracompute Qwen3.8 Max&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sources: Alibaba Cloud Model Studio Singapore pricing (Qwen3.8-Max / Qwen3.8-Flash), IteraCompute &lt;code&gt;/v1/models&lt;/code&gt; (fetched 2026-11-06, cache bypassed).&lt;/p&gt;

</description>
      <category>qwen</category>
      <category>llm</category>
      <category>api</category>
      <category>finops</category>
    </item>
    <item>
      <title>Claude Sonnet 5.5: an 80% cache-hit rate is worth about as much as the Batch API</title>
      <dc:creator>IteraCompute</dc:creator>
      <pubDate>Thu, 05 Nov 2026 02:41:00 +0000</pubDate>
      <link>https://dev.to/iteracomputeai/claude-sonnet-55-an-80-cache-hit-rate-is-worth-about-as-much-as-the-batch-api-5bgi</link>
      <guid>https://dev.to/iteracomputeai/claude-sonnet-55-an-80-cache-hit-rate-is-worth-about-as-much-as-the-batch-api-5bgi</guid>
      <description>&lt;p&gt;Anthropic's Batch API halves the price of Claude Sonnet 5.5 if you can wait up to 24 hours. Prompt caching cuts the input side by 95% on every hit, in real time. On a typical month, the two end up close to the same bill, so it's worth knowing which lever you're actually pulling before you move traffic into a queue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Anthropic list prices for Claude Sonnet 5.5 (USD per 1M tokens, checked 2026-11-05)&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tier&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Cache read&lt;/th&gt;
&lt;th&gt;Cache write (5m / 1h)&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;Standard (real time)&lt;/td&gt;
&lt;td&gt;$2.00&lt;/td&gt;
&lt;td&gt;$0.10&lt;/td&gt;
&lt;td&gt;$2.50 / $4.00&lt;/td&gt;
&lt;td&gt;$10.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Batch API (async, up to 24h)&lt;/td&gt;
&lt;td&gt;$1.00&lt;/td&gt;
&lt;td&gt;$0.05&lt;/td&gt;
&lt;td&gt;$1.25 / $2.00&lt;/td&gt;
&lt;td&gt;$5.00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Cache reads on Sonnet 5.5 are 0.05x of base input, not the 0.1x most older Claude models use, and the batch discount stacks on top. US-only inference (&lt;code&gt;inference_geo&lt;/code&gt;) adds 1.1x to everything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One month: 100M input tokens, 10M output tokens&lt;/strong&gt; (cache writes left out)&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cache-hit rate&lt;/th&gt;
&lt;th&gt;Standard&lt;/th&gt;
&lt;th&gt;Batch&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;$300.00&lt;/td&gt;
&lt;td&gt;$150.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;td&gt;$205.00&lt;/td&gt;
&lt;td&gt;$102.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;80%&lt;/td&gt;
&lt;td&gt;$148.00&lt;/td&gt;
&lt;td&gt;$74.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;90%&lt;/td&gt;
&lt;td&gt;$129.00&lt;/td&gt;
&lt;td&gt;$64.50&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The number to notice: &lt;strong&gt;Batch at 0% cache hits ($150) costs about the same as real time at 80% hits ($148).&lt;/strong&gt; If your prompts share a long, stable prefix, fixing caching gets you the batch discount without the 24-hour wait. Batch only wins clearly when the prefix varies per request, or when you can get both.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where the money goes once caching works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At 90% hits on the standard tier, input is $29 of the $129 and output is $100. From that point, input price barely matters. What moves the bill:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Output length, thinking included.&lt;/strong&gt; Output tokens include reasoning. Lowering effort on routine calls is the next lever after caching.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache writes.&lt;/strong&gt; A 5-minute write costs 1.25x base input, a 1-hour write 2x. With 10M tokens of 5-minute writes added to the 80% month above, the standard bill goes from $148 to $173.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prefix stability.&lt;/strong&gt; A timestamp or request ID at the top of the system prompt resets the hit rate to zero. Put anything that changes per request after the cached block.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;A quick way to decide&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interactive or user-facing: standard tier, and spend the effort on cache hits.&lt;/li&gt;
&lt;li&gt;Nightly evals, backfills, bulk classification: Batch, and keep caching on anyway, since batch cache hits are best-effort but still billed at $0.05.&lt;/li&gt;
&lt;li&gt;Mixed: route by latency need, not by model.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is IteraCompute. We serve &lt;code&gt;anthropic/claude-sonnet-5-5&lt;/code&gt; through an OpenAI-compatible API, real time, at $1.00 input / $0.05 cached input / $1.25 cache write (5m) / $5.00 output per 1M tokens (checked 2026-11-05). That matches Anthropic's Batch per-token prices without the queue: $74 for the 80%-hit month above, against $148 on Anthropic's standard tier. If your workload can wait for Anthropic's Batch API, that's the same price direct. The same key also serves Claude Haiku 5.5 and low-cost open models like DeepSeek V4.1 Flash, so a mixed route doesn't need a second client: &lt;a href="https://iteracompute.com/models/claude-sonnet-5-5/?utm_source=dev&amp;amp;utm_medium=social&amp;amp;utm_campaign=one_api_mix_202611&amp;amp;utm_content=20261105_dev_sonnet_01" rel="noopener noreferrer"&gt;Iteracompute Claude Sonnet 5.5&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sources: Anthropic pricing docs (model pricing, batch processing, prompt caching, data residency sections), checked 2026-11-05.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>llm</category>
      <category>api</category>
      <category>finops</category>
    </item>
    <item>
      <title>Claude Haiku 5.5's 100K line: one extra token can make the whole request 5x</title>
      <dc:creator>IteraCompute</dc:creator>
      <pubDate>Fri, 30 Oct 2026 01:48:33 +0000</pubDate>
      <link>https://dev.to/iteracomputeai/claude-haiku-55s-100k-line-one-extra-token-can-make-the-whole-request-5x-4k31</link>
      <guid>https://dev.to/iteracomputeai/claude-haiku-55s-100k-line-one-extra-token-can-make-the-whole-request-5x-4k31</guid>
      <description>&lt;p&gt;Claude Haiku 5.5 is cheap at $0.10 input and $0.50 output per 1M tokens, and it has a 1M-token context window. The price sheet also has a step at 100K prompt tokens, and it applies to the whole request. If your agent or batch job sits near that line, the step matters more than the headline price. Here's the math, using Anthropic's prices checked on 2026-10-30.&lt;/p&gt;

&lt;h2&gt;
  
  
  The official rates
&lt;/h2&gt;

&lt;p&gt;USD per 1M tokens, global inference:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Prompt size&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Cache read&lt;/th&gt;
&lt;th&gt;5-min cache write&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;Up to 100K tokens&lt;/td&gt;
&lt;td&gt;$0.10&lt;/td&gt;
&lt;td&gt;$0.01&lt;/td&gt;
&lt;td&gt;$0.125&lt;/td&gt;
&lt;td&gt;$0.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Over 100K tokens&lt;/td&gt;
&lt;td&gt;$0.50&lt;/td&gt;
&lt;td&gt;$0.05&lt;/td&gt;
&lt;td&gt;$0.625&lt;/td&gt;
&lt;td&gt;$2.50&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Once the prompt crosses 100K, everything in that request is billed at the higher row: output, cache reads and cache writes too. US-only inference costs 1.1x either row. The Batch API is half price.&lt;/p&gt;

&lt;h2&gt;
  
  
  One request on each side of the line
&lt;/h2&gt;

&lt;p&gt;An agent turn with 90% of the prompt cached and 4K output tokens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;99K prompt: 9.9K x $0.10 + 89.1K x $0.01 + 4K x $0.50 = about $0.0039&lt;/li&gt;
&lt;li&gt;101K prompt: 10.1K x $0.50 + 90.9K x $0.05 + 4K x $2.50 = about $0.0196&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2% more prompt, about 5x the cost of the turn.&lt;/p&gt;

&lt;h2&gt;
  
  
  A month of traffic
&lt;/h2&gt;

&lt;p&gt;100M input tokens and 10M output tokens, Anthropic list prices:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cache hit&lt;/th&gt;
&lt;th&gt;All prompts under 100K&lt;/th&gt;
&lt;th&gt;30% of tokens in prompts over 100K&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;$15.00&lt;/td&gt;
&lt;td&gt;$33.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;td&gt;$10.50&lt;/td&gt;
&lt;td&gt;$23.10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;80%&lt;/td&gt;
&lt;td&gt;$7.80&lt;/td&gt;
&lt;td&gt;$17.16&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;90%&lt;/td&gt;
&lt;td&gt;$6.90&lt;/td&gt;
&lt;td&gt;$15.18&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Putting 30% of the tokens over the line multiplies the bill by 2.2x at every cache-hit rate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the 100K usually comes from
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Tool and MCP definitions loaded on every turn, even in an empty session&lt;/li&gt;
&lt;li&gt;Compaction thresholds set as a fraction of the 1M window (35% of 1M is 350K, far past the step)&lt;/li&gt;
&lt;li&gt;Batch prompts that pack hundreds of records into one request&lt;/li&gt;
&lt;li&gt;Tokenizer differences: in one published test (The New Stack, 2026-10-23), the same prompt counted about 40% more tokens on Haiku 5.5 than on DeepSeek V4.1 Flash, so a prompt measured at 80K on another model can land over 100K&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I'd do
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Count the full billed prompt (input + cache read + cache write tokens) per request, and alert at about 90K.&lt;/li&gt;
&lt;li&gt;Compact or split before the step, not at the context limit.&lt;/li&gt;
&lt;li&gt;Split large batch prompts into chunks under 100K. The shared instructions get repeated, but with caching that repetition is cheap.&lt;/li&gt;
&lt;li&gt;For async work, use the Batch API, which halves both rows.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Disclosure: This is IteraCompute, an OpenAI-compatible API for many models. We list Claude Haiku 5.5 at $0.05 input, $0.005 cached input and $0.25 output per 1M tokens for prompts up to 100K, and $0.25 / $0.025 / $1.25 above that (checked 2026-10-30). That's half of the list price on both sides of the step, but the step itself is still there, so the advice above applies to us too. Current prices are on the model page: &lt;a href="https://iteracompute.com/models/claude-haiku-5-5/?utm_source=dev&amp;amp;utm_medium=social&amp;amp;utm_campaign=claude_haiku_price_202610&amp;amp;utm_content=20261030_dev_haiku_01" rel="noopener noreferrer"&gt;Model Page&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>claude</category>
      <category>webdev</category>
    </item>
    <item>
      <title>MiniMax M3 past 512K input tokens: the whole request doubles, and other bill math</title>
      <dc:creator>IteraCompute</dc:creator>
      <pubDate>Thu, 29 Oct 2026 03:00:10 +0000</pubDate>
      <link>https://dev.to/iteracompute/minimax-m3-past-512k-input-tokens-the-whole-request-doubles-and-other-bill-math-c9n</link>
      <guid>https://dev.to/iteracompute/minimax-m3-past-512k-input-tokens-the-whole-request-doubles-and-other-bill-math-c9n</guid>
      <description>&lt;p&gt;MiniMax M3 has a 1M-token context window, but its official price has a step at 512K input tokens. If you run long agent sessions, that step matters more than the headline rate. Here is the math, using prices checked on 2026-10-29.&lt;/p&gt;

&lt;h2&gt;
  
  
  The official rates
&lt;/h2&gt;

&lt;p&gt;MiniMax's pricing page (platform.minimax.io/docs/pricing/overview), standard tier, USD per 1M tokens, with the current "permanent 50% off" applied:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Request size&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Cached input&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;Up to 512K input tokens&lt;/td&gt;
&lt;td&gt;$0.30&lt;/td&gt;
&lt;td&gt;$0.06&lt;/td&gt;
&lt;td&gt;$1.20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Above 512K input tokens&lt;/td&gt;
&lt;td&gt;$0.60&lt;/td&gt;
&lt;td&gt;$0.12&lt;/td&gt;
&lt;td&gt;$2.40&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The higher row applies to the whole request once input crosses 512K, and the priority service tier costs 1.5x either row.&lt;/p&gt;

&lt;h2&gt;
  
  
  One request on each side of the line
&lt;/h2&gt;

&lt;p&gt;An agent turn with 90% of the prompt cached and 8K output tokens:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;510K input: 51K x $0.30 + 459K x $0.06 + 8K x $1.20 = about $0.052&lt;/li&gt;
&lt;li&gt;520K input: 52K x $0.60 + 468K x $0.12 + 8K x $2.40 = about $0.107&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;About 2% more context, about twice the cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  A month of traffic
&lt;/h2&gt;

&lt;p&gt;100M input tokens and 10M output tokens, at different cache-hit rates:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cache hit&lt;/th&gt;
&lt;th&gt;M3, all requests under 512K&lt;/th&gt;
&lt;th&gt;M3, all requests over 512K&lt;/th&gt;
&lt;th&gt;M3.1 Flash&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;$42.00&lt;/td&gt;
&lt;td&gt;$84.00&lt;/td&gt;
&lt;td&gt;$21.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;td&gt;$30.00&lt;/td&gt;
&lt;td&gt;$60.00&lt;/td&gt;
&lt;td&gt;$14.25&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;80%&lt;/td&gt;
&lt;td&gt;$22.80&lt;/td&gt;
&lt;td&gt;$45.60&lt;/td&gt;
&lt;td&gt;$10.20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;90%&lt;/td&gt;
&lt;td&gt;$20.40&lt;/td&gt;
&lt;td&gt;$40.80&lt;/td&gt;
&lt;td&gt;$8.85&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;MiniMax M3.1 Flash, released on 2026-10-19, is listed at $0.15 / $0.015 / $0.60 with no long-context step on the same page. It is a different model, though: its thinking can't be turned off and &lt;code&gt;reasoning_effort&lt;/code&gt; defaults to &lt;code&gt;max&lt;/code&gt;, so reasoning tokens (billed as output) can eat much of the saving unless you set &lt;code&gt;low&lt;/code&gt; or &lt;code&gt;medium&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd do
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Log input tokens per request and alert well below 512K, not at the 1M limit.&lt;/li&gt;
&lt;li&gt;Compact or summarize history before a session crosses the step.&lt;/li&gt;
&lt;li&gt;Re-check cached-input pricing on every provider you compare. Third-party hosts of M3 vary a lot, and many serve fp8 or fp4 weights while MiniMax's own weights are BF16, so compare like with like.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Disclosure: I work on IteraCompute, an OpenAI-compatible API for open models. We list MiniMax M3 at $0.30 input, $0.05 cached input and $1.19 output per 1M tokens (checked 2026-10-29). The model page has the current price: &lt;a href="https://iteracompute.com/models/minimax-m3/?utm_source=dev&amp;amp;utm_medium=social&amp;amp;utm_campaign=minimax_m3_price_202610&amp;amp;utm_content=20261029_dev_m3_01" rel="noopener noreferrer"&gt;MiniMax M3 Price&lt;/a&gt;&lt;/p&gt;

</description>
      <category>llm</category>
      <category>ai</category>
      <category>api</category>
      <category>pricing</category>
    </item>
    <item>
      <title>One API key, two GLM models: what routing easy steps to GLM-5.3-Flash does to the bill (prices checked 2026-10-27)</title>
      <dc:creator>IteraCompute</dc:creator>
      <pubDate>Tue, 27 Oct 2026 02:30:40 +0000</pubDate>
      <link>https://dev.to/iteracompute/one-api-key-two-glm-models-what-routing-easy-steps-to-glm-53-flash-does-to-the-bill-prices-mo</link>
      <guid>https://dev.to/iteracompute/one-api-key-two-glm-models-what-routing-easy-steps-to-glm-53-flash-does-to-the-bill-prices-mo</guid>
      <description>&lt;p&gt;This is IteraCompute, so treat this as a disclosed write-up from one provider, not a neutral ranking. Every price below is a list price in USD per 1M tokens, checked on 2026-10-27 from the providers' pricing pages or OpenRouter's endpoint list. Prices change often, so check them again before you commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: stop sending every step to the big model
&lt;/h2&gt;

&lt;p&gt;Most agent loops are made of a few hard steps (planning, writing the actual patch, the final answer) and many easy ones (classifying the request, summarising a file or tool output, extracting fields, checking formats, writing commit messages). If every step goes to GLM-5.3, you pay GLM-5.3 prices for the easy work too.&lt;/p&gt;

&lt;p&gt;GLM-5.3-Flash is roughly a tenth of the price of GLM-5.3. If the endpoint is OpenAI-compatible and both models sit behind the same key, routing is one field:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.iteracompute.com/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;EASY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;classify&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;summarize_tool_output&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;extract&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;commit_message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;z-ai/glm-5.3-flash&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;EASY&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;z-ai/glm-5.3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same pattern works with any OpenAI-compatible provider that serves both models. What changes is the bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prices used (USD per 1M tokens, 2026-10-27)
&lt;/h2&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;Provider&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Cached input&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;GLM-5.3&lt;/td&gt;
&lt;td&gt;Z.ai (official)&lt;/td&gt;
&lt;td&gt;1.40&lt;/td&gt;
&lt;td&gt;0.26&lt;/td&gt;
&lt;td&gt;4.40&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3&lt;/td&gt;
&lt;td&gt;IteraCompute&lt;/td&gt;
&lt;td&gt;0.82&lt;/td&gt;
&lt;td&gt;0.20&lt;/td&gt;
&lt;td&gt;2.88&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3&lt;/td&gt;
&lt;td&gt;Sail Research (fp8, via OpenRouter)&lt;/td&gt;
&lt;td&gt;0.50&lt;/td&gt;
&lt;td&gt;0.08&lt;/td&gt;
&lt;td&gt;2.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3-Flash&lt;/td&gt;
&lt;td&gt;Z.ai (official)&lt;/td&gt;
&lt;td&gt;0.15&lt;/td&gt;
&lt;td&gt;0.03&lt;/td&gt;
&lt;td&gt;0.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3-Flash&lt;/td&gt;
&lt;td&gt;IteraCompute&lt;/td&gt;
&lt;td&gt;0.08&lt;/td&gt;
&lt;td&gt;0.023&lt;/td&gt;
&lt;td&gt;0.28&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM-5.3-Flash&lt;/td&gt;
&lt;td&gt;Near AI (fp8, via OpenRouter)&lt;/td&gt;
&lt;td&gt;0.08&lt;/td&gt;
&lt;td&gt;0.012&lt;/td&gt;
&lt;td&gt;0.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek V4.1 Flash&lt;/td&gt;
&lt;td&gt;IteraCompute&lt;/td&gt;
&lt;td&gt;0.14&lt;/td&gt;
&lt;td&gt;0.006&lt;/td&gt;
&lt;td&gt;0.55&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sail Research and Near AI are the cheapest standard (no promo) endpoints that declare fp8 for each model. One exception: at 0% cache hit, AkashML (fp8, 0.19 / 0.19 / 4.40) is a little cheaper than Sail for GLM-5.3, which would make that row $28.00 instead of $30.10 in the first table.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monthly bill: 100M input + 10M output tokens
&lt;/h2&gt;

&lt;p&gt;Workload assumption: 70% of tokens go to the cheap model and 30% to GLM-5.3, with the same 10:1 input-to-output ratio on both. Cache-hit rate is the share of input tokens billed at the cached price.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setup&lt;/th&gt;
&lt;th&gt;0%&lt;/th&gt;
&lt;th&gt;50%&lt;/th&gt;
&lt;th&gt;80%&lt;/th&gt;
&lt;th&gt;90%&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;All GLM-5.3, Z.ai official&lt;/td&gt;
&lt;td&gt;$184.00&lt;/td&gt;
&lt;td&gt;$127.00&lt;/td&gt;
&lt;td&gt;$92.80&lt;/td&gt;
&lt;td&gt;$81.40&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;All GLM-5.3, IteraCompute&lt;/td&gt;
&lt;td&gt;$110.80&lt;/td&gt;
&lt;td&gt;$79.80&lt;/td&gt;
&lt;td&gt;$61.20&lt;/td&gt;
&lt;td&gt;$55.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;All GLM-5.3, Sail Research fp8&lt;/td&gt;
&lt;td&gt;$70.00&lt;/td&gt;
&lt;td&gt;$49.00&lt;/td&gt;
&lt;td&gt;$36.40&lt;/td&gt;
&lt;td&gt;$32.20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;70/30 mix, Z.ai official (one key)&lt;/td&gt;
&lt;td&gt;$69.20&lt;/td&gt;
&lt;td&gt;$47.90&lt;/td&gt;
&lt;td&gt;$35.12&lt;/td&gt;
&lt;td&gt;$30.86&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;70/30 mix, IteraCompute (one key)&lt;/td&gt;
&lt;td&gt;$40.80&lt;/td&gt;
&lt;td&gt;$29.51&lt;/td&gt;
&lt;td&gt;$22.73&lt;/td&gt;
&lt;td&gt;$20.47&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;70/30 mix with DeepSeek V4.1 Flash as the cheap model, IteraCompute&lt;/td&gt;
&lt;td&gt;$46.89&lt;/td&gt;
&lt;td&gt;$32.90&lt;/td&gt;
&lt;td&gt;$24.51&lt;/td&gt;
&lt;td&gt;$21.71&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;70/30 mix, Sail (GLM-5.3) + Near AI (Flash), two providers&lt;/td&gt;
&lt;td&gt;$30.10&lt;/td&gt;
&lt;td&gt;$21.42&lt;/td&gt;
&lt;td&gt;$16.21&lt;/td&gt;
&lt;td&gt;$14.48&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Same workload, 50/50 split:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setup&lt;/th&gt;
&lt;th&gt;0%&lt;/th&gt;
&lt;th&gt;50%&lt;/th&gt;
&lt;th&gt;80%&lt;/th&gt;
&lt;th&gt;90%&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;50/50 mix, Z.ai official&lt;/td&gt;
&lt;td&gt;$102.00&lt;/td&gt;
&lt;td&gt;$70.50&lt;/td&gt;
&lt;td&gt;$51.60&lt;/td&gt;
&lt;td&gt;$45.30&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50/50 mix, IteraCompute&lt;/td&gt;
&lt;td&gt;$60.80&lt;/td&gt;
&lt;td&gt;$43.88&lt;/td&gt;
&lt;td&gt;$33.72&lt;/td&gt;
&lt;td&gt;$30.34&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50/50 mix, Sail + Near AI&lt;/td&gt;
&lt;td&gt;$41.50&lt;/td&gt;
&lt;td&gt;$29.30&lt;/td&gt;
&lt;td&gt;$21.98&lt;/td&gt;
&lt;td&gt;$19.54&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What the numbers say
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Routing saves more than switching hosts.&lt;/strong&gt; On IteraCompute, the 70/30 mix costs about 63% less than sending everything to GLM-5.3 there. It is also 36–42% cheaper than sending everything to the cheapest fp8 GLM-5.3 host. At 50/50 that gap shrinks to 6–13%, so how much traffic you can move to Flash matters most.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Against the official API, the same mix on one key is 33–41% cheaper on IteraCompute&lt;/strong&gt; at both splits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;We are not the cheapest way to run this mix.&lt;/strong&gt; If you buy GLM-5.3 from Sail and Flash from Near AI, our bill is 38–46% higher at 70/30 and 50–60% higher at 50/50. You get there through OpenRouter with provider pinning (one key, plus OpenRouter's fees) or by opening accounts with both providers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The cheap model choice matters too.&lt;/strong&gt; DeepSeek V4.1 Flash has a much lower cached price (0.006), but its input and output prices are higher, so in this workload GLM-5.3-Flash still comes out cheaper at every cache-hit rate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Listed separately: promos and undeclared precision
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Time-limited promos: GMICloud runs about 50% off both models (GLM-5.3 0.70 / 0.13 / 2.20, Flash 0.075 / 0.015 / 0.25). The 70/30 mix there costs $34.60 / $23.95 / $17.56 / $15.43, cheaper than ours while the promo lasts.&lt;/li&gt;
&lt;li&gt;Endpoints that don't declare precision (for example DekaLLM or NanoGPT for GLM-5.3, LLM Gateway or ArgoLink for Flash) can bring the 70/30 mix down to about $24.26 / $20.41 / $15.29 / $13.52. fp4 endpoints are cheaper still. Neither is a like-for-like fp8 comparison, so they are left out of the tables.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Caveats before you copy this
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Token counts are an assumption. GLM-5.3-Flash always runs with reasoning on, so measure output tokens per step on your own traffic before trusting the split.&lt;/li&gt;
&lt;li&gt;Route by step type, not by guessing after the fact. Keep a fallback: if a Flash step fails validation, retry it on GLM-5.3 and count those retries in the bill.&lt;/li&gt;
&lt;li&gt;Keep the stable part of the prompt (system prompt, tool definitions, repo context) at the front so it hits the cache. At 80–90% cache hit, the cached-input price is a large part of the bill.&lt;/li&gt;
&lt;li&gt;Log model, input, cached and output tokens per step. Then you can recompute this table with your real numbers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to check our prices for all models on one page, they're on the &lt;a href="https://iteracompute.com/pricing/?utm_source=dev&amp;amp;utm_medium=social&amp;amp;utm_campaign=one_api_mix_202610&amp;amp;utm_content=20261027_dev_glm53mix_01" rel="noopener noreferrer"&gt;IteraCompute pricing page&lt;/a&gt;. Model IDs are &lt;code&gt;z-ai/glm-5.3&lt;/code&gt;, &lt;code&gt;z-ai/glm-5.3-flash&lt;/code&gt; and &lt;code&gt;deepseek/deepseek-v4.1-flash&lt;/code&gt; on an OpenAI-compatible endpoint.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>ai</category>
      <category>agents</category>
      <category>price</category>
    </item>
  </channel>
</rss>
