Gemini Robotics ER

Gemini Robotics ER(具身推理)模型是视觉语言模型 (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 流式传输端点) 双向流式传输,可实现具有低延迟函数调用的实时机器人智能体。 机器人流式传输
视频进度(仅限 Gemini Robotics ER 2) 从连续视频 Feed 中查找时刻和进行进度分类。 视频理解

准备工作

Gemini Robotics ER 模型可通过 Gemini Developer API 获取。首先,从 Google AI Studio 或 Google Cloud 控制台创建 Gemini API 密钥,然后设置环境。

如需详细了解密钥类型、安全性以及如何使用 Python、JavaScript 和其他语言配置密钥,请参阅使用 Gemini API 密钥。

使用入门

以下示例在图片中查找对象,并返回其归一化 2D 坐标和标签。您可以将此输出直接传递给机器人 API 或 VLA 模型,以生成机器人操作。

Python

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)

JavaScript

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);

Java

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(""));

Go

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)
    }
}

REST

# 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。

JSON

[
  {"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 密钥。
  • 延迟时间与性能:复杂的查询、高分辨率输入或高思考级别可能会导致处理时间增加。对于思考级别,请使用中等,以便在延迟时间和性能之间实现良好平衡。
  • 幻觉:与所有大语言模型一样,Gemini Robotics ER 模型有时可能会产生“幻觉”或提供不正确的信息,尤其是在提示不明确或输入超出分布范围时。
  • 依赖于提示质量:输出质量取决于输入提示的清晰度。使用具体、结构清晰的提示。
  • 计算成本:运行模型(尤其是使用视频输入或高 thinking_budget 时)会消耗计算资源并产生费用。如需了解详情,请参阅思考页面。
  • 输入类型:如需详细了解每种模式的限制,请参阅以下主题。

隐私权声明

您确认,本文档中提及的模型(以下简称“机器人模型”)会利用视频和音频数据,以便根据您的指令操作和移动您的硬件。因此,您在操作机器人模型时,机器人模型可能会收集身份可识别的用户的数据,例如语音、图像和肖像数据(“个人数据”)。如果您选择以收集个人数据的方式运行机器人模型,则表示您同意,除非身份可识别的人员已充分知悉并同意其个人数据可能会提供给 Google 并由 Google 使用(如 https://ai.google.dev/gemini-api/terms 上的《Gemini API 附加服务条款》[以下简称“条款”]中所述,包括“Google 如何使用您的数据”部分),否则您不会允许任何身份可识别的人员与机器人模型互动或出现在机器人模型周围的区域。您应确保此类通知允许按照本条款所述收集和使用个人数据,并且您应尽商业上合理的努力,通过使用面部模糊处理等技术,以及在不包含身份可识别的人员的区域操作机器人模型(在可行范围内),最大限度地减少个人数据的收集和分发。

价格

如需详细了解价格和可用区域,请参阅价格页面。

模型端点

Gemini Robotics ER 2 预览版

属性 说明
模型代码 gemini-robotics-er-2-preview
支持的数据类型

输入源

文本、图片、视频、音频

输出

文本

Token 限制[*]

输入 token 限制

131,072

输出 token 限制

65536

功能

音频生成

不受支持

缓存

支持

代码执行

支持

Computer Use

支持

文件搜索

支持

函数调用

支持

Grounding with Google Maps

支持

图片生成

不受支持

Live API

不受支持

利用 Google 搜索建立回答依据

支持

结构化输出

支持

思考

支持

网址上下文

支持

使用选项

Batch API

支持

Flex 推理

不受支持

优先级推断

不受支持

个版本
如需了解详情,请参阅模型版本模式。
  • 预览:gemini-robotics-er-2-preview
最后更新时间 2026 年 7 月
模型卡片 模型卡片

Gemini Robotics ER 2 Streaming 预览版

属性 说明
模型代码 gemini-robotics-er-2-streaming-preview
支持的数据类型

输入源

文本、图片、视频、音频

输出

文本

Token 限制[*]

输入 token 限制

131,072

输出 token 限制

65536

功能

音频生成

不受支持

缓存

不受支持

代码执行

不受支持

Computer Use

不受支持

文件搜索

不受支持

函数调用

支持

Grounding with Google Maps

不受支持

图片生成

不受支持

Live API

支持

利用 Google 搜索建立回答依据

支持

结构化输出

不受支持

思考

支持

网址上下文

不受支持

使用选项

Batch API

不受支持

Flex 推理

不受支持

优先级推断

不受支持

个版本
如需了解详情,请参阅模型版本模式。
  • 预览:gemini-robotics-er-2-streaming-preview
最后更新时间 2026 年 7 月
模型卡片 模型卡片

Gemini Robotics ER 1.6 预览版

属性 说明
模型代码 gemini-robotics-er-1.6-preview
支持的数据类型

输入源

文本、图片、视频、音频

输出

文本

Token 限制[*]

输入 token 限制

131,072

输出 token 限制

65536

功能

音频生成

不受支持

缓存

支持

代码执行

支持

Computer Use

支持

文件搜索

支持

函数调用

支持

Grounding with Google Maps

支持

图片生成

不受支持

Live API

不受支持

利用 Google 搜索建立回答依据

支持

结构化输出

支持

思考

支持

网址上下文

支持

使用选项

Batch API

支持

Flex 推理

不受支持

优先级推断

不受支持

个版本
如需了解详情,请参阅模型版本模式。
  • 关闭:gemini-robotics-er-1.6-preview
最后更新时间 2025 年 12 月
知识截点 2025 年 1 月

后续步骤