跳轉到

Gemini Robotics ER

Gemini Robotics ER 模型目前為預覽版。

Gemini Robotics ER(embodied reasoning,具身推理)模型是視覺語言模型(VLM),讓機器人能感知實體世界並與之互動。這類模型能解讀視覺資料、進行空間與時間推理、規劃多步驟任務,並編排機器人與工具。

模型

Gemini Robotics ER 2 模型是 Gemini Robotics 系列的最新模型,也是我們更新後的推理模型,能讓機器人精確理解所處環境。它專精於具身推理能力,例如以代理方式編排機器人(例如使用 VLA)、機器人影片理解(包括進度理解與成功偵測)、儀器讀數、指向與空間推理。

Gemini Robotics ER 2 模型提供兩個模型端點:

  • gemini-robotics-er-2-preview:標準 ER 2 模型。以 Gemini 3.5 Flash 為基礎,具備更佳的空間推理、影片時刻查找、影片進度分類、多機器人編排與多步驟工具使用能力。
  • gemini-robotics-er-2-streaming-preview:針對使用 Live API 的即時串流最佳化。適合需要處理連續音訊與影片輸入的低延遲機器人代理。

Gemini Robotics ER 1.6 已於 2026 年 8 月 31 日淘汰。若你仍在使用 Gemini Robotics ER 1.6,請在 API 呼叫中將 model="gemini-robotics-er-1.6-preview" 換成 model="gemini-robotics-er-2-preview" 或 model="gemini-robotics-er-2-streaming-preview",升級至 Gemini Robotics ER 2。

在 Google AI Studio 中試用 Gemini Robotics ER 2

機器人能力

Gemini Robotics ER 支援多種具身推理能力。選取一項能力以深入瞭解:

能力 說明 指南
空間推理 指向物體、在影片中追蹤物體、以邊界框偵測、規劃軌跡。 空間推理
代理視覺 運用程式碼執行,透過影像處理工具強化其他能力。 代理視覺
任務編排 結合空間推理與自訂機器人 API,完成長程任務。 任務編排
串流(僅限 Gemini Robotics ER 2 Streaming 端點) 雙向串流,支援低延遲函式呼叫的即時機器人代理。 機器人串流
影片進度(僅限 Gemini Robotics ER 2) 從連續影片來源進行時刻查找與進度分類。 影片理解

開始之前

Gemini Robotics ER 模型可透過 Gemini Developer API 使用。開始之前,請先從 Google AI Studio 或 Google Cloud 控制台 建立 Gemini API 金鑰,並設定你的環境。

如需瞭解金鑰類型、安全性,以及如何在 Python、JavaScript 等語言中設定金鑰的詳細資訊,請參閱使用 Gemini API 金鑰。

