> ## 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.

# Kling テキストから動画へ (カメラ制御) - ComfyUI 組み込みノード

> カメラ制御機能を備えた Kling テキストから動画への生成ノード

<img src="https://mintcdn.com/dripart/5003JSxULDwNImme/images/built-in-nodes/api_nodes/kwai_vgi/kling-camera-control-t2v.jpg?fit=max&auto=format&n=5003JSxULDwNImme&q=85&s=6ed35f4f4394e141a9405d2f1cefb22c" alt="ComfyUI 組み込み Kling テキストから動画へ (カメラ制御) ノード" width="1731" height="1301" data-path="images/built-in-nodes/api_nodes/kwai_vgi/kling-camera-control-t2v.jpg" />

Kling テキストから動画へ (カメラ制御) ノードは、プロフェッショナルなカメラ動作を伴う動画をテキストから生成します。本ノードは標準の Kling テキストから動画へノードを拡張したものであり、カメラ制御機能を追加しています。

## パラメータ

### 基本パラメータ

| パラメータ            | 型               | デフォルト値 | 説明                        |
| ---------------- | --------------- | ------ | ------------------------- |
| prompt           | 文字列             | ""     | 動画の内容を記述するテキストプロンプト       |
| negative\_prompt | 文字列             | ""     | 動画に含めたくない要素               |
| cfg\_scale       | 浮動小数点数          | 7.0    | プロンプトへの従い具合を制御する値         |
| aspect\_ratio    | 選択項目            | "16:9" | 出力動画のアスペクト比               |
| camera\_control  | CAMERA\_CONTROL | -      | Kling カメラ制御ノードから取得したカメラ設定 |

### 固定パラメータ

※以下のパラメータは固定されており、変更できません：

* モデル：kling-v1-5
* モード：pro
* 再生時間：5秒

### 出力

| 出力    | 型  | 説明      |
| ----- | -- | ------- |
| VIDEO | 動画 | 生成された動画 |

## ソースコード

\[ノードソースコード（2025-05-03 更新）]

```python theme={null}

class KlingCameraControlT2VNode(KlingTextToVideoNode):
    """
    Kling Text to Video Camera Control Node. This node is a text to video node, but it supports controlling the camera.
    Duration, mode, and model_name request fields are hard-coded because camera control is only supported in pro mode with the kling-v1-5 model at 5s duration as of 2025-05-02.
    """

    @classmethod
    def INPUT_TYPES(s):
        return {
            "required": {
                "prompt": model_field_to_node_input(
                    IO.STRING, KlingText2VideoRequest, "prompt", multiline=True
                ),
                "negative_prompt": model_field_to_node_input(
                    IO.STRING,
                    KlingText2VideoRequest,
                    "negative_prompt",
                    multiline=True,
                ),
                "cfg_scale": model_field_to_node_input(
                    IO.FLOAT, KlingText2VideoRequest, "cfg_scale"
                ),
                "aspect_ratio": model_field_to_node_input(
                    IO.COMBO,
                    KlingText2VideoRequest,
                    "aspect_ratio",
                    enum_type=AspectRatio,
                ),
                "camera_control": (
                    "CAMERA_CONTROL",
                    {
                        "tooltip": "Can be created using the Kling Camera Controls node. Controls the camera movement and motion during the video generation.",
                    },
                ),
            },
            "hidden": {"auth_token": "AUTH_TOKEN_COMFY_ORG"},
        }

    DESCRIPTION = "実世界の映像撮影技術を模倣したプロフェッショナルなカメラ動作を用いて、テキストを映画的な動画に変換します。ズーム、回転、パン、チルト、ファーストパーソンビューなどの仮想カメラ操作を制御しながら、元のテキスト内容への焦点を維持します。"

    def api_call(
        self,
        prompt: str,
        negative_prompt: str,
        cfg_scale: float,
        aspect_ratio: str,
        camera_control: Optional[CameraControl] = None,
        auth_token: Optional[str] = None,
    ):
        return super().api_call(
            model_name="kling-v1-5",
            cfg_scale=cfg_scale,
            mode="pro",
            aspect_ratio=aspect_ratio,
            duration="5",
            prompt=prompt,
            negative_prompt=negative_prompt,
            camera_control=camera_control,
            auth_token=auth_token,
        )
```
