
OpenAI の Decisions API とは?Jev・Clef との違いをまとめてみた
こんにちは、けーまです。
OpenAI から、テキストを生成するのではなく質問ごとの確率だけを返す「Decisions API」が公開されました。
TypeSafe の Jev や Cloudflare の Clef と同じ decision model ですが、リクエストやレスポンスの形式にはいくつか違いがあります。
この記事では、Decisions API の概要と Jev・Clef との違いを整理したうえで、以前 Clef の記事で試したのと同じ質問を実際に投げてレスポンスを比較してみました。
1. Decisions API とは
Decisions API は、入力データ(テキストや画像)と型を定義した質問を渡すと、質問ごとの確率を返してくれる API です。
エンドポイントは POST /v1/decisions で、利用できるモデルは現時点で gpt-6-luna の1種類のみとなっています。
質問の型は以下の3種類が用意されています。
-
predicate:yes/no で答える質問。yes の確率(probability)を返す -
choice:定義した選択肢から1つ選ぶ質問。選ばれた選択肢、選択肢ごとの確率、確信度(confidence)を返す -
score:順序付けられた段階で評価する質問。確率で重み付けしたスコア、段階ごとの確率、確信度を返す
料金は入力トークンに対してのみ発生し、100万トークンあたり $0.10 です。
Input costs $0.10 per 1M tokens. You pay only for input tokens: there are no cache-read, cache-write, or output-token charges.
引用元: Decisions API | OpenAI API
2. Jev・Clef との違い
2.1 違いの一覧
| 項目 | Decisions API | Jev | Clef |
|---|---|---|---|
| 提供元 | OpenAI | TypeSafe | Cloudflare(Workers AI) |
| 入力 | テキスト・JSON と画像 | テキスト・JSON のみ | テキスト・JSON と画像 |
| 入力の渡し方 | input(文字列、または input_text・input_image を並べたメッセージ) |
state |
state と images |
| 質問の渡し方 | questions の配列。各質問に name を付ける |
questions の辞書 |
questions の辞書(キーが質問名) |
| yes/no の型 | predicate |
noul |
noul |
| 選択肢・段階の書き方 | choices(value と description)、levels(label と description) |
criteria |
criteria |
| 答えの返し方 | answers の配列(name で引く) |
answers の辞書 |
answers の辞書 |
| 選択肢ごとの確率 | [{"value": "technical", "probability": 1.0}] の配列 |
{"technical": 1.0} の辞書 |
{"technical": 0.8088} の辞書 |
| 段階の名前 | probabilities の各要素に label |
legend に別出し |
legend に別出し |
| 確率の桁 | 小数第2位 | 小数第2位 | 小数第4位 |
usage |
input_tokens・output_tokens・total_tokens と内訳。(output_tokens は常に 0) |
input_tokens・output_tokens。「output_tokens にも値が入る」 |
input_tokens・output_tokens。(output_tokens は常に 0) |
| 料金(入力100万トークン) | $0.10 | $0.042 | $0.24(flash は $0.09) |
Jev と Clef は共通のリクエスト形式で呼び出せますが、Decisions API では質問を配列で渡し、結果も配列で返ってくる構造になっています。
そのため、Jev や Clef 向けに書いたコードを流用する場合は、リクエストの組み立てとレスポンスのパース処理を書き直す必要があります。
また、画像は URL 参照ではなく、base64 形式の data URL に変換して input_image に指定します。
その際、input には単一の文字列ではなくメッセージの配列を渡し、input_text と並べてリクエストします(コメントは説明用です)。
"input": [{
"role": "user",
"content": [
// 指示:この写真の商品を検査してください
{"type": "input_text", "text": "Inspect the product in this photo."},
{"type": "input_image", "image_url": "data:image/png;base64,iVBORw0KGgo..."}
]
}]
2.2 同じ質問の書き方と返り方
「この問い合わせは緊急か」を1問だけ聞いたときのリクエストと、実際に返ってきたレスポンスです。
Jev・Clef(model 以外は同じ)
{
"model": "jev-latest",
"state": "Checkout has been failing for every customer for the last hour.",
"questions": {
"urgent": {"type": "noul", "instructions": "Is this support request urgent?"}
}
}
{
"model": "jev-1.13.0",
"answers": {
"urgent": {
"type": "noul",
"noul": 0.97
}
},
"usage": {
"input_tokens": 284,
"output_tokens": 20
}
}
Clef も同じ形の answers を返しますが、REST API では全体が result で包まれます。
Decisions API
{
"model": "gpt-6-luna",
"input": "Checkout has been failing for every customer for the last hour.",
"questions": [
{"type": "predicate", "name": "urgent", "instructions": "Is this support request urgent?"}
]
}
{
"model": "gpt-6-luna",
"answers": [
{
"type": "predicate",
"name": "urgent",
"probability": 0.99
}
],
"usage": {
"input_tokens": 166,
"input_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 166
}
}
3. 公式ガイドのサンプルを投げてみた
まずは公式ガイドに記載されている choice と score のサンプルを、記載通りの文面でそれぞれ5回ずつ実行してみました。
リクエスト内のコメントは説明用のものであり、実際のリクエストには含めていません。
3.1 choice(担当部署)
curl https://api.openai.com/v1/decisions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6-luna",
// 判断の材料:注文に対して2重に請求された
"input": "I was charged twice for my order.",
"questions": [{
"type": "choice",
"name": "department",
// どの部署がこの苦情を担当すべきか
"instructions": "Which department should handle this complaint?",
"choices": [
{"value": "billing", "description": "Payments, invoices, and refunds."}, // 支払い・請求・返金
{"value": "technical", "description": "Problems using the product."}, // 製品利用に関する問題
{"value": "shipping", "description": "Delivery and tracking."}, // 配送と追跡
{"value": "other", "description": "Requests outside these categories."} // 上記以外の問い合わせ
]
}]
}'
{
"model": "gpt-6-luna",
"answers": [
{
"type": "choice",
"name": "department",
"choice": "billing",
"probabilities": [
{
"value": "billing",
"probability": 1.0
},
{
"value": "technical",
"probability": 0.0
},
{
"value": "shipping",
"probability": 0.0
},
{
"value": "other",
"probability": 0.0
}
],
"confidence": 1.0
}
],
"usage": {
"input_tokens": 145,
"input_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 145
}
}
5回とも billing 1.0、確信度 1.0 が返りました(実行時間の中央値 0.273秒(273ms)、入力トークン 145)。
公式ガイドのレスポンス例は billing 0.95・確信度 0.93 ですが、実際には 1.0 まで振り切れました。
3.2 score(深刻度)
curl https://api.openai.com/v1/decisions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6-luna",
// 判断の材料:Safari ではエクスポートに失敗するが Chrome では動作する
"input": "Export fails in Safari but works in Chrome.",
"questions": [{
"type": "score",
"name": "severity",
// この問題はどのくらい深刻か
"instructions": "How severe is this issue?",
"levels": [
{"label": "Cosmetic", "description": "Appearance only; no lost functionality."}, // 見た目だけで機能は失われていない
{"label": "Workaround available", "description": "A task fails, but another way works."}, // 作業は失敗するが別の方法で回避できる
{"label": "Fully blocked", "description": "A task fails with no workaround."} // 作業が失敗し回避策もない
]
}]
}'
{
"model": "gpt-6-luna",
"answers": [
{
"type": "score",
"name": "severity",
"score": 0.97,
"probabilities": [
{
"value": 0,
"label": "Cosmetic",
"probability": 0.03
},
{
"value": 1,
"label": "Workaround available",
"probability": 0.97
},
{
"value": 2,
"label": "Fully blocked",
"probability": 0.0
}
],
"confidence": 0.96
}
],
"usage": {
"input_tokens": 146,
"input_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 146
}
}
5回とも score 0.97、確信度 0.96 が返りました(実行時間の中央値 0.256秒(256ms)、入力トークン 146)。
公式ガイドのレスポンス例は score 1.1・確信度 0.55 ですが、実際には Workaround available に 0.97 が集まり、片方に寄る結果になりました。
4. Jev・Clef と同じ質問を投げてみた
続いて、Clef の記事で扱った state と質問内容を Decisions API のフォーマットに合わせて書き換え、同様に5回リクエストを送ってみました。
state には「1時間前から、すべての顧客で決済が失敗し続けている」というサポート問い合わせを想定し、3つの型の質問を1回のリクエストにまとめて問い合わせています。
今回は description を省略してリクエストしてみましたが、エラーにならず正常に応答が返ってきました。
| 項目 | Jev | clef | clef-flash | Decisions API |
|---|---|---|---|---|
| 緊急か(yes の確率) | 0.96〜0.97 | 0.9906 | 0.9551 | 0.96 |
| 担当チーム(technical の確率) | technical(0.99〜1.0) | technical(0.8088) | technical(0.9355) | technical(1.0) |
| 深刻度(0〜3) | 2.99 | 2.9573 | 2.7182 | 2.97 |
| 5回の結果のばらつき | 小数第2位で揺れた | 5回とも同一 | 5回とも同一 | 5回とも同一 |
| 入力トークン | 402 | 346 | 346 | 406 |
| 実行時間(中央値) | 0.238秒(238ms) | 0.478秒(478ms) | 0.294秒(294ms) | 0.255秒(255ms) |
| 料金(1リクエスト、1ドル150円で換算) | $0.0000169(約0.0025円) | $0.0000830(約0.0125円) | $0.0000311(約0.0047円) | $0.0000406(約0.0061円) |
※ Jev・Clef の数値は、Clef の記事を執筆した時点(2026年10月4日)の実測値です。
4モデルとも判定の結論自体は一致しており、Decisions API は Jev と同じように小数第2位までの確率を返しました。
5. まとめ
Decisions API は、Clef と同様にテキストだけでなく画像も入力できる decision model であり、料金面でも clef より安価で clef-flash に近い水準に抑えられています。
また、手元の実行では試行ごとの揺れもなく、Jev や Clef と遜色ない応答速度で動作しました。
ただし、リクエストやレスポンスの構造は Jev や Clef と互換性がありません。
質問や回答が配列形式でやり取りされるため、既存のコードから移行する際には組み立てとパース処理の修正が必要となります。
テキストのみの判定でコストを最優先するなら Jev、画像を入力に含めながらコストと速度のバランスを取りたいなら Decisions API が有力な選択肢になりそうです。







