curl --request POST \
--url https://direct.evolink.ai/v1beta/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-decision-1",
"input": "The blue mug I ordered on Monday arrived cracked on Wednesday.",
"questions": {
"is_damaged": {
"type": "noul",
"instructions": "Did the item arrive damaged?"
}
}
}
'{
"answers": {
"is_defect": {
"type": "noul",
"noul": 0.94,
"confidence": 0.94
},
"next_action": {
"type": "choice",
"choice": "human_escalation",
"probabilities": {
"human_escalation": 0.76,
"replacement_shipment": 0.18,
"troubleshooting_flow": 0.04,
"instant_refund": 0.02
},
"confidence": 0.76
},
"churn_risk": {
"type": "score",
"score": 2.99,
"legend": {
"0": "No churn signal",
"1": "Mild frustration",
"2": "Mentions alternatives",
"3": "Threatens to cancel"
},
"probabilities": {
"0": 0,
"1": 0,
"2": 0.01,
"3": 0.99
},
"confidence": 0.99
}
},
"usage": {
"total_input_tokens": 324,
"input_tokens_by_modality": [
{
"modality": "text",
"tokens": 324
}
],
"total_output_tokens": 0,
"total_tokens": 324
}
}Gemini Decisions - 完全なパラメータリファレンス
gemini-decision-1でテキスト、画像、音声、動画、PDF を評価し、はい/いいえの確率、単一選択、スコアを取得します- すべての回答を同期的に返します。ストリーミング、Batch API、コンテキストキャッシュには対応していません
- 入力トークンのみ課金され、出力は無料です。各リクエストには最低料金が適用されます。モデル料金をご覧ください
- 対話やテキスト生成には Gemini ネイティブ API を使用してください
curl --request POST \
--url https://direct.evolink.ai/v1beta/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-decision-1",
"input": "The blue mug I ordered on Monday arrived cracked on Wednesday.",
"questions": {
"is_damaged": {
"type": "noul",
"instructions": "Did the item arrive damaged?"
}
}
}
'{
"answers": {
"is_defect": {
"type": "noul",
"noul": 0.94,
"confidence": 0.94
},
"next_action": {
"type": "choice",
"choice": "human_escalation",
"probabilities": {
"human_escalation": 0.76,
"replacement_shipment": 0.18,
"troubleshooting_flow": 0.04,
"instant_refund": 0.02
},
"confidence": 0.76
},
"churn_risk": {
"type": "score",
"score": 2.99,
"legend": {
"0": "No churn signal",
"1": "Mild frustration",
"2": "Mentions alternatives",
"3": "Threatens to cancel"
},
"probabilities": {
"0": 0,
"1": 0,
"2": 0.01,
"3": 0.99
},
"confidence": 0.99
}
},
"usage": {
"total_input_tokens": 324,
"input_tokens_by_modality": [
{
"modality": "text",
"tokens": 324
}
],
"total_output_tokens": 0,
"total_tokens": 324
}
}https://direct.evolink.ai を使用し、https://api.evolink.ai を代替エンドポイントとして使用します。承認
EvoLink の API Key を Bearer トークンとして認証します。
API Key の取得:
API Key 管理ページをご覧ください。
リクエストヘッダー:
Authorization: Bearer YOUR_API_KEY
ボディ
リクエストボディで受け付けるのは model、input、questions の 3 フィールドのみです。それ以外のフィールド(stream など)を渡すと 400 invalid_request が返ります。
モデル ID。gemini-decision-1 を使用します。
このモデルは対話モデルではなく、本エンドポイントでのみ使えます。たとえば GPT Decisions のエンドポイント /v1/decisions に送ると 400 model_endpoint_mismatch が返ります。
gemini-decision-1 "gemini-decision-1"
すべての質問で共有する入力です。テキスト文字列、単一のコンテンツブロック、またはコンテンツブロックの配列(テキスト、画像、音声、動画、PDF ドキュメント)を指定します。入力を空にすることはできません。隣り合うテキストブロックは区切り文字なしで順に連結されるため、必要に応じてスペースや改行を自分で入れてください。JSON データは文字列にシリアライズしてテキストとして渡します。
1"I was charged twice for my order."
判定する質問を「質問キー → 質問」のマップで指定します(1~1,000 問)。キーは自由に決められ([A-Za-z0-9_-]+ に一致する 1~64 文字)、回答は同じキーで返ります。モデルはキーを参照しないため、質問文全体を instructions に書いてください。
| タイプ | 用途 | 主な結果 |
|---|---|---|
noul | ある記述が成り立つかを判定 | noul:「はい」の確率(0.01~0.99) |
choice | 固定リストから 1 つを選択 | choice:最も確率の高い選択肢 ID |
score | 順序付きレベルで入力を採点 | score:確率加重のレベルスコア |
各質問は同じ入力に対して独立に評価され、互いを参照しません。質問タイプは混在できます。質問間に依存関係がある場合は、複数のリクエストに分けてください。入力とすべての質問で 262,144 トークンのコンテキストウィンドウを共有します。
Show child attributes
Show child attributes
{
"is_damaged": {
"type": "noul",
"instructions": "Did the item arrive damaged?"
}
}
レスポンス
質問ごとに 1 つの回答を、リクエストの質問と同じキーで返します
質問ごとに 1 つの回答を、リクエストの質問と同じキーで返します。各回答の type は対応する質問と同じです。prompt_feedback.block_reason が設定されている場合は空になります
Show child attributes
Show child attributes
トークン使用量。入力トークンのみ課金されます(total_input_tokens)。テキスト、画像、音声、動画、PDF のトークンはすべて同じ単価で、出力は常に 0 です。各リクエストには最低料金が適用されます。最新の料金はモデル料金をご覧ください。コンテキストキャッシュには対応していないため、同じ入力でもリクエストごとに課金されます。HTTP 200 のレスポンスに prompt_feedback.block_reason が含まれる場合も、入力使用量に応じて課金されます。有効な使用量が返されない場合は、推定値で精算されます。
Show child attributes
Show child attributes
入力コンテンツフィルタからのフィードバック。block_reason が設定されている場合は入力がブロックされており、質問は評価されず answers は空になります。HTTP 200 で返される場合も課金されます。usage を参照してください。
Show child attributes
Show child attributes