> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-claude-comfy-concurrency-limits-page-s84u33.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Comfy API クイックスタート

> AIコーディングエージェントとcomfy-cliを使って、ローカルのComfyUI環境をビルドしてリリースし、マネージドエンドポイントとしてデプロイします。

## エージェントから始める（推奨）

デプロイしたいローカルComfyUIインストールのフォルダーでコーディングエージェントを起動します。次のプロンプトを貼り付けてください:

```text theme={null}
Install or update comfy-cli, then read its Build and Deploy skills:

pip install -U comfy-cli
comfy skills show comfy-build
comfy skills show comfy-deploy

Use comfy-build to inspect this local ComfyUI install and package its models, custom nodes, and pinned dependencies into a Comfy API Build. Show me what will be included and create a Linux/NVIDIA release. Then use comfy-deploy to show the available GPU and region options, worker bounds, and current rates. Wait for my approval before creating a deployment. After approval, deploy it and explain how to run a workflow.
```

## クイックスタート

ローカルインストールと、`workflow_api.json` として保存された[APIフォーマットのワークフロー](/ja/development/api-development/workflow-api-format)が準備できている場合は、次のコマンドを使用します。

<Steps>
  <Step title="初期化">
    ```bash theme={null}
    comfy build init --name "my-comfy-build" --models-dir ./models --custom-nodes-dir ./custom_nodes
    ```
  </Step>

  <Step title="プッシュしてリリースを作成">
    Buildとそのアセットをプッシュし、利用可能なターゲットを確認してから、Linux/NVIDIAリリースが完了するのを待ちます:

    ```bash theme={null}
    comfy build push
    comfy build refs build-targets
    comfy build release create --target linux/nvidia --watch
    ```
  </Step>

  <Step title="デプロイを開始">
    カタログで利用可能なGPUとリージョンの組み合わせを確認し、GPU、リージョン、ワーカー上限のプレースホルダーを自分の設定に置き換えます:

    ```bash theme={null}
    comfy deploy refs compute
    comfy deploy up --gpu <gpu> --region <region> --min <min-workers> --max <max-workers> --watch
    ```
  </Step>

  <Step title="ワークフローを実行">
    `comfy deploy up` が出力したデプロイIDを `--deployment` に指定して使用します:

    ```bash theme={null}
    comfy deploy run \
      --workflow workflow_api.json \
      --deployment <deployment-id> \
      --output-dir ./results
    ```
  </Step>
</Steps>

## その他の開始方法

環境またはワークフローがすでにComfyデスクトップやワークフローファイルに存在する場合は、こちらを使用します。

<CardGroup cols={2}>
  <Card title="Comfyデスクトップのスナップショット" icon="camera" href="/ja/development/serverless/build-sources#comfy-desktop-スナップショット">
    デスクトップからスナップショットをエクスポートし、Buildウィザードにインポートします。
  </Card>

  <Card title="ワークフローJSONのインポート" icon="file-import" href="/ja/development/serverless/build-sources#ワークフロー-json">
    保存済みのワークフローをBuildウィザードにインポートしてBuildを開始します。
  </Card>
</CardGroup>

## 次のステップ

<CardGroup cols={2}>
  <Card title="Comfy ワークフロー" icon="magnifying-glass" href="https://comfy.org/models?type=workflows">
    コミュニティが共有するComfyUIワークフローを閲覧できます。
  </Card>

  <Card title="アプリ" icon="grid-2" href="https://comfy.org/models?type=apps">
    ComfyUIで作られたコミュニティアプリを探索できます。
  </Card>
</CardGroup>


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