<?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: Silver Stone</title>
    <description>The latest articles on DEV Community by Silver Stone (@silver_stone_19).</description>
    <link>https://dev.to/silver_stone_19</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%2F4064946%2Fcab24f43-5736-44b3-b4d0-4c1c6a57e991.png</url>
      <title>DEV Community: Silver Stone</title>
      <link>https://dev.to/silver_stone_19</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/silver_stone_19"/>
    <language>en</language>
    <item>
      <title>Why AI API Costs Are Harder to Estimate Than Price Per Million Tokens</title>
      <dc:creator>Silver Stone</dc:creator>
      <pubDate>Sat, 15 Aug 2026 23:51:20 +0000</pubDate>
      <link>https://dev.to/silver_stone_19/why-ai-api-costs-are-harder-to-estimate-than-price-per-million-tokens-12hd</link>
      <guid>https://dev.to/silver_stone_19/why-ai-api-costs-are-harder-to-estimate-than-price-per-million-tokens-12hd</guid>
      <description>&lt;p&gt;A single AI API request can cost less than a cent and still turn into a four-figure monthly bill.&lt;/p&gt;

&lt;p&gt;That sounds contradictory until you stop looking at the price of one request and start looking at the workload behind it.&lt;/p&gt;

&lt;p&gt;AI providers usually make pricing look simple:&lt;/p&gt;

&lt;p&gt;input tokens cost X per million&lt;br&gt;
output tokens cost Y per million&lt;/p&gt;

&lt;p&gt;Those numbers are useful.&lt;/p&gt;

&lt;p&gt;But they are not your actual product cost.&lt;/p&gt;

&lt;p&gt;To estimate that, you also need to know how many tokens each request uses, how much the model generates, how often the request runs, whether one user action triggers multiple model calls, and how that usage scales over a month.&lt;/p&gt;

&lt;p&gt;That is where the interesting math starts.&lt;/p&gt;

&lt;p&gt;The price per million tokens is only one variable&lt;/p&gt;

&lt;p&gt;A basic AI API cost calculation looks like this:&lt;/p&gt;

&lt;p&gt;Input cost =&lt;br&gt;
monthly input tokens / 1,000,000&lt;br&gt;
x input price per million tokens&lt;/p&gt;

&lt;p&gt;Output cost =&lt;br&gt;
monthly output tokens / 1,000,000&lt;br&gt;
x output price per million tokens&lt;/p&gt;

&lt;p&gt;Monthly API cost =&lt;br&gt;
input cost + output cost&lt;/p&gt;

&lt;p&gt;The formula is simple.&lt;/p&gt;

&lt;p&gt;Estimating the numbers that go into it is not.&lt;/p&gt;

&lt;p&gt;Imagine an AI feature that uses:&lt;/p&gt;

&lt;p&gt;1,500 input tokens per request&lt;br&gt;
300 output tokens per request&lt;br&gt;
10,000 requests per day&lt;br&gt;
30 active days per month&lt;/p&gt;

&lt;p&gt;That becomes:&lt;/p&gt;

&lt;p&gt;450 million input tokens per month&lt;br&gt;
90 million output tokens per month&lt;/p&gt;

&lt;p&gt;Now assume, purely as an example, that the model costs:&lt;/p&gt;

&lt;p&gt;$1.50 per million input tokens&lt;br&gt;
$6.00 per million output tokens&lt;/p&gt;

&lt;p&gt;The monthly calculation becomes:&lt;/p&gt;

&lt;p&gt;Input:&lt;br&gt;
450 x $1.50 = $675&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
90 x $6.00 = $540&lt;/p&gt;

&lt;p&gt;Total:&lt;br&gt;
$1,215 per month&lt;/p&gt;

&lt;p&gt;The individual request still looks extremely cheap.&lt;/p&gt;

&lt;p&gt;It costs about:&lt;/p&gt;

&lt;p&gt;$0.00405&lt;/p&gt;

