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

# RunComfy APIs

> Choose the right RunComfy API for your use case: on-demand model inference, serverless ComfyUI workflows, serverless LoRA deployments, or AI Toolkit LoRA training.

RunComfy provides **four API products**, an **MCP server** for AI assistants, and a **CLI** for the terminal. The APIs share the same high-level flow (submit > get a `request_id` > fetch status/results), but they solve different problems.

<Columns cols={2}>
  <Card title="Serverless API (ComfyUI)" icon="server" href="/serverless/introduction">
    Deploy ComfyUI workflows as serverless endpoints.
  </Card>

  <Card title="Trainer API (LoRA)" icon="graduation-cap" href="/trainer-apis/introduction">
    Run AI Toolkit LoRA training jobs on GPUs — bring your dataset + YAML config.
  </Card>

  <Card title="Serverless API (LoRA)" icon="layers" href="/serverless-lora/introduction">
    Deploy LoRAs as serverless endpoints.
  </Card>

  <Card title="Model API" icon="sparkles" href="/model-apis/quickstart">
    Run hosted models on-demand with no deployment — pay per request.
  </Card>

  <Card title="MCP" icon="plug" href="/mcp/introduction">
    Connect AI assistants (Claude, Cursor, Windsurf) to your deployments via MCP.
  </Card>

  <Card title="CLI" icon="terminal" href="/cli/introduction">
    Run RunComfy models from your terminal or any AI agent. One command to submit, poll, and download.
  </Card>
</Columns>

***

## Which API should I use?

Use this as a quick decision guide:

| What you are trying to do                                                                                | Recommended API              | What you call with       | Deployment required? |
| -------------------------------------------------------------------------------------------------------- | ---------------------------- | ------------------------ | :------------------: |
| Train/fine‑tune an **AI Toolkit LoRA** (upload dataset, run training, download artifacts)                | **Trainer API**              | `dataset_id` + `job_id`  |          No          |
| Run a model from the RunComfy **Models catalog** (or a hosted pipeline)                                  | **Model API**                | `model_id`               |          No          |
| Run inference with a **LoRA** *without deploying anything*                                               | **Model API**                | `model_id` + LoRA inputs |          No          |
| Turn a **ComfyUI workflow** into a production endpoint (versions, autoscaling, webhooks, instance proxy) | **Serverless API (ComfyUI)** | `deployment_id`          |          Yes         |
| Serve a **LoRA** behind a dedicated, scalable endpoint                                                   | **Serverless API (LoRA)**    | `deployment_id`          |          Yes         |

**One important mental model:**\
Both **Serverless API (LoRA)** and **Serverless API (ComfyUI)** are built on the same serverless deployment system. The difference is *what you deploy* and therefore *what the request schema looks like*.

***

## Getting started

* **Model API**: start with **[Quickstart](/model-apis/quickstart)**, then see **[Async Queue Endpoints](/model-apis/async-queue-endpoints)**.
* **Serverless API (ComfyUI)**: start with **[Quickstart](/serverless/quickstart)**, then learn about **[Overrides and workflow files](/serverless/workflow-files)**.
* **Serverless API (LoRA)**: start with **[Choose a LoRA inference API](/serverless-lora/api-types)**, then follow the **[Quickstart](/serverless-lora/quickstart)**.
* **Trainer API**: start with **[Quickstart](/trainer-apis/quickstart)**, then see **[Async Queue Endpoints (Datasets)](/trainer-apis/async-queue-endpoints-datasets)** and **[Async Queue Endpoints (Training Jobs)](/trainer-apis/async-queue-endpoints-training-jobs)**.

***

## Common request pattern

Most RunComfy endpoints are **asynchronous**:

1. Submit a job (`POST …`) > get an ID (`request_id`, `job_id`, etc.)
2. Poll status (`GET …/status`) until it completes
3. Fetch outputs (`GET …/result`) or use **webhooks** for push-based updates

If you are deploying workflows (Serverless API), you can also manage the deployment lifecycle (create/update/delete) and interact with live instances through the **Instance Proxy**.
