AGENT TOOL · 确定性算法 · 零 LLM

Agent 调用成本预算器¥0.99/次

跑 agent 之前先算清成本:输入单次调用单价、预计调用次数、重试率、安全缓冲,算出预计花费和封顶花费。解决"成本不可预测、跑到一半烧穿预算"的痛点,给 agent 设 budget cap 一个明确数字。

调用方式(402 机器付)

curl -X POST https://api.liuwangcun.com/api/tool/agent-budget \
  -H "content-type: application/json" \
  -H "payment-proof: <支付宝/ x402 付款凭证>" \
  -d '{ "unitPrice": 0.02, "calls": 5000, "retryRate": 0.1, "buffer": 0.2 }(retryRate/buffer 可省略,默认 0 和 0.2)'

未带付款凭证时返回 HTTP 402 + Payment-Needed 头(含金额、收款方、资源路径),Agent 可直接解析并完成支付后重试。

示例输入

{ "unitPrice": 0.02, "calls": 5000, "retryRate": 0.1, "buffer": 0.2 }(retryRate/buffer 可省略,默认 0 和 0.2)

说明

纯确定性计算,无模型推理、无外部数据查询;不扣款、不写入、不查询任何第三方系统。返回结果含免责声明,仅供参考。

Powered by universal-asset-api · 全部数字资产 · llms.txt