&lt;p&gt;Less than half a cent.&lt;/p&gt;

&lt;p&gt;But 300,000 of those requests are no longer a rounding error.&lt;/p&gt;

&lt;p&gt;This is why "cost per request" and "cost to operate the product" are two very different questions.&lt;/p&gt;

&lt;p&gt;Output tokens deserve more attention than they usually get&lt;/p&gt;

&lt;p&gt;One common mistake is treating all tokens as if they cost the same.&lt;/p&gt;

&lt;p&gt;They often do not.&lt;/p&gt;

&lt;p&gt;Input and output pricing can be different, sometimes significantly so.&lt;/p&gt;

&lt;p&gt;That means two applications with the same total token usage can have different economics.&lt;/p&gt;

&lt;p&gt;A classification task might send a large amount of context to the model but return only a few tokens.&lt;/p&gt;

&lt;p&gt;A writing assistant might generate hundreds or thousands of tokens every time it runs.&lt;/p&gt;

&lt;p&gt;A coding agent may repeatedly read context and produce substantial outputs across several model calls.&lt;/p&gt;

&lt;p&gt;So asking:&lt;/p&gt;

&lt;p&gt;"How many tokens does this feature use?"&lt;/p&gt;

&lt;p&gt;is not enough.&lt;/p&gt;

&lt;p&gt;A better question is:&lt;/p&gt;

&lt;p&gt;"How many input tokens and output tokens does a typical completed task use?"&lt;/p&gt;

&lt;p&gt;That distinction becomes increasingly important as usage grows.&lt;/p&gt;

&lt;p&gt;Long prompts quietly multiply the bill&lt;/p&gt;

&lt;p&gt;Large prompts do not necessarily feel expensive during development.&lt;/p&gt;

&lt;p&gt;You add:&lt;/p&gt;

&lt;p&gt;system instructions&lt;br&gt;
previous conversation history&lt;br&gt;
retrieved documents&lt;br&gt;
tool descriptions&lt;br&gt;
examples&lt;br&gt;
user context&lt;br&gt;
application metadata&lt;/p&gt;

&lt;p&gt;Each addition may seem small.&lt;/p&gt;

&lt;p&gt;But if the same context is sent thousands of times per day, every extra token participates in the multiplication.&lt;/p&gt;

&lt;p&gt;Return to the earlier example.&lt;/p&gt;

&lt;p&gt;Instead of 1,500 input tokens, imagine the average request grows to 5,000.&lt;/p&gt;

&lt;p&gt;The output remains 300 tokens.&lt;/p&gt;

&lt;p&gt;At the same illustrative prices and request volume:&lt;/p&gt;

&lt;p&gt;Monthly input tokens:&lt;br&gt;
5,000 x 10,000 x 30&lt;br&gt;
= 1.5 billion tokens&lt;/p&gt;

&lt;p&gt;Input cost:&lt;br&gt;
1,500 x $1.50&lt;br&gt;
= $2,250&lt;/p&gt;

&lt;p&gt;Output cost:&lt;br&gt;
90 x $6.00&lt;br&gt;
= $540&lt;/p&gt;

&lt;p&gt;Total:&lt;br&gt;
$2,790 per month&lt;/p&gt;

&lt;p&gt;The product did not gain more users.&lt;/p&gt;

&lt;p&gt;The model did not become more expensive.&lt;/p&gt;

&lt;p&gt;Only the average prompt became larger.&lt;/p&gt;

&lt;p&gt;Monthly API cost increased from $1,215 to $2,790.&lt;/p&gt;

&lt;p&gt;That is why context management is not only a latency or model-quality problem.&lt;/p&gt;

&lt;p&gt;It is also an economic problem.&lt;/p&gt;

&lt;p&gt;User actions and API requests are not always the same thing&lt;/p&gt;

&lt;p&gt;This becomes even more important with AI agents and multi-step workflows.&lt;/p&gt;

