0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GLM-5.3-Flash API料金比較:OpenRouterの5.5%手数料とキャッシュ比率を含めて計算

0
Posted at

glm-5.3-flash-price-comparison-v8.png

概要

GLM-5.3-FlashをコーディングAgentや長時間の自動処理で利用する場合、モデルページに表示されたトークン単価だけでは実際のコストを比較できません。

この記事では、次の2点を含めてZ.ai、OpenRouter、AIHubMixを比較します。

  • OpenRouter従量課金プランの5.5%プラットフォーム手数料
  • 入力トークンの一部がキャッシュにヒットする場合の料金

価格は2026年9月1日時点です。

公開されている単価

経路 入力 / 1M tokens 出力 / 1M tokens Cache read / 1M tokens Platform fee
Z.ai公式API $0.075 $0.250 $0.015 記載なし
OpenRouter / Z.ai $0.075 $0.250 $0.015 5.5%
AIHubMix $0.056 $0.197 $0.014 記載なし

AIHubMix、OpenRouter、Z.aiの50%割引は、いずれも2026年9月10日 01:00 JSTに終了予定です。

OpenRouterの実質単価

OpenRouterのPricingには、Pay-as-you-goのPlatform Feeとして5.5%が記載されています。

モデル利用額に比例して手数料を配賦し、購入したクレジットをすべて消費する場合、次のように計算できます。

effective_cost = model_cost * 1.055
Input:      $0.075 * 1.055 = $0.0791 / 1M
Output:     $0.250 * 1.055 = $0.2638 / 1M
Cache read: $0.015 * 1.055 = $0.0158 / 1M

キャッシュ比率を含める

Z.aiのコンテキストキャッシュは、繰り返し利用されるプロンプト前半部分を自動的に検出します。キャッシュにヒットしたトークンは通常入力ではなく、Cache read単価で課金されます。

入力トークン数をI、キャッシュ比率をr、出力トークン数をOとすると、計算式は次のようになります。

normal_input = I * (1 - r)
cached_input = I * r

cost = normal_input * input_price
     + cached_input * cache_read_price
     + O * output_price

入力100万トークン、出力100万トークンを固定し、AIHubMixとOpenRouterで同じキャッシュ比率を仮定した結果です。

Cache ratio AIHubMix OpenRouter(手数料前) OpenRouter(手数料込み) AIHubMixの削減率
0% $0.253 $0.325 $0.343 26.2%
50% $0.232 $0.295 $0.311 25.5%
80% $0.219 $0.277 $0.292 24.9%

キャッシュ比率80%の場合、100万入力トークンの内訳は通常入力20万、キャッシュ読み取り80万です。

JavaScriptで再計算する

以下のコードでは、価格の単位を「USD / 100万トークン」とし、入力と出力をそれぞれ100万トークンに固定しています。

const platforms = {
  aihubmix: {
    input: 0.056,
    output: 0.197,
    cacheRead: 0.014,
    platformFee: 0
  },
  openrouter: {
    input: 0.075,
    output: 0.25,
    cacheRead: 0.015,
    platformFee: 0.055
  }
};

function calculateCost(platform, cacheRatio) {
  const inferenceCost =
    (1 - cacheRatio) * platform.input +
    cacheRatio * platform.cacheRead +
    platform.output;

  return inferenceCost * (1 + platform.platformFee);
}

for (const cacheRatio of [0, 0.5, 0.8]) {
  console.log({
    cacheRatio,
    aihubmix: calculateCost(platforms.aihubmix, cacheRatio),
    openrouter: calculateCost(platforms.openrouter, cacheRatio)
  });
}

結論

キャッシュ比率が高いほど両プラットフォームの総額は下がります。Cache read単価の差は通常入力・出力単価の差より小さいため、AIHubMixの相対的な価格差は少し縮まります。

それでも、今回の0〜80%キャッシュ比率では、AIHubMixはOpenRouterの5.5%手数料込みコストより約24.9〜26.2%低い結果です。

OpenRouterは多数のプロバイダーを統一APIで利用できることが強みです。Z.ai公式APIはモデル提供元への直接接続です。GLM-5.3-Flashの推論コストを優先する場合、今回の比較ではAIHubMixが最も低価格です。

価格や提供状況は変更される可能性があるため、長期運用前に最新の料金ページを確認してください。

参考:AIHubMix Blog

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?