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?

モデル名の設定ミスを防ぐ:公開カタログで API ID を確認する

0
Posted at

この記事は RouterBase チームによる技術メモです。DeepSeek V4.1 Flash の追加を例に、API のモデル ID を確認する方法を紹介します。

URL からモデル ID を推測しない

製品ページの URL と、API が受け付ける識別子は別の値です。RouterBase の公開カタログでは、このモデルの ID は deepseek/deepseek-v4.1-flash です。

以下を check-model.mjs として保存し、Node.js 18 以降で実行できます。API キーは不要で、推論リクエストも送信しません。

const response = await fetch("https://routerbase.com/v1/models");
if (!response.ok) throw new Error(`Catalog HTTP ${response.status}`);
const { data } = await response.json();
const model = data.find(m => m.id === "deepseek/deepseek-v4.1-flash");
if (!model) throw new Error("Model is absent from the catalog");
console.log(model.id, model.pricing);

この確認で分かること

2026 年 9 月 14 日にカタログを確認し、上記の ID が掲載されていることを確認しました。取得に成功しても、生成品質や応答時間を検証したことにはなりません。

ID が見つからない場合は、別のモデルへ自動的に置き換えず、現在のドキュメントを確認してください。実際のアプリケーションでは、base URL に https://routerbase.com/v1 を指定し、RouterBase API キーをサーバー側の環境変数から読み込みます。

設定を確認した後は、少数の代表的な入力で出力内容を評価します。HTTP ステータスの確認と、回答が要件を満たすかどうかの確認は、分けて記録すると原因を追いやすくなります。

参考:公開カタログAPI ドキュメント今回のモデル情報

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?