&lt;p&gt;A user might click one button.&lt;/p&gt;

&lt;p&gt;Behind that button, your application might:&lt;/p&gt;

&lt;p&gt;classify the request&lt;br&gt;
retrieve information&lt;br&gt;
call a reasoning model&lt;br&gt;
call another model with retrieved context&lt;br&gt;
evaluate the result&lt;br&gt;
retry a failed step&lt;/p&gt;

&lt;p&gt;From the user's perspective, one thing happened.&lt;/p&gt;

&lt;p&gt;From the billing system's perspective, several model calls happened.&lt;/p&gt;

&lt;p&gt;If one user action generates six model requests, estimating cost from user actions alone can underestimate usage dramatically.&lt;/p&gt;

&lt;p&gt;For agentic systems, the useful unit is often not:&lt;/p&gt;

&lt;p&gt;cost per message&lt;/p&gt;

&lt;p&gt;but:&lt;/p&gt;

&lt;p&gt;cost per completed workflow&lt;/p&gt;

&lt;p&gt;That forces you to count everything that actually happens behind the interface.&lt;/p&gt;

&lt;p&gt;Request volume is where tiny costs become real costs&lt;/p&gt;

&lt;p&gt;Suppose a request costs only $0.002.&lt;/p&gt;

&lt;p&gt;At different volumes:&lt;/p&gt;

&lt;p&gt;1,000 requests   = $2&lt;br&gt;
10,000 requests  = $20&lt;br&gt;
100,000 requests = $200&lt;br&gt;
1,000,000 requests = $2,000&lt;/p&gt;

&lt;p&gt;There is nothing inherently bad about that.&lt;/p&gt;

&lt;p&gt;A $2,000 API bill could be extremely profitable if those requests support enough revenue.&lt;/p&gt;

&lt;p&gt;The point is not that AI APIs are expensive.&lt;/p&gt;

&lt;p&gt;The point is that unit price without volume tells you almost nothing about the economics of the product.&lt;/p&gt;

&lt;p&gt;You need both.&lt;/p&gt;

&lt;p&gt;Caching can change the equation&lt;/p&gt;

&lt;p&gt;Some AI APIs offer lower pricing for eligible cached input.&lt;/p&gt;

&lt;p&gt;That can matter when your application repeatedly sends the same large blocks of context, such as:&lt;/p&gt;

&lt;p&gt;stable system prompts&lt;br&gt;
repeated instructions&lt;br&gt;
shared reference material&lt;br&gt;
long reusable prefixes&lt;/p&gt;

&lt;p&gt;But caching should be modeled rather than assumed.&lt;/p&gt;

&lt;p&gt;Not every token will necessarily qualify.&lt;/p&gt;

&lt;p&gt;Not every request will produce a cache hit.&lt;/p&gt;

&lt;p&gt;And application behavior can change how much reusable context you actually have.&lt;/p&gt;

&lt;p&gt;A useful cost estimate therefore separates normal input from discounted cached input instead of assuming that the entire prompt receives the cheapest possible rate.&lt;/p&gt;

&lt;p&gt;Estimate scenarios, not one perfect number&lt;/p&gt;

&lt;p&gt;Before shipping an AI feature, I would avoid trying to predict one exact monthly bill.&lt;/p&gt;

&lt;p&gt;Instead, model at least three scenarios.&lt;/p&gt;

&lt;p&gt;Low usage&lt;/p&gt;

&lt;p&gt;What happens if adoption is slower than expected?&lt;/p&gt;

&lt;p&gt;This gives you the initial operating floor.&lt;/p&gt;

&lt;p&gt;Expected usage&lt;/p&gt;

&lt;p&gt;Use the workload you realistically think the product will reach.&lt;/p&gt;

&lt;p&gt;This becomes your planning case.&lt;/p&gt;

&lt;p&gt;High usage&lt;/p&gt;

