今日已更新 233 条资讯 | 累计 20205 条内容
关于我们

The Cheaper API Was 2.5x Cheaper. It Cost 1.6x More.

Alex Spinov 2026年06月19日 02:20 1 次阅读 来源:Dev.to

AI-disclosure: AI-assisted draft, human-reviewed. The demo numbers are the verbatim stdout of a deterministic, stdlib-only Python script included in full below — re-run it and you get the same bytes. The attempt counts in that script are a SYNTHETIC fixture I chose to exercise the accounting mechanism, calibrated to the retry skew I see in my own scraper logs (run counts from my Apify history). It is NOT a benchmark of any named vendor's API or prices. The one external claim (the cost-per-successful-task formula) is attributed and linked. The cheaper API was 2.5x cheaper per call. The monthly bill came in higher anyway. Not by a rounding error. The "cheap" option cost 1.63x more per successful task than the one with the bigger sticker price. Same workload. The price page never showed me that number, because the price page doesn't know your success rate. You do — after you've already paid. This is the arithmetic the per-call price hides. And it's a decision you make before you spend, not a cap you bolt on after. TL;DR You compare two API tiers by per-call (or per-token) price and pick the cheaper one. That ranking can be wrong. You pay for every attempt — success or fail. The denominator that pays the bills is successful tasks , not calls. True cost = price_per_attempt × attempts ÷ successes . A cheap tier with a low success rate burns its discount on retries. In the run below: cheap tier $0.0020 /call but $0.0096 /success; robust tier $0.0050 /call but $0.0059 /success. The sticker winner loses . For anyone choosing an API, model, or tier for an agent: log attempts and successes for a week, divide, then decide. A 70-line script is at the bottom — drop in your numbers. The price page is a sticker, not a bill Here's the trap, stated plainly. The number on the pricing page is per call . The number on your invoice is per call too — but the value you got is per successful task . Those are different denominators, and the gap between them is exactly the work that failed. E

本文内容来源于互联网,版权归原作者所有
查看原文