# Gemini Decision 1

Gemini Decision 1 是专为 [Decisions API](/docs/decisions-api)。它可以在一次预填充过程中评估文本、图像、视频、音频和 PDF 中键入的问题，并返回零输出 token 的校准结果概率。

使用 Gemini Decision 1 进行请求路由、同时跨多个规则进行策略检查、根据评分标准对候选人进行评分、工具选择以及实时媒体流上的低延迟分类。单个请求可以通过共享输入评估最多 1,000 个独立问题，最多 262,144 token：

* **是/否：** 返回从 0.01 到 0.99 的校准概率以及置信度分数。
* **单选：** 评估 2 到 255 选项并返回顶级选项、每个选项的概率和置信度。
* **评分标准：** 评估 2 到 255 有序评分标准级别并返回概率加权预期分数、每级别概率和置信度。

{% button href="/docs/decisions-api" variant="primary" %}查看文档{% /button %}

## 快速入门  {% #quickstart %}

在一次通话中针对同一客户消息评估是/否问题和路由选择：

{% tabs %}
{% tab filename="decisions.py" label="Python" %}
```python
from google import genai

client = genai.Client(http_options={"api_version": "v1beta"})

result = client.decisions.create(
    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?",
        },
        "queue": {
            "type": "choice",
            "instructions": "Which support queue should handle this message?",
            "criteria": {
                "billing": "Payment, invoice, or refund questions.",
                "replacements": "Damaged, missing, or wrong items.",
                "general": "Product questions and account updates.",
            },
        },
    },
)

damaged = result.answers["is_damaged"]
queue = result.answers["queue"]
print(f"P(damaged)={damaged.noul:.2f} queue={queue.choice}")
```
{% /tab %}

{% tab filename="decisions.mjs" label="JavaScript" %}
```javascript
import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({ apiVersion: "v1beta" });

const result = await ai.decisions.create({
  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?",
    },
    queue: {
      type: "choice",
      instructions: "Which support queue should handle this message?",
      criteria: {
        billing: "Payment, invoice, or refund questions.",
        replacements: "Damaged, missing, or wrong items.",
        general: "Product questions and account updates.",
      },
    },
  },
});

const damaged = result.answers?.is_damaged;
const queue = result.answers?.queue;
if (damaged?.type === "noul" && queue?.type === "choice") {
  console.log(`P(damaged)=${damaged.noul} queue=${queue.choice}`);
}
```
{% /tab %}

{% tab filename="decisions.sh" label="REST" %}
```bash
curl -X POST "https://generativelanguage.googleapis.com/v1beta/decisions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "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?"
      },
      "queue": {
        "type": "choice",
        "instructions": "Which support queue should handle this message?",
        "criteria": {
          "billing": "Payment, invoice, or refund questions.",
          "replacements": "Damaged, missing, or wrong items.",
          "general": "Product questions and account updates."
        }
      }
    }
  }'
```
{% /tab %}
{% /tabs %}

## 文档  {% #documentation %}

参观 [Decisions API](/docs/decisions-api) 请求模式、标准设计、多模态输入和校准详细信息的指南。看 [价格](/docs/pricing#gemini-decision) 和 [速率限制](/docs/rate-limits#gemini-decision) 用于计费和配额层。

## 示例应用程序  {% #sample-apps %}

探索使用 Gemini Decision 1 构建的 Google AI Studio 中的交互式示例应用程序：

* [决策游乐场](https://aistudio.google.com/apps/f6cbef57-8bad-443a-813f-4d4c8f9750af?fullscreenApplet=true)：根据自定义文本和媒体输入以交互方式测试是/否、选择和评分问题。
* [上门包裹](https://aistudio.google.com/apps/bdca3fee-8d0a-4663-b30e-73828a55c1e8?fullscreenApplet=true)：使用校准概率对交货照片的包裹状况和放置进行分类。
* [找到动物园管理员](https://aistudio.google.com/apps/b86d2f3b-c1d4-4d44-9198-5303a0cb65c1?fullscreenApplet=true)：一次性评估跨场景候选者的视觉属性。

## gemini-decision-1  {% #gemini-decision-1 %}

{% doc-table variant="model" %}
{% doc-row header="true" %}
{% doc-cell %}
属性
{% /doc-cell %}

{% doc-cell %}
说明
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="id_card" /%}模型代码
{% /section %}
{% /doc-cell %}

{% doc-cell %}
`gemini-decision-1`
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="save" /%}支持的数据类型
{% /section %}
{% /doc-cell %}

{% doc-cell %}
**输入** 文本、图像、视频、音频和 PDF

**输出** 校准概率（是/否、选择和分数，0 输出 token）
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="token_auto" /%}token 限制{% sup %}[[*]](/docs/tokens){% /sup %}
{% /section %}
{% /doc-cell %}

{% doc-cell %}
**输入token限制** 262,144

**输出 token 限制** 0（每个请求最多 1,000 问题）
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="handyman" /%}功能
{% /section %}
{% /doc-cell %}

{% doc-cell %}
{% section class="three-column-grid" %}
{% section %}
[**经过校准的决策**](/docs/decisions-api)

{% badge type="supported" /%}
{% /section %}

{% section %}
**音频生成**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**Batch API**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**缓存**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**代码执行**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**计算机使用**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**文件搜索**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**弹性推理**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**函数调用**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**使用 Google 地图提供事实依据**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**图像生成**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**Live API**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**优先推理**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**搜索事实依据**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**结构化输出**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**文本生成**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**思考**

{% badge type="not-supported" /%}
{% /section %}

{% section %}
**URL 上下文**

{% badge type="not-supported" /%}
{% /section %}
{% /section %}
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="123" /%}版本
{% /section %}
{% /doc-cell %}

{% doc-cell %}
阅读 [模型版本模式](/docs/models#model-versions) 了解更多详情。

* `gemini-decision-1`
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="calendar_month" /%}最新更新
{% /section %}
{% /doc-cell %}

{% doc-cell %}
十一月 2026
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="speed" /%}速率限制
{% /section %}
{% /doc-cell %}

{% doc-cell %}
[速率限制](/docs/rate-limits#gemini-decision)
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="paid" /%}价格
{% /section %}
{% /doc-cell %}

{% doc-cell %}
[价格](/docs/pricing#gemini-decision)
{% /doc-cell %}
{% /doc-row %}
{% /doc-table %}
