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

# Running Workflows

> How to run ComfyUI workflows against a live deployment, and which client works with which deployment

Once ComfyUI is [deployed somewhere](/development/deploy/overview), your application runs workflows against it: submit a workflow, wait for execution, download the outputs. This page maps out which client to use for which deployment.

## Start here: the Comfy SDKs

For a new integration, use the official **Comfy SDKs** (Python and TypeScript) and the [Comfy API v2](/api-reference/v2/overview) they call. The same code runs against every deployment target; only the base URL changes.

<Card title="Comfy SDKs" icon="code" href="/development/api-development/sdks">
  Install the SDK, submit a workflow, and download the outputs. Currently in beta.
</Card>

## What works against what

| Deployment | Comfy SDKs / API v2 | Notes |
| - | - | - |
| **Comfy API deployment** | Yes | Point `COMFY_BASE_URL` at `https://<deployment>.run.comfy.app` with your API key |
| **Comfy Cloud** | Yes | The default base URL. Requires an API key and a paid subscription |
| **Self-hosted** | Yes, via the [API Proxy](/development/comfyui-server/api-proxy) | During the v2 beta, a small service alongside ComfyUI serves the v2 API |

Self-hosted instances can also skip the SDK entirely and use the raw [ComfyUI Server API](/development/comfyui-server/comms_overview) (REST + WebSocket). It exposes the full local surface, including the queue and node info, but has no compatibility guarantee across releases.

## Which API should I use?

| | Comfy API v2 + SDKs | v1 Cloud API | ComfyUI Server API |
| - | - | - | - |
| **Where it runs** | Comfy API deployments, Comfy Cloud, or self-hosted via the API Proxy | Comfy Cloud only | Self-hosted only |
| **Compatibility** | Versioned, additive changes only within v2 | Deprecated, may change without notice | No guarantee across releases |
| **Authentication** | `Authorization: Bearer` on Comfy Cloud and Comfy API deployments. Self-hosted: none by default, optional static bearer token | `X-API-Key` header (Comfy Cloud account) | None (local) or API key for Partner Nodes |
| **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 | Existing integrations and Cloud features v2 does not cover yet | Full control, custom tooling against your own instance |

All of them accept the same workflow format ([API format](/development/api-development/workflow-api-format)), so you can develop and test workflows locally and move them to another deployment 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 any deployment target.
  </Card>

  <Card title="API Proxy for Self-Hosted" icon="plug" href="/development/comfyui-server/api-proxy">
    Serve the v2 API in front of your own ComfyUI so the SDKs can reach it.
  </Card>

  <Card title="Workflow API Format" icon="file-code" href="/development/api-development/workflow-api-format">
    Export workflows in the JSON format the APIs accept.
  </Card>

  <Card title="ComfyUI Server API" icon="server" href="/development/comfyui-server/comms_overview">
    The raw REST and WebSocket API of a self-hosted instance.
  </Card>
</CardGroup>

## Prerequisites

* An [API key](/development/api-development/getting-an-api-key) for anything that touches Comfy Cloud, a Comfy API deployment, or Partner Nodes. A purely local ComfyUI does not need one.
* A workflow exported in [API format](/development/api-development/workflow-api-format).


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