---
title: 透過 RunAPI 在 WorkBuddy 中使用 Gemini — MCP 指南 | RunAPI
description: 透過 RunAPI MCP 伺服器從 WorkBuddy 呼叫 Google Gemini。Gemini 3.5 Flash、3.x Pro、2.5 Pro——一個金鑰、一個 MCP 設定，無需 Google Cloud 項目。
url: https://runapi.ai/zh-HK/workbuddy-gemini.md
canonical: https://runapi.ai/zh-HK/workbuddy-gemini
locale: zh-HK
site: RunAPI
image: https://runapi.ai/assets/opengraph-bfaaa0f0.png
alternates:
  en: https://runapi.ai/workbuddy-gemini
  zh-CN: https://runapi.ai/zh-CN/workbuddy-gemini
  es: https://runapi.ai/es/workbuddy-gemini
  ja: https://runapi.ai/ja/workbuddy-gemini
  de: https://runapi.ai/de/workbuddy-gemini
  fr: https://runapi.ai/fr/workbuddy-gemini
  pt-BR: https://runapi.ai/pt-BR/workbuddy-gemini
  ko: https://runapi.ai/ko/workbuddy-gemini
  it: https://runapi.ai/it/workbuddy-gemini
  nl: https://runapi.ai/nl/workbuddy-gemini
  pl: https://runapi.ai/pl/workbuddy-gemini
  tr: https://runapi.ai/tr/workbuddy-gemini
  zh-TW: https://runapi.ai/zh-TW/workbuddy-gemini
  zh-HK: https://runapi.ai/zh-HK/workbuddy-gemini
  ar: https://runapi.ai/ar/workbuddy-gemini
  x-default: https://runapi.ai/workbuddy-gemini
model: gemini
---

> HTML version: https://runapi.ai/zh-HK/workbuddy-gemini
> Site index for agents: https://runapi.ai/llms.txt


# 在 WorkBuddy 中使用 Gemini。

Google Gemini 可透過 RunAPI 使用——Gemini 3.5 Flash 提供低於 100ms 的首 token 延遲，3.x Pro 用於複雜推理，2.5 Pro 則面向生產環境並具備 1M token 上下文視窗。WorkBuddy 原生支援 MCP，因此驅動 GPT 的同一個 runapi MCP 伺服器和 RUNAPI_API_KEY 也可呼叫 Gemini，無需 Google Cloud 項目、服務帳號或 Vertex AI 設定。

