运行一个 AI 智能体要花多少钱?来自 4 个项目的真实数据
原题How much does an AI agent cost to run? Numbers from 4 builds
推荐理由真实项目账单把模型调用、基础设施和静默失败放在一起。开发者可用作者的估算方式检查成本上限,避免只按 token 单价选方案。
读前速览
一位全栈 AI 工程师拆解了四个 AI 智能体项目的真实运行成本,指出模型选择是决定 token 账单的最大因素(每 1,000 步成本相差约 140 倍),但最大的隐性成本在于上下文管理、基础设施,以及防止静默失败的防护措施。
一个 AI 智能体有三个成本计量表,模型只是其中之一。
模型调用、智能体所驱动的系统(代理、浏览器、服务器),以及防止静默失败的防护措施都会产生成本。在全部四个项目中,最便宜的 token 是那些从未发送的 token,而昂贵的工时都花在了模型周边的部分上。
模型选择对 token 账单的影响超过其他任何因素,差距约 140 倍。
1,000 个相同的智能体步骤(输入 4,000 token,输出 500 token)在 DeepSeek V4.1 Flash 上花费 0.46 美元,在 Claude Haiku 5.5 上花费 0.65 美元,在 Claude Opus 5.5 上则要 26 美元。将每条消息路由到最便宜且够用的模型,并删除那些不划算的调用,能最大程度地削减账单。
上下文,而非每 token 的价格,才是 bug 和隐性成本的真正来源。
长会话在上下文溢出时返回乱码文本,保存的检查点变得过大,系统提示词中携带了很少用到的文件。回收会话、将检查点限制在 2 KB、按需加载技能,每次调用可节省数千个 token,同时加快回复速度。
智能体所驱动的基础设施,其成本可能超过模型账单。
一次旅行基准测试运行使用了约 935 MB 的代理流量(约 3.08 美元),屏蔽追踪器将每次搜索的流量从 4.2 MB 降至 2.5 MB,而决定服务器规格的是 CPU 而非内存(8 核上运行 20 个浏览器,负载约 30,剩余 6-7 GB 内存)。
大多数估算都忽略的成本,是让智能体可以安全地无人值守。
真实的失败案例包括:一次 8 天的静默宕机、一个「成功」但返回零行的任务、一次停止后仍持续花费 4 小时的运行,以及 49 分钟内 3,492 条告警(92.4% 为噪音)。这些体现为工时和信任的流失,而非 token 价格。
其余 1 个要点
当输入不能离开本地且模型较小时,端侧 AI 更便宜。
两个开源模型(约 24 MB 权重)在场地自己的电脑上运行,用于直播音频检查,没有按次调用费用,32 个频道约占一台双核服务器的 0.9,代价是必须在真实数据上验证其准确性。
完整摘要
Denys 是一位全栈兼 AI 工程师,他分享了自己构建并运行的四个 AI 智能体系统的实测成本数据:一个个人助理智能体、一个旅行价格基准测试、一个直播音频检查器,以及一个房产证书服务。他认为,运行一个智能体需要三方面的成本——模型调用、它所驱动的系统,以及防止它静默失败的防护措施。模型选择对 token 账单的影响最大:1,000 个相同的智能体步骤在 DeepSeek V4.1 Flash 上花费 0.46 美元,而在 Claude Opus 5.5 上则要 26 美元,相差约 140 倍。在他的项目中,模型调用是最容易控制上限的部分(一次背景检查 0.05 美元,一次完整研究运行的上限为 2.10 美元),而一次基准测试运行的代理流量就花了 3.08 美元,最昂贵的意外来自静默失败,包括一次长达 8 天无人察觉的宕机。他详细介绍了上下文管理的 bug、基础设施的规模选择(决定服务器规格的是 CPU 而非内存)、何时端侧 AI 优于 API,以及大多数估算都会忽略的防护工作。最后,他给出了一个五数字估算框架,并坦诚说明了上限与实际支出之间的差距。
目录 · 11 节
简而言之TL;DR
运行一个 AI 智能体有三项成本:模型调用、它操控的系统,以及防止它悄无声息地出错的防护措施。你选择的模型对 token 费用影响最大:执行一千个完全相同的智能体步骤,DeepSeek V4.1 Flash 的成本是 0.46 美元,Claude Haiku 5.5 是 0.65 美元,Claude Opus 5.5 则是 26 美元。在我今年构建的四个系统中,模型调用也是最容易设定成本上限的部分:一次后台检查花费 0.05 美元,一次完整的研究任务最多花费 2.10 美元。一次价格基准测试运行的代理流量花费了 3.08 美元,而代价高昂的意外情况,则是那些无人察觉的故障,例如一次中断持续了 8 天才被发现。An AI agent costs three things to run: the model calls, the systems it drives, and the guardrails that stop it failing quietly. The model you pick moves the token bill most: a thousand identical agent steps cost USD 0.46 on DeepSeek V4.1 Flash, USD 0.65 on Claude Haiku 5.5 and USD 26 on Claude Opus 5.5. In four systems I built this year, model calls were also the easiest part to cap: USD 0.05 for a background check, USD 2.10 at most for a full research run. Proxy traffic for one price benchmark run cost USD 3.08, and the costly surprises were failures nobody saw, like an outage that ran for 8 days before it was noticed.
我是 Denys,一名全栈和 AI 工程师。大多数关于这个问题的文章都会引用很大的范围,却没有实际项目作为依据。下面列出了我构建并运行的四个项目的数据指标,以及每个数字的来源:配置文件、提交消息和实测结果。如果某个数字是我设定的上限,而不是实际支付的费用,我会明确说明。I’m Denys, a full-stack and AI engineer. Most articles on this question quote wide ranges with no project behind them. Below are the meters from four things I built and run, with the source of every number: config files, commit messages and measured runs. Where a number is a ceiling I set rather than a bill I paid, I say so.
运行 AI 智能体需要支付哪些费用?What do you pay for when you run an AI agent?
三个计量单位,而模型只是其中之一。Three meters, and the model is only one of them.
| Build | What the AI does | Model cost per unit | What else runs the bill |
|---|---|---|---|
| Personal assistant agent | Chats on Telegram, works the CRM and email, runs web research | USD 0.00065 to 0.026 per step, depending on the model; ceilings from USD 0.05 to 2.10 per run | One server, plus retries and watchdogs |
| Price benchmark for a travel agent | A separate AI agent starts benchmark runs through an MCP server | Zero on my side: that agent pays its own tokens | Proxy traffic, about USD 3.08 per run, and an 8-core server |
| Live broadcast audio check | Detects speech and the spoken language on every channel | Zero per call: two small models run on the site’s own computer | CPU: a 32-channel demo used about 0.9 of a 2-core cloud server |
| Property certificates | Reads unknown portals like a person would | Tokens only for portals the scripts do not know | Scripts handle the known portal with no tokens at all |
这一规律在这四种情况中都成立:最便宜的 token,就是你根本不发送的 token;而昂贵的工时,则花在模型周边的环节上。The pattern held in all four: the cheapest token is one you never send, and the expensive hours go into the parts around the model.
模型调用的费用是多少?How much do the model calls cost?
在这四个方案中,只有助手这一项的模型费用由我承担。它基于 Anthropic 的 Claude Agent SDK 运行,其中的每个智能体都在代码中设置了硬性上限。达到轮次上限或费用上限时,SDK 就会停止运行。The assistant is the only one of the four where the model bill is mine. It runs on Anthropic’s Claude Agent SDK, and every agent in it has a hard ceiling in code. The SDK stops a run when it reaches the turn limit or the dollar limit.
| Job | Model | Ceiling per run |
|---|---|---|
| Background check while idle | Claude Haiku 4.5 | USD 0.05, and USD 1.00 per day in total |
| Research: split the question | Claude Opus 4.6 | USD 0.10, 1 turn |
| Research: three researchers in parallel | Claude Opus 4.6 | USD 0.50 each, 3 turns, web search and fetch |
| Research: write the answer | Claude Opus 4.6 | USD 0.50, 1 turn |
| Main conversation | Haiku, Sonnet or Opus, see below | 200 turns or USD 50, a safety net rather than an expectation |
因此,一次完整研究运行的最高成本为 0.10 美元 + 3 × 0.50 美元 + 0.50 美元 = 2.10 美元。这是成本上限,而非平均值;实际成本取决于模型,下一节将列出模型的价格。So the most a full research run can cost is USD 0.10 + 3 × 0.50 + 0.50 = USD 2.10. That is a ceiling, not an average; what a run really costs depends on the model, which the next section prices.
有两种选择比任何价格变动都更能降低账单:Two choices cut the bill more than any price change:
- 将每条消息路由到能够处理它的最便宜模型。简短、简单的消息交给 Haiku,中等复杂度的消息交给 Sonnet,多步骤的消息交给 Opus。路由器会读取关键词和消息长度,因此路由本身不会产生模型调用费用。早期,所有智能体都运行在 Opus 上。Route each message to the cheapest model that can handle it. Short, simple messages go to Haiku, moderate ones to Sonnet, multi-step ones to Opus. The router reads keywords and message length, so routing itself costs no model call. Early on, every agent ran on Opus.
- 删除那些没有必要的调用。后台检查程序以前每个周期都会要求模型生成一份状态报告。它无法访问电子邮件或 CRM,因此只能写出没人需要的消息。我彻底移除了模型调用。配置中仍然设有 1.00 美元的每日上限,却没有保护任何东西。Delete calls that do not earn their place. The background check used to ask the model for a status report every cycle. It had no access to email or the CRM, so all it could do was write messages nobody needed. I removed the model call entirely. The USD 1.00 daily cap is still in the config, guarding nothing.
坦诚地说,还有一个不足:SDK 会报告每次调用的成本,但我从未把它存下来。月度总额只能在 Anthropic 控制台里查看,而不在应用中。如果让我重新做一次,我会从第一天起就记录每次调用的成本,这样你就能看出是哪项任务花了钱,而不只是知道总共花了多少。One honest gap: the SDK reports the cost of every call, and I never stored it. The monthly total lives in the Anthropic console, not in the app. If I built it again, I would log cost per call from day one, so you can see which job spends the money, not only how much.
模型的选择会对账单产生多大影响?How much does the choice of model change the bill?
在 token 方面,这一点比其他任何因素都重要。下文列出了一个 agent 步骤使用不同模型时的价格。该步骤大约输入 4,000 个 token、输出 500 个 token;这是写入助手自身代码、用于后台检查的单次调用估算值。价格采用 OpenRouter 2026 年 10 月 15 日的价目表。OpenRouter 按各提供商的标价转收费,并在购买额度时收取费用(标准方案为 5.5%),而非按请求收费。More than anything else on the token side. Below, one agent step is priced on different models. The step is about 4,000 tokens in and 500 out, the per-call estimate written into the assistant’s own code for its background check. Prices are OpenRouter’s list on 15 October 2026. OpenRouter passes through each provider’s list price and takes its fee when you buy credits (5.5% on the standard plan), not per request.
| Model | Price per 1M tokens, in / out | One step | 1,000 steps |
|---|---|---|---|
| DeepSeek V4.1 Flash | USD 0.024 / 0.72 | USD 0.00046 | USD 0.46 |
| Claude Haiku 5.5, GPT-6 Luna | USD 0.10 / 0.50 | USD 0.00065 | USD 0.65 |
| Qwen3.8 Flash | USD 0.15 / 0.47 | USD 0.00083 | USD 0.83 |
| Mistral Small 4 | USD 0.15 / 0.60 | USD 0.00090 | USD 0.90 |
| Llama 4 Maverick | USD 0.188 / 0.652 | USD 0.0011 | USD 1.08 |
| Gemini 3.5 Flash Lite | USD 0.30 / 2.50 | USD 0.0025 | USD 2.45 |
| DeepSeek V4 Pro | USD 0.955 / 1.911 | USD 0.0048 | USD 4.78 |
| Gemini 3.8 Flash | USD 0.75 / 3.75 | USD 0.0049 | USD 4.88 |
| Grok 4.7 | USD 2 / 6 | USD 0.011 | USD 11 |
| Claude Sonnet 5.5, GPT-6.1 Sol, Gemini 4 Argon | USD 2 / 10 | USD 0.013 | USD 13 |
| Claude Opus 5.5 | USD 4 / 20 | USD 0.026 | USD 26 |
| Claude Fable 5.1, GPT-6 Astra | USD 10 / 50 | USD 0.065 | USD 65 |
同一项工作每千步的成本从 0.46 美元到 65 美元不等,差距约为 140 倍。由此可得出三点:The same work costs from USD 0.46 to USD 65 per thousand steps, a spread of about 140 times. Three things follow:
- 一个小型模型就能处理大多数步骤。对消息进行分类、从文档中提取字段、根据已知文本作答:这些任务很少需要顶级模型。把大型模型留给规划和复杂推理,这正是上述路由机制的作用。A small model handles most steps. Sorting a message, pulling fields from a document, answering from a known text: these rarely need a top model. Keep the large ones for planning and hard reasoning, which is what the routing above does.
- 价格变化很快。该助手运行于 Claude Haiku 4.5、Sonnet 4.6 和 Opus 4.6。根据今天的价目表,Haiku 4.5 每步费用为 0.0065 美元,Haiku 5.5 每步费用为 0.00065 美元。Anthropic 指出,其较新的模型处理相同文本时计算的 token 数量大约多 30%,因此新模型的每步费用仍便宜近八倍。Google 的 Gemini 4 Argon 预计将于 2026 年 12 月 1 日涨价一倍。制定一年期计划前,请重新核实。Prices move fast. The assistant ran on Claude Haiku 4.5, Sonnet 4.6 and Opus 4.6. On today’s list, the step costs USD 0.0065 on Haiku 4.5 and USD 0.00065 on Haiku 5.5. Anthropic notes that its newer models count about 30% more tokens for the same text, so per step the newer one is still almost eight times cheaper. Google’s Gemini 4 Argon is due to double its price on 1 December 2026. Re-check before you plan a year ahead.
- 比较任务,而不是 token 价格。一个更便宜的模型如果需要尝试两次,或者需要更长的提示词才能按预期运行,完成每项任务的成本可能反而更高。选定模型之前,先用两三个模型测试一批真实任务。Compare tasks, not token prices. A cheaper model that needs two attempts, or a longer prompt to behave, can cost more per finished task. Measure a sample of real tasks on two or three models before you choose.
你自己的估算只需一行:每项任务的步骤数 × 每月任务数 × 你所用模型的单步价格。Your own estimate is one line: steps per task × tasks per month × the step price of your model.
为什么真正的问题是上下文,而不是每个 token 的价格?Why was context the real problem, not the price per token?
每个 token 的成本是可预测的。上下文却不是。这个助手遇到的那些棘手 bug,全都与每次调用中输入了多少文本有关:Price per token is predictable. Context is not. The bugs that hurt this assistant were all about how much text went into each call:
- 长会话会导致回复异常。为了更快地作答,应用会在消息之间保持会话处于热启动状态。上下文溢出时,模型开始返回混杂多种字母的乱码。解决办法:每处理 20 条消息就重建一次会话;如果回复看起来有问题,就在新会话中重试。Long sessions broke replies. To answer faster, the app kept a warm session open between messages. When the context overflowed, the model started returning garbled text in mixed alphabets. The fix: recycle the session after 20 messages and retry in a fresh one when a reply looks broken.
- 保存的检查点变得太大了。某天,调用失败并提示“提示词过长”。现在,每次调用注入的检查点都限制为 2 KB。A saved checkpoint grew too big. One day calls failed with “Prompt is too long”. The checkpoint injected into each call is now capped at 2 KB.
- 系统提示中携带了一些很少用到的文件。仅在消息需要时才加载技能,每次调用大约能节省 3,000 个 token;从预加载内容中移除三个参考文件,还能再节省约 1,500 个 token。这些数字是根据提交说明估算的,并非账单明细。The system prompt carried files it rarely needed. Loading skills only when a message needs them saved about 3,000 tokens per call, and dropping three reference files from the preload saved about 1,500 more. These are estimates from the commit notes, not invoice lines.
- 历史记录太长且作用不大。每次调用时发送的聊天记录从 20 条消息缩减到了 10 条。History was longer than useful. The chat history sent with each call went from 20 messages to 10.
这些做法都能同时降低成本并加快回复速度。像对待金钱一样,把上下文视为一种预算。Every one of these lowers cost and speeds up replies at the same time. Treat context as a budget, the same way you treat money.
智能体所驱动的基础设施需要多少成本?What does the infrastructure an agent drives cost?
在旅行价格基准测试中,AI 部分是一个独立的代理。它通过我搭建的 MCP 服务器启动基准测试,而它所消耗的令牌费用由运行该代理的人承担。基准测试本身支付的是幕后抓取所需的费用:住宅代理和一台装满浏览器的服务器。In the travel price benchmark, the AI part is a separate agent. It starts benchmark runs through an MCP server I built, and its tokens are billed to whoever runs that agent. What the benchmark itself pays for is the scraping behind it: residential proxies and a server full of browsers.
该系统测得的数据:Measured numbers from that system:
- 代理流量:在两个旅游网站上运行一次约使用 935 MB,费用约为 3.08 美元,平均每保存一行价格约消耗 0.23 MB。Proxy traffic: one run over two travel sites used about 935 MB, about USD 3.08, roughly 0.23 MB per price row saved.
- 屏蔽跟踪器:在某个网站上,屏蔽跟踪脚本后,每次搜索的数据流量从 4.2 MB 降至 2.5 MB,六次测试的价格均完全相同。Blocking trackers: on one site, blocking tracking scripts cut traffic from 4.2 MB to 2.5 MB per search, with identical prices in all six test runs.
- 无需浏览器时就不使用浏览器:某个网站的价格可以通过一个伪装成移动浏览器的普通 HTTP 客户端读取。在五个工作线程上,采集速度从每分钟 8 个日期提升到 43 个,该网站的浏览器代码也被删除了。No browser where none is needed: one site’s prices could be read with a plain HTTP client that looks like a mobile browser. Collection went from 8 to 43 dates per minute on five workers, and the browser code for that site was deleted.
- 服务器规模由 CPU 而非内存决定:在一台 8 核服务器上运行 20 个浏览器时,负载约为 30,而仍有 6 到 7 GB 内存空闲。一个已预热的浏览器约占用 345 MB。应按核心数配置服务器。CPU, not memory, sets the server size: with 20 browsers on an 8-core server, load was about 30 while 6 to 7 GB of RAM sat free. A warm browser takes about 345 MB. Size the server by cores.
如果你的智能体会操作浏览器、使用代理或调用付费 API,这些费用很可能会超过模型账单。选择模型前,先按任务衡量这些成本。If your agent drives browsers, proxies or paid APIs, those meters will likely outgrow the model bill. Measure them per task before you choose a model.
什么时候设备端 AI 比 API 更便宜?When is on-device AI cheaper than an API?
当输入数据无需离开建筑物,且模型规模较小时。这个广播项目会在体育赛事直播期间检查实时音频频道,监测静音、故障,以及解说员切换到错误语言等情况。把每一秒的音频都发送到 API,不仅每次调用都要花钱,还会增加延迟。When the input never needs to leave the building and the model is small. The broadcast project checks live audio channels during sports broadcasts: silence, glitches, a commentator switching to the wrong language. Sending every second of audio to an API would cost money on every call and add delay.
相反,两个开放模型运行在场馆自己的电脑上:一个检测语音,另一个识别语言。两者的权重总计约为 24 MB,语音检测器额外占用约 7 MB RAM,而且无需按调用付费。在一个 32 通道演示中,实时分析所有通道约占用了一台双核云服务器 0.9 的资源。Instead, two open models run on the venue’s own computer: one detects speech, the other names the language. Together they hold about 24 MB of weights, the speech detector adds about 7 MB of RAM, and there is no fee per call. In a 32-channel demo, analysing every channel in real time used about 0.9 of a 2-core cloud server.
代价是,准确性需要你自行验证。在一组公开的清晰朗读语音数据中,每种语言有 30 段、每段 3 秒的音频,语言模型识别葡萄牙语的准确率为 93.3%,识别西班牙语、英语和法语的准确率则至少为 96.7%。这是上限,不是预测:由于没有真实广播链路中的音频可用,因此从未测量过评论员讲话下的观众噪声和音乐对识别效果的影响。The trade-off is accuracy you have to prove yourself. On a public set of clean read speech, 30 three-second clips per language, the language model was right 93.3% of the time for Portuguese and at least 96.7% for Spanish, English and French. That is a ceiling, not a forecast: crowd noise and music under a commentator were never measured, because no audio from a real broadcast circuit was available.
要让一个智能体能够安全地独自运行,需要付出什么代价?What does it cost to make an agent safe to leave alone?
这是大多数估算都会漏掉的成本,也是我耗费时间最多的地方。下面是一些真实的失败案例:This is the cost most estimates skip, and it is where my hours went. Some real failures:
- 长达 8 天的无声故障。同一台服务器上的另一个项目更新了共享的浏览器缓存。爬虫的浏览器池从 40 个正常工作的浏览器骤降至 0,任务卡住却没有报错,也没有触发任何告警。修复办法很简单:给爬虫配置独立的浏览器缓存。定位原因花了 8 天,因为没有针对池就绪状态的告警。An 8-day silent outage. Another project on the same server updated a shared browser cache. The scraper’s pool went from 40 working browsers to 0, jobs hung without an error, and nothing alerted anyone. The fix was small: give the scraper its own browser cache. Finding the cause took 8 days, because there was no alert on pool readiness.
- 一个什么都没做却“成功”了的任务。一次运行在 12 分钟内遍历了 359 个日期,保存了 0 行,却报告成功。现在,任务连续遇到 25 个没有数据的日期后就会停止,并说明原因。A job that “succeeded” with nothing. One run went through 359 dates in 12 minutes, saved 0 rows and reported success. Jobs now stop after 25 empty dates in a row and say why.
- 一场已停止却仍在消耗资源的运行。一个被标记为已停止的基准测试仍运行了 4 小时,期间一直在使用代理流量。A stopped run that kept spending. A benchmark marked as stopped kept running for 4 hours, using proxy traffic the whole time.
- 代理流量限制耗尽了浏览器池。代理套餐达到流量上限后,浏览器池在 12 分钟内从 40 个缩减到 0,并一直维持为 0,直到重启。现在它会每 60 秒自动补充一次,间隔逐渐延长至 5 分钟。A proxy limit drained the pool. When the proxy plan hit its traffic limit, the pool shrank from 40 browsers to 0 in 12 minutes and stayed there until a restart. It now refills itself every 60 seconds, backing off to 5 minutes.
- 第一天就出现了太多警报。广播工具首次在真实的 16 声道节目流上进行测试,节目时长 49 分钟,共产生了 3,492 个事件。其中 92.4% 是噪声和声音变化警报,操作员在 27 分钟内按了 182 次“清除”。检测器本身没有问题;只是阈值从未用真实节目音频测试过。解决办法是按配置档切换,而不是重新设计算法。Too many alerts on day one. The first test of the broadcast tool on a real 16-channel feed, 49 minutes long, produced 3,492 events. 92.4% were noise and voice-change alerts, and the operator pressed Clear 182 times in 27 minutes. The detectors were fine; the thresholds had never met real programme audio. The fix was a per-profile switch, not new maths.
- 卡住的调用和速率限制。现在,助手会对无响应的调用设置 120 秒看门狗超时,整个调用的时限为 300 秒;当 API 过载或触发速率限制时,还会在 30 秒、2 分钟和 5 分钟后最多重试 3 次。工具调用卡住时不会转而使用备用模型,因为换用响应较慢的模型无法解决工具卡住的问题。Hung calls and rate limits. The assistant now has a 120-second watchdog for a call that goes quiet, a 300-second limit on the whole call, and up to 3 retries after 30 seconds, 2 minutes and 5 minutes when the API is overloaded or rate-limited. A hung tool call does not fall through to the backup models, because a slower model will not fix a stuck tool.
这些都不会体现在令牌价格上,而是体现在耗费的时间里,以及智能体说“完成了”却出错时失去的信任上。为此做好预算:先用真实数据进行一次测试,为可能悄无声息地失效的环节设置警报,并检查所谓的“成功”是否真的产出了结果。None of this shows up as a token price. It shows up as hours, and as trust lost when the agent says “done” and is wrong. Budget for it: a first test on real data, alerts on the things that can go silent, and checks that a “success” produced something.
当脚本几乎可以完成所有工作时,AI 还有什么用武之地?Where does AI fit when scripts can do most of the work?
用于边缘场景。房产证明服务会从物业管理公司的在线账户收集文件,并生成卖方所需的证明。脚本负责处理主要的已知门户网站,95%的文件都能在这里办妥。视觉 AI 只读取脚本不认识的门户网站,而这条处理路径设有一个开关,可以立即关闭。At the edges. The property certificate service collects papers from property managers’ online accounts and builds the certificate a seller needs. A script handles the main known portal, where 95% of documents are completed. Vision AI reads only the portals the scripts do not know, and that path sits behind a switch that turns it off at once.
对于订购证书的人来说,如今拿到证书只需 2 到 3 分钟,而不是 2 到 3 周;费用也从 200 至 300 欧元降到了 99 欧元。有意让 AI 只承担整个流程中较小的一部分:在脚本适用的环节,它们成本低、结果可预测;而只有在必须像人一样阅读时,才会用到模型。For the people who order them, a certificate now takes 2 to 3 minutes instead of 2 to 3 weeks, and costs EUR 99 instead of EUR 200 to 300. The AI is the smaller part of that pipeline on purpose: scripts are cheap and predictable where they work, and the model is used where only reading like a person will do.
如何估算你自己的智能体的运行成本?How do you estimate the running cost of your own agent?
在询价之前,先记下五个数字:Before you ask for a quote, write down five numbers:
- 每月任务数。消息、文档、运行次数。Tasks per month. Messages, documents, runs.
- 每项任务需要调用模型的次数,以及各自需要哪种模型。大多数任务都不需要顶级模型。Model calls per task, and which model each needs. Most tasks do not need the top model.
- 每次调用的 token 数量。系统提示词、历史记录、文档。成本正是在这里悄然增长的。Tokens per call. System prompt, history, documents. This is where costs grow quietly.
- 其他计费单位:代理按 MB 计费,付费 API 按调用次数计费,服务器按核心数计费。The other meters. Proxies per MB, paid APIs per call, servers per core.
- 为每项作业设置上限。在代码中为每次运行设定美元额度上限,而不只是限制账户的月度支出。A ceiling for each job. A per-run dollar cap in code, not only a monthly limit on the account.
然后还要加上那些没人会提及的成本:第一周就在真实数据上进行测试、针对无声故障设置告警,以及安排人查看这些告警。Then add the cost nobody quotes: a test on real data in week one, alerts for silent failures, and someone to read them.
这些数字没有告诉你的事情What these numbers do not tell you
上述上限是我设定的限额,并非实际支出;模型价格表列的是标价,也不是我的发票金额。每个项目的数字都来自同一个系统、同一时间段。模型价格经常变动,因此在制定计划前,请查看供应商当前的定价页面。此外,这些信息都没有说明这些构建耗时多久或开发成本是多少;这主要取决于集成工作,而非 AI。The ceilings above are limits I set, not what was spent, and the model table is list prices, not my invoices. Every project number comes from one system and one period. Model prices change often, so check the vendors’ current pricing pages before you plan. And none of this says how long the builds took or what they cost to build; that depends on the integrations far more than on the AI.
如果你正在规划一个智能体,想交流一下它的运行成本,我很乐意帮你看看相关数据。我的 AI 智能体开发页面介绍了我的工作方式,而房产证案例、广播音频案例和旅行价格案例则更详细地展示了其中三个项目。对于 WhatsApp 上的机器人来说,渠道费用往往高于模型费用;我在《WhatsApp AI 聊天机器人要花多少钱》中按国家计算了这些费用。If you are planning an agent and want to compare notes on what it will cost to run, I am happy to look at your numbers. My AI agent development page shows how I work, and the property certificate case, broadcast audio case and travel price case show three of these builds in more detail. For a bot on WhatsApp, the channel fees often outweigh the model; I worked them out per country in what a WhatsApp AI chatbot costs.
来源Sources
- Anthropic, Claude Agent SDK options:
max_turnsandmax_budget_usdstop a run; each result reportstotal_cost_usd. - OpenRouter,模型标价和平台费用,查阅于 2026 年 10 月 15 日。OpenRouter, model list prices and platform fees, read 15 October 2026.
- Anthropic 的 Claude 定价和 Google 的 Gemini API 定价,查阅日期:2026 年 10 月 15 日;分词器说明及 Gemini 4 Argon 价格变更。Anthropic, Claude pricing, and Google, Gemini API pricing, read 15 October 2026: the tokenizer note and the Gemini 4 Argon price change.
- 所有项目编号:各项目自身的配置文件、提交信息和实测运行数据,2026 年。All project numbers: the projects’ own config files, commit messages and measured runs, 2026.