> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-chore-sync-comfy-api-v2-spec-0ee014e.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# APIs Overview

> An overview of the different ways to interact with ComfyUI programmatically

ComfyUI offers several API options depending on where you want to run your workflows and how much infrastructure you want to manage. This page helps you choose the right approach.

***

## Start Here

For a new integration, use the **Comfy SDKs** and the Comfy API v2 they call. v2 is a new, versioned HTTP interface. It coexists with the existing Cloud API and ComfyUI Server API. See the [Comfy API v2 Overview](/api-reference/v2/overview). The same code runs against Comfy Cloud, a serverless deployment, and your own machine.

<Card title="Comfy SDKs" icon="code" href="/development/api-development/sdks">
  Official Python and TypeScript SDKs for running workflows from your own application. Currently in beta.
</Card>

The other APIs below are still fully supported, and they cover surface the SDKs do not reach yet. Nothing here is deprecated.

***

## Which API Should I Use?

|                      | Comfy API v2 + SDKs                                                                                                                                  | Cloud API                                        | ComfyUI Server API                                |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------- |
| **Where it runs**    | Comfy Cloud, a serverless deployment, or your own machine via a local proxy                                                                          | Comfy Cloud (managed GPUs)                       | Your own machine                                  |
| **Compatibility**    | Versioned, additive changes only within v2                                                                                                           | Experimental, may change without notice          | No guarantee across releases                      |
| **GPU management**   | Depends on which surface you point it at                                                                                                             | Handled for you                                  | You manage your own hardware                      |
| **Models**           | Depends on which surface you point it at                                                                                                             | Pre-installed and managed by Comfy               | You download and manage locally                   |
| **Authentication**   | `Authorization: Bearer` on Cloud. Self-hosted: none by default, optional static bearer token                                                         | `X-API-Key` header (Comfy Cloud account)         | None (local) or API key for Partner Nodes         |
| **Base URL**         | `https://cloud.comfy.org`, `https://<deployment>.run.comfy.app`, or `http://127.0.0.1:8189`, selected with the `COMFY_BASE_URL` environment variable | `https://cloud.comfy.org`                        | Your server URL (e.g. `http://localhost:8188`)    |
| **Official clients** | Python and TypeScript SDKs                                                                                                                           | None, call over HTTP                             | None, call over HTTP                              |
| **Protocol**         | REST + SSE                                                                                                                                           | REST + WebSocket                                 | REST + WebSocket                                  |
| **Scope**            | Run a workflow and get results                                                                                                                       | Full Cloud surface, including models and account | Full local surface, including queue and node info |
| **Best for**         | New integrations that should keep working                                                                                                            | Cloud features the SDKs do not cover yet         | Full control, custom hardware & models            |

All of them use the same workflow format ([API format](/development/api-development/workflow-api-format)), so you can develop and test workflows locally and move them to the cloud without changes.

***

## Getting Started

<CardGroup cols={2}>
  <Card title="Comfy SDKs" icon="code" href="/development/api-development/sdks">
    Run workflows from Python or TypeScript, against Cloud or your own machine.
  </Card>

  <Card title="Cloud API" icon="cloud" href="/development/cloud/overview">
    Run workflows on Comfy's managed infrastructure. No GPU setup required.
  </Card>

  <Card title="ComfyUI Server API" icon="server" href="/development/comfyui-server/comms_overview">
    Run ComfyUI as a server on your own machine and call it via API.
  </Card>

  <Card title="Partner Node API Integration" icon="key" href="/development/comfyui-server/api-key-integration">
    Use paid Partner Nodes in headless or API-driven workflows.
  </Card>
</CardGroup>

***

## Prerequisites

Before using any API, you'll need:

* An API key for anything that touches Comfy Cloud or Partner Nodes (see [Getting an API Key](/development/api-development/getting-an-api-key)). A purely local ComfyUI does not need one.
