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

# Overview

> Using ComfyUI as a Developer

ComfyUI is a modular GenAI inference engine that can be run as a server, accessed via API, extended with custom nodes, and managed from the command line. Most API work follows two steps: get ComfyUI running somewhere, then run workflows against it from your application.

## Quick Start

The fastest way to try the API is to run a workflow against Comfy Cloud. There is nothing to deploy: the SDKs point at Comfy Cloud by default, so all you need is a workflow and an [API key](/development/api-development/getting-an-api-key).

<Steps>
  <Step title="Get a workflow">
    Browse [ComfyUI Workflows](https://comfy.org/workflows) for community workflows, or build your own in the editor. Save it in [API format](/development/api-development/workflow-api-format) as `workflow_api.json`.
  </Step>

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

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

  <Step title="Run it">
    <CodeGroup>
      ```python Python theme={null}
      from comfy_sdk import Comfy

      client = Comfy(api_key="comfyui-...")  # Comfy Cloud is the default target

      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 is the default target

      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"` is the ID of the output node in your workflow file. See the [SDK guide](/development/api-development/sdks) for inputs, progress events, and error handling.
  </Step>

  <Step title="Deploy your own ComfyUI">
    When you need your own models and custom nodes behind the endpoint, deploy your environment with the [Serverless API](/development/serverless/overview). The same SDK code works against it; only the base URL changes.
  </Step>
</Steps>

## Deploy ComfyUI

Learn how to deploy and scale ComfyUI, on the Developer Platform or your own infrastructure.

<Card title="Deployment Overview" icon="map" href="/development/deploy/overview">
  Compare Serverless API, Comfy Cloud, and self-hosting, and pick the right target.
</Card>

See also: [Serverless API](/development/serverless/overview) · [Comfy Cloud](/development/deploy/cloud) · [Self-Hosting Options](/development/deploy/self-hosting)

## Run Workflows

Learn how to run workflows using our SDKs and the v2 HTTP API. They work against our serverless API endpoints and your own ComfyUI instance.

<Card title="Running Workflows" icon="play" href="/development/run-workflows/overview">
  See which client works with which deployment, starting with the Python and TypeScript SDKs.
</Card>

See also: [Comfy SDKs](/development/api-development/sdks) · [API Proxy for Self-Hosted](/development/comfyui-server/api-proxy) · [Comfy API v2 Reference](/api-reference/v2/overview)

## Agent Tools / MCP

Connect AI agents to ComfyUI via the Model Context Protocol (MCP). Start with the hosted Cloud MCP, or use Local MCP and Comfy CLI for other setups.

<Card title="MCP Overview" icon="robot" href="/agent-tools">
  Compare Cloud MCP, Local MCP, and Comfy CLI, and find the right setup for your AI agent integration.
</Card>

See also: [Comfy MCP](/agent-tools/mcp) for cloud and local connections

## More

<CardGroup cols={2}>
  <Card title="Self-Hosted Server API" icon="server" href="/development/comfyui-server/comms_overview">
    The raw REST and WebSocket API of the ComfyUI server: routes, messages, and startup flags.
  </Card>

  <Card title="Comfy CLI" icon="terminal" href="/comfy-cli/getting-started">
    Install, update, and manage ComfyUI from the terminal.
  </Card>

  <Card title="Custom Nodes" icon="puzzle-piece" href="/custom-nodes/overview">
    Extend ComfyUI with Python backends and JavaScript UI extensions.
  </Card>

  <Card title="Registry" icon="box-open" href="/registry/overview">
    Package and publish custom nodes through the Comfy Registry.
  </Card>
</CardGroup>
