<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>api-pricing on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/api-pricing/</link>
    <description>Recent content in api-pricing on S Anand</description>
    <generator>Hugo -- 0.156.0</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 14 Jun 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/api-pricing/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Things I Learned - 14 Jun 2026</title>
      <link>https://www.s-anand.net/blog/things-i-learned-14-jun-2026/</link>
      <pubDate>Sun, 14 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-14-jun-2026/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Overheard a journalist saying: &amp;ldquo;I can tell when humans are lying. There are no tell tale signs of AI lying. At least &lt;em&gt;I&lt;/em&gt; don&amp;rsquo;t have any.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/public-clis/rdt-cli&#34;&gt;rdt-cli&lt;/a&gt; is a Reddit CLI. It uses a clever trick: it auto-detects installed browsers and extracts cookies (supports Chrome, Firefox, Edge, Brave). So, if you&amp;rsquo;re logged into Reddit on any browser, &lt;code&gt;uvx --from rdt-cli rdt whoami&lt;/code&gt; automatically shows who you are logged in as. (The &lt;a href=&#34;https://github.com/public-clis/public-clis&#34;&gt;public-clis&lt;/a&gt; repo also lists other useful CLIs like &lt;a href=&#34;https://github.com/public-clis/twitter-cli&#34;&gt;twitter-cli&lt;/a&gt;, )&lt;/li&gt;
&lt;li&gt;Currently, a $20 Claude Pro gives you ~$400 and a $100 Claude Max gives you ~$2,000 of API usage. For ChatGPT, the numbers are ~$700 and $3,500. &lt;a href=&#34;https://x.com/SemiAnalysis_/status/2064815044085318040&#34;&gt;SemiAnalysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;When Fable 5 refuses to answer questions, here&amp;rsquo;s the message that appears: &amp;ldquo;Fable 5 has safety measures that flag messages on most cybersecurity or biology topics. They may flag safe, normal content as well. These measures let us bring you Mythos-level capability in other areas sooner, and we&amp;rsquo;re working to refine them. Send feedback or &lt;a href=&#34;https://support.claude.com/en/articles/15363606&#34;&gt;learn more&lt;/a&gt;.&amp;rdquo; I managed to trigger this once while researching an M&amp;amp;A acquisition target. Clicking on &amp;ldquo;Edit and retry with Fable 5&amp;rdquo; triggered Opus 5 again, twice.&lt;/li&gt;
&lt;li&gt;DNA codons (A, T, C, G) encode proteins in triplets. There are &lt;a href=&#34;https://en.wikipedia.org/wiki/DNA_and_RNA_codon_tables&#34;&gt;64 triplets that map to 20 amino acids&lt;/a&gt;. Some like Leucine, have 6 codons. Some like Methionine have only one. Why? When creating genes, there&amp;rsquo;s a wobble, sometimes, at the 3rd codon. THe mapping minimizes that impact: small errors map to similar proteins. The more common proteins have more codons. There&amp;rsquo;s a lot of fascinating information science going on here. &lt;a href=&#34;https://gemini.google.com/share/cfa70dcab30c&#34;&gt;Gemini&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ChatGPT now shows a &amp;ldquo;Check in&amp;rdquo; button when it&amp;rsquo;s thinking. Clicking on that gives you a work-in-progress answer while it continues thinking. When done, it &lt;em&gt;replaces&lt;/em&gt; the WIP answer with the final answer. A useful feature!&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>AI Coding Agent Subscription ROI</title>
      <link>https://www.s-anand.net/blog/ai-coding-agent-subscription-roi/</link>
      <pubDate>Sat, 30 May 2026 23:19:34 +0800</pubDate>
      <guid>https://www.s-anand.net/blog/ai-coding-agent-subscription-roi/</guid>
      <description>&lt;p&gt;I ran &lt;a href=&#34;https://github.com/ryoppippi/ccusage&#34;&gt;&lt;code&gt;npx -y ccusage monthly --compact&lt;/code&gt;&lt;/a&gt; to get the following break-up of my AI coding agent costs.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Month&lt;/th&gt;
          &lt;th style=&#34;text-align: right&#34;&gt;Codex&lt;/th&gt;
          &lt;th style=&#34;text-align: right&#34;&gt;Claude&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;2025-09&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$37.47&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$2.29&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;2025-10&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$106.79&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$9.13&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;2025-11&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$100.35&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$14.24&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;2025-12&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$240.69&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$24.88&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;2026-01&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$100.89&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$20.28&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;2026-02&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$323.21&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$29.46&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;2026-03&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$1996.32&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$134.87&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;2026-04&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$401.36&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$47.07&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;2026-05&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$378.20&lt;/td&gt;
          &lt;td style=&#34;text-align: right&#34;&gt;$45.13&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;This shows the ROI of my $20 subscriptions to each. I get ~$35 worth of API calls for my $20 Claude Pro subscription and ~$400 of API calls for my $20 ChatGPT Plus subscription (on top of my ChatGPT chats.)&lt;/p&gt;
