I built an AI gateway because I was tired of guessing what a request would cost

I built an AI gateway because I was tired of guessing what a request would cost

我构建了一个 AI 网关,因为我厌倦了猜测每次请求的成本

Every provider has a different pricing page. If you use one provider, that is fine. But the moment you want to compare models across providers (and you should, because prices for the same task vary wildly), you end up with a spreadsheet, a bunch of open tabs, and the nagging feeling that the numbers went stale last week. That was me for months. So I built the thing I actually wanted: EidosStack AI Gateway.

每个服务商的定价页面各不相同。如果你只用一家服务商,那没问题。但一旦你想对比不同服务商的模型(你应该这么做,因为同一任务的价格差异巨大),你最终会陷入电子表格、一堆打开的标签页,以及那种“数据上周就过时了”的焦虑感中。我曾为此困扰了几个月,所以我构建了自己真正想要的东西:EidosStack AI 网关。

What it does

它能做什么

It is an OpenAI-compatible API gateway. One endpoint, one API key, 48+ models behind it from DeepSeek, Anthropic (Claude), OpenAI (GPT), Google (Gemini), Alibaba (Qwen), Moonshot (Kimi), and Zhipu (GLM). The part I am most happy with is the pricing table. It shows input, output, and cache token prices per model, and it refreshes every 30 seconds. You see what a request will cost before you send it, not after the invoice arrives.

这是一个兼容 OpenAI 的 API 网关。只需一个端点、一个 API Key,即可调用背后超过 48 种模型,包括 DeepSeek、Anthropic (Claude)、OpenAI (GPT)、Google (Gemini)、阿里巴巴 (Qwen)、月之暗面 (Kimi) 和智谱 (GLM)。我最满意的是它的定价表:它显示了每个模型的输入、输出和缓存 Token 价格,并且每 30 秒刷新一次。你可以在发送请求前就知道成本,而不是等到账单寄来时才发现。

How billing works

计费方式

Pay-as-you-go, no subscription. You create an API key, set a spending limit on it if you want, and top up when needed. Billing is in IDR with USD shown as a reference. Prices on the gateway run up to 50% below the official provider rates. That is not a promo, it is just how we price.

按量付费,无需订阅。你只需创建一个 API Key,根据需要设置消费限额,并在需要时充值。计费货币为印尼盾 (IDR),并提供美元 (USD) 作为参考。网关上的价格比官方服务商的价格最高可低 50%。这不是促销,而是我们的定价策略。

What I learned building it

开发过程中的心得

Keeping a pricing table honest is harder than it sounds. Providers change prices quietly, so the table has to be re-verified constantly instead of hand-edited once. “OpenAI-compatible” is easy to claim and hard to get right. Tool calling and streaming were the parts that needed the most attention. Per-key spending limits matter more to small teams than fancy routing. Nobody wants to discover a runaway loop ate their balance overnight.

保持定价表的准确性比听起来要难得多。服务商会悄悄调整价格,因此定价表必须持续自动校验,而不是手动编辑一次就完事。“兼容 OpenAI”说起来容易,做好却很难。工具调用 (Tool calling) 和流式传输 (Streaming) 是最需要关注的部分。对于小团队来说,基于 Key 的消费限额比花哨的路由功能更重要。没人希望发现一个失控的循环在一夜之间耗尽了所有余额。

Try it

立即尝试

The gateway is live at eidosstack.com/en/ai-gateway. The pricing table is public, so you can compare costs before signing up. We are also launching on Product Hunt on September 8 if you want to follow along. Feedback is welcome, especially from people running multi-provider setups. What do you use to keep API costs under control?

该网关现已上线:eidosstack.com/en/ai-gateway。定价表是公开的,你可以在注册前对比成本。我们还将于 9 月 8 日在 Product Hunt 上发布,欢迎关注。欢迎提供反馈,特别是那些正在使用多服务商配置的用户。你们平时用什么方法来控制 API 成本呢?