&lt;p&gt;What happens if usage is much stronger than expected?&lt;/p&gt;

&lt;p&gt;This is where expensive architectural assumptions become visible.&lt;/p&gt;

&lt;p&gt;You can do the same with token usage:&lt;/p&gt;

&lt;p&gt;Short prompt&lt;br&gt;
Typical prompt&lt;br&gt;
Heavy prompt&lt;/p&gt;

&lt;p&gt;and output length:&lt;/p&gt;

&lt;p&gt;Short response&lt;br&gt;
Typical response&lt;br&gt;
Long response&lt;/p&gt;

&lt;p&gt;A range is often more useful than false precision.&lt;/p&gt;

&lt;p&gt;The variables worth knowing before you ship&lt;/p&gt;

&lt;p&gt;For a basic estimate, you should know or approximate:&lt;/p&gt;

&lt;p&gt;Average input tokens per request&lt;br&gt;
Average output tokens per request&lt;br&gt;
Requests per day&lt;br&gt;
Active days per month&lt;br&gt;
Current input price per million tokens&lt;br&gt;
Current output price per million tokens&lt;br&gt;
Cached input share, if relevant&lt;/p&gt;

&lt;p&gt;For more complex applications, also consider:&lt;/p&gt;

&lt;p&gt;Model calls per completed task&lt;br&gt;
Retry frequency&lt;br&gt;
Different models inside the same workflow&lt;br&gt;
Traffic growth&lt;br&gt;
Background or scheduled AI jobs&lt;/p&gt;

&lt;p&gt;You do not need perfect production data before launch.&lt;/p&gt;

&lt;p&gt;You need assumptions that are explicit enough to test.&lt;/p&gt;

&lt;p&gt;That is much better than looking at "$X per million tokens" and hoping the monthly bill stays small.&lt;/p&gt;

&lt;p&gt;Calculate your own workload&lt;/p&gt;

&lt;p&gt;I built an AI API Cost Calculator on UsefulAtlas for exactly this type of estimation.&lt;/p&gt;

&lt;p&gt;Instead of baking model prices into the tool, you can enter the current input and output prices from the provider you are considering and combine them with your own workload assumptions.&lt;/p&gt;

&lt;p&gt;That makes it useful for chatbots, AI features, agents, batch jobs and other API-based workflows.&lt;/p&gt;

&lt;p&gt;Run your own numbers here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://usefulatlas.com/calculators/ai-api-cost-calculator/" rel="noopener noreferrer"&gt;https://usefulatlas.com/calculators/ai-api-cost-calculator/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Free to use. No account needed.&lt;/p&gt;

&lt;p&gt;The important question is not whether an AI request costs a fraction of a cent.&lt;/p&gt;

&lt;p&gt;It is what happens when your real application starts making thousands, hundreds of thousands, or millions of them.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>llm</category>
    </item>
    <item>
      <title>Building privacy-first browser tools: QR, image metadata, and PDF editing without uploads</title>
      <dc:creator>Silver Stone</dc:creator>
      <pubDate>Sun, 09 Aug 2026 22:06:20 +0000</pubDate>
      <link>https://dev.to/silver_stone_19/building-privacy-first-browser-tools-qr-image-metadata-and-pdf-editing-without-uploads-1318</link>
      <guid>https://dev.to/silver_stone_19/building-privacy-first-browser-tools-qr-image-metadata-and-pdf-editing-without-uploads-1318</guid>
      <description>&lt;p&gt;I have been expanding UsefulAtlas into a browser-local toolbox instead of adding hundreds of tiny utility pages.&lt;/p&gt;

&lt;p&gt;The latest work includes:&lt;/p&gt;

&lt;p&gt;QR Studio&lt;/p&gt;

&lt;p&gt;Static QR generation&lt;br&gt;
URL, text, Wi-Fi, vCard, email and SMS&lt;br&gt;
Local image and camera decoding&lt;br&gt;
Destination inspection before opening&lt;br&gt;
PNG/SVG export&lt;/p&gt;