&lt;p&gt;I end up using Codex a lot more - partly because it&amp;rsquo;s a bit more diligent, but mostly because it&amp;rsquo;s a lot cheaper.&lt;/p&gt;
&lt;p&gt;Clearly, subscriptions are good deal for individuals. Codex, especially.&lt;/p&gt;
&lt;p&gt;This may not be true for corporates. &lt;a href=&#34;https://simonwillison.net/2026/May/27/product-market-fit/&#34;&gt;Simon Willison&lt;/a&gt; says that Anthropic and OpenAI both changed &lt;em&gt;enterprise&lt;/em&gt; pricing to align with token prices. That means the cost of enterprise AI security is ~2-20 &lt;em&gt;times&lt;/em&gt; their token budget - which is growing rapidly.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;BTW, my moment of &lt;a href=&#34;https://en.wikipedia.org/wiki/Chatbot_psychosis&#34;&gt;AI psychosis&lt;/a&gt; was in March 2026. The coding agents had increased their limits and I was tokenmaxxing. I&amp;rsquo;m far from that limit today, but the symptoms linger.&lt;/p&gt;
&lt;noscript&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://files.s-anand.net/images/2026-05-30-ai-coding-agent-subscription-roi.avif&#34;&gt;&lt;/p&gt;
&lt;/noscript&gt;
&lt;p&gt;&lt;canvas id=&#34;ai-coding-agent-usage&#34;&gt;&lt;/canvas&gt;&lt;/p&gt;
&lt;script&gt;
  (async function () {
    const rows = [
      { month: &#39;2025-09&#39;, claude: 2.29, codex: 37.47 },
      { month: &#39;2025-10&#39;, claude: 9.13, codex: 106.79 },
      { month: &#39;2025-11&#39;, claude: 14.24, codex: 100.35 },
      { month: &#39;2025-12&#39;, claude: 24.88, codex: 240.69 },
      { month: &#39;2026-01&#39;, claude: 20.28, codex: 100.89 },
      { month: &#39;2026-02&#39;, claude: 29.46, codex: 323.21 },
      { month: &#39;2026-03&#39;, claude: 134.87, codex: 1996.32 },
      { month: &#39;2026-04&#39;, claude: 47.07, codex: 401.36 },
      { month: &#39;2026-05&#39;, claude: 45.13, codex: 378.20 }
    ];

    const theme = {
      ink: &#39;#231f20&#39;,
      muted: &#39;#6b625c&#39;,
      grid: &#39;rgba(35, 31, 32, 0.11)&#39;,
      axis: &#39;rgba(35, 31, 32, 0.22)&#39;,
      claude: &#39;#b96d3a&#39;,
      codex: &#39;#2d5f87&#39;,
      tooltip: &#39;rgba(35, 31, 32, 0.94)&#39;
    };

    const canvas = document.getElementById(&#39;ai-coding-agent-usage&#39;);

    Object.assign(canvas.style, {
      display: &#39;block&#39;,
      width: &#39;100%&#39;,
      height: &#39;100%&#39;,
      minHeight: &#39;480px&#39;
    });

    function loadChartJs() {
      if (window.Chart) return Promise.resolve();
      return new Promise((resolve, reject) =&gt; {
        const script = document.createElement(&#39;script&#39;);
        script.src = &#39;https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js&#39;;
        script.onload = resolve;
        script.onerror = reject;
        document.head.appendChild(script);
      });
    }

    await loadChartJs();

    const usd = new Intl.NumberFormat(&#39;en-US&#39;, {
      style: &#39;currency&#39;,
      currency: &#39;USD&#39;,
      maximumFractionDigits: 2
    });

    const compactUsd = new Intl.NumberFormat(&#39;en-US&#39;, {
      style: &#39;currency&#39;,
      currency: &#39;USD&#39;,
      notation: &#39;compact&#39;,
      maximumFractionDigits: 1
    });

    Chart.defaults.font.family = document.body.style.fontFamily;
    Chart.defaults.color = theme.muted;

    new Chart(canvas, {
      type: &#39;line&#39;,
      data: {
        labels: rows.map(d =&gt; d.month),
        datasets: [
          {
            label: &#39;Claude&#39;,
            data: rows.map(d =&gt; d.claude),
            borderColor: theme.claude,
            backgroundColor: theme.claude,
            pointBackgroundColor: &#39;#ffffff&#39;,
            pointBorderColor: theme.claude,
            pointBorderWidth: 2.5,
            pointRadius: 4,
            pointHoverRadius: 7,
            borderWidth: 3,
            tension: 0.22
          },
          {
            label: &#39;Codex&#39;,
            data: rows.map(d =&gt; d.codex),
            borderColor: theme.codex,
            backgroundColor: theme.codex,
            pointBackgroundColor: &#39;#ffffff&#39;,
            pointBorderColor: theme.codex,
            pointBorderWidth: 2.5,
            pointRadius: 4,
            pointHoverRadius: 7,
            borderWidth: 3,
            tension: 0.22
          }
        ]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        interaction: { mode: &#39;index&#39;, intersect: false },
        layout: { padding: { top: 12, right: 18, bottom: 4, left: 8 } },
        plugins: {
          legend: {
            position: &#39;bottom&#39;,
            labels: {
              usePointStyle: true,
              pointStyle: &#39;circle&#39;,
              boxWidth: 8,
              boxHeight: 8,
              padding: 22,
              color: theme.muted,
              font: { size: 13, weight: &#39;650&#39; }
            }
          },
          tooltip: {
            enabled: true,
            mode: &#39;index&#39;,
            intersect: false,
            backgroundColor: theme.tooltip,
            bodyFont: { size: 13, weight: &#39;650&#39; },
            padding: 13,
            displayColors: true,
            callbacks: {
              title: items =&gt; items[0].label,
              label: item =&gt; `${item.dataset.label}: ${usd.format(item.parsed.y)}`,
              afterBody: items =&gt; {
                const i = items[0].dataIndex;
                const total = rows[i].claude + rows[i].codex;
                return `Combined: ${usd.format(total)}`;
              }
            }
          }
        },
        scales: {
          x: {
            grid: { color: &#39;rgba(35,31,32,0.07)&#39;, drawTicks: false },
            border: { color: theme.axis },
            ticks: { maxRotation: 0, autoSkip: false, color: theme.muted, font: { size: 12 } }
          },
          y: {
            beginAtZero: true,
            suggestedMax: 2200,
            grid: { color: theme.grid },
            border: { display: false },
            ticks: {
              padding: 8,
              color: theme.muted,
              callback: value =&gt; value &gt;= 1000 ? compactUsd.format(value) : &#39;$&#39; + value
            },
            title: {
              display: true,
              text: &#39;Cost (USD)&#39;,
              color: theme.muted,
              font: { size: 12, weight: &#39;650&#39; }
            }
          }
        }
      }
    });
  })();
&lt;/script&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;14 Jun 2026&lt;/strong&gt;: &lt;a href=&#34;https://x.com/SemiAnalysis_/status/2064815044085318040&#34;&gt;SemiAnalysis&lt;/a&gt; tested and found that a $20 Claude Pro gives you ~$400 and a $100 Claude Max gives you ~$2,000 of API usage. For ChatGPT, the numbers are ~$700 and $3,500.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>OpenAI TTS cost</title>
      <link>https://www.s-anand.net/blog/openai-tts-cost/</link>
      <pubDate>Sun, 02 Nov 2025 05:12:32 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/openai-tts-cost/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;OpenAI TTS cost&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/doodle.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;The OpenAI &lt;a href=&#34;https://platform.openai.com/docs/guides/text-to-speech&#34;&gt;text-to-speech&lt;/a&gt; cost documentation is confusing.&lt;/p&gt;
&lt;p&gt;As of 2 Nov 2025:&lt;/p&gt;
&lt;ul class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/gpt-4o-mini-tts&#34;&gt;GPT-4o mini TTS&lt;/a&gt; costs $0.60 / MTok input and $12.00 / MTok audio output according to the &lt;a href=&#34;https://platform.openai.com/docs/models/gpt-4o-mini-tts&#34;&gt;model page&lt;/a&gt; and the &lt;a href=&#34;https://platform.openai.com/docs/pricing&#34;&gt;pricing page&lt;/a&gt;. They also estimate this to be ~1.5c per minute - both for input and output. It supports up to 2,000 tokens input.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/tts-1&#34;&gt;TTS-1&lt;/a&gt; costs $15 / MTok speech generated according to the &lt;a href=&#34;https://platform.openai.com/docs/models/tts-1&#34;&gt;model page&lt;/a&gt; but the &lt;a href=&#34;https://platform.openai.com/docs/pricing&#34;&gt;pricing page&lt;/a&gt; says it&#39;s $15 / MChars. No estimate per minute is provided. Is supports up to 4,096 characters input.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/tts-1-hd&#34;&gt;TTS-1 HD&lt;/a&gt; is twice as expensive as TTS-1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I wanted to find the approximate total cost for a typical text input measured per character and token.&lt;/p&gt;
&lt;p&gt;I converted this &lt;a href=&#34;podcast.txt&#34;&gt;podcast&lt;/a&gt; with 4,096 ASCII characters and 877 tokens on &lt;a href=&#34;https://github.com/openai/tiktoken&#34;&gt;o200k_base&lt;/a&gt; using:&lt;/p&gt;
&lt;p&gt;I ran:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl https://api.openai.com/v1/audio/speech &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_API_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -d &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;jq -n --arg text &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;cat podcast.txt&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;{
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    model: &amp;#34;tts-1&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    voice: &amp;#34;coral&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    input: $text
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;  }&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --output tts-1.mp3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This took 46 seconds to generate and produced a 5.1 MB MP3 file (256 seconds)&lt;/p&gt;
&lt;p&gt;To measure the cost, I ran:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl &lt;span class=&#34;s2&#34;&gt;&amp;#34;https://api.openai.com/v1/organization/costs?start_time=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date -d &lt;span class=&#34;s1&#34;&gt;&amp;#39;1 day ago&amp;#39;&lt;/span&gt; +%s&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;project_ids=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$PROJECT_ID&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;group_by=line_item&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_ADMIN_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This cost: &lt;strong&gt;USD 0.061425&lt;/strong&gt;. Then I ran:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl https://api.openai.com/v1/audio/speech &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_API_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -d &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;jq -n --arg text &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;cat podcast.txt&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;{
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    model: &amp;#34;gpt-4o-mini-tts&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    voice: &amp;#34;coral&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    input: $text
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;  }&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --output gpt-4o-mini-tts.mp3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This took 44 seconds to generate and produced a 4.3 MB MP3 file (268 seconds).&lt;/p&gt;
&lt;p&gt;When I ran the admin API call again, the costs did not reflect for 5 minutes. So I ran it the GPT-4o mini TTS call again with the same input. This took 44 seconds to generate a 4.3 MB MP3 file. When I ran the admin API call again, the total cost for &lt;strong&gt;the 2 requests&lt;/strong&gt; was: &lt;strong&gt;USD 0.12942&lt;/strong&gt; audio output and USD 0.0010524 input.&lt;/p&gt;
&lt;p&gt;I also checked for TTS-1 HD. Here are the costs in USD:&lt;/p&gt;
&lt;figure class=&#34;wp-block-table&#34;&gt;&lt;table class=&#34;has-fixed-layout&#34;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Model&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;$ / MTok&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;$ / MChars&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;$ / hour&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Time (s)&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Audio (s)&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Cost $&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;GPT-4o mini TTS&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;74.4&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;15.9&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.876&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;46&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;268&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.0652&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TTS-1&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;70.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;15.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.864&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;44&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;256&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.0614&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TTS-1 HD&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;140.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;30.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;1.728&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;62&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;257&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.1228&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;
&lt;p&gt;The GPT-4o mini TTS audio output cost was USD 0.06471 for the input of 877 tokens, i.e. $73.8 / MTok. Since the actual cost is $12 / MTok, this is a 6.15x multiplier. I guess &lt;strong&gt;1 input text token produces ~6 output audio tokens&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In terms of quality:&lt;/p&gt;
&lt;ul class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;GPT-4o mini TTS: Very slightly robotic. Looser interpretation of text (e.g. says &#34;October&#34; when I write &#34;Oct&#34;).&lt;/li&gt;
&lt;li&gt;TTS-1: Natural. Strict interpretation of text.&lt;/li&gt;
&lt;li&gt;TTS-1 HD: Very slightly more natural. Strict interpretation of text.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;I will likely use TTS-1 for now&lt;/strong&gt; given the cost difference is small and the quality is good enough.&lt;/p&gt;
&lt;hr class=&#34;wp-block-separator has-alpha-channel-opacity&#34;/&gt;
&lt;p&gt;Incidentally, the &lt;a href=&#34;https://platform.openai.com/docs/api-reference/usage/audio_speeches&#34;&gt;usage API&lt;/a&gt; did not show an GPT 4o mini TTS line items even after 20 minutes.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl &lt;span class=&#34;s2&#34;&gt;&amp;#34;https://api.openai.com/v1/organization/usage/audio_speeches?start_time=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date -d &lt;span class=&#34;s1&#34;&gt;&amp;#39;1 day ago&amp;#39;&lt;/span&gt; +%s&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;project_ids=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$PROJECT_ID&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;group_by=model&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_ADMIN_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
