OpenAIのgpt-6-lunaを
分類や
2026年10月26日8時18分
| 項目 | 内容 |
|---|---|
| 使える |
gpt-6-lunaだけ |
| 送り先 | POST /v1/decisions |
| 答えの型 | predicate・ |
| 1回の |
1〜400個 |
| 入力の料金 | 100万 |
| 出力の料金 | かからない |
| 一般提供 | 2026年10月22日 |
Decisions APIとは
Decisions
OpenAIの
3つの答えの型
| 型 | 聞くこと | 返る答え |
|---|---|---|
| predicate | 当ては |
0〜1の確率 |
| choice | どれを |
選んだ値 |
| score | どの |
段階の点数 |
choiceは、confidence
scoreの
1回の
入力には、file_idでは
向いている使い方とResponses APIとの使い分け
ガイドでは、
自分で
| やりたいこと | 使うもの |
|---|---|
| 判定・ |
Decisions API |
| 項目の |
Structured Outputs |
| ツールの |
function calling |
データの扱い
ガイドに
料金
料金ページとgpt-6-lunaの
| 項目 | Decisions | Responses |
|---|---|---|
| 入力 | 0.10ドル | 0.10ドル |
| 出力 | かからない | 0.50ドル |
| キャッシュの |
0.01ドル | 0.01ドル |
| キャッシュの |
Responsesと同じ | 0.125ドル |
ガイドでは、gpt-6-lunaのgpt-6-lunaの
データをgpt-6-lunaを
APIで呼び出す
コードを
APIキーは、OPENAI_API_KEYに
export OPENAI_API_KEY="ここに自分のAPIキー"
curl https://api.openai.com/v1/decisions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6-luna",
"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、input、questionsのinputには、nameをotherのような
ガイドに
{
"answers": [
{
"type": "choice",
"name": "department",
"choice": "billing",
"probabilities": [
{ "value": "billing", "probability": 0.95 },
{ "value": "technical", "probability": 0.02 },
{ "value": "shipping", "probability": 0.01 },
{ "value": "other", "probability": 0.02 }
],
"confidence": 0.93
}
]
}
choiceにprobabilitiesにconfidenceに
Pythonで呼び出す
OpenAIのclient.decisions.createでrefusalにnameが
from openai import OpenAI
client = OpenAI()
decision = client.decisions.create(
model="gpt-6-luna",
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."},
],
}
],
)
answer = decision.answers[0]
if answer.type == "refusal":
print(f"Refused: {answer.name}")
elif answer.type == "choice":
print(f"Department: {answer.choice} (confidence: {answer.confidence})")
しきい値の決め方
確率や
プロンプトキャッシュで安くする
同じinputにquestionsの
キャッシュと使用量の確かめ方
キャッシュがcached_tokensusage.input_tokens_detailsのcache_write_tokensです。usage.input_tokensにusage.input_tokensに
組織全体のGET /v1/organization/usage/decisionsでapi.usage.readのnum_model_requestsは
APIキーが

コメント