Start here: the Comfy SDKs
For a new integration, use the official Comfy SDKs (Python and TypeScript) and the Comfy API v2 they call. The same code runs against every deployment target; only the base URL changes.Comfy SDKs
Install the SDK, submit a workflow, and download the outputs. Currently in beta.
什么和什么兼容
自托管实例也可以完全跳过 SDK,直接使用原生 ComfyUI 服务器 API(REST + WebSocket)。它暴露完整的本地接口,包括队列和节点信息,但不保证跨版本兼容。
应该使用哪个 API?
所有这些 API 都接受相同的工作流格式(API 格式),因此你可以在本地开发和测试工作流,并将其迁移到其他部署环境,无需任何更改。
入门
Comfy SDK
使用 Python 或 TypeScript 针对任何部署目标运行工作流。
自托管 API 代理
在你自己的 ComfyUI 前面提供 v2 API,以便 SDK 可以访问它。
工作流 API 格式
以 API 接受的 JSON 格式导出工作流。
ComfyUI 服务器 API
自托管实例的原始 REST 和 WebSocket API。