> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-claude-comfy-concurrency-limits-page-s84u33.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Comfy Cloud 快速开始

> 使用付费订阅、API 密钥和 Comfy SDK 在 Comfy Cloud 上运行 API 格式的工作流。

Comfy Cloud 是一个完全托管、始终可用的 ComfyUI 环境。你可以在浏览器中构建工作流，也可以通过 SDK 运行工作流。无需创建 Build 或部署。

<Note>
  初次使用 Comfy Cloud？请先阅读 [Comfy Cloud 简介](/zh/get_started/cloud)。本快速开始介绍如何从应用中运行工作流。
</Note>

## 快速开始

需要付费订阅、一个 [API 密钥](/zh/development/api-development/getting-an-api-key) 以及一个 API 格式的工作流。[Comfy SDK](/zh/development/api-development/sdks) 默认面向 Cloud。

<Steps>
  <Step title="创建 API 密钥">
    在 [platform.comfy.org](https://platform.comfy.org) 创建 API 密钥。详情请参阅 [获取 API 密钥](/zh/development/api-development/getting-an-api-key)。
  </Step>

  <Step title="安装 SDK">
    <CodeGroup>
      ```bash Python theme={null}
      pip install comfy-sdk
      ```

      ```bash TypeScript theme={null}
      npm i @comfyorg/sdk
      ```
    </CodeGroup>
  </Step>

  <Step title="以 API 格式导出工作流">
    在 Cloud 编辑器中，使用 `File → Export Workflow (API)` 将测试好的工作流保存为 `workflow_api.json`。请参阅 [工作流 API 格式](/zh/development/api-development/workflow-api-format)。
  </Step>

  <Step title="运行它">
    <CodeGroup>
      ```python Python theme={null}
      from comfy_sdk import Comfy

      client = Comfy(api_key="comfyui-...")  # Comfy Cloud 是默认目标

      wf = client.workflows.from_file("workflow_api.json")

      job = client.run(wf)
      for output in job.get_outputs("9"):
          output.to_file(output.name)
      ```

      ```typescript TypeScript theme={null}
      import { Comfy } from "@comfyorg/sdk";

      const client = new Comfy({ apiKey: "comfyui-..." }); // Comfy Cloud 是默认目标

      const wf = await client.workflows.fromFile("workflow_api.json");

      const job = await client.run(wf);
      await job.getOutputs("9")[0].toFile("out.png");
      ```
    </CodeGroup>

    `"9"` 是输出节点的 ID。有关输入、进度和错误处理的信息，请参阅 [SDK 指南](/zh/development/api-development/sdks)。
  </Step>
</Steps>

同一段 SDK 代码也可以面向 [Comfy API 部署](/zh/development/serverless/quickstart) 和 [自托管 ComfyUI](/zh/development/deploy/self-hosting)。请参阅 [运行工作流](/zh/development/run-workflows/overview)。

## 后续步骤

<Card title="用量与限制" icon="gauge" href="/zh/development/deploy/cloud-usage">
  了解 Cloud 积分和并发任务的工作方式。
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.