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

# OpenAI DALL·E 3 — ComfyUI ネイティブノードドキュメント

> OpenAI の DALL·E 3 モデルを用いて高品質な画像を生成するノード

<img src="https://mintcdn.com/dripart/5003JSxULDwNImme/images/built-in-nodes/api_nodes/openai/openai-dall-e-3.jpg?fit=max&auto=format&n=5003JSxULDwNImme&q=85&s=1d4da35db8baddcd1321ef98365e26d0" alt="ComfyUI ネイティブ OpenAI DALL·E 3 ノード" width="1576" height="966" data-path="images/built-in-nodes/api_nodes/openai/openai-dall-e-3.jpg" />

このノードは OpenAI の DALL·E 3 API に接続し、詳細なテキストプロンプトを用いて高品質な画像を生成できます。DALL·E 3 は OpenAI が提供する画像生成モデルであり、前世代と比較して、画像品質の大幅な向上、プロンプト理解の精度向上、およびディテール再現性の改善が特徴です。

## パラメータ

### 入力パラメータ

| パラメータ   | 型   | デフォルト値      | 説明                                                                                                    |
| ------- | --- | ----------- | ----------------------------------------------------------------------------------------------------- |
| prompt  | 文字列 | ""          | 生成対象を詳細に記述したテキストプロンプト                                                                                 |
| seed    | 整数  | 0           | 最終的な出力結果はシード値とは無関係であり、このパラメータは再実行の有無を制御するだけです                                                         |
| quality | 選択肢 | "standard"  | 画像品質。「standard」または「hd」から選択可能                                                                          |
| style   | 選択肢 | "natural"   | 視覚スタイル。「natural」または「vivid」から選択可能。「vivid」では、より超現実的で劇的な画像が生成されやすくなります。「natural」では、より自然で超現実的でない画像が生成されます |
| size    | 選択肢 | "1024x1024" | 出力画像サイズ。「1024x1024」、「1024x1792」、「1792x1024」から選択可能                                                     |

### 出力パラメータ

| 出力    | 型  | 説明         |
| ----- | -- | ---------- |
| IMAGE | 画像 | 生成された画像の結果 |

## ソースコード

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

```python theme={null}

class OpenAIDalle3(ComfyNodeABC):
    """
    Generates images synchronously via OpenAI's DALL·E 3 endpoint.

    Uses the proxy at /proxy/openai/images/generations. Returned URLs are short‑lived,
    so download or cache results if you need to keep them.
    """

    def __init__(self):
        pass

    @classmethod
    def INPUT_TYPES(cls) -> InputTypeDict:
        return {
            "required": {
                "prompt": (
                    IO.STRING,
                    {
                        "multiline": True,
                        "default": "",
                        "tooltip": "Text prompt for DALL·E",
                    },
                ),
            },
            "optional": {
                "seed": (
                    IO.INT,
                    {
                        "default": 0,
                        "min": 0,
                        "max": 2**31 - 1,
                        "step": 1,
                        "display": "number",
                        "control_after_generate": True,
                        "tooltip": "not implemented yet in backend",
                    },
                ),
                "quality": (
                    IO.COMBO,
                    {
                        "options": ["standard", "hd"],
                        "default": "standard",
                        "tooltip": "Image quality",
                    },
                ),
                "style": (
                    IO.COMBO,
                    {
                        "options": ["natural", "vivid"],
                        "default": "natural",
                        "tooltip": "Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.",
                    },
                ),
                "size": (
                    IO.COMBO,
                    {
                        "options": ["1024x1024", "1024x1792", "1792x1024"],
                        "default": "1024x1024",
                        "tooltip": "Image size",
                    },
                ),
            },
            "hidden": {"auth_token": "AUTH_TOKEN_COMFY_ORG"},
        }

    RETURN_TYPES = (IO.IMAGE,)
    FUNCTION = "api_call"
    CATEGORY = "api node/image/openai"
    DESCRIPTION = cleandoc(__doc__ or "")
    API_NODE = True

    def api_call(
        self,
        prompt,
        seed=0,
        style="natural",
        quality="standard",
        size="1024x1024",
        auth_token=None,
    ):
        model = "dall-e-3"

        # build the operation
        operation = SynchronousOperation(
            endpoint=ApiEndpoint(
                path="/proxy/openai/images/generations",
                method=HttpMethod.POST,
                request_model=OpenAIImageGenerationRequest,
                response_model=OpenAIImageGenerationResponse,
            ),
            request=OpenAIImageGenerationRequest(
                model=model,
                prompt=prompt,
                quality=quality,
                size=size,
                style=style,
                seed=seed,
            ),
            auth_token=auth_token,
        )

        response = operation.execute()

        img_tensor = validate_and_cast_response(response)
        return (img_tensor,)
```