- [取得 API Key](https://runapi.ai/zh-HK/login)
- [閱讀文件](https://runapi.ai/zh-HK/docs/guides)

一個 RunAPI 金鑰 · MCP 一鍵連接 · 無需 Google Cloud 項目

### 提示詞

```text
Use the runapi MCP server to send a chat request to Gemini.

Requirements:
- Call the RunAPI chat tool exposed by the runapi MCP server
- Set model to "gemini-3.5-flash"
- Ask: "Explain the difference between gRPC and REST in three sentences."
- Set temperature to 0.7 and max_tokens to 256
- Show me the assistant reply and the token usage counts

```

### MCP 設定

```bash
{
  "mcpServers": {
    "runapi": {
      "url": "https://runapi.ai/mcp",
      "transport": "streamable_http",
      "headers": {
        "Authorization": "Bearer $RUNAPI_API_KEY"
      }
    }
  }
}

```

### 回應

```json
{
  "model": "gemini-3.5-flash",
  "content": "gRPC uses HTTP/2 and Protocol Buffers for strongly-typed, multiplexed RPC calls with built-in code generation. REST uses JSON payloads and relies on URL paths and HTTP verbs for resource semantics. gRPC is faster for service-to-service calls; REST is simpler to debug and more widely supported by browsers.",
  "finish_reason": "stop",
  "usage": {
    "prompt_tokens": 34,
    "completion_tokens": 71,
    "total_tokens": 105
  }
}

```

## 三個步驟在 WorkBuddy 中使用 Gemini

1. **註冊 RunAPI MCP server** - 在啟動 WorkBuddy 的環境中設定 RUNAPI_API_KEY，然後新增一個名為 runapi 的 MCP 伺服器，透過 streamable HTTP 指向 https://runapi.ai/mcp。無需 Google Cloud 憑證或服務帳號 JSON——RunAPI 金鑰即是 Gemini 所需的一切。 `export RUNAPI_API_KEY=runapi_xxx
# MCP server: runapi → https://runapi.ai/mcp
`
2. **提示工作台代理** - 在 WorkBuddy 中輸入自然語言請求並指定模型——gemini-3.5-flash 追求速度，gemini-2.5-pro 用於長上下文推理。WorkBuddy 會填入 RunAPI 聊天工具的 model 和 messages 參數並發送呼叫。 `model: gemini-3.5-flash`
3. **讀取工具結果** - MCP 工具會同步返回回覆及 token 用量統計。在下一個提示中切換至 GPT 或 Claude 時無需更改設定——runapi 伺服器背後的每個模型共用相同的金鑰和工具結構。 `usage.total_tokens: 105`

## RunAPI MCP 伺服器上的 Gemini 工具參數

| 參數 | 類型 | 說明 |
| --- | --- | --- |
| `model` | `string` | 必填。gemini-3.5-flash、gemini-2.5-flash、gemini-2.5-pro、gemini-3-flash-preview 或 gemini-3.1-pro-preview。 |
| `messages` | `array` | 必填。訊息物件陣列，包含 role（system、user、assistant）及 content 欄位。WorkBuddy 會根據你的提示自動建構此陣列。 |
| `temperature` | `number` | 選填。採樣溫度，介於 0 至 2 之間。數值越低，輸出越確定。預設值因模型而異。 |
| `max_tokens` | `integer` | 選填。回應中生成的最大 token 數量。 |
| `top_p` | `number` | 選填。Nucleus 採樣閾值，介於 0 至 1 之間。可替代溫度參數控制輸出隨機性。 |
| `tools` | `array` | 可選。用於函數呼叫的工具定義。Gemini 會在助手訊息中返回 tool_calls，WorkBuddy 會像處理其他工具結果一樣處理它們。 |

## 什麼是 WorkBuddy 上的 Gemini？

Google Gemini 可透過 RunAPI 使用，無需 Google Cloud 項目、服務帳號或 Vertex AI 設定。WorkBuddy 透過與 GPT 和 Claude 相同的 runapi MCP 伺服器及 RUNAPI_API_KEY 存取 Gemini。Gemini 3.5 Flash 提供低於 100ms 的首 token 延遲，適合即時代理循環；Gemini 2.5 Pro 則以 1M token 上下文視窗和思考模式處理長上下文任務及複雜推理。

## Gemini 使用場景

- **從工作台進行多模態分析** - 連同文字提示一起發送圖片、PDF、音訊檔案或視頻幀，讓 Gemini 進行分析、描述或提取結構化數據——全部透過一個工具呼叫原生處理。
- **以 1M token 上下文進行長文件分析** - 將完整程式碼庫、法律文件集或學術論文集輸入 Gemini 2.5 Pro 的 1M token 上下文視窗，無需分塊或檢索管道即可進行分析與摘要。
- **以 Flash 實現實時 agent 循環** - 在速度敏感的工具呼叫鏈中使用 Gemini 3.5 Flash，這類場景中低於 100ms 的首 token 延遲比峰值推理質量更重要。每百萬 token 的費用在目錄中屬最低之列。

## Gemini + WorkBuddy 常見問題

### 我可以在沒有 Google Cloud 項目的情況下在 WorkBuddy 中使用 Google Gemini 嗎？

可以。RunAPI 透過其 MCP 伺服器提供 Gemini 存取。您只需一個 RUNAPI_API_KEY——無需 Google Cloud 項目、服務帳號 JSON 或 Vertex AI 計費設定。

### Gemini Flash 和 Pro 有什麼分別——各自應在何時使用？

Flash（gemini-3.5-flash）速度最快且費用最低——最適合即時代理循環、分類和工具呼叫鏈。Pro（gemini-2.5-pro）用於複雜推理、長上下文分析及準確性比速度更重要的多步驟任務。

### 透過 RunAPI 使用 Gemini 如何計費？

按 token 付費，無月費訂閱或最低消費要求。輸入和輸出 token 分開計量，Gemini Flash 費率是 RunAPI 目錄中最低之列。請查閱 RunAPI 定價頁面了解最新費率。

### 我可以在同一個 WorkBuddy 會話中切換 Gemini 和 GPT 嗎？

可以。兩者都透過相同的 runapi MCP 伺服器和 API 金鑰。在下一個提示中指定不同的模型——gemini-3.5-flash、gpt-5.5 或目錄中的其他模型——WorkBuddy 只會更改工具呼叫的 model 參數。

### 透過 RunAPI 使用的 Gemini 是否支援函數呼叫和工具使用？

支援。在請求中定義工具，Gemini 會在助手訊息中返回 tool_calls。WorkBuddy 處理這些工具呼叫的方式與處理 GPT 或 Claude 的工具呼叫相同。


- [WorkBuddy 設定指南 →](https://runapi.ai/zh-HK/workbuddy.md) - 尚未連接？請先參閱 WorkBuddy 的 RunAPI MCP 設定指南。
- [Gemini models →](https://runapi.ai/zh-HK/models/gemini.md) - 查看所有 Gemini 版本、定價方案及 API 文件。

## 立即在 WorkBuddy 中試用 Gemini。

免費獲取 RunAPI 金鑰，註冊 MCP 伺服器，即可開始與 Gemini 3.5 Flash 聊天——無需 Google Cloud 項目。

[瀏覽模型 →](https://runapi.ai/zh-HK/models.md)

---

## More from RunAPI

- [Home](https://runapi.ai/zh-HK/.md)
### 產品
- [模型目錄](https://runapi.ai/zh-HK/models.md)
- [收費](https://runapi.ai/zh-HK/pricing.md)
- [服務商](https://runapi.ai/zh-HK/models#all-models)
### 開發者
- [文件](https://runapi.ai/zh-HK/docs/guides)
- [SDK](https://runapi.ai/zh-HK/sdk.md)
- [CLI](https://runapi.ai/zh-HK/cli.md)
- [MCP Server](https://runapi.ai/zh-HK/mcp.md)
- [x402](https://runapi.ai/zh-HK/x402.md)
### 指南
- [Claude Code 與 Cursor](https://runapi.ai/zh-HK/claude-code-vs-cursor.md)
- [Cursor API 設定](https://runapi.ai/zh-HK/cursor-api-setup.md)
- [RunAPI 與 OpenRouter](https://runapi.ai/zh-HK/openrouter-alternative.md)
### 公司
- [企業版](https://runapi.ai/zh-HK/contact.md)
- [聯絡](https://runapi.ai/zh-HK/contact.md)
### 法律
- [條款](https://runapi.ai/zh-HK/terms.md)
- [私隱](https://runapi.ai/zh-HK/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-HK",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/zh-HK/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-HK",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/zh-HKicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "SoftwareApplication",
    "name": "適用於 WorkBuddy 的 RunAPI Gemini",
    "applicationCategory": "DeveloperApplication",
    "description": "透過 RunAPI MCP 伺服器從 WorkBuddy 呼叫 Google Gemini。Gemini 3.5 Flash、3.x Pro、2.5 Pro——一個金鑰、一個 MCP 設定，無需 Google Cloud 項目。",
    "url": "https://runapi.ai/zh-HK/workbuddy-gemini"
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "我可以在沒有 Google Cloud 項目的情況下在 WorkBuddy 中使用 Google Gemini 嗎？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "可以。RunAPI 透過其 MCP 伺服器提供 Gemini 存取。您只需一個 RUNAPI_API_KEY——無需 Google Cloud 項目、服務帳號 JSON 或 Vertex AI 計費設定。"
        }
      },
      {
        "@type": "Question",
        "name": "Gemini Flash 和 Pro 有什麼分別——各自應在何時使用？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Flash（gemini-3.5-flash）速度最快且費用最低——最適合即時代理循環、分類和工具呼叫鏈。Pro（gemini-2.5-pro）用於複雜推理、長上下文分析及準確性比速度更重要的多步驟任務。"
        }
      },
      {
        "@type": "Question",
        "name": "透過 RunAPI 使用 Gemini 如何計費？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "按 token 付費，無月費訂閱或最低消費要求。輸入和輸出 token 分開計量，Gemini Flash 費率是 RunAPI 目錄中最低之列。請查閱 RunAPI 定價頁面了解最新費率。"
        }
      },
      {
        "@type": "Question",
        "name": "我可以在同一個 WorkBuddy 會話中切換 Gemini 和 GPT 嗎？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "可以。兩者都透過相同的 runapi MCP 伺服器和 API 金鑰。在下一個提示中指定不同的模型——gemini-3.5-flash、gpt-5.5 或目錄中的其他模型——WorkBuddy 只會更改工具呼叫的 model 參數。"
        }
      },
      {
        "@type": "Question",
        "name": "透過 RunAPI 使用的 Gemini 是否支援函數呼叫和工具使用？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "支援。在請求中定義工具，Gemini 會在助手訊息中返回 tool_calls。WorkBuddy 處理這些工具呼叫的方式與處理 GPT 或 Claude 的工具呼叫相同。"
        }
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "HowTo",
    "name": "如何透過 RunAPI 在 WorkBuddy 中使用 Gemini",
    "description": "在 WorkBuddy 中將 RunAPI 註冊為 MCP 伺服器，提示工作台代理呼叫 Gemini 聊天工具，並讀取返回的回覆。",
    "step": [
      {
        "@type": "HowToStep",
        "position": 1,
        "name": "註冊 RunAPI MCP server",
        "text": "在啟動 WorkBuddy 的環境中設定 RUNAPI_API_KEY，然後新增一個名為 runapi 的 MCP 伺服器，透過 streamable HTTP 指向 https://runapi.ai/mcp。無需 Google Cloud 憑證或服務帳號 JSON——RunAPI 金鑰即是 Gemini 所需的一切。",
        "url": "https://runapi.ai/zh-HK/workbuddy-gemini#how-step-1"
      },
      {
        "@type": "HowToStep",
        "position": 2,
        "name": "提示工作台代理",
        "text": "在 WorkBuddy 中輸入自然語言請求並指定模型——gemini-3.5-flash 追求速度，gemini-2.5-pro 用於長上下文推理。WorkBuddy 會填入 RunAPI 聊天工具的 model 和 messages 參數並發送呼叫。",
        "url": "https://runapi.ai/zh-HK/workbuddy-gemini#how-step-2"
      },
      {
        "@type": "HowToStep",
        "position": 3,
        "name": "讀取工具結果",
        "text": "MCP 工具會同步返回回覆及 token 用量統計。在下一個提示中切換至 GPT 或 Claude 時無需更改設定——runapi 伺服器背後的每個模型共用相同的金鑰和工具結構。",
        "url": "https://runapi.ai/zh-HK/workbuddy-gemini#how-step-3"
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "主頁",
        "item": "https://runapi.ai/zh-HK"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "適用於 WorkBuddy 的 RunAPI Gemini",
        "item": "https://runapi.ai/zh-HK/workbuddy-gemini"
      }
    ]
  }
]
```
