> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 将 Activepieces 连接到 CometAPI

> 使用本指南，通过设置 base URL、API key 以及 model 或 provider 选项，将 Activepieces 连接到 CometAPI。

[Activepieces](https://cloud.activepieces.com/) 是一个开源自动化平台。借助内置的 CometAPI 连接器，你可以在几秒钟内为任意工作流添加 AI 步骤。

## 前提条件

* 一个 [Activepieces](https://cloud.activepieces.com/) 账户
* 一个拥有可用 API key 的 [CometAPI](https://www.cometapi.com) 账户

## 设置

<Steps>
  <Step title="获取你的 CometAPI API key">
    登录 [CometAPI 控制台](https://www.cometapi.com/console)。点击 **Add API Key** 并复制你的密钥。

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/overview/810968_364191.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=aef81a83f29f8eb16655ed4060425f50" alt="CometAPI 控制台 — Add API Key 按钮" width="3824" height="1892" data-path="images/overview/810968_364191.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/HhtmQffktazbxUvS/images/overview/810968_364193.png?fit=max&auto=format&n=HhtmQffktazbxUvS&q=85&s=d893f659267150d0faf45f99eb5dffc1" alt="CometAPI API key 详情和 base URL" width="2434" height="1232" data-path="images/overview/810968_364193.png" />
    </Frame>
  </Step>

  <Step title="创建一个 flow 并添加 CometAPI 步骤">
    在你的 Activepieces 项目中，点击 **Create Flow** → **From Scratch**。点击画布上的 **+** 按钮，搜索 `cometapi`，然后选择 **Ask CometAPI**。

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/integrations/810968_361326.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=20fd998714bb23dc7c28dbad4315c152" alt="带有用于添加步骤的 + 按钮的 Activepieces 画布" width="1920" height="956" data-path="images/integrations/810968_361326.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/integrations/810968_361327.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=084735cca2fbbb0b5e49672c029ff34c" alt="显示 CometAPI 连接器的搜索结果" width="1920" height="974" data-path="images/integrations/810968_361327.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/integrations/810968_361328.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=a68000d40dcdfdd14af3a0954ab0c34b" alt="在连接器列表中选中的 Ask CometAPI 步骤" width="1920" height="909" data-path="images/integrations/810968_361328.png" />
    </Frame>
  </Step>

  <Step title="配置 CometAPI 步骤">
    将你的 API key 粘贴到 **API Key** 字段中。选择你想使用的当前模型，并填写你的 prompt。

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/integrations/810968_361329.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=b3ea4a155f705dfb8cd0956a3cfc7fc8" alt="CometAPI 步骤 — API key 和模型选择" width="1900" height="915" data-path="images/integrations/810968_361329.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/integrations/810968_361330.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=344e62888e22f3ef1d34109e95ee8baf" alt="Ask CometAPI 步骤的 prompt 配置" width="1920" height="925" data-path="images/integrations/810968_361330.png" />
    </Frame>
  </Step>

  <Step title="测试 flow">
    点击 **Test** 运行该步骤。成功的响应表明集成工作正常。

    <Frame>
      <img src="https://mintcdn.com/cometapi/SZhlxZhCnMLn__BW/images/integrations/810968_361331.png?fit=max&auto=format&n=SZhlxZhCnMLn__BW&q=85&s=92fd6c62bcf33f681b053668a9ac6687" alt="来自 CometAPI 步骤的成功测试响应" width="1874" height="939" data-path="images/integrations/810968_361331.png" />
    </Frame>
  </Step>
</Steps>

<Note>
  如果测试失败，请检查你的 API key 是否正确，以及你的账户是否有可用余额。如果问题仍然存在，请联系 [CometAPI 支持](https://www.cometapi.com)。
</Note>

<script type="application/ld+json">
  {`
    {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "HowTo",
        "@id": "https://apidoc.cometapi.com/integrations/activepieces#howto",
        "name": "将 Activepieces 连接到 CometAPI",
        "description": "使用本指南，通过设置 base URL、API key 以及模型或 provider 选项，将 Activepieces 连接到 CometAPI。",
        "step": [
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/activepieces#step-1",
            "position": 1,
            "name": "获取你的 CometAPI API key",
            "text": "创建或打开你的 CometAPI 账户，然后从控制台复制一个有效的 API key。"
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/activepieces#step-2",
            "position": 2,
            "name": "创建一个 flow 并添加 CometAPI 步骤",
            "text": "完成“将 Activepieces 连接到 CometAPI”指南中的“创建一个 flow 并添加 CometAPI 步骤”这一步。"
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/activepieces#step-3",
            "position": 3,
            "name": "配置 CometAPI 步骤",
            "text": "完成“将 Activepieces 连接到 CometAPI”指南中的“配置 CometAPI 步骤”这一步。"
          },
          {
            "@type": "HowToStep",
            "@id": "https://apidoc.cometapi.com/integrations/activepieces#step-4",
            "position": 4,
            "name": "测试 flow",
            "text": "完成“将 Activepieces 连接到 CometAPI”指南中的“测试 flow”这一步。"
          }
        ]
      },
      {
        "@type": "BreadcrumbList",
        "itemListElement": [
          {
            "@type": "ListItem",
            "position": 1,
            "name": "CometAPI 文档",
            "item": "https://apidoc.cometapi.com/"
          },
          {
            "@type": "ListItem",
            "position": 2,
            "name": "集成",
            "item": "https://apidoc.cometapi.com/integrations"
          },
          {
            "@type": "ListItem",
            "position": 3,
            "name": "将 Activepieces 连接到 CometAPI",
            "item": "https://apidoc.cometapi.com/integrations/activepieces"
          }
        ]
      }
    ]
    }
    `}
</script>