Cloud Storage URI(gs://)無法直接透過 Gemini Developer API 存取。請在本機載入圖片,或使用 Files API。

開始使用

下列範例會找出圖片中的物體,並傳回其正規化的 2D 座標與標籤。你可以直接將此輸出傳給機器人 API 或 VLA 模型,以產生機器人動作。

from google import genai

PROMPT = """
          Point to no more than 10 items in the image. The label returned
          should be an identifying name for the object detected.
          The answer should follow the json format: [{"point": <point>,
          "label": <label1>}, ...]. The points are in [y, x] format
          normalized to 0-1000.
        """
client = genai.Client()

uploaded_file = client.files.upload(file="my-image.png")

image_response = client.interactions.create(
    model="gemini-robotics-er-2-preview",
    input=[
        {
            "type": "image",
            "uri": uploaded_file.uri,
            "mime_type": uploaded_file.mime_type
        },
        {"type": "text", "text": PROMPT}
    ],
    generation_config={"thinking_level": "high"},
)

print(image_response.output_text)
import { GoogleGenAI } from "@google/genai";

const PROMPT = `
  Point to no more than 10 items in the image. The label returned
  should be an identifying name for the object detected.
  The answer should follow the json format: [{"point": <point>,
  "label": <label1>}, ...]. The points are in [y, x] format
  normalized to 0-1000.
`;
const client = new GoogleGenAI();

const uploadedFile = await client.files.upload({ file: "my-image.png" });

const imageResponse = await client.interactions.create({
  model: "gemini-robotics-er-2-preview",
  input: [
    {
      type: "image",
      uri: uploadedFile.uri,
      mime_type: uploadedFile.mimeType,
    },
    { type: "text", text: PROMPT },
  ],
  generation_config: { thinking_level: "high" },
});

console.log(imageResponse.output_text);
import com.google.genai.Client;
import com.google.genai.gaos.models.interactions.Content;
import com.google.genai.gaos.models.interactions.CreateModelInteraction;
import com.google.genai.gaos.models.interactions.GenerationConfig;
import com.google.genai.gaos.models.interactions.ImageContent;
import com.google.genai.gaos.models.interactions.ImageContentMimeType;
import com.google.genai.gaos.models.interactions.Interaction;
import com.google.genai.gaos.models.interactions.InteractionsInput;
import com.google.genai.gaos.models.interactions.Model;
import com.google.genai.gaos.models.interactions.TextContent;
import com.google.genai.gaos.models.interactions.ThinkingLevel;
import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;
import com.google.genai.types.File;
import com.google.genai.types.UploadFileConfig;
import java.util.List;

Client client = new Client();

String prompt =
    "Point to no more than 10 items in the image. The label returned "
        + "should be an identifying name for the object detected. "
        + "The answer should follow the json format: [{\"point\": <point>, "
        + "\"label\": <label1>}, ...]. The points are in [y, x] format "
        + "normalized to 0-1000.";

File uploadedFile =
    client.files.upload(
        new java.io.File("my-image.png"),
        UploadFileConfig.builder().mimeType("image/png").build());

Content imageContent =
    ImageContent.builder()
        .uri(uploadedFile.uri().orElse(""))
        .mimeType(ImageContentMimeType.of(uploadedFile.mimeType().orElse("image/png")))
        .build();
Content textContent = TextContent.builder().text(prompt).build();

CreateModelInteraction params =
    CreateModelInteraction.builder()
        .model(Model.of("gemini-robotics-er-2-preview"))
        .input(InteractionsInput.ofContent(List.of(imageContent, textContent)))
        .generationConfig(
            GenerationConfig.builder().thinkingLevel(ThinkingLevel.HIGH).build())
        .build();

Interaction imageResponse =
    client.interactions.create(CreateInteractionRequestBody.of(params)).interaction().get();

System.out.println(imageResponse.outputText().orElse(""));
package main

import (
    "context"
    "fmt"
    "log"

    "google.golang.org/genai"
    "google.golang.org/genai/interactions/models/interactions"
    "google.golang.org/genai/interactions/models/operations"
)

func main() {
    ctx := context.Background()
    client, err := genai.NewClient(ctx, nil)
    if err != nil {
        log.Fatal(err)
    }

    prompt := `Point to no more than 10 items in the image. The label returned
should be an identifying name for the object detected.
The answer should follow the json format: [{"point": <point>,
"label": <label1>}, ...]. The points are in [y, x] format
normalized to 0-1000.`

    uploadedFile, err := client.Files.UploadFromPath(ctx, "my-image.png", &genai.UploadFileConfig{
        MIMEType: "image/png",
    })
    if err != nil {
        log.Fatal(err)
    }

    res, err := client.Interactions.Create(ctx, operations.CreateInteractionRequest{
        Body: operations.NewCreateInteractionRequestBody(interactions.CreateModelInteraction{
            Model: interactions.Model("gemini-robotics-er-2-preview"),
            Input: interactions.NewInteractionsInput([]interactions.Content{
                interactions.NewContent(interactions.ImageContent{
                    URI:      genai.Ptr(uploadedFile.URI),
                    MimeType: genai.Ptr(interactions.ImageMimeTypeImagePng),
                }),
                interactions.NewContent(interactions.TextContent{
                    Text: prompt,
                }),
            }),
            GenerationConfig: &interactions.GenerationConfig{
                ThinkingLevel: interactions.ThinkingLevelHigh.ToPointer(),
            },
        }),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Interaction.OutputText != nil {
        fmt.Println(*res.Interaction.OutputText)
    }
}
# First, ensure you have the image file locally.
# Encode the image to base64
IMAGE_BASE64=$(base64 -w 0 my-image.png)

curl -X POST \
  "https://generativelanguage.googleapis.com/v1beta/interactions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-robotics-er-2-preview",
    "input": {
      "parts": [
        {
          "inlineData": {
            "mimeType": "image/png",
            "data": "'"${IMAGE_BASE64}"'"
          }
        },
        {
          "text": "Point to no more than 10 items in the image. The label returned should be an identifying name for the object detected. The answer should follow the json format: [{\"point\": [y, x], \"label\": <label1>}, ...]. The points are in [y, x] format normalized to 0-1000."
        }
      ]
    },
    "generation_config": {
      "thinking_config": {
        "thinking_level": "high"
      }
    }
  }'

輸出會是一個 JSON 陣列,其中每個物件都包含一個 point(正規化的 [y, x] 座標)與一個標示物體的 label。

[
  {"point": [376, 508], "label": "small banana"},
  {"point": [287, 609], "label": "larger banana"},
  {"point": [223, 303], "label": "pink starfruit"},
  {"point": [435, 172], "label": "paper bag"},
  {"point": [270, 786], "label": "green plastic bowl"},
  {"point": [488, 775], "label": "metal measuring cup"},
  {"point": [673, 580], "label": "dark blue bowl"},
  {"point": [471, 353], "label": "light blue bowl"},
  {"point": [492, 497], "label": "bread"},
  {"point": [525, 429], "label": "lime"}
]

下圖示範這些點的呈現方式:

運作方式

Gemini Robotics ER 接收圖片、影片或音訊輸入與自然語言提示詞。它能辨識物體、推理場景脈絡與空間關係,並傳回座標或邊界框等結構化輸出。

Gemini Robotics ER 也具備代理能力:它能將複雜任務拆解為子任務,並透過呼叫你的機器人函式或執行產生的程式碼來完成。例如,「把蘋果放進碗裡」會變成定位、抓取與放置的一系列步驟。

如需瞭解 Gemini 如何執行工具呼叫的詳細資訊,請參閱函式呼叫。

安全性

Gemini Robotics ER 在設計時已將安全性納入考量,但維護機器人周圍環境的安全仍是你的責任。生成式 AI 模型可能會出錯,實體機器人也可能造成損壞。如需深入瞭解,請造訪 Gemini Robotics 安全頁面。

最佳做法

  1. 使用平實的自然語言。如同對人說明一樣,描述你希望機器人做的事。若某個詞彙效果不佳,可改用常見的同義詞。

  2. 最佳化視覺輸入。傳送圖片前,先裁切或放大體積小或不清楚的物體。光線與低色彩對比都可能影響偵測。

  3. 將複雜任務拆解為步驟。將每個步驟以獨立提示詞傳送,讓模型保持專注並提升準確度。

  4. 對於高精確度任務,多次查詢並將結果取平均。這種共識做法能降低空間輸出的變異。

限制

使用 Gemini Robotics ER 開發時,請留意下列限制:

  • API 金鑰限制:Gemini API 不接受來自未受限 API 金鑰的要求,並會傳回 403 Forbidden 錯誤。請在 AI Studio 中為 API 金鑰加上限制,以確保其安全。詳情請參閱保護未受限的 API 金鑰。
  • 延遲與效能的取捨:複雜的查詢、高解析度輸入或高思考等級都可能拉長處理時間。思考等級建議使用 medium,在延遲與效能之間取得良好平衡。
  • 幻覺:與所有大型語言模型一樣,Gemini Robotics ER 模型偶爾會「產生幻覺」或提供不正確的資訊,特別是在提示詞含糊或輸入超出分布範圍時。
  • 對提示詞品質的依賴:輸出品質取決於輸入提示詞是否清晰。請使用具體且結構良好的提示詞。
  • 運算成本:執行模型會消耗運算資源並產生費用,特別是使用影片輸入或高 thinking_budget 時。詳情請參閱思考頁面。
  • 輸入類型:各模式限制的詳細資訊請參閱下列主題。

隱私權聲明

你瞭解,本文件所提及的模型(下稱「Robotics Models」)會運用影片與音訊資料來運作,並依你的指示移動你的硬體。因此,你在操作 Robotics Models 時,可能會收集到可識別個人的資料,例如聲音、影像與肖像資料(下稱「個人資料」)。若你選擇以會收集個人資料的方式操作 Robotics Models,你同意:在未充分告知可識別個人並取得其同意之前,你不會允許任何可識別個人與 Robotics Models 互動,或出現在 Robotics Models 周圍的區域;該告知與同意須說明其個人資料可能會依 https://aistudio.google.com/docs/terms 所載的 Gemini API 附加服務條款(下稱「條款」),包括其中名為「How Google Uses Your Data」的一節所述,提供給 Google 並由 Google 使用。你應確保該告知允許依條款所述收集與使用個人資料,並應盡商業上合理的努力,透過臉部模糊等技術將個人資料的收集與散布降到最低,並在可行範圍內於不含可識別個人的區域操作 Robotics Models。

定價

定價與可用地區的詳細資訊,請參閱定價頁面。

模型端點

屬性 說明
模型代碼 gemini-robotics-er-2-preview
支援的資料類型 輸入 文字、圖片、影片、音訊 輸出 文字
權杖上限[*] 輸入權杖上限 131,072 輸出權杖上限 65,536
功能 音訊生成 不支援 程式碼執行 支援 電腦使用 支援 上下文快取 支援 File search 支援 函式呼叫 支援 使用 Google Maps 接地 支援 使用 Google 搜尋接地 支援 圖片生成 不支援 Live API 不支援 結構化輸出 支援 思考 支援 URL 上下文 支援
取用選項 Batch API 支援 Flex inference 不支援 Priority inference 不支援
版本 詳情請參閱模型版本模式。預覽版:gemini-robotics-er-2-preview
最新更新 2026 年 7 月
模型卡 模型卡
定價 定價
屬性 說明
模型代碼 gemini-robotics-er-2-streaming-preview
支援的資料類型 輸入 文字、圖片、影片、音訊 輸出 文字
權杖上限[*] 輸入權杖上限 131,072 輸出權杖上限 65,536
功能 音訊生成 不支援 程式碼執行 不支援 電腦使用 不支援 上下文快取 不支援 File search 不支援 函式呼叫 支援 使用 Google Maps 接地 不支援 使用 Google 搜尋接地 支援 圖片生成 不支援 Live API 支援 結構化輸出 不支援 思考 支援 URL 上下文 不支援
取用選項 Batch API 不支援 Flex inference 不支援 Priority inference 不支援
版本 詳情請參閱模型版本模式。預覽版:gemini-robotics-er-2-streaming-preview
最新更新 2026 年 7 月
模型卡 模型卡
定價 定價
屬性 說明
模型代碼 gemini-robotics-er-1.6-preview
支援的資料類型 輸入 文字、圖片、影片、音訊 輸出 文字
權杖上限[*] 輸入權杖上限 131,072 輸出權杖上限 65,536
功能 音訊生成 不支援 程式碼執行 支援 電腦使用 支援 上下文快取 支援 File search 支援 函式呼叫 支援 使用 Google Maps 接地 支援 使用 Google 搜尋接地 支援 圖片生成 不支援 Live API 不支援 結構化輸出 支援 思考 支援 URL 上下文 支援
取用選項 Batch API 支援 Flex inference 支援 Priority inference 支援
版本 詳情請參閱模型版本模式。已關閉:gemini-robotics-er-1.6-preview
最新更新 2025 年 12 月
知識截止日期 2025 年 1 月

後續步驟