---
title: 透過 RunAPI 在 WorkBuddy 使用 Flux Kontext — MCP 指南 | RunAPI
description: 透過 RunAPI 使用 MCP，在 WorkBuddy 中以 Flux Kontext 生成及編輯圖片。一組 API key、文字引導編輯，以及來自工作台的角色一致性。
url: https://runapi.ai/zh-TW/workbuddy-flux-kontext.md
canonical: https://runapi.ai/zh-TW/workbuddy-flux-kontext
locale: zh-TW
site: RunAPI
image: https://runapi.ai/assets/opengraph-bfaaa0f0.png
alternates:
  en: https://runapi.ai/workbuddy-flux-kontext
  zh-CN: https://runapi.ai/zh-CN/workbuddy-flux-kontext
  es: https://runapi.ai/es/workbuddy-flux-kontext
  ja: https://runapi.ai/ja/workbuddy-flux-kontext
  de: https://runapi.ai/de/workbuddy-flux-kontext
  fr: https://runapi.ai/fr/workbuddy-flux-kontext
  pt-BR: https://runapi.ai/pt-BR/workbuddy-flux-kontext
  ko: https://runapi.ai/ko/workbuddy-flux-kontext
  it: https://runapi.ai/it/workbuddy-flux-kontext
  nl: https://runapi.ai/nl/workbuddy-flux-kontext
  pl: https://runapi.ai/pl/workbuddy-flux-kontext
  tr: https://runapi.ai/tr/workbuddy-flux-kontext
  zh-TW: https://runapi.ai/zh-TW/workbuddy-flux-kontext
  zh-HK: https://runapi.ai/zh-HK/workbuddy-flux-kontext
  ar: https://runapi.ai/ar/workbuddy-flux-kontext
  x-default: https://runapi.ai/workbuddy-flux-kontext
model: flux-kontext
---

> HTML version: https://runapi.ai/zh-TW/workbuddy-flux-kontext
> Site index for agents: https://runapi.ai/llms.txt


# 在 WorkBuddy 使用 Flux Kontext。

Black Forest Labs 的 Flux Kontext 可處理文字引導的圖片編輯與生成，並維持角色一致性。WorkBuddy 透過 RunAPI MCP server 呼叫它 — 在提示中描述圖片或編輯內容，工作台 agent 即會傳回完成的圖片 URL。

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

一組 API key · MCP 一鍵連線 · 由 server 處理非同步作業

### 提示詞

```text
Use the runapi MCP server to generate an image with Flux Kontext Pro.

Requirements:
- Call the RunAPI text_to_image tool with model "flux-kontext-pro"
- Prompt: a matte-black water bottle on a beige stone surface, soft side light, studio photography
- Wait for the task to complete and show me the image URL

```

### MCP 設定

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

```

### 回應

```json
{
  "task_id": "tsk_abc123",
  "status": "completed",
  "model": "flux-kontext-pro",
  "output": {
    "image_url": "https://media.runapi.ai/outputs/tsk_abc123.png"
  }
}