&lt;p&gt;Image Toolbox&lt;/p&gt;

&lt;p&gt;Resize / convert&lt;br&gt;
EXIF and metadata inspection&lt;br&gt;
GPS detection&lt;br&gt;
Local metadata/privacy cleaning&lt;br&gt;
Automatic re-inspection of cleaned output&lt;/p&gt;

&lt;p&gt;PDF Toolbox&lt;/p&gt;

&lt;p&gt;Merge / split / reorder&lt;br&gt;
Text annotations&lt;br&gt;
Pen and highlighting&lt;br&gt;
Visual signatures&lt;br&gt;
Undo / redo&lt;br&gt;
Local PDF export&lt;/p&gt;

&lt;p&gt;The main constraint has been simple:&lt;/p&gt;

&lt;p&gt;Private files should stay in the browser when the task does not require a server.&lt;/p&gt;

&lt;p&gt;That also creates some interesting engineering problems: PDF coordinate transforms, worker ownership, metadata container parsing, QR payload safety, Blob lifecycle cleanup, mobile input, and keeping heavy libraries lazy-loaded.&lt;/p&gt;

&lt;p&gt;I am intentionally avoiding remote upload APIs for these workflows.&lt;/p&gt;

&lt;p&gt;No MCP layer or agent API either - the human tool needs to be good first.&lt;/p&gt;

&lt;p&gt;The project is live here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://usefulatlas.com/" rel="noopener noreferrer"&gt;https://usefulatlas.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you build browser-local utilities too, I would be interested in what edge cases caused you the most trouble.&lt;/p&gt;

</description>
      <category>privacy</category>
      <category>security</category>
      <category>tools</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I built a set of client-side tools for local AI hardware checks and everyday coding tasks</title>
      <dc:creator>Silver Stone</dc:creator>
      <pubDate>Thu, 06 Aug 2026 01:48:53 +0000</pubDate>
      <link>https://dev.to/silver_stone_19/i-built-a-set-of-client-side-tools-for-local-ai-hardware-checks-and-everyday-coding-tasks-1lgc</link>
      <guid>https://dev.to/silver_stone_19/i-built-a-set-of-client-side-tools-for-local-ai-hardware-checks-and-everyday-coding-tasks-1lgc</guid>
      <description>&lt;p&gt;I got tired of opening random online tools that either track everything or send my data to some server just to format JSON or check if a model fits on my GPU.&lt;/p&gt;

&lt;p&gt;So I built UsefulAtlas — a collection of browser-based developer tools and AI hardware calculators that run fully client-side where possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  What it currently has
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Coder Box&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
JSON formatter/minifier, Base64, UUID generator, hash tools, JWT inspector, text cleaner — all local in the browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI / Local LLM stuff&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VRAM / hardware checker (can this model actually run on my GPU + RAM?)
&lt;/li&gt;
&lt;li&gt;PSU wattage calculator for single and multi-GPU AI builds
&lt;/li&gt;
&lt;li&gt;Local vs Cloud cost / TCO calculators
&lt;/li&gt;
&lt;li&gt;A few other cost and ROI tools for API usage and automation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Also&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Image resize/compress/convert and a PDF toolbox that never uploads your files.&lt;/p&gt;

&lt;p&gt;Nothing requires an account. Most tools process everything in your browser. I tried to keep the assumptions visible so you can actually trust the numbers.&lt;/p&gt;

&lt;p&gt;I'm currently adding more local image/PDF utilities and expanding the AI hardware side.&lt;/p&gt;

&lt;p&gt;Would love feedback from people who actually run local models or just want quick, private tools without the usual clutter.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://usefulatlas.com" rel="noopener noreferrer"&gt;usefulatlas.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>hardware</category>
      <category>showdev</category>
      <category>tools</category>
    </item>
  </channel>
</rss>