```

## 在 WorkBuddy 使用 Flux Kontext 的三個步驟

1. **新增 RunAPI MCP server** - 在 WorkBuddy 中註冊名為 runapi 的 MCP server，透過 streamable HTTP 指向 https://runapi.ai/mcp，並讓 Authorization header 從 RUNAPI_API_KEY 讀取您的 key。若您已為聊天連接 RunAPI，Flux Kontext 會在同一台 server 上提供 — 無需額外設定。 `url: https://runapi.ai/mcp
auth: Bearer ${RUNAPI_API_KEY}
`
2. **提示工作台 agent** - 要求 WorkBuddy 呼叫 RunAPI text_to_image 工具，並將 model 設為 flux-kontext-pro。描述您想要的圖片，或傳入 image_url 加上編輯指示以進行情境內編輯。 `tool: text_to_image · model: flux-kontext-pro`
3. **取得結果** - MCP server 會建立任務、追蹤至完成，並將完成的圖片 URL 傳回 WorkBuddy。agent 會在對話中顯示 URL — 您無需手動輪詢。 `task_id: tsk_abc123 → completed`

## Flux Kontext 工具參數

| 參數 | 類型 | 說明 |
| --- | --- | --- |
| `model` | `string` | 必填。flux-kontext-pro 或 flux-kontext-max。 |
| `prompt` | `string` | 生成或編輯的文字指令。 |
| `image_url` | `string` | 情境內編輯的來源圖片 URL。 |
| `aspect_ratio` | `string` | 選填。輸出長寬比。 |

## WorkBuddy 上的 Flux Kontext 是什麼？

Black Forest Labs 的 Flux Kontext 是連續式圖片編輯模型，使用者表示它在精準修改方面「比 ChatGPT 和 Gemini 更好」。您只要以自然語言描述要變更的內容，它就會修改該部分並保持其餘內容完整 — 更換服裝時臉部維持相同，更換背景時產品位置不變。WorkBuddy 可將它作為 RunAPI MCP server 上的工具使用，因此編輯可直接在工作台內完成。

## Flux Kontext 使用情境

- **替換背景同時保留主體** - 更換產品或人像背景，同時讓主體維持完全相同的位置 — 無需遮罩、無需局部重繪，只要在 WorkBuddy 輸入文字指示。
- **服裝與外觀變更** - 在保留角色臉部特徵的前提下更換服裝、髮色或配件，適用於時尚樣板製作與角色設計迭代。
- **替換招牌與標籤上的文字** - 替換現有圖片中招牌、產品標籤或店面的文字 — 在提示中輸入新文字，Flux Kontext 會直接在原位置呈現。

## Flux Kontext + WorkBuddy 問題

### 我可以在 WorkBuddy 中使用 Flux Kontext 嗎？

可以。在 WorkBuddy 中將 RunAPI 新增為 MCP server，接著要求 agent 呼叫 text_to_image 工具，並將 model 設為 flux-kontext-pro。您用於聊天的同一組 RUNAPI_API_KEY 也可處理圖片生成。

### 使用 Flux Kontext 需要單獨的 API 金鑰嗎？

不需要。同一組 RUNAPI_API_KEY 適用於所有 RunAPI 模型 — LLM、圖片、影片及音樂。一個 MCP server、一組 key、一個計費帳戶。

### 在 WorkBuddy 中由誰處理非同步任務輪詢？

由 RunAPI MCP server 處理。Flux Kontext 任務為非同步，但 server 會追蹤每個任務直到完成，並將完成的圖片 URL 傳回 WorkBuddy，因此您永遠不必手動輪詢。

### Flux Kontext 如何計費？

Flux Kontext Pro 每張圖片最低 5 美分。Flux Kontext Max 為了更高保真度而價格較高。請查看 RunAPI 定價頁面以取得目前費率 — 採用隨用隨付計費，無需訂閱。

### Flux Kontext 可以直接編輯圖片中的文字嗎？

可以。將原始圖片作為 image_url 傳入，並在提示中輸入類似「將招牌文字改為 OPEN」的內容。模型會以與原始文字相同的位置和風格呈現新文字，很適合用於標籤和店面 mockup。


- [WorkBuddy 設定指南 →](https://runapi.ai/zh-TW/workbuddy.md) - 尚未連線嗎？請先參閱 WorkBuddy 的 RunAPI MCP 設定指南。
- [Flux Kontext 模型 →](https://runapi.ai/zh-TW/models/flux-kontext.md) - 查看所有 Flux Kontext 版本、定價及 API 文件。

## 立即在 WorkBuddy 試用 Flux Kontext。

取得免費 RunAPI key，將 MCP server 新增至 WorkBuddy，並開始使用 Flux Kontext 生成及編輯圖片。

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

---

## More from RunAPI

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

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-TW",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/zh-TW/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-TW",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/zh-TWicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "SoftwareApplication",
    "name": "適用於 WorkBuddy 的 RunAPI Flux Kontext",
    "applicationCategory": "DeveloperApplication",
    "description": "透過 RunAPI 使用 MCP，在 WorkBuddy 中以 Flux Kontext 生成及編輯圖片。一組 API key、文字引導編輯，以及來自工作台的角色一致性。",
    "url": "https://runapi.ai/zh-TW/workbuddy-flux-kontext"
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "我可以在 WorkBuddy 中使用 Flux Kontext 嗎？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "可以。在 WorkBuddy 中將 RunAPI 新增為 MCP server，接著要求 agent 呼叫 text_to_image 工具，並將 model 設為 flux-kontext-pro。您用於聊天的同一組 RUNAPI_API_KEY 也可處理圖片生成。"
        }
      },
      {
        "@type": "Question",
        "name": "使用 Flux Kontext 需要單獨的 API 金鑰嗎？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "不需要。同一組 RUNAPI_API_KEY 適用於所有 RunAPI 模型 — LLM、圖片、影片及音樂。一個 MCP server、一組 key、一個計費帳戶。"
        }
      },
      {
        "@type": "Question",
        "name": "在 WorkBuddy 中由誰處理非同步任務輪詢？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "由 RunAPI MCP server 處理。Flux Kontext 任務為非同步，但 server 會追蹤每個任務直到完成，並將完成的圖片 URL 傳回 WorkBuddy，因此您永遠不必手動輪詢。"
        }
      },
      {
        "@type": "Question",
        "name": "Flux Kontext 如何計費？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Flux Kontext Pro 每張圖片最低 5 美分。Flux Kontext Max 為了更高保真度而價格較高。請查看 RunAPI 定價頁面以取得目前費率 — 採用隨用隨付計費，無需訂閱。"
        }
      },
      {
        "@type": "Question",
        "name": "Flux Kontext 可以直接編輯圖片中的文字嗎？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "可以。將原始圖片作為 image_url 傳入，並在提示中輸入類似「將招牌文字改為 OPEN」的內容。模型會以與原始文字相同的位置和風格呈現新文字，很適合用於標籤和店面 mockup。"
        }
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "HowTo",
    "name": "如何透過 RunAPI 在 WorkBuddy 使用 Flux Kontext",
    "description": "在 WorkBuddy 中將 RunAPI 新增為 MCP server，提示工作台 agent 呼叫 Flux Kontext text_to_image 工具，並取得生成的圖片 URL。",
    "step": [
      {
        "@type": "HowToStep",
        "position": 1,
        "name": "新增 RunAPI MCP server",
        "text": "在 WorkBuddy 中註冊名為 runapi 的 MCP server，透過 streamable HTTP 指向 https://runapi.ai/mcp，並讓 Authorization header 從 RUNAPI_API_KEY 讀取您的 key。若您已為聊天連接 RunAPI，Flux Kontext 會在同一台 server 上提供 — 無需額外設定。",
        "url": "https://runapi.ai/zh-TW/workbuddy-flux-kontext#how-step-1"
      },
      {
        "@type": "HowToStep",
        "position": 2,
        "name": "提示工作台 agent",
        "text": "要求 WorkBuddy 呼叫 RunAPI text_to_image 工具，並將 model 設為 flux-kontext-pro。描述您想要的圖片，或傳入 image_url 加上編輯指示以進行情境內編輯。",
        "url": "https://runapi.ai/zh-TW/workbuddy-flux-kontext#how-step-2"
      },
      {
        "@type": "HowToStep",
        "position": 3,
        "name": "取得結果",
        "text": "MCP server 會建立任務、追蹤至完成，並將完成的圖片 URL 傳回 WorkBuddy。agent 會在對話中顯示 URL — 您無需手動輪詢。",
        "url": "https://runapi.ai/zh-TW/workbuddy-flux-kontext#how-step-3"
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "首頁",
        "item": "https://runapi.ai/zh-TW"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "適用於 WorkBuddy 的 RunAPI Flux Kontext",
        "item": "https://runapi.ai/zh-TW/workbuddy-flux-kontext"
      }
    ]
  }
]
```
