# nodes

node_type: nodes-langchain.minimax
package_name: @n8n/n8n-nodes-langchain
display_name: MiniMax
description: Interact with MiniMax AI models
category: transform
development_style: programmatic
version: 1
credentials_required:
  [
  {
  "name": "minimaxApi",
  "required": true
  }
  ]

outputs:
  [
  "main"
  ]

updated_at: 2026-07-16 12:10:22
properties_schema:
  [
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "Audio",
          "value": "audio"
        },
        {
          "name": "Image",
          "value": "image"
        },
        {
          "name": "Text",
          "value": "text"
        },
        {
          "name": "Video",
          "value": "video"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "textToSpeech",
      "options": [
        {
          "name": "Text to Speech",
          "value": "textToSpeech",
          "action": "Convert text to speech",
          "description": "Generate speech audio from text input"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "audio"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "options",
      "default": "speech-2.8-hd",
      "description": "The speech synthesis model to use",
      "options": [
        {
          "name": "Speech 02 HD",
          "value": "speech-02-hd",
          "description": "Superior rhythm and stability with outstanding quality"
        },
        {
          "name": "Speech 02 Turbo",
          "value": "speech-02-turbo",
          "description": "Enhanced multilingual capabilities and performance"
        },
        {
          "name": "Speech 2.6 HD",
          "value": "speech-2.6-hd",
          "description": "HD model with outstanding prosody and cloning similarity"
        },
        {
          "name": "Speech 2.6 Turbo",
          "value": "speech-2.6-turbo",
          "description": "Turbo model with support for 40 languages"
        },
        {
          "name": "Speech 2.8 HD",
          "value": "speech-2.8-hd",
          "description": "Latest HD model with ultra-realistic quality and sound tags"
        },
        {
          "name": "Speech 2.8 Turbo",
          "value": "speech-2.8-turbo",
          "description": "Latest Turbo model with seamless speed and natural flow"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "audio"
          ],
          "operation": [
            "textToSpeech"
          ]
        }
      }
    },
    {
      "displayName": "Text",
      "name": "text",
      "type": "string",
      "default": "",
      "description": "The text to convert to speech (max 10,000 characters)",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "audio"
          ],
          "operation": [
            "textToSpeech"
          ]
        }
      },
      "typeOptions": {
        "rows": 4
      }
    },
    {
      "displayName": "Voice ID",
      "name": "voiceId",
      "type": "string",
      "default": "English_Graceful_Lady",
      "description": "Voice ID to use for speech synthesis. Browse available voices in the <a href=\"https://platform.minimax.io/docs/faq/system-voice-id\">MiniMax documentation</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "audio"
          ],
          "operation": [
            "textToSpeech"
          ]
        }
      }
    },
    {
      "displayName": "Download Audio",
      "name": "downloadAudio",
      "type": "boolean",
      "default": true,
      "description": "Whether to download the generated audio as binary data. When disabled, only the audio URL is returned.",
      "displayOptions": {
        "show": {
          "resource": [
            "audio"
          ],
          "operation": [
            "textToSpeech"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Audio Format",
          "name": "audioFormat",
          "type": "options",
          "options": [
            {
              "name": "MP3",
              "value": "mp3"
            },
            {
              "name": "PCM",
              "value": "pcm"
            },
            {
              "name": "FLAC",
              "value": "flac"
            },
            {
              "name": "WAV",
              "value": "wav"
            }
          ],
          "default": "mp3",
          "description": "Output audio format. WAV is only supported in non-streaming mode."
        },
        {
          "displayName": "Emotion",
          "name": "emotion",
          "type": "options",
          "options": [
            {
              "name": "Angry",
              "value": "angry"
            },
            {
              "name": "Calm",
              "value": "calm"
            },
            {
              "name": "Disgusted",
              "value": "disgusted"
            },
            {
              "name": "Fearful",
              "value": "fearful"
            },
            {
              "name": "Happy",
              "value": "happy"
            },
            {
              "name": "Sad",
              "value": "sad"
            },
            {
              "name": "Surprised",
              "value": "surprised"
            }
          ],
          "default": "calm",
          "description": "Emotion for synthesized speech. By default the model auto-selects the most natural emotion."
        },
        {
          "displayName": "Language Boost",
          "name": "languageBoost",
          "type": "options",
          "options": [
            {
              "name": "Arabic",
              "value": "Arabic"
            },
            {
              "name": "Auto Detect",
              "value": "auto"
            },
            {
              "name": "Chinese",
              "value": "Chinese"
            },
            {
              "name": "English",
              "value": "English"
            },
            {
              "name": "French",
              "value": "French"
            },
            {
              "name": "German",
              "value": "German"
            },
            {
              "name": "Indonesian",
              "value": "Indonesian"
            },
            {
              "name": "Italian",
              "value": "Italian"
            },
            {
              "name": "Japanese",
              "value": "Japanese"
            },
            {
              "name": "Korean",
              "value": "Korean"
            },
            {
              "name": "Portuguese",
              "value": "Portuguese"
            },
            {
              "name": "Russian",
              "value": "Russian"
            },
            {
              "name": "Spanish",
              "value": "Spanish"
            },
            {
              "name": "Thai",
              "value": "Thai"
            },
            {
              "name": "Turkish",
              "value": "Turkish"
            },
            {
              "name": "Vietnamese",
              "value": "Vietnamese"
            }
          ],
          "default": "auto",
          "description": "Enhance recognition for a specific language"
        },
        {
          "displayName": "Pitch",
          "name": "pitch",
          "type": "number",
          "typeOptions": {
            "minValue": -12,
            "maxValue": 12
          },
          "default": 0,
          "description": "Speech pitch adjustment (-12 to 12, 0 = original pitch)"
        },
        {
          "displayName": "Speed",
          "name": "speed",
          "type": "number",
          "typeOptions": {
            "minValue": 0.5,
            "maxValue": 2,
            "numberPrecision": 1
          },
          "default": 1,
          "description": "Speech speed (0.5-2, higher = faster)"
        },
        {
          "displayName": "Volume",
          "name": "volume",
          "type": "number",
          "typeOptions": {
            "minValue": 0.1,
            "maxValue": 10,
            "numberPrecision": 1
          },
          "default": 1,
          "description": "Speech volume (0.1-10, higher = louder)"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "audio"
          ],
          "operation": [
            "textToSpeech"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "generate",
      "options": [
        {
          "name": "Generate an Image",
          "value": "generate",
          "action": "Generate an image",
          "description": "Create an image from a text prompt"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "image"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "options",
      "default": "image-01",
      "description": "The model to use for image generation",
      "options": [
        {
          "name": "Image-01",
          "value": "image-01",
          "description": "High-quality image generation with fine-grained details"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "",
      "description": "Text description of the image to generate (max 1500 characters)",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 4
      }
    },
    {
      "displayName": "Aspect Ratio",
      "name": "aspectRatio",
      "type": "options",
      "default": "1:1",
      "description": "Aspect ratio of the generated image",
      "options": [
        {
          "name": "1:1 (1024x1024)",
          "value": "1:1"
        },
        {
          "name": "16:9 (1280x720)",
          "value": "16:9"
        },
        {
          "name": "2:3 (832x1248)",
          "value": "2:3"
        },
        {
          "name": "21:9 (1344x576)",
          "value": "21:9"
        },
        {
          "name": "3:2 (1248x832)",
          "value": "3:2"
        },
        {
          "name": "3:4 (864x1152)",
          "value": "3:4"
        },
        {
          "name": "4:3 (1152x864)",
          "value": "4:3"
        },
        {
          "name": "9:16 (720x1280)",
          "value": "9:16"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Number of Images",
      "name": "numberOfImages",
      "type": "number",
      "default": 1,
      "description": "Number of images to generate per request (1-9)",
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 9
      }
    },
    {
      "displayName": "Download Image",
      "name": "downloadImage",
      "type": "boolean",
      "default": true,
      "description": "Whether to download the generated image as binary data. When disabled, only the image URL is returned.",
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Prompt Optimizer",
          "name": "promptOptimizer",
          "type": "boolean",
          "default": false,
          "description": "Whether to automatically optimize the prompt for better results"
        },
        {
          "displayName": "Seed",
          "name": "seed",
          "type": "number",
          "default": 0,
          "description": "Random seed for reproducible outputs. Using the same seed and parameters produces the same image."
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "message",
      "options": [
        {
          "name": "Message a Model",
          "value": "message",
          "action": "Message a model",
          "description": "Send a message and get a response from a MiniMax model"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "text"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "options",
      "default": "MiniMax-M2.7",
      "description": "The model to use for generating the response",
      "options": [
        {
          "name": "MiniMax-M2",
          "value": "MiniMax-M2"
        },
        {
          "name": "MiniMax-M2.1",
          "value": "MiniMax-M2.1"
        },
        {
          "name": "MiniMax-M2.1-Highspeed",
          "value": "MiniMax-M2.1-highspeed"
        },
        {
          "name": "MiniMax-M2.5",
          "value": "MiniMax-M2.5"
        },
        {
          "name": "MiniMax-M2.5-Highspeed",
          "value": "MiniMax-M2.5-highspeed"
        },
        {
          "name": "MiniMax-M2.7",
          "value": "MiniMax-M2.7"
        },
        {
          "name": "MiniMax-M2.7-Highspeed",
          "value": "MiniMax-M2.7-highspeed"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Messages",
      "name": "messages",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "content": "",
            "role": "user"
          }
        ]
      },
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Prompt",
              "name": "content",
              "type": "string",
              "description": "The content of the message to be sent",
              "default": "",
              "placeholder": "e.g. Hello, how can you help me?",
              "typeOptions": {
                "rows": 2
              }
            },
            {
              "displayName": "Role",
              "name": "role",
              "type": "options",
              "description": "Role in shaping the model's response, it tells the model how it should behave and interact with the user",
              "options": [
                {
                  "name": "User",
                  "value": "user",
                  "description": "Send a message as a user and get a response from the model"
                },
                {
                  "name": "Assistant",
                  "value": "assistant",
                  "description": "Tell the model to adopt a specific tone or personality"
                }
              ],
              "default": "user"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "sortable": true,
        "multipleValues": true
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Hide Thinking",
          "name": "hideThinking",
          "type": "boolean",
          "default": true,
          "description": "Whether to strip chain-of-thought reasoning from the response, returning only the final answer"
        },
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxTokens",
          "default": 1024,
          "description": "The maximum number of tokens to generate in the completion",
          "type": "number",
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          }
        },
        {
          "displayName": "Max Tool Calls Iterations",
          "name": "maxToolsIterations",
          "type": "number",
          "default": 15,
          "description": "The maximum number of tool iteration cycles the LLM will run before stopping. A single iteration can contain multiple tool calls. Set to 0 for no limit.",
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          }
        },
        {
          "displayName": "Output Randomness (Temperature)",
          "name": "temperature",
          "default": 0.7,
          "description": "Controls the randomness of the output. Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Output Randomness (Top P)",
          "name": "topP",
          "default": 0.95,
          "description": "The maximum cumulative probability of tokens to consider when sampling",
          "type": "number",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 2
          }
        },
        {
          "displayName": "System Message",
          "name": "system",
          "type": "string",
          "default": "",
          "placeholder": "e.g. You are a helpful assistant"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "textToVideo",
      "options": [
        {
          "name": "Generate Video From Text",
          "value": "textToVideo",
          "action": "Generate video from text prompt",
          "description": "Generate a video from a text prompt"
        },
        {
          "name": "Generate Video From Image",
          "value": "imageToVideo",
          "action": "Generate video from image",
          "description": "Generate a video from an image, with optional last frame and subject reference"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "options",
      "default": "MiniMax-Hailuo-2.3",
      "description": "The model to use for video generation",
      "options": [
        {
          "name": "MiniMax-Hailuo-2.3",
          "value": "MiniMax-Hailuo-2.3",
          "description": "Latest video generation model with enhanced realism"
        },
        {
          "name": "MiniMax-Hailuo-02",
          "value": "MiniMax-Hailuo-02",
          "description": "Video model supporting higher resolution and longer duration"
        },
        {
          "name": "T2V-01-Director",
          "value": "T2V-01-Director",
          "description": "Text-to-video model with camera control commands"
        },
        {
          "name": "T2V-01",
          "value": "T2V-01",
          "description": "Standard text-to-video model"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "textToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "",
      "description": "Text description of the video (max 2000 characters). Camera movements can be controlled using [command] syntax, e.g. [Push in], [Pan left].",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "textToVideo"
          ]
        }
      },
      "typeOptions": {
        "rows": 4
      }
    },
    {
      "displayName": "Duration (Seconds)",
      "name": "duration",
      "type": "options",
      "default": 6,
      "description": "Duration of the generated video",
      "options": [
        {
          "name": "6 Seconds",
          "value": 6
        },
        {
          "name": "10 Seconds",
          "value": 10
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "textToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Resolution",
      "name": "resolution",
      "type": "options",
      "default": "768P",
      "description": "Resolution of the generated video. Available options depend on the model.",
      "options": [
        {
          "name": "720P",
          "value": "720P"
        },
        {
          "name": "768P",
          "value": "768P"
        },
        {
          "name": "1080P",
          "value": "1080P"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "textToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Download Video",
      "name": "downloadVideo",
      "type": "boolean",
      "default": true,
      "description": "Whether to download the generated video as binary data. When disabled, only the video URL is returned.",
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "textToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Prompt Optimizer",
          "name": "promptOptimizer",
          "type": "boolean",
          "default": true,
          "description": "Whether to automatically optimize the prompt for better results"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "textToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "options",
      "default": "MiniMax-Hailuo-2.3",
      "description": "The model to use for video generation",
      "options": [
        {
          "name": "I2V-01",
          "value": "I2V-01",
          "description": "Standard image-to-video model"
        },
        {
          "name": "I2V-01-Director",
          "value": "I2V-01-Director",
          "description": "Image-to-video with camera control commands"
        },
        {
          "name": "I2V-01-Live",
          "value": "I2V-01-live",
          "description": "Image-to-video live model"
        },
        {
          "name": "MiniMax-Hailuo-02",
          "value": "MiniMax-Hailuo-02",
          "description": "Model supporting higher resolution and longer duration"
        },
        {
          "name": "MiniMax-Hailuo-2.3",
          "value": "MiniMax-Hailuo-2.3",
          "description": "Latest model with enhanced realism"
        },
        {
          "name": "MiniMax-Hailuo-2.3-Fast",
          "value": "MiniMax-Hailuo-2.3-Fast",
          "description": "Faster image-to-video model for value and efficiency"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "imageToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Image Input Type",
      "name": "imageInputType",
      "type": "options",
      "default": "url",
      "description": "How to provide the first frame image",
      "options": [
        {
          "name": "URL",
          "value": "url"
        },
        {
          "name": "Binary File",
          "value": "binary"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "imageToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Image URL",
      "name": "imageUrl",
      "type": "string",
      "default": "",
      "description": "Public URL of the image to use as first frame (JPG, JPEG, PNG, WebP, <20MB)",
      "required": true,
      "displayOptions": {
        "show": {
          "imageInputType": [
            "url"
          ],
          "resource": [
            "video"
          ],
          "operation": [
            "imageToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Input Data Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "required": true,
      "displayOptions": {
        "show": {
          "imageInputType": [
            "binary"
          ],
          "resource": [
            "video"
          ],
          "operation": [
            "imageToVideo"
          ]
        }
      },
      "typeOptions": {
        "binaryDataProperty": true
      }
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "",
      "description": "Optional text description of the video (max 2000 characters). Camera movements can be controlled using [command] syntax.",
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "imageToVideo"
          ]
        }
      },
      "typeOptions": {
        "rows": 4
      }
    },
    {
      "displayName": "Duration (Seconds)",
      "name": "duration",
      "type": "options",
      "default": 6,
      "description": "Duration of the generated video",
      "options": [
        {
          "name": "6 Seconds",
          "value": 6
        },
        {
          "name": "10 Seconds",
          "value": 10
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "imageToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Resolution",
      "name": "resolution",
      "type": "options",
      "default": "768P",
      "description": "Resolution of the generated video. Available options depend on the model.",
      "options": [
        {
          "name": "512P",
          "value": "512P"
        },
        {
          "name": "720P",
          "value": "720P"
        },
        {
          "name": "768P",
          "value": "768P"
        },
        {
          "name": "1080P",
          "value": "1080P"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "imageToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Download Video",
      "name": "downloadVideo",
      "type": "boolean",
      "default": true,
      "description": "Whether to download the generated video as binary data. When disabled, only the video URL is returned.",
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "imageToVideo"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Prompt Optimizer",
          "name": "promptOptimizer",
          "type": "boolean",
          "default": true,
          "description": "Whether to automatically optimize the prompt"
        },
        {
          "displayName": "Last Frame Image Input Type",
          "name": "lastFrameInputType",
          "type": "options",
          "options": [
            {
              "name": "None",
              "value": "none"
            },
            {
              "name": "URL",
              "value": "url"
            },
            {
              "name": "Binary File",
              "value": "binary"
            }
          ],
          "default": "none",
          "description": "Provide a last frame image to generate a first-and-last-frame video. Only supported by MiniMax-Hailuo-2.3 and MiniMax-Hailuo-02."
        },
        {
          "displayName": "Last Frame Image URL",
          "name": "lastFrameImageUrl",
          "type": "string",
          "default": "",
          "placeholder": "https://example.com/last-frame.jpg",
          "displayOptions": {
            "show": {
              "lastFrameInputType": [
                "url"
              ]
            }
          }
        },
        {
          "displayName": "Last Frame Data Field Name",
          "name": "lastFrameBinaryPropertyName",
          "type": "string",
          "default": "lastFrame",
          "placeholder": "e.g. lastFrame",
          "typeOptions": {
            "binaryDataProperty": true
          },
          "displayOptions": {
            "show": {
              "lastFrameInputType": [
                "binary"
              ]
            }
          }
        },
        {
          "displayName": "Subject Reference Input Type",
          "name": "subjectReferenceInputType",
          "type": "options",
          "options": [
            {
              "name": "None",
              "value": "none"
            },
            {
              "name": "URL",
              "value": "url"
            },
            {
              "name": "Binary File",
              "value": "binary"
            }
          ],
          "default": "none",
          "description": "Provide a face photo for facial consistency in the generated video. Only supported by MiniMax-Hailuo-2.3."
        },
        {
          "displayName": "Subject Reference Image URL",
          "name": "subjectReferenceImageUrl",
          "type": "string",
          "default": "",
          "placeholder": "https://example.com/face.jpg",
          "displayOptions": {
            "show": {
              "subjectReferenceInputType": [
                "url"
              ]
            }
          }
        },
        {
          "displayName": "Subject Reference Data Field Name",
          "name": "subjectReferenceBinaryPropertyName",
          "type": "string",
          "default": "subjectReference",
          "placeholder": "e.g. subjectReference",
          "typeOptions": {
            "binaryDataProperty": true
          },
          "displayOptions": {
            "show": {
              "subjectReferenceInputType": [
                "binary"
              ]
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ],
          "operation": [
            "imageToVideo"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "textToSpeech",
      "name": "Text to Speech",
      "description": "Generate speech audio from text input",
      "resource": "audio"
    },
    {
      "operation": "generate",
      "name": "Generate an Image",
      "description": "Create an image from a text prompt",
      "resource": "image"
    },
    {
      "operation": "message",
      "name": "Message a Model",
      "description": "Send a message and get a response from a MiniMax model",
      "resource": "text"
    },
    {
      "operation": "textToVideo",
      "name": "Generate Video From Text",
      "description": "Generate a video from a text prompt",
      "resource": "video"
    },
    {
      "operation": "imageToVideo",
      "name": "Generate Video From Image",
      "description": "Generate a video from an image, with optional last frame and subject reference",
      "resource": "video"
    }
  ]


node_type: nodes-langchain.moonshotTool
package_name: @n8n/n8n-nodes-langchain
display_name: Moonshot Kimi Tool
description: Interact with Moonshot Kimi AI models (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1
credentials_required:
  [
  {
  "name": "moonshotApi",
  "required": true
  }
  ]

outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-07-16 12:10:22
tool_variant_of: nodes-langchain.moonshot
properties_schema:
  [
    {
      "displayName": "Tool Description",
      "name": "toolDescription",
      "type": "string",
      "default": "",
      "required": false,
      "description": "Description for the AI to understand what this tool does and when to use it",
      "typeOptions": {
        "rows": 3
      },
      "placeholder": "e.g., Use this tool to interact with Moonshot Kimi"
    },
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "Image",
          "value": "image"
        },
        {
          "name": "Text",
          "value": "text"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "analyze",
      "options": [
        {
          "name": "Analyze Image",
          "value": "analyze",
          "action": "Analyze image",
          "description": "Analyze an image and answer questions about it"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "image"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "modelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. kimi-k2.6"
        }
      ]
    },
    {
      "displayName": "Text Input",
      "name": "text",
      "type": "string",
      "default": "What's in this image?",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Input Data Field Name(s)",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary field(s) which contains the image(s), separate multiple field names with commas",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "binaryDataProperty": true
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Maximum Number of Tokens",
          "description": "Fewer tokens will result in shorter, less detailed image description",
          "name": "maxTokens",
          "type": "number",
          "default": 1024,
          "typeOptions": {
            "minValue": 1
          }
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "message",
      "options": [
        {
          "name": "Message a Model",
          "value": "message",
          "action": "Message a model",
          "description": "Send a message and get a response from a Moonshot Kimi model"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "text"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "modelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. kimi-k2.6"
        }
      ]
    },
    {
      "displayName": "Messages",
      "name": "messages",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "content": "",
            "role": "user"
          }
        ]
      },
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Prompt",
              "name": "content",
              "type": "string",
              "description": "The content of the message to be sent",
              "default": "",
              "placeholder": "e.g. Hello, how can you help me?",
              "typeOptions": {
                "rows": 2
              }
            },
            {
              "displayName": "Role",
              "name": "role",
              "type": "options",
              "description": "Role in shaping the model's response, it tells the model how it should behave and interact with the user",
              "options": [
                {
                  "name": "User",
                  "value": "user",
                  "description": "Send a message as a user and get a response from the model"
                },
                {
                  "name": "Assistant",
                  "value": "assistant",
                  "description": "Tell the model to adopt a specific tone or personality"
                }
              ],
              "default": "user"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "sortable": true,
        "multipleValues": true
      }
    },
    {
      "displayName": "Add Attachments",
      "name": "addAttachments",
      "type": "boolean",
      "default": false,
      "description": "Whether to add image attachments to the message",
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Attachment Input Data Field Name(s)",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary field(s) which contains the image(s) to attach, separate multiple field names with commas",
      "displayOptions": {
        "show": {
          "addAttachments": [
            true
          ],
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "binaryDataProperty": true
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Frequency Penalty",
          "name": "frequencyPenalty",
          "default": 0,
          "typeOptions": {
            "maxValue": 2,
            "minValue": -2,
            "numberPrecision": 1
          },
          "description": "Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim",
          "type": "number"
        },
        {
          "displayName": "Include Merged Response",
          "name": "includeMergedResponse",
          "type": "boolean",
          "default": false,
          "description": "Whether to include a single output string merging all text parts of the response"
        },
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxTokens",
          "default": 1024,
          "description": "The maximum number of tokens to generate in the completion",
          "type": "number",
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          }
        },
        {
          "displayName": "Max Tool Calls Iterations",
          "name": "maxToolsIterations",
          "type": "number",
          "default": 15,
          "description": "The maximum number of tool iteration cycles the LLM will run before stopping. A single iteration can contain multiple tool calls. Set to 0 for no limit.",
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          }
        },
        {
          "displayName": "Output Randomness (Temperature)",
          "name": "temperature",
          "default": 0.7,
          "description": "Controls the randomness of the output. Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Output Randomness (Top P)",
          "name": "topP",
          "default": 1,
          "description": "The maximum cumulative probability of tokens to consider when sampling",
          "type": "number",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Presence Penalty",
          "name": "presencePenalty",
          "default": 0,
          "typeOptions": {
            "maxValue": 2,
            "minValue": -2,
            "numberPrecision": 1
          },
          "description": "Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics",
          "type": "number"
        },
        {
          "displayName": "Response Format",
          "name": "responseFormat",
          "default": "text",
          "type": "options",
          "options": [
            {
              "name": "Text",
              "value": "text",
              "description": "Regular text response"
            },
            {
              "name": "JSON",
              "value": "json_object",
              "description": "Enables JSON mode, which should guarantee the message the model generates is valid JSON"
            }
          ]
        },
        {
          "displayName": "System Message",
          "name": "system",
          "type": "string",
          "default": "",
          "placeholder": "e.g. You are a helpful assistant"
        },
        {
          "displayName": "Thinking Mode",
          "name": "thinkingMode",
          "type": "boolean",
          "default": false,
          "description": "Whether to enable thinking mode for deep reasoning. The model will include reasoning steps in the response. Cannot be used together with Web Search."
        },
        {
          "displayName": "Web Search",
          "name": "webSearch",
          "type": "boolean",
          "default": false,
          "description": "Whether to enable built-in web search. The model will search the web for relevant information. Cannot be used together with Thinking Mode."
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "analyze",
      "name": "Analyze Image",
      "description": "Analyze an image and answer questions about it",
      "resource": "image"
    },
    {
      "operation": "message",
      "name": "Message a Model",
      "description": "Send a message and get a response from a Moonshot Kimi model",
      "resource": "text"
    }
  ]


node_type: nodes-langchain.moonshot
package_name: @n8n/n8n-nodes-langchain
display_name: Moonshot Kimi
description: Interact with Moonshot Kimi AI models
category: transform
development_style: programmatic
version: 1
credentials_required:
  [
  {
  "name": "moonshotApi",
  "required": true
  }
  ]

outputs:
  [
  "main"
  ]

updated_at: 2026-07-16 12:10:22
properties_schema:
  [
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "Image",
          "value": "image"
        },
        {
          "name": "Text",
          "value": "text"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "analyze",
      "options": [
        {
          "name": "Analyze Image",
          "value": "analyze",
          "action": "Analyze image",
          "description": "Analyze an image and answer questions about it"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "image"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "modelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. kimi-k2.6"
        }
      ]
    },
    {
      "displayName": "Text Input",
      "name": "text",
      "type": "string",
      "default": "What's in this image?",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Input Data Field Name(s)",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary field(s) which contains the image(s), separate multiple field names with commas",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "binaryDataProperty": true
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Maximum Number of Tokens",
          "description": "Fewer tokens will result in shorter, less detailed image description",
          "name": "maxTokens",
          "type": "number",
          "default": 1024,
          "typeOptions": {
            "minValue": 1
          }
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "message",
      "options": [
        {
          "name": "Message a Model",
          "value": "message",
          "action": "Message a model",
          "description": "Send a message and get a response from a Moonshot Kimi model"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "text"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "modelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. kimi-k2.6"
        }
      ]
    },
    {
      "displayName": "Messages",
      "name": "messages",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "content": "",
            "role": "user"
          }
        ]
      },
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Prompt",
              "name": "content",
              "type": "string",
              "description": "The content of the message to be sent",
              "default": "",
              "placeholder": "e.g. Hello, how can you help me?",
              "typeOptions": {
                "rows": 2
              }
            },
            {
              "displayName": "Role",
              "name": "role",
              "type": "options",
              "description": "Role in shaping the model's response, it tells the model how it should behave and interact with the user",
              "options": [
                {
                  "name": "User",
                  "value": "user",
                  "description": "Send a message as a user and get a response from the model"
                },
                {
                  "name": "Assistant",
                  "value": "assistant",
                  "description": "Tell the model to adopt a specific tone or personality"
                }
              ],
              "default": "user"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "sortable": true,
        "multipleValues": true
      }
    },
    {
      "displayName": "Add Attachments",
      "name": "addAttachments",
      "type": "boolean",
      "default": false,
      "description": "Whether to add image attachments to the message",
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Attachment Input Data Field Name(s)",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary field(s) which contains the image(s) to attach, separate multiple field names with commas",
      "displayOptions": {
        "show": {
          "addAttachments": [
            true
          ],
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "binaryDataProperty": true
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Frequency Penalty",
          "name": "frequencyPenalty",
          "default": 0,
          "typeOptions": {
            "maxValue": 2,
            "minValue": -2,
            "numberPrecision": 1
          },
          "description": "Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim",
          "type": "number"
        },
        {
          "displayName": "Include Merged Response",
          "name": "includeMergedResponse",
          "type": "boolean",
          "default": false,
          "description": "Whether to include a single output string merging all text parts of the response"
        },
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxTokens",
          "default": 1024,
          "description": "The maximum number of tokens to generate in the completion",
          "type": "number",
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          }
        },
        {
          "displayName": "Max Tool Calls Iterations",
          "name": "maxToolsIterations",
          "type": "number",
          "default": 15,
          "description": "The maximum number of tool iteration cycles the LLM will run before stopping. A single iteration can contain multiple tool calls. Set to 0 for no limit.",
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          }
        },
        {
          "displayName": "Output Randomness (Temperature)",
          "name": "temperature",
          "default": 0.7,
          "description": "Controls the randomness of the output. Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Output Randomness (Top P)",
          "name": "topP",
          "default": 1,
          "description": "The maximum cumulative probability of tokens to consider when sampling",
          "type": "number",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Presence Penalty",
          "name": "presencePenalty",
          "default": 0,
          "typeOptions": {
            "maxValue": 2,
            "minValue": -2,
            "numberPrecision": 1
          },
          "description": "Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics",
          "type": "number"
        },
        {
          "displayName": "Response Format",
          "name": "responseFormat",
          "default": "text",
          "type": "options",
          "options": [
            {
              "name": "Text",
              "value": "text",
              "description": "Regular text response"
            },
            {
              "name": "JSON",
              "value": "json_object",
              "description": "Enables JSON mode, which should guarantee the message the model generates is valid JSON"
            }
          ]
        },
        {
          "displayName": "System Message",
          "name": "system",
          "type": "string",
          "default": "",
          "placeholder": "e.g. You are a helpful assistant"
        },
        {
          "displayName": "Thinking Mode",
          "name": "thinkingMode",
          "type": "boolean",
          "default": false,
          "description": "Whether to enable thinking mode for deep reasoning. The model will include reasoning steps in the response. Cannot be used together with Web Search."
        },
        {
          "displayName": "Web Search",
          "name": "webSearch",
          "type": "boolean",
          "default": false,
          "description": "Whether to enable built-in web search. The model will search the web for relevant information. Cannot be used together with Thinking Mode."
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "analyze",
      "name": "Analyze Image",
      "description": "Analyze an image and answer questions about it",
      "resource": "image"
    },
    {
      "operation": "message",
      "name": "Message a Model",
      "description": "Send a message and get a response from a Moonshot Kimi model",
      "resource": "text"
    }
  ]


node_type: nodes-langchain.ollamaTool
package_name: @n8n/n8n-nodes-langchain
display_name: Ollama Tool
description: Interact with Ollama AI models (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1
credentials_required:
  [
  {
  "name": "ollamaApi",
  "required": true
  }
  ]

outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-07-16 12:10:22
tool_variant_of: nodes-langchain.ollama
properties_schema:
  [
    {
      "displayName": "Tool Description",
      "name": "toolDescription",
      "type": "string",
      "default": "",
      "required": false,
      "description": "Description for the AI to understand what this tool does and when to use it",
      "typeOptions": {
        "rows": 3
      },
      "placeholder": "e.g., Use this tool to interact with Ollama"
    },
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "Image",
          "value": "image"
        },
        {
          "name": "Text",
          "value": "text"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "analyze",
      "options": [
        {
          "name": "Analyze Image",
          "value": "analyze",
          "action": "Analyze image",
          "description": "Take in images and answer questions about them"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "image"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "modelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. llava, llama3.2-vision"
        }
      ]
    },
    {
      "displayName": "Text Input",
      "name": "text",
      "type": "string",
      "default": "What's in this image?",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Input Type",
      "name": "inputType",
      "type": "options",
      "default": "binary",
      "options": [
        {
          "name": "Binary File(s)",
          "value": "binary"
        },
        {
          "name": "Image URL(s)",
          "value": "url"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Input Data Field Name(s)",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary field(s) which contains the image(s), separate multiple field names with commas",
      "displayOptions": {
        "show": {
          "inputType": [
            "binary"
          ],
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "URL(s)",
      "name": "imageUrls",
      "type": "string",
      "default": "",
      "description": "URL(s) of the image(s) to analyze, multiple URLs can be added separated by comma",
      "displayOptions": {
        "show": {
          "inputType": [
            "url"
          ],
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to simplify the response or not",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "System Message",
          "name": "system",
          "type": "string",
          "default": "",
          "placeholder": "e.g. You are a helpful assistant.",
          "description": "System message to set the context for the conversation",
          "typeOptions": {
            "rows": 2
          }
        },
        {
          "displayName": "Temperature",
          "name": "temperature",
          "type": "number",
          "default": 0.8,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 2,
            "numberPrecision": 2
          },
          "description": "Controls randomness in responses. Lower values make output more focused."
        },
        {
          "displayName": "Thinking",
          "name": "think",
          "type": "boolean",
          "default": true,
          "description": "Whether to enable (default) thinking mode for supported models. When enabled, the model's thinking process is separated from the output. When disabled, the model outputs content directly (only for supported models)."
        },
        {
          "displayName": "Output Randomness (Top P)",
          "name": "top_p",
          "default": 0.7,
          "description": "The maximum cumulative probability of tokens to consider when sampling",
          "type": "number",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Top K",
          "name": "top_k",
          "type": "number",
          "default": 40,
          "typeOptions": {
            "minValue": 1
          },
          "description": "Controls diversity by limiting the number of top tokens to consider"
        },
        {
          "displayName": "Max Tokens",
          "name": "num_predict",
          "type": "number",
          "default": 1024,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Maximum number of tokens to generate in the completion"
        },
        {
          "displayName": "Frequency Penalty",
          "name": "frequency_penalty",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 2
          },
          "description": "Adjusts the penalty for tokens that have already appeared in the generated text. Higher values discourage repetition."
        },
        {
          "displayName": "Presence Penalty",
          "name": "presence_penalty",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "numberPrecision": 2
          },
          "description": "Adjusts the penalty for tokens based on their presence in the generated text so far. Positive values penalize tokens that have already appeared, encouraging diversity."
        },
        {
          "displayName": "Repetition Penalty",
          "name": "repeat_penalty",
          "type": "number",
          "default": 1.1,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 2
          },
          "description": "Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient."
        },
        {
          "displayName": "Context Length",
          "name": "num_ctx",
          "type": "number",
          "default": 4096,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Sets the size of the context window used to generate the next token"
        },
        {
          "displayName": "Repeat Last N",
          "name": "repeat_last_n",
          "type": "number",
          "default": 64,
          "typeOptions": {
            "minValue": -1,
            "numberPrecision": 0
          },
          "description": "Sets how far back for the model to look back to prevent repetition. (0 = disabled, -1 = num_ctx)."
        },
        {
          "displayName": "Min P",
          "name": "min_p",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 3
          },
          "description": "Alternative to the top_p, and aims to ensure a balance of quality and variety. The parameter p represents the minimum probability for a token to be considered, relative to the probability of the most likely token."
        },
        {
          "displayName": "Seed",
          "name": "seed",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Sets the random number seed to use for generation. Setting this to a specific number will make the model generate the same text for the same prompt."
        },
        {
          "displayName": "Stop Sequences",
          "name": "stop",
          "type": "string",
          "default": "",
          "description": "Sets the stop sequences to use. When this pattern is encountered the LLM will stop generating text and return. Separate multiple patterns with commas"
        },
        {
          "displayName": "Keep Alive",
          "name": "keep_alive",
          "type": "string",
          "default": "5m",
          "description": "Specifies the duration to keep the loaded model in memory after use. Format: 1h30m (1 hour 30 minutes)."
        },
        {
          "displayName": "Low VRAM Mode",
          "name": "low_vram",
          "type": "boolean",
          "default": false,
          "description": "Whether to activate low VRAM mode, which reduces memory usage at the cost of slower generation speed. Useful for GPUs with limited memory."
        },
        {
          "displayName": "Main GPU ID",
          "name": "main_gpu",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Specifies the ID of the GPU to use for the main computation. Only change this if you have multiple GPUs."
        },
        {
          "displayName": "Context Batch Size",
          "name": "num_batch",
          "type": "number",
          "default": 512,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Sets the batch size for prompt processing. Larger batch sizes may improve generation speed but increase memory usage."
        },
        {
          "displayName": "Number of GPUs",
          "name": "num_gpu",
          "type": "number",
          "default": -1,
          "typeOptions": {
            "minValue": -1,
            "numberPrecision": 0
          },
          "description": "Specifies the number of GPUs to use for parallel processing. Set to -1 for auto-detection."
        },
        {
          "displayName": "Number of CPU Threads",
          "name": "num_thread",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Specifies the number of CPU threads to use for processing. Set to 0 for auto-detection."
        },
        {
          "displayName": "Penalize Newlines",
          "name": "penalize_newline",
          "type": "boolean",
          "default": true,
          "description": "Whether the model will be less likely to generate newline characters, encouraging longer continuous sequences of text"
        },
        {
          "displayName": "Use Memory Locking",
          "name": "use_mlock",
          "type": "boolean",
          "default": false,
          "description": "Whether to lock the model in memory to prevent swapping. This can improve performance but requires sufficient available memory."
        },
        {
          "displayName": "Use Memory Mapping",
          "name": "use_mmap",
          "type": "boolean",
          "default": true,
          "description": "Whether to use memory mapping for loading the model. This can reduce memory usage but may impact performance."
        },
        {
          "displayName": "Load Vocabulary Only",
          "name": "vocab_only",
          "type": "boolean",
          "default": false,
          "description": "Whether to only load the model vocabulary without the weights. Useful for quickly testing tokenization."
        },
        {
          "displayName": "Output Format",
          "name": "format",
          "type": "options",
          "options": [
            {
              "name": "Default",
              "value": ""
            },
            {
              "name": "JSON",
              "value": "json"
            }
          ],
          "default": "",
          "description": "Specifies the format of the API response"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "message",
      "options": [
        {
          "name": "Message a Model",
          "value": "message",
          "action": "Message a model",
          "description": "Send a message to Ollama model"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "text"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "modelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. llava, llama3.2-vision"
        }
      ]
    },
    {
      "displayName": "Messages",
      "name": "messages",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "content": "",
            "role": "user"
          }
        ]
      },
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Content",
              "name": "content",
              "type": "string",
              "description": "The content of the message to be sent",
              "default": "",
              "placeholder": "e.g. Hello, how can you help me?",
              "typeOptions": {
                "rows": 2
              }
            },
            {
              "displayName": "Role",
              "name": "role",
              "type": "options",
              "description": "The role of this message in the conversation",
              "options": [
                {
                  "name": "User",
                  "value": "user",
                  "description": "Message from the user"
                },
                {
                  "name": "Assistant",
                  "value": "assistant",
                  "description": "Response from the assistant (for conversation history)"
                }
              ],
              "default": "user"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "sortable": true,
        "multipleValues": true
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to simplify the response or not",
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "System Message",
          "name": "system",
          "type": "string",
          "default": "",
          "placeholder": "e.g. You are a helpful assistant.",
          "description": "System message to set the context for the conversation",
          "typeOptions": {
            "rows": 2
          }
        },
        {
          "displayName": "Temperature",
          "name": "temperature",
          "type": "number",
          "default": 0.8,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 2,
            "numberPrecision": 2
          },
          "description": "Controls randomness in responses. Lower values make output more focused."
        },
        {
          "displayName": "Thinking",
          "name": "think",
          "type": "boolean",
          "default": true,
          "description": "Whether to enable (default) thinking mode for supported models. When enabled, the model's thinking process is separated from the output. When disabled, the model outputs content directly (only for supported models)."
        },
        {
          "displayName": "Output Randomness (Top P)",
          "name": "top_p",
          "default": 0.7,
          "description": "The maximum cumulative probability of tokens to consider when sampling",
          "type": "number",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Top K",
          "name": "top_k",
          "type": "number",
          "default": 40,
          "typeOptions": {
            "minValue": 1
          },
          "description": "Controls diversity by limiting the number of top tokens to consider"
        },
        {
          "displayName": "Max Tokens",
          "name": "num_predict",
          "type": "number",
          "default": 1024,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Maximum number of tokens to generate in the completion"
        },
        {
          "displayName": "Frequency Penalty",
          "name": "frequency_penalty",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 2
          },
          "description": "Adjusts the penalty for tokens that have already appeared in the generated text. Higher values discourage repetition."
        },
        {
          "displayName": "Presence Penalty",
          "name": "presence_penalty",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "numberPrecision": 2
          },
          "description": "Adjusts the penalty for tokens based on their presence in the generated text so far. Positive values penalize tokens that have already appeared, encouraging diversity."
        },
        {
          "displayName": "Repetition Penalty",
          "name": "repeat_penalty",
          "type": "number",
          "default": 1.1,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 2
          },
          "description": "Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient."
        },
        {
          "displayName": "Context Length",
          "name": "num_ctx",
          "type": "number",
          "default": 4096,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Sets the size of the context window used to generate the next token"
        },
        {
          "displayName": "Repeat Last N",
          "name": "repeat_last_n",
          "type": "number",
          "default": 64,
          "typeOptions": {
            "minValue": -1,
            "numberPrecision": 0
          },
          "description": "Sets how far back for the model to look back to prevent repetition. (0 = disabled, -1 = num_ctx)."
        },
        {
          "displayName": "Min P",
          "name": "min_p",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 3
          },
          "description": "Alternative to the top_p, and aims to ensure a balance of quality and variety. The parameter p represents the minimum probability for a token to be considered, relative to the probability of the most likely token."
        },
        {
          "displayName": "Seed",
          "name": "seed",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Sets the random number seed to use for generation. Setting this to a specific number will make the model generate the same text for the same prompt."
        },
        {
          "displayName": "Stop Sequences",
          "name": "stop",
          "type": "string",
          "default": "",
          "description": "Sets the stop sequences to use. When this pattern is encountered the LLM will stop generating text and return. Separate multiple patterns with commas"
        },
        {
          "displayName": "Keep Alive",
          "name": "keep_alive",
          "type": "string",
          "default": "5m",
          "description": "Specifies the duration to keep the loaded model in memory after use. Format: 1h30m (1 hour 30 minutes)."
        },
        {
          "displayName": "Low VRAM Mode",
          "name": "low_vram",
          "type": "boolean",
          "default": false,
          "description": "Whether to activate low VRAM mode, which reduces memory usage at the cost of slower generation speed. Useful for GPUs with limited memory."
        },
        {
          "displayName": "Main GPU ID",
          "name": "main_gpu",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Specifies the ID of the GPU to use for the main computation. Only change this if you have multiple GPUs."
        },
        {
          "displayName": "Context Batch Size",
          "name": "num_batch",
          "type": "number",
          "default": 512,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Sets the batch size for prompt processing. Larger batch sizes may improve generation speed but increase memory usage."
        },
        {
          "displayName": "Number of GPUs",
          "name": "num_gpu",
          "type": "number",
          "default": -1,
          "typeOptions": {
            "minValue": -1,
            "numberPrecision": 0
          },
          "description": "Specifies the number of GPUs to use for parallel processing. Set to -1 for auto-detection."
        },
        {
          "displayName": "Number of CPU Threads",
          "name": "num_thread",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Specifies the number of CPU threads to use for processing. Set to 0 for auto-detection."
        },
        {
          "displayName": "Penalize Newlines",
          "name": "penalize_newline",
          "type": "boolean",
          "default": true,
          "description": "Whether the model will be less likely to generate newline characters, encouraging longer continuous sequences of text"
        },
        {
          "displayName": "Use Memory Locking",
          "name": "use_mlock",
          "type": "boolean",
          "default": false,
          "description": "Whether to lock the model in memory to prevent swapping. This can improve performance but requires sufficient available memory."
        },
        {
          "displayName": "Use Memory Mapping",
          "name": "use_mmap",
          "type": "boolean",
          "default": true,
          "description": "Whether to use memory mapping for loading the model. This can reduce memory usage but may impact performance."
        },
        {
          "displayName": "Load Vocabulary Only",
          "name": "vocab_only",
          "type": "boolean",
          "default": false,
          "description": "Whether to only load the model vocabulary without the weights. Useful for quickly testing tokenization."
        },
        {
          "displayName": "Output Format",
          "name": "format",
          "type": "options",
          "options": [
            {
              "name": "Default",
              "value": ""
            },
            {
              "name": "JSON",
              "value": "json"
            }
          ],
          "default": "",
          "description": "Specifies the format of the API response"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "analyze",
      "name": "Analyze Image",
      "description": "Take in images and answer questions about them",
      "resource": "image"
    },
    {
      "operation": "message",
      "name": "Message a Model",
      "description": "Send a message to Ollama model",
      "resource": "text"
    }
  ]


node_type: nodes-langchain.ollama
package_name: @n8n/n8n-nodes-langchain
display_name: Ollama
description: Interact with Ollama AI models
category: transform
development_style: programmatic
version: 1
credentials_required:
  [
  {
  "name": "ollamaApi",
  "required": true
  }
  ]

outputs:
  [
  "main"
  ]

updated_at: 2026-07-16 12:10:22
properties_schema:
  [
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "Image",
          "value": "image"
        },
        {
          "name": "Text",
          "value": "text"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "analyze",
      "options": [
        {
          "name": "Analyze Image",
          "value": "analyze",
          "action": "Analyze image",
          "description": "Take in images and answer questions about them"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "image"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "modelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. llava, llama3.2-vision"
        }
      ]
    },
    {
      "displayName": "Text Input",
      "name": "text",
      "type": "string",
      "default": "What's in this image?",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Input Type",
      "name": "inputType",
      "type": "options",
      "default": "binary",
      "options": [
        {
          "name": "Binary File(s)",
          "value": "binary"
        },
        {
          "name": "Image URL(s)",
          "value": "url"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Input Data Field Name(s)",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary field(s) which contains the image(s), separate multiple field names with commas",
      "displayOptions": {
        "show": {
          "inputType": [
            "binary"
          ],
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "URL(s)",
      "name": "imageUrls",
      "type": "string",
      "default": "",
      "description": "URL(s) of the image(s) to analyze, multiple URLs can be added separated by comma",
      "displayOptions": {
        "show": {
          "inputType": [
            "url"
          ],
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to simplify the response or not",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "System Message",
          "name": "system",
          "type": "string",
          "default": "",
          "placeholder": "e.g. You are a helpful assistant.",
          "description": "System message to set the context for the conversation",
          "typeOptions": {
            "rows": 2
          }
        },
        {
          "displayName": "Temperature",
          "name": "temperature",
          "type": "number",
          "default": 0.8,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 2,
            "numberPrecision": 2
          },
          "description": "Controls randomness in responses. Lower values make output more focused."
        },
        {
          "displayName": "Thinking",
          "name": "think",
          "type": "boolean",
          "default": true,
          "description": "Whether to enable (default) thinking mode for supported models. When enabled, the model's thinking process is separated from the output. When disabled, the model outputs content directly (only for supported models)."
        },
        {
          "displayName": "Output Randomness (Top P)",
          "name": "top_p",
          "default": 0.7,
          "description": "The maximum cumulative probability of tokens to consider when sampling",
          "type": "number",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Top K",
          "name": "top_k",
          "type": "number",
          "default": 40,
          "typeOptions": {
            "minValue": 1
          },
          "description": "Controls diversity by limiting the number of top tokens to consider"
        },
        {
          "displayName": "Max Tokens",
          "name": "num_predict",
          "type": "number",
          "default": 1024,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Maximum number of tokens to generate in the completion"
        },
        {
          "displayName": "Frequency Penalty",
          "name": "frequency_penalty",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 2
          },
          "description": "Adjusts the penalty for tokens that have already appeared in the generated text. Higher values discourage repetition."
        },
        {
          "displayName": "Presence Penalty",
          "name": "presence_penalty",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "numberPrecision": 2
          },
          "description": "Adjusts the penalty for tokens based on their presence in the generated text so far. Positive values penalize tokens that have already appeared, encouraging diversity."
        },
        {
          "displayName": "Repetition Penalty",
          "name": "repeat_penalty",
          "type": "number",
          "default": 1.1,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 2
          },
          "description": "Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient."
        },
        {
          "displayName": "Context Length",
          "name": "num_ctx",
          "type": "number",
          "default": 4096,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Sets the size of the context window used to generate the next token"
        },
        {
          "displayName": "Repeat Last N",
          "name": "repeat_last_n",
          "type": "number",
          "default": 64,
          "typeOptions": {
            "minValue": -1,
            "numberPrecision": 0
          },
          "description": "Sets how far back for the model to look back to prevent repetition. (0 = disabled, -1 = num_ctx)."
        },
        {
          "displayName": "Min P",
          "name": "min_p",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 3
          },
          "description": "Alternative to the top_p, and aims to ensure a balance of quality and variety. The parameter p represents the minimum probability for a token to be considered, relative to the probability of the most likely token."
        },
        {
          "displayName": "Seed",
          "name": "seed",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Sets the random number seed to use for generation. Setting this to a specific number will make the model generate the same text for the same prompt."
        },
        {
          "displayName": "Stop Sequences",
          "name": "stop",
          "type": "string",
          "default": "",
          "description": "Sets the stop sequences to use. When this pattern is encountered the LLM will stop generating text and return. Separate multiple patterns with commas"
        },
        {
          "displayName": "Keep Alive",
          "name": "keep_alive",
          "type": "string",
          "default": "5m",
          "description": "Specifies the duration to keep the loaded model in memory after use. Format: 1h30m (1 hour 30 minutes)."
        },
        {
          "displayName": "Low VRAM Mode",
          "name": "low_vram",
          "type": "boolean",
          "default": false,
          "description": "Whether to activate low VRAM mode, which reduces memory usage at the cost of slower generation speed. Useful for GPUs with limited memory."
        },
        {
          "displayName": "Main GPU ID",
          "name": "main_gpu",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Specifies the ID of the GPU to use for the main computation. Only change this if you have multiple GPUs."
        },
        {
          "displayName": "Context Batch Size",
          "name": "num_batch",
          "type": "number",
          "default": 512,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Sets the batch size for prompt processing. Larger batch sizes may improve generation speed but increase memory usage."
        },
        {
          "displayName": "Number of GPUs",
          "name": "num_gpu",
          "type": "number",
          "default": -1,
          "typeOptions": {
            "minValue": -1,
            "numberPrecision": 0
          },
          "description": "Specifies the number of GPUs to use for parallel processing. Set to -1 for auto-detection."
        },
        {
          "displayName": "Number of CPU Threads",
          "name": "num_thread",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Specifies the number of CPU threads to use for processing. Set to 0 for auto-detection."
        },
        {
          "displayName": "Penalize Newlines",
          "name": "penalize_newline",
          "type": "boolean",
          "default": true,
          "description": "Whether the model will be less likely to generate newline characters, encouraging longer continuous sequences of text"
        },
        {
          "displayName": "Use Memory Locking",
          "name": "use_mlock",
          "type": "boolean",
          "default": false,
          "description": "Whether to lock the model in memory to prevent swapping. This can improve performance but requires sufficient available memory."
        },
        {
          "displayName": "Use Memory Mapping",
          "name": "use_mmap",
          "type": "boolean",
          "default": true,
          "description": "Whether to use memory mapping for loading the model. This can reduce memory usage but may impact performance."
        },
        {
          "displayName": "Load Vocabulary Only",
          "name": "vocab_only",
          "type": "boolean",
          "default": false,
          "description": "Whether to only load the model vocabulary without the weights. Useful for quickly testing tokenization."
        },
        {
          "displayName": "Output Format",
          "name": "format",
          "type": "options",
          "options": [
            {
              "name": "Default",
              "value": ""
            },
            {
              "name": "JSON",
              "value": "json"
            }
          ],
          "default": "",
          "description": "Specifies the format of the API response"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "message",
      "options": [
        {
          "name": "Message a Model",
          "value": "message",
          "action": "Message a model",
          "description": "Send a message to Ollama model"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "text"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "modelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. llava, llama3.2-vision"
        }
      ]
    },
    {
      "displayName": "Messages",
      "name": "messages",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "content": "",
            "role": "user"
          }
        ]
      },
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Content",
              "name": "content",
              "type": "string",
              "description": "The content of the message to be sent",
              "default": "",
              "placeholder": "e.g. Hello, how can you help me?",
              "typeOptions": {
                "rows": 2
              }
            },
            {
              "displayName": "Role",
              "name": "role",
              "type": "options",
              "description": "The role of this message in the conversation",
              "options": [
                {
                  "name": "User",
                  "value": "user",
                  "description": "Message from the user"
                },
                {
                  "name": "Assistant",
                  "value": "assistant",
                  "description": "Response from the assistant (for conversation history)"
                }
              ],
              "default": "user"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "sortable": true,
        "multipleValues": true
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to simplify the response or not",
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "System Message",
          "name": "system",
          "type": "string",
          "default": "",
          "placeholder": "e.g. You are a helpful assistant.",
          "description": "System message to set the context for the conversation",
          "typeOptions": {
            "rows": 2
          }
        },
        {
          "displayName": "Temperature",
          "name": "temperature",
          "type": "number",
          "default": 0.8,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 2,
            "numberPrecision": 2
          },
          "description": "Controls randomness in responses. Lower values make output more focused."
        },
        {
          "displayName": "Thinking",
          "name": "think",
          "type": "boolean",
          "default": true,
          "description": "Whether to enable (default) thinking mode for supported models. When enabled, the model's thinking process is separated from the output. When disabled, the model outputs content directly (only for supported models)."
        },
        {
          "displayName": "Output Randomness (Top P)",
          "name": "top_p",
          "default": 0.7,
          "description": "The maximum cumulative probability of tokens to consider when sampling",
          "type": "number",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Top K",
          "name": "top_k",
          "type": "number",
          "default": 40,
          "typeOptions": {
            "minValue": 1
          },
          "description": "Controls diversity by limiting the number of top tokens to consider"
        },
        {
          "displayName": "Max Tokens",
          "name": "num_predict",
          "type": "number",
          "default": 1024,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Maximum number of tokens to generate in the completion"
        },
        {
          "displayName": "Frequency Penalty",
          "name": "frequency_penalty",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 2
          },
          "description": "Adjusts the penalty for tokens that have already appeared in the generated text. Higher values discourage repetition."
        },
        {
          "displayName": "Presence Penalty",
          "name": "presence_penalty",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "numberPrecision": 2
          },
          "description": "Adjusts the penalty for tokens based on their presence in the generated text so far. Positive values penalize tokens that have already appeared, encouraging diversity."
        },
        {
          "displayName": "Repetition Penalty",
          "name": "repeat_penalty",
          "type": "number",
          "default": 1.1,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 2
          },
          "description": "Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient."
        },
        {
          "displayName": "Context Length",
          "name": "num_ctx",
          "type": "number",
          "default": 4096,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Sets the size of the context window used to generate the next token"
        },
        {
          "displayName": "Repeat Last N",
          "name": "repeat_last_n",
          "type": "number",
          "default": 64,
          "typeOptions": {
            "minValue": -1,
            "numberPrecision": 0
          },
          "description": "Sets how far back for the model to look back to prevent repetition. (0 = disabled, -1 = num_ctx)."
        },
        {
          "displayName": "Min P",
          "name": "min_p",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 3
          },
          "description": "Alternative to the top_p, and aims to ensure a balance of quality and variety. The parameter p represents the minimum probability for a token to be considered, relative to the probability of the most likely token."
        },
        {
          "displayName": "Seed",
          "name": "seed",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Sets the random number seed to use for generation. Setting this to a specific number will make the model generate the same text for the same prompt."
        },
        {
          "displayName": "Stop Sequences",
          "name": "stop",
          "type": "string",
          "default": "",
          "description": "Sets the stop sequences to use. When this pattern is encountered the LLM will stop generating text and return. Separate multiple patterns with commas"
        },
        {
          "displayName": "Keep Alive",
          "name": "keep_alive",
          "type": "string",
          "default": "5m",
          "description": "Specifies the duration to keep the loaded model in memory after use. Format: 1h30m (1 hour 30 minutes)."
        },
        {
          "displayName": "Low VRAM Mode",
          "name": "low_vram",
          "type": "boolean",
          "default": false,
          "description": "Whether to activate low VRAM mode, which reduces memory usage at the cost of slower generation speed. Useful for GPUs with limited memory."
        },
        {
          "displayName": "Main GPU ID",
          "name": "main_gpu",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Specifies the ID of the GPU to use for the main computation. Only change this if you have multiple GPUs."
        },
        {
          "displayName": "Context Batch Size",
          "name": "num_batch",
          "type": "number",
          "default": 512,
          "typeOptions": {
            "minValue": 1,
            "numberPrecision": 0
          },
          "description": "Sets the batch size for prompt processing. Larger batch sizes may improve generation speed but increase memory usage."
        },
        {
          "displayName": "Number of GPUs",
          "name": "num_gpu",
          "type": "number",
          "default": -1,
          "typeOptions": {
            "minValue": -1,
            "numberPrecision": 0
          },
          "description": "Specifies the number of GPUs to use for parallel processing. Set to -1 for auto-detection."
        },
        {
          "displayName": "Number of CPU Threads",
          "name": "num_thread",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "numberPrecision": 0
          },
          "description": "Specifies the number of CPU threads to use for processing. Set to 0 for auto-detection."
        },
        {
          "displayName": "Penalize Newlines",
          "name": "penalize_newline",
          "type": "boolean",
          "default": true,
          "description": "Whether the model will be less likely to generate newline characters, encouraging longer continuous sequences of text"
        },
        {
          "displayName": "Use Memory Locking",
          "name": "use_mlock",
          "type": "boolean",
          "default": false,
          "description": "Whether to lock the model in memory to prevent swapping. This can improve performance but requires sufficient available memory."
        },
        {
          "displayName": "Use Memory Mapping",
          "name": "use_mmap",
          "type": "boolean",
          "default": true,
          "description": "Whether to use memory mapping for loading the model. This can reduce memory usage but may impact performance."
        },
        {
          "displayName": "Load Vocabulary Only",
          "name": "vocab_only",
          "type": "boolean",
          "default": false,
          "description": "Whether to only load the model vocabulary without the weights. Useful for quickly testing tokenization."
        },
        {
          "displayName": "Output Format",
          "name": "format",
          "type": "options",
          "options": [
            {
              "name": "Default",
              "value": ""
            },
            {
              "name": "JSON",
              "value": "json"
            }
          ],
          "default": "",
          "description": "Specifies the format of the API response"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "message"
          ],
          "resource": [
            "text"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "analyze",
      "name": "Analyze Image",
      "description": "Take in images and answer questions about them",
      "resource": "image"
    },
    {
      "operation": "message",
      "name": "Message a Model",
      "description": "Send a message to Ollama model",
      "resource": "text"
    }
  ]


node_type: nodes-langchain.openAiTool
package_name: @n8n/n8n-nodes-langchain
display_name: OpenAI Tool
category: transform
development_style: programmatic
version: 2.3
credentials_required:
  [
  {
  "name": "openAiApi",
  "required": true
  }
  ]

outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-07-16 12:10:22
tool_variant_of: nodes-langchain.openAi
description:
  Message an assistant or GPT, analyze images, generate audio, etc. (AI Tool variant for use with AI Agents)

properties_schema:
  [
    {
      "displayName": "Tool Description",
      "name": "toolDescription",
      "type": "string",
      "default": "",
      "required": false,
      "description": "Description for the AI to understand what this tool does and when to use it",
      "typeOptions": {
        "rows": 3
      },
      "placeholder": "e.g., Use this tool to interact with OpenAI"
    },
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "Text",
          "value": "text",
          "builderHint": {
            "propertyHint": "For text generation, reasoning and tools, use AI Agent with OpenAI Chat Model instead of this resource."
          }
        },
        {
          "name": "Image",
          "value": "image"
        },
        {
          "name": "Audio",
          "value": "audio"
        },
        {
          "name": "File",
          "value": "file"
        },
        {
          "name": "Conversation",
          "value": "conversation"
        },
        {
          "name": "Video",
          "value": "video"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "generate",
      "options": [
        {
          "name": "Generate Audio",
          "value": "generate",
          "action": "Generate audio",
          "description": "Creates audio from a text prompt"
        },
        {
          "name": "Transcribe a Recording",
          "value": "transcribe",
          "action": "Transcribe a recording",
          "description": "Transcribes audio into text"
        },
        {
          "name": "Translate a Recording",
          "value": "translate",
          "action": "Translate a recording",
          "description": "Translates audio into text in English"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "audio"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "OpenAI API limits the size of the audio file to 25 MB",
      "name": "fileSizeLimitNotice",
      "type": "notice",
      "default": " ",
      "displayOptions": {
        "show": {
          "resource": [
            "audio"
          ],
          "operation": [
            "translate",
            "transcribe"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "tts-1",
      "options": [
        {
          "name": "TTS-1",
          "value": "tts-1"
        },
        {
          "name": "TTS-1-HD",
          "value": "tts-1-hd"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Text Input",
      "name": "input",
      "type": "string",
      "default": "",
      "description": "The text to generate audio for. The maximum length is 4096 characters.",
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "audio"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Voice",
      "name": "voice",
      "type": "options",
      "default": "alloy",
      "description": "The voice to use when generating the audio",
      "options": [
        {
          "name": "Alloy",
          "value": "alloy"
        },
        {
          "name": "Echo",
          "value": "echo"
        },
        {
          "name": "Fable",
          "value": "fable"
        },
        {
          "name": "Nova",
          "value": "nova"
        },
        {
          "name": "Onyx",
          "value": "onyx"
        },
        {
          "name": "Shimmer",
          "value": "shimmer"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Response Format",
          "name": "response_format",
          "type": "options",
          "default": "mp3",
          "options": [
            {
              "name": "MP3",
              "value": "mp3"
            },
            {
              "name": "OPUS",
              "value": "opus"
            },
            {
              "name": "AAC",
              "value": "aac"
            },
            {
              "name": "FLAC",
              "value": "flac"
            }
          ]
        },
        {
          "displayName": "Audio Speed",
          "name": "speed",
          "type": "number",
          "default": 1,
          "typeOptions": {
            "minValue": 0.25,
            "maxValue": 4,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Put Output in Field",
          "name": "binaryPropertyOutput",
          "type": "string",
          "default": "data",
          "hint": "The name of the output field to put the binary file data in"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Input Data Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm",
      "displayOptions": {
        "show": {
          "operation": [
            "transcribe"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Language of the Audio File",
          "name": "language",
          "type": "string",
          "description": "The language of the input audio. Supplying the input language in <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes\" target=\"_blank\">ISO-639-1</a> format will improve accuracy and latency.",
          "default": ""
        },
        {
          "displayName": "Output Randomness (Temperature)",
          "name": "temperature",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "transcribe"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Input Data Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm",
      "displayOptions": {
        "show": {
          "operation": [
            "translate"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Output Randomness (Temperature)",
          "name": "temperature",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "translate"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "upload",
      "options": [
        {
          "name": "Delete a File",
          "value": "deleteFile",
          "action": "Delete a file",
          "description": "Delete a file from the server"
        },
        {
          "name": "List Files",
          "value": "list",
          "action": "List files",
          "description": "Returns a list of files that belong to the user's organization"
        },
        {
          "name": "Upload a File",
          "value": "upload",
          "action": "Upload a file",
          "description": "Upload a file that can be used across various endpoints"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "file"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Input Data Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the file. The size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants.",
      "displayOptions": {
        "show": {
          "operation": [
            "upload"
          ],
          "resource": [
            "file"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Purpose",
          "name": "purpose",
          "type": "options",
          "default": "user_data",
          "description": "The intended purpose of the uploaded file, the 'Fine-tuning' only supports .jsonl files",
          "options": [
            {
              "name": "Assistants",
              "value": "assistants"
            },
            {
              "name": "Fine-Tune",
              "value": "fine-tune"
            },
            {
              "name": "Vision",
              "value": "vision"
            },
            {
              "name": "User Data",
              "value": "user_data"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "upload"
          ],
          "resource": [
            "file"
          ]
        }
      }
    },
    {
      "displayName": "File",
      "name": "fileId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "deleteFile"
          ],
          "resource": [
            "file"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "fileSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "file-[a-zA-Z0-9]",
                "errorMessage": "Not a valid File ID"
              }
            }
          ],
          "placeholder": "e.g. file-1234567890"
        }
      ]
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Purpose",
          "name": "purpose",
          "type": "options",
          "default": "any",
          "description": "Only return files with the given purpose",
          "options": [
            {
              "name": "Any [Default]",
              "value": "any"
            },
            {
              "name": "Assistants",
              "value": "assistants"
            },
            {
              "name": "Fine-Tune",
              "value": "fine-tune"
            },
            {
              "name": "Vision",
              "value": "vision"
            },
            {
              "name": "User Data",
              "value": "user_data"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "list"
          ],
          "resource": [
            "file"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "generate",
      "options": [
        {
          "name": "Analyze Image",
          "value": "analyze",
          "action": "Analyze image",
          "description": "Take in images and answer questions about them"
        },
        {
          "name": "Generate an Image",
          "value": "generate",
          "action": "Generate an image",
          "description": "Creates an image from a text prompt"
        },
        {
          "name": "Edit Image",
          "value": "edit",
          "action": "Edit image",
          "description": "Edit an image"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "image"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "dall-e-3",
      "description": "The model to use for image generation",
      "options": [
        {
          "name": "DALL·E 2",
          "value": "dall-e-2"
        },
        {
          "name": "DALL·E 3",
          "value": "dall-e-3"
        },
        {
          "name": "GPT Image 1",
          "value": "gpt-image-1"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.2
              }
            }
          ],
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": "gpt-image-1-mini"
      },
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.2
              }
            }
          ],
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "imageGenerateModelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. gpt-4"
        }
      ]
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "",
      "description": "A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3.",
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Number of Images",
          "name": "n",
          "default": 1,
          "description": "Number of images to generate",
          "type": "number",
          "typeOptions": {
            "minValue": 1,
            "maxValue": 10
          },
          "displayOptions": {
            "show": {
              "/model": [
                "dall-e-2"
              ]
            }
          }
        },
        {
          "displayName": "Quality",
          "name": "dalleQuality",
          "type": "options",
          "description": "The quality of the image that will be generated, HD creates images with finer details and greater consistency across the image",
          "options": [
            {
              "name": "HD",
              "value": "hd"
            },
            {
              "name": "Standard",
              "value": "standard"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "dall-e-3"
              ]
            }
          },
          "default": "standard"
        },
        {
          "displayName": "Quality",
          "name": "quality",
          "type": "options",
          "description": "The quality of the image that will be generated, High creates images with finer details and greater consistency across the image",
          "options": [
            {
              "name": "High",
              "value": "high"
            },
            {
              "name": "Medium",
              "value": "medium"
            },
            {
              "name": "Low",
              "value": "low"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          },
          "default": "medium"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "256x256",
              "value": "256x256"
            },
            {
              "name": "512x512",
              "value": "512x512"
            },
            {
              "name": "1024x1024",
              "value": "1024x1024"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "dall-e-2"
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "1024x1024",
              "value": "1024x1024"
            },
            {
              "name": "1792x1024",
              "value": "1792x1024"
            },
            {
              "name": "1024x1792",
              "value": "1024x1792"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "dall-e-3"
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "1024x1024",
              "value": "1024x1024"
            },
            {
              "name": "1024x1536",
              "value": "1024x1536"
            },
            {
              "name": "1536x1024",
              "value": "1536x1024"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Style",
          "name": "style",
          "type": "options",
          "options": [
            {
              "name": "Natural",
              "value": "natural",
              "description": "Produce more natural looking images"
            },
            {
              "name": "Vivid",
              "value": "vivid",
              "description": "Lean towards generating hyper-real and dramatic images"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "dall-e-3"
              ]
            }
          },
          "default": "vivid"
        },
        {
          "displayName": "Respond with Image URL(s)",
          "name": "returnImageUrls",
          "type": "boolean",
          "default": false,
          "description": "Whether to return image URL(s) instead of binary file(s)",
          "displayOptions": {
            "hide": {
              "/model": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "Put Output in Field",
          "name": "binaryPropertyOutput",
          "type": "string",
          "default": "data",
          "hint": "The name of the output field to put the binary file data in",
          "displayOptions": {
            "show": {
              "returnImageUrls": [
                false
              ]
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.2
              }
            }
          ],
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Number of Images",
          "name": "n",
          "default": 1,
          "description": "Number of images to generate",
          "type": "number",
          "typeOptions": {
            "minValue": 1,
            "maxValue": 10
          },
          "displayOptions": {
            "show": {
              "/modelId": [
                "dall-e-2"
              ]
            }
          }
        },
        {
          "displayName": "Quality",
          "name": "dalleQuality",
          "type": "options",
          "description": "The quality of the image that will be generated, HD creates images with finer details and greater consistency across the image",
          "options": [
            {
              "name": "HD",
              "value": "hd"
            },
            {
              "name": "Standard",
              "value": "standard"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                "dall-e-3"
              ]
            }
          },
          "default": "standard"
        },
        {
          "displayName": "Quality",
          "name": "quality",
          "type": "options",
          "description": "The quality of the image that will be generated, High creates images with finer details and greater consistency across the image",
          "options": [
            {
              "name": "High",
              "value": "high"
            },
            {
              "name": "Medium",
              "value": "medium"
            },
            {
              "name": "Low",
              "value": "low"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          },
          "default": "medium"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "256x256",
              "value": "256x256"
            },
            {
              "name": "512x512",
              "value": "512x512"
            },
            {
              "name": "1024x1024",
              "value": "1024x1024"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                "dall-e-2"
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "1024x1024",
              "value": "1024x1024"
            },
            {
              "name": "1792x1024",
              "value": "1792x1024"
            },
            {
              "name": "1024x1792",
              "value": "1024x1792"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                "dall-e-3"
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "1024x1024",
              "value": "1024x1024"
            },
            {
              "name": "1024x1536",
              "value": "1024x1536"
            },
            {
              "name": "1536x1024",
              "value": "1536x1024"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Style",
          "name": "style",
          "type": "options",
          "options": [
            {
              "name": "Natural",
              "value": "natural",
              "description": "Produce more natural looking images"
            },
            {
              "name": "Vivid",
              "value": "vivid",
              "description": "Lean towards generating hyper-real and dramatic images"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                "dall-e-3"
              ]
            }
          },
          "default": "vivid"
        },
        {
          "displayName": "Respond with Image URL(s)",
          "name": "returnImageUrls",
          "type": "boolean",
          "default": false,
          "description": "Whether to return image URL(s) instead of binary file(s)",
          "displayOptions": {
            "hide": {
              "/modelId": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "Put Output in Field",
          "name": "binaryPropertyOutput",
          "type": "string",
          "default": "data",
          "hint": "The name of the output field to put the binary file data in",
          "displayOptions": {
            "show": {
              "returnImageUrls": [
                false
              ]
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.2
              }
            }
          ],
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "imageModelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. gpt-4"
        }
      ]
    },
    {
      "displayName": "Text Input",
      "name": "text",
      "type": "string",
      "default": "What's in this image?",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Input Type",
      "name": "inputType",
      "type": "options",
      "default": "url",
      "options": [
        {
          "name": "Image URL(s)",
          "value": "url"
        },
        {
          "name": "Binary File(s)",
          "value": "base64"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "URL(s)",
      "name": "imageUrls",
      "type": "string",
      "default": "",
      "description": "URL(s) of the image(s) to analyze, multiple URLs can be added separated by comma",
      "displayOptions": {
        "show": {
          "inputType": [
            "url"
          ],
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Input Data Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the image(s)",
      "displayOptions": {
        "show": {
          "inputType": [
            "base64"
          ],
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to simplify the response or not",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Detail",
          "name": "detail",
          "type": "options",
          "default": "auto",
          "options": [
            {
              "name": "Auto",
              "value": "auto",
              "description": "Model will look at the image input size and decide if it should use the low or high setting"
            },
            {
              "name": "Low",
              "value": "low",
              "description": "Return faster responses and consume fewer tokens"
            },
            {
              "name": "High",
              "value": "high",
              "description": "Return more detailed responses, consumes more tokens"
            }
          ]
        },
        {
          "displayName": "Length of Description (Max Tokens)",
          "description": "Fewer tokens will result in shorter, less detailed image description",
          "name": "maxTokens",
          "type": "number",
          "default": 300,
          "typeOptions": {
            "minValue": 1
          }
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "gpt-image-1",
      "description": "The model to use for image generation",
      "options": [
        {
          "name": "DALL·E 2",
          "value": "dall-e-2"
        },
        {
          "name": "GPT Image 1",
          "value": "gpt-image-1"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.3
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": "gpt-image-1"
      },
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.3
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "imageGenerateModelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. gpt-4"
        }
      ]
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "",
      "description": "A text description of the desired image(s). Maximum 1000 characters for dall-e-2, 32000 characters for gpt-image-1.",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Images",
      "name": "images",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "binaryPropertyName": "data"
          }
        ]
      },
      "description": "Add one or more binary fields to include images with your prompt. Each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images.",
      "options": [
        {
          "displayName": "Image",
          "name": "values",
          "values": [
            {
              "displayName": "Binary Field Name",
              "name": "binaryPropertyName",
              "type": "string",
              "default": "data",
              "placeholder": "e.g. data",
              "description": "The name of the binary field containing the image data"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "/model": [
            "gpt-image-1"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "multipleValues": true,
        "multipleValueButtonText": "Add Image"
      }
    },
    {
      "displayName": "Images",
      "name": "images",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "binaryPropertyName": "data"
          }
        ]
      },
      "description": "Add one or more binary fields to include images with your prompt. Each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images.",
      "options": [
        {
          "displayName": "Image",
          "name": "values",
          "values": [
            {
              "displayName": "Binary Field Name",
              "name": "binaryPropertyName",
              "type": "string",
              "default": "data",
              "placeholder": "e.g. data",
              "description": "The name of the binary field containing the image data"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "gpt-image"
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "multipleValues": true,
        "multipleValueButtonText": "Add Image"
      }
    },
    {
      "displayName": "Binary Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the image. It should be a square png file less than 4MB.",
      "displayOptions": {
        "show": {
          "/model": [
            "dall-e-2"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Binary Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the image. It should be a square png file less than 4MB.",
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "dall-e"
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Number of Images",
      "name": "n",
      "type": "number",
      "default": 1,
      "description": "The number of images to generate. Must be between 1 and 10.",
      "displayOptions": {
        "show": {
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 10
      }
    },
    {
      "displayName": "Size",
      "name": "size",
      "type": "options",
      "default": "1024x1024",
      "description": "The size of the generated images",
      "options": [
        {
          "name": "256x256",
          "value": "256x256"
        },
        {
          "name": "512x512",
          "value": "512x512"
        },
        {
          "name": "1024x1024",
          "value": "1024x1024"
        },
        {
          "name": "1024x1536 (Portrait)",
          "value": "1024x1536"
        },
        {
          "name": "1536x1024 (Landscape)",
          "value": "1536x1024"
        },
        {
          "name": "Auto",
          "value": "auto"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Quality",
      "name": "quality",
      "type": "options",
      "default": "auto",
      "description": "The quality of the image that will be generated",
      "options": [
        {
          "name": "Auto",
          "value": "auto"
        },
        {
          "name": "High",
          "value": "high"
        },
        {
          "name": "Medium",
          "value": "medium"
        },
        {
          "name": "Low",
          "value": "low"
        },
        {
          "name": "Standard",
          "value": "standard"
        }
      ],
      "displayOptions": {
        "show": {
          "/model": [
            "gpt-image-1"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Quality",
      "name": "quality",
      "type": "options",
      "default": "auto",
      "description": "The quality of the image that will be generated",
      "options": [
        {
          "name": "Auto",
          "value": "auto"
        },
        {
          "name": "High",
          "value": "high"
        },
        {
          "name": "Medium",
          "value": "medium"
        },
        {
          "name": "Low",
          "value": "low"
        },
        {
          "name": "Standard",
          "value": "standard"
        }
      ],
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "gpt-image"
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Response Format",
      "name": "responseFormat",
      "type": "options",
      "default": "url",
      "description": "The format in which the generated images are returned. URLs are only valid for 60 minutes after generation.",
      "options": [
        {
          "name": "URL",
          "value": "url"
        },
        {
          "name": "Base64 JSON",
          "value": "b64_json"
        }
      ],
      "displayOptions": {
        "show": {
          "/model": [
            "dall-e-2"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Response Format",
      "name": "responseFormat",
      "type": "options",
      "default": "url",
      "description": "The format in which the generated images are returned. URLs are only valid for 60 minutes after generation.",
      "options": [
        {
          "name": "URL",
          "value": "url"
        },
        {
          "name": "Base64 JSON",
          "value": "b64_json"
        }
      ],
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "dall-e"
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Output Format",
      "name": "outputFormat",
      "type": "options",
      "default": "png",
      "description": "The format in which the generated images are returned. Only supported for gpt-image-1.",
      "options": [
        {
          "name": "PNG",
          "value": "png"
        },
        {
          "name": "JPEG",
          "value": "jpeg"
        },
        {
          "name": "WebP",
          "value": "webp"
        }
      ],
      "displayOptions": {
        "show": {
          "/model": [
            "gpt-image-1"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Output Format",
      "name": "outputFormat",
      "type": "options",
      "default": "png",
      "description": "The format in which the generated images are returned. Only supported for gpt-image-1.",
      "options": [
        {
          "name": "PNG",
          "value": "png"
        },
        {
          "name": "JPEG",
          "value": "jpeg"
        },
        {
          "name": "WebP",
          "value": "webp"
        }
      ],
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "gpt-image"
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Output Compression",
      "name": "outputCompression",
      "type": "number",
      "default": 100,
      "description": "The compression level (0-100%) for the generated images. Only supported for gpt-image-1 with webp or jpeg output formats.",
      "displayOptions": {
        "show": {
          "/model": [
            "gpt-image-1"
          ],
          "outputFormat": [
            "webp",
            "jpeg"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "minValue": 0,
        "maxValue": 100
      }
    },
    {
      "displayName": "Output Compression",
      "name": "outputCompression",
      "type": "number",
      "default": 100,
      "description": "The compression level (0-100%) for the generated images. Only supported for gpt-image-1 with webp or jpeg output formats.",
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "gpt-image"
              }
            }
          ],
          "outputFormat": [
            "webp",
            "jpeg"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "minValue": 0,
        "maxValue": 100
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "User",
          "name": "user",
          "type": "string",
          "default": "",
          "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse",
          "placeholder": "user-12345"
        },
        {
          "displayName": "Background",
          "name": "background",
          "type": "options",
          "default": "auto",
          "description": "Allows to set transparency for the background of the generated image(s). Only supported for gpt-image-1.",
          "options": [
            {
              "name": "Auto",
              "value": "auto"
            },
            {
              "name": "Transparent",
              "value": "transparent"
            },
            {
              "name": "Opaque",
              "value": "opaque"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "gpt-image-1"
              ]
            }
          }
        },
        {
          "displayName": "Input Fidelity",
          "name": "inputFidelity",
          "type": "options",
          "default": "low",
          "description": "Control how much effort the model will exert to match the style and features of input images. Only supported for gpt-image-1.",
          "options": [
            {
              "name": "Low",
              "value": "low"
            },
            {
              "name": "High",
              "value": "high"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "gpt-image-1"
              ]
            }
          }
        },
        {
          "displayName": "Image Mask",
          "name": "imageMask",
          "type": "string",
          "default": "data",
          "hint": "The name of the input field containing the binary file data to be processed",
          "description": "Name of the binary property which contains the image. An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as image."
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.3
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "User",
          "name": "user",
          "type": "string",
          "default": "",
          "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse",
          "placeholder": "user-12345"
        },
        {
          "displayName": "Background",
          "name": "background",
          "type": "options",
          "default": "auto",
          "description": "Allows to set transparency for the background of the generated image(s). Only supported for gpt-image-1.",
          "options": [
            {
              "name": "Auto",
              "value": "auto"
            },
            {
              "name": "Transparent",
              "value": "transparent"
            },
            {
              "name": "Opaque",
              "value": "opaque"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "Input Fidelity",
          "name": "inputFidelity",
          "type": "options",
          "default": "low",
          "description": "Control how much effort the model will exert to match the style and features of input images. Only supported for gpt-image-1.",
          "options": [
            {
              "name": "Low",
              "value": "low"
            },
            {
              "name": "High",
              "value": "high"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "Image Mask",
          "name": "imageMask",
          "type": "string",
          "default": "data",
          "hint": "The name of the input field containing the binary file data to be processed",
          "description": "Name of the binary property which contains the image. An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as image."
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.3
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "response",
      "options": [
        {
          "name": "Message a Model",
          "value": "response",
          "action": "Message a model",
          "description": "Generate a model response with GPT 3, 4, 5, etc. using Responses API",
          "builderHint": {
            "propertyHint": "Use operation: 'response' for text generation. Do NOT use 'message' — that v1 value is invalid on v2 and fails validation."
          }
        },
        {
          "name": "Classify Text for Violations",
          "value": "classify",
          "action": "Classify text for violations",
          "description": "Check whether content complies with usage policies"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "text"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Text Input",
      "name": "input",
      "type": "string",
      "default": "",
      "description": "The input text to classify if it is violates the moderation policy",
      "displayOptions": {
        "show": {
          "operation": [
            "classify"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": false,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "classify"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Use Stable Model",
          "name": "useStableModel",
          "type": "boolean",
          "default": false,
          "description": "Whether to use the stable version of the model instead of the latest version, accuracy may be slightly lower"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.1
              }
            }
          ],
          "operation": [
            "classify"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "modelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. gpt-4"
        }
      ]
    },
    {
      "displayName": "Messages",
      "name": "responses",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "type": "text"
          }
        ]
      },
      "options": [
        {
          "displayName": "Message",
          "name": "values",
          "values": [
            {
              "displayName": "Type",
              "name": "type",
              "type": "options",
              "default": "text",
              "options": [
                {
                  "name": "Text",
                  "value": "text"
                },
                {
                  "name": "Image",
                  "value": "image"
                },
                {
                  "name": "File",
                  "value": "file"
                }
              ]
            },
            {
              "displayName": "Role",
              "name": "role",
              "type": "options",
              "description": "Role in shaping the model's response, it tells the model how it should behave and interact with the user",
              "options": [
                {
                  "name": "User",
                  "value": "user",
                  "description": "Send a message as a user and get a response from the model"
                },
                {
                  "name": "Assistant",
                  "value": "assistant",
                  "description": "Tell the model to adopt a specific tone or personality"
                },
                {
                  "name": "System",
                  "value": "system",
                  "description": "Usually used to set the model's behavior or context for the next user message"
                }
              ],
              "default": "user"
            },
            {
              "displayName": "Prompt",
              "name": "content",
              "type": "string",
              "description": "The content of the message to be send",
              "default": "",
              "placeholder": "e.g. Hello, how can you help me?",
              "typeOptions": {
                "rows": 2
              },
              "displayOptions": {
                "show": {
                  "type": [
                    "text"
                  ]
                }
              }
            },
            {
              "displayName": "Image Type",
              "name": "imageType",
              "type": "options",
              "default": "url",
              "options": [
                {
                  "name": "Image URL",
                  "value": "url"
                },
                {
                  "name": "File ID",
                  "value": "fileId"
                },
                {
                  "name": "File Data",
                  "value": "base64"
                }
              ],
              "displayOptions": {
                "show": {
                  "type": [
                    "image"
                  ]
                }
              }
            },
            {
              "displayName": "Image URL",
              "name": "imageUrl",
              "type": "string",
              "default": "",
              "placeholder": "e.g. https://example.com/image.jpeg",
              "description": "URL of the image to be sent",
              "displayOptions": {
                "show": {
                  "type": [
                    "image"
                  ],
                  "imageType": [
                    "url"
                  ]
                }
              }
            },
            {
              "displayName": "Image Data",
              "name": "binaryPropertyName",
              "type": "string",
              "default": "data",
              "placeholder": "e.g. data",
              "hint": "The name of the input field containing the binary file data to be processed",
              "description": "Name of the binary property which contains the image(s)",
              "displayOptions": {
                "show": {
                  "type": [
                    "image"
                  ],
                  "imageType": [
                    "base64"
                  ]
                }
              }
            },
            {
              "displayName": "File ID",
              "name": "fileId",
              "type": "string",
              "default": "",
              "description": "ID of the file to be sent",
              "displayOptions": {
                "show": {
                  "type": [
                    "image"
                  ],
                  "imageType": [
                    "fileId"
                  ]
                }
              }
            },
            {
              "displayName": "Detail",
              "name": "imageDetail",
              "type": "options",
              "default": "auto",
              "description": "The detail level of the image to be sent to the model",
              "options": [
                {
                  "name": "Auto",
                  "value": "auto"
                },
                {
                  "name": "Low",
                  "value": "low"
                },
                {
                  "name": "High",
                  "value": "high"
                }
              ],
              "displayOptions": {
                "show": {
                  "type": [
                    "image"
                  ]
                }
              }
            },
            {
              "displayName": "File Type",
              "name": "fileType",
              "type": "options",
              "default": "url",
              "options": [
                {
                  "name": "File URL",
                  "value": "url"
                },
                {
                  "name": "File ID",
                  "value": "fileId"
                },
                {
                  "name": "File Data",
                  "value": "base64"
                }
              ],
              "displayOptions": {
                "show": {
                  "type": [
                    "file"
                  ]
                }
              }
            },
            {
              "displayName": "File URL",
              "name": "fileUrl",
              "type": "string",
              "default": "",
              "placeholder": "e.g. https://example.com/file.pdf",
              "description": "URL of the file to be sent. Accepts base64 encoded files as well.",
              "displayOptions": {
                "show": {
                  "type": [
                    "file"
                  ],
                  "fileType": [
                    "url"
                  ]
                }
              }
            },
            {
              "displayName": "File ID",
              "name": "fileId",
              "type": "string",
              "default": "",
              "description": "ID of the file to be sent",
              "displayOptions": {
                "show": {
                  "type": [
                    "file"
                  ],
                  "fileType": [
                    "fileId"
                  ]
                }
              }
            },
            {
              "displayName": "File Data",
              "name": "binaryPropertyName",
              "type": "string",
              "default": "data",
              "placeholder": "e.g. data",
              "hint": "The name of the input field containing the binary file data to be processed",
              "description": "Name of the binary property which contains the file",
              "displayOptions": {
                "show": {
                  "type": [
                    "file"
                  ],
                  "fileType": [
                    "base64"
                  ]
                }
              }
            },
            {
              "displayName": "File Name",
              "name": "fileName",
              "type": "string",
              "default": "",
              "required": true,
              "displayOptions": {
                "show": {
                  "type": [
                    "file"
                  ],
                  "fileType": [
                    "base64"
                  ]
                }
              }
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "sortable": true,
        "multipleValues": true
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Hide Tools",
      "name": "hideTools",
      "type": "hidden",
      "default": "hide",
      "displayOptions": {
        "show": {
          "modelId": [
            "gpt-3.5-turbo-16k-0613",
            "dall-e-3",
            "text-embedding-3-large",
            "dall-e-2",
            "whisper-1",
            "tts-1-hd-1106",
            "tts-1-hd",
            "gpt-4-0314",
            "text-embedding-3-small",
            "gpt-4-32k-0314",
            "gpt-3.5-turbo-0301",
            "gpt-4-vision-preview",
            "gpt-3.5-turbo-16k",
            "gpt-3.5-turbo-instruct-0914",
            "tts-1",
            "davinci-002",
            "gpt-3.5-turbo-instruct",
            "babbage-002",
            "tts-1-1106",
            "text-embedding-ada-002"
          ],
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Connect your own custom n8n tools to this node on the canvas",
      "name": "noticeTools",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "hide": {
          "hideTools": [
            "hide"
          ]
        },
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Built-in Tools",
      "name": "builtInTools",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Web Search",
          "name": "webSearch",
          "type": "collection",
          "default": {
            "searchContextSize": "medium"
          },
          "options": [
            {
              "displayName": "Search Context Size",
              "description": "High level guidance for the amount of context window space to use for the search",
              "name": "searchContextSize",
              "type": "options",
              "default": "medium",
              "options": [
                {
                  "name": "Low",
                  "value": "low"
                },
                {
                  "name": "Medium",
                  "value": "medium"
                },
                {
                  "name": "High",
                  "value": "high"
                }
              ]
            },
            {
              "displayName": "Web Search Allowed Domains",
              "name": "allowedDomains",
              "type": "string",
              "default": "",
              "description": "Comma-separated list of domains to search. Only domains in this list will be searched.",
              "placeholder": "e.g. google.com, wikipedia.org"
            },
            {
              "displayName": "Country",
              "name": "country",
              "type": "string",
              "default": "",
              "placeholder": "e.g. US, GB"
            },
            {
              "displayName": "City",
              "name": "city",
              "type": "string",
              "default": "",
              "placeholder": "e.g. New York, London"
            },
            {
              "displayName": "Region",
              "name": "region",
              "type": "string",
              "default": "",
              "placeholder": "e.g. New York, London"
            }
          ]
        },
        {
          "displayName": "File Search",
          "name": "fileSearch",
          "type": "collection",
          "default": {
            "vectorStoreIds": "[]"
          },
          "options": [
            {
              "displayName": "Vector Store IDs",
              "name": "vectorStoreIds",
              "description": "The vector store IDs to use for the file search. Vector stores are managed via OpenAI Dashboard.",
              "type": "json",
              "default": "[]",
              "required": true
            },
            {
              "displayName": "Filters",
              "name": "filters",
              "type": "json",
              "default": "{}"
            },
            {
              "displayName": "Max Results",
              "name": "maxResults",
              "type": "number",
              "default": 1,
              "typeOptions": {
                "minValue": 1,
                "maxValue": 50
              }
            }
          ]
        },
        {
          "displayName": "Code Interpreter",
          "name": "codeInterpreter",
          "type": "boolean",
          "default": true,
          "description": "Whether to allow the model to execute code in a sandboxed environment"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Conversation ID",
          "name": "conversationId",
          "default": "",
          "description": "The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation after this response completes.",
          "type": "string"
        },
        {
          "displayName": "Include Additional Data",
          "name": "include",
          "default": [],
          "type": "multiOptions",
          "description": "Specify additional output data to include in the model response",
          "options": [
            {
              "name": "Code Interpreter Call Outputs",
              "value": "code_interpreter_call.outputs"
            },
            {
              "name": "Computer Call Output Image URL",
              "value": "computer_call_output.output.image_url"
            },
            {
              "name": "File Search Call Results",
              "value": "file_search_call.results"
            },
            {
              "name": "Message Input Image URL",
              "value": "message.input_image.image_url"
            },
            {
              "name": "Message Output Text Logprobs",
              "value": "message.output_text.logprobs"
            },
            {
              "name": "Reasoning Encrypted Content",
              "value": "reasoning.encrypted_content"
            },
            {
              "name": "Web Search Tool Call Sources",
              "value": "web_search_call.action.sources"
            }
          ]
        },
        {
          "displayName": "Instructions",
          "name": "instructions",
          "type": "string",
          "default": "",
          "description": "Instructions for the model to follow",
          "typeOptions": {
            "rows": 2
          }
        },
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxTokens",
          "default": 16,
          "description": "The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).",
          "type": "number",
          "typeOptions": {
            "maxValue": 32768
          }
        },
        {
          "displayName": "Max Tool Calls Iterations",
          "name": "maxToolsIterations",
          "type": "number",
          "default": 15,
          "description": "The maximum number of tool iteration cycles the LLM will run before stopping. A single iteration can contain multiple tool calls. Set to 0 for no limit."
        },
        {
          "displayName": "Max Built-in Tool Calls",
          "name": "maxToolCalls",
          "type": "number",
          "default": 15,
          "description": "The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored."
        },
        {
          "displayName": "Metadata",
          "name": "metadata",
          "type": "json",
          "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.",
          "default": "{}"
        },
        {
          "displayName": "Parallel Tool Calls",
          "name": "parallelToolCalls",
          "type": "boolean",
          "default": false,
          "description": "Whether to allow parallel tool calls. If true, the model can call multiple tools at once."
        },
        {
          "displayName": "Previous Response ID",
          "name": "previousResponseId",
          "type": "string",
          "default": "",
          "description": "The ID of the previous response to continue from. Cannot be used in conjunction with Conversation ID."
        },
        {
          "displayName": "Prompt",
          "name": "promptConfig",
          "type": "fixedCollection",
          "description": "Configure the reusable prompt template configured via OpenAI Dashboard. <a href=\"https://platform.openai.com/docs/guides/prompt-engineering#reusable-prompts\">Learn more</a>.",
          "default": {
            "promptOptions": [
              {
                "promptId": ""
              }
            ]
          },
          "options": [
            {
              "displayName": "Prompt",
              "name": "promptOptions",
              "values": [
                {
                  "displayName": "Prompt ID",
                  "name": "promptId",
                  "type": "string",
                  "default": "",
                  "description": "The unique identifier of the prompt template to use"
                },
                {
                  "displayName": "Version",
                  "name": "version",
                  "type": "string",
                  "default": "",
                  "description": "Optional version of the prompt template"
                },
                {
                  "displayName": "Variables",
                  "name": "variables",
                  "type": "json",
                  "default": "{}",
                  "description": "Variables to be substituted into the prompt template"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Prompt Cache Key",
          "name": "promptCacheKey",
          "type": "string",
          "default": "",
          "description": "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates"
        },
        {
          "displayName": "Reasoning",
          "name": "reasoning",
          "type": "fixedCollection",
          "default": {
            "reasoningOptions": [
              {
                "effort": "medium",
                "summary": "none"
              }
            ]
          },
          "options": [
            {
              "displayName": "Reasoning",
              "name": "reasoningOptions",
              "values": [
                {
                  "displayName": "Effort",
                  "name": "effort",
                  "type": "options",
                  "default": "medium",
                  "options": [
                    {
                      "name": "Low",
                      "value": "low"
                    },
                    {
                      "name": "Medium",
                      "value": "medium"
                    },
                    {
                      "name": "High",
                      "value": "high"
                    }
                  ]
                },
                {
                  "displayName": "Summary",
                  "name": "summary",
                  "type": "options",
                  "default": "auto",
                  "description": "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process.",
                  "options": [
                    {
                      "name": "None",
                      "value": "none"
                    },
                    {
                      "name": "Auto",
                      "value": "auto"
                    },
                    {
                      "name": "Concise",
                      "value": "concise"
                    },
                    {
                      "name": "Detailed",
                      "value": "detailed"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "displayName": "Safety Identifier",
          "name": "safetyIdentifier",
          "type": "string",
          "default": "",
          "description": "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user."
        },
        {
          "displayName": "Service Tier",
          "name": "serviceTier",
          "type": "options",
          "default": "auto",
          "description": "The service tier to use for the request",
          "options": [
            {
              "name": "Auto",
              "value": "auto"
            },
            {
              "name": "Flex",
              "value": "flex"
            },
            {
              "name": "Default",
              "value": "default"
            },
            {
              "name": "Priority",
              "value": "priority"
            }
          ]
        },
        {
          "displayName": "Store",
          "name": "store",
          "type": "boolean",
          "default": true,
          "description": "Whether to store the generated model response for later retrieval via API"
        },
        {
          "displayName": "Output Format",
          "name": "textFormat",
          "type": "fixedCollection",
          "default": {
            "textOptions": [
              {
                "type": "text"
              }
            ]
          },
          "options": [
            {
              "displayName": "Text",
              "name": "textOptions",
              "values": [
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "default": "",
                  "options": [
                    {
                      "name": "Text",
                      "value": "text"
                    },
                    {
                      "name": "JSON Schema (recommended)",
                      "value": "json_schema"
                    },
                    {
                      "name": "JSON Object",
                      "value": "json_object"
                    }
                  ]
                },
                {
                  "displayName": "Verbosity",
                  "name": "verbosity",
                  "type": "options",
                  "default": "medium",
                  "options": [
                    {
                      "name": "Low",
                      "value": "low"
                    },
                    {
                      "name": "Medium",
                      "value": "medium"
                    },
                    {
                      "name": "High",
                      "value": "high"
                    }
                  ]
                },
                {
                  "displayName": "Name",
                  "name": "name",
                  "type": "string",
                  "default": "my_schema",
                  "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "json_schema"
                      ]
                    }
                  }
                },
                {
                  "displayName": "All properties in the schema must be set to \"required\", when using \"strict\" mode.",
                  "name": "requiredNotice",
                  "type": "notice",
                  "default": "",
                  "displayOptions": {
                    "show": {
                      "strict": [
                        true
                      ]
                    }
                  }
                },
                {
                  "displayName": "Schema",
                  "name": "schema",
                  "type": "json",
                  "default": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"message\": {\n      \"type\": \"string\"\n    }\n  },\n  \"additionalProperties\": false,\n  \"required\": [\"message\"]\n}",
                  "description": "The schema of the response format",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "json_schema"
                      ]
                    }
                  }
                },
                {
                  "displayName": "Description",
                  "name": "description",
                  "type": "string",
                  "default": "",
                  "description": "The description of the response format",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "json_schema"
                      ]
                    }
                  }
                },
                {
                  "displayName": "Strict",
                  "name": "strict",
                  "type": "boolean",
                  "default": false,
                  "description": "Whether to require that the AI will always generate responses that match the provided JSON Schema",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "json_schema"
                      ]
                    }
                  }
                }
              ]
            }
          ]
        },
        {
          "displayName": "Top Logprobs",
          "name": "topLogprobs",
          "type": "number",
          "default": 0,
          "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 20
          }
        },
        {
          "displayName": "Output Randomness (Temperature)",
          "name": "temperature",
          "type": "number",
          "default": 1,
          "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 2,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Output Randomness (Top P)",
          "name": "topP",
          "default": 1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "An alternative to sampling with temperature, controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.",
          "type": "number"
        },
        {
          "displayName": "Truncation",
          "name": "truncation",
          "type": "boolean",
          "default": false,
          "description": "Whether to truncate the input to the model's context window size. When disabled will throw a 400 error instead."
        },
        {
          "displayName": "Background Mode",
          "name": "backgroundMode",
          "type": "fixedCollection",
          "default": {
            "values": [
              {
                "backgroundMode": true
              }
            ]
          },
          "options": [
            {
              "displayName": "Bakground",
              "name": "values",
              "values": [
                {
                  "displayName": "Background Mode",
                  "name": "enabled",
                  "type": "boolean",
                  "default": false,
                  "description": "Whether to run the model in background mode. If true, the model will run in background mode."
                },
                {
                  "displayName": "Timeout",
                  "name": "timeout",
                  "type": "number",
                  "default": 300,
                  "description": "The timeout for the background mode in seconds. If 0, the timeout is infinite.",
                  "typeOptions": {
                    "minValue": 0,
                    "maxValue": 3600
                  }
                }
              ]
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "action": "Create a conversation",
          "description": "Create a conversation"
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get a conversation",
          "description": "Get a conversation"
        },
        {
          "name": "Remove",
          "value": "remove",
          "action": "Remove a conversation",
          "description": "Remove a conversation"
        },
        {
          "name": "Update",
          "value": "update",
          "action": "Update a conversation",
          "description": "Update a conversation"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "conversation"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Messages",
      "name": "messages",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "type": "text"
          }
        ]
      },
      "options": [
        {
          "displayName": "Message",
          "name": "values",
          "values": [
            {
              "displayName": "Role",
              "name": "role",
              "type": "options",
              "description": "Role in shaping the model's response, it tells the model how it should behave and interact with the user",
              "options": [
                {
                  "name": "User",
                  "value": "user",
                  "description": "Send a message as a user and get a response from the model"
                },
                {
                  "name": "Assistant",
                  "value": "assistant",
                  "description": "Tell the model to adopt a specific tone or personality"
                },
                {
                  "name": "System",
                  "value": "system",
                  "description": "Usually used to set the model's behavior or context for the next user message"
                }
              ],
              "default": "user"
            },
            {
              "displayName": "Prompt",
              "name": "content",
              "type": "string",
              "description": "The content of the message to be send",
              "default": "",
              "placeholder": "e.g. Hello, how can you help me?",
              "typeOptions": {
                "rows": 2
              },
              "displayOptions": {}
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "conversation"
          ]
        }
      },
      "typeOptions": {
        "sortable": true,
        "multipleValues": true
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Metadata",
          "name": "metadata",
          "type": "json",
          "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.",
          "default": "{}"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "conversation"
          ]
        }
      }
    },
    {
      "displayName": "Conversation ID",
      "name": "conversationId",
      "type": "string",
      "default": "",
      "description": "The ID of the conversation to delete",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "remove"
          ],
          "resource": [
            "conversation"
          ]
        }
      }
    },
    {
      "displayName": "Conversation ID",
      "name": "conversationId",
      "type": "string",
      "default": "",
      "description": "The ID of the conversation to update",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "update"
          ],
          "resource": [
            "conversation"
          ]
        }
      }
    },
    {
      "displayName": "Metadata",
      "name": "metadata",
      "type": "json",
      "default": "{}",
      "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "update"
          ],
          "resource": [
            "conversation"
          ]
        }
      }
    },
    {
      "displayName": "Conversation ID",
      "name": "conversationId",
      "type": "string",
      "default": "",
      "description": "The ID of the conversation to retrieve",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "conversation"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "generate",
      "options": [
        {
          "name": "Generate",
          "value": "generate",
          "action": "Generate a video",
          "description": "Creates a video from a text prompt"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "video"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "videoModelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. gpt-4"
        }
      ]
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "A video of a cat playing with a ball",
      "description": "The prompt to generate a video from",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "video"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Seconds",
      "name": "seconds",
      "type": "number",
      "default": 4,
      "description": "Clip duration in seconds",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "video"
          ]
        }
      }
    },
    {
      "displayName": "Size",
      "name": "size",
      "type": "options",
      "default": "1280x720",
      "description": "Output resolution formatted as width x height. 1024x1792 and 1792x1024 are only supported by Sora 2 Pro.",
      "options": [
        {
          "name": "720x1280",
          "value": "720x1280"
        },
        {
          "name": "1280x720",
          "value": "1280x720"
        },
        {
          "name": "1024x1792",
          "value": "1024x1792"
        },
        {
          "name": "1792x1024",
          "value": "1792x1024"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "video"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Reference",
          "description": "Optional image reference that guides generation",
          "name": "binaryPropertyNameReference",
          "type": "string",
          "default": "data",
          "placeholder": "e.g. data"
        },
        {
          "displayName": "Wait Timeout",
          "name": "waitTime",
          "type": "number",
          "default": 300,
          "description": "Time to wait for the video to be generated in seconds",
          "typeOptions": {
            "minValue": 5,
            "maxValue": 7200
          }
        },
        {
          "displayName": "Output Field Name",
          "name": "fileName",
          "type": "string",
          "default": "data",
          "hint": "The name of the output field to put the binary file data in"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "video"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "generate",
      "name": "Generate Audio",
      "description": "Creates audio from a text prompt",
      "resource": "audio"
    },
    {
      "operation": "transcribe",
      "name": "Transcribe a Recording",
      "description": "Transcribes audio into text",
      "resource": "audio"
    },
    {
      "operation": "translate",
      "name": "Translate a Recording",
      "description": "Translates audio into text in English",
      "resource": "audio"
    },
    {
      "operation": "deleteFile",
      "name": "Delete a File",
      "description": "Delete a file from the server",
      "resource": "file"
    },
    {
      "operation": "list",
      "name": "List Files",
      "description": "Returns a list of files that belong to the user's organization",
      "resource": "file"
    },
    {
      "operation": "upload",
      "name": "Upload a File",
      "description": "Upload a file that can be used across various endpoints",
      "resource": "file"
    },
    {
      "operation": "analyze",
      "name": "Analyze Image",
      "description": "Take in images and answer questions about them",
      "resource": "image"
    },
    {
      "operation": "generate",
      "name": "Generate an Image",
      "description": "Creates an image from a text prompt",
      "resource": "image"
    },
    {
      "operation": "edit",
      "name": "Edit Image",
      "description": "Edit an image",
      "resource": "image"
    },
    {
      "operation": "response",
      "name": "Message a Model",
      "description": "Generate a model response with GPT 3, 4, 5, etc. using Responses API",
      "resource": "text"
    },
    {
      "operation": "classify",
      "name": "Classify Text for Violations",
      "description": "Check whether content complies with usage policies",
      "resource": "text"
    },
    {
      "operation": "create",
      "name": "Create",
      "description": "Create a conversation",
      "resource": "conversation"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a conversation",
      "resource": "conversation"
    },
    {
      "operation": "remove",
      "name": "Remove",
      "description": "Remove a conversation",
      "resource": "conversation"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update a conversation",
      "resource": "conversation"
    },
    {
      "operation": "generate",
      "name": "Generate",
      "description": "Creates a video from a text prompt",
      "resource": "video"
    }
  ]


node_type: nodes-langchain.openAi
package_name: @n8n/n8n-nodes-langchain
display_name: OpenAI
description: Message an assistant or GPT, analyze images, generate audio, etc.
category: transform
development_style: programmatic
version: 2.3
credentials_required:
  [
  {
  "name": "openAiApi",
  "required": true
  }
  ]

outputs:
  [
  "main"
  ]

updated_at: 2026-07-16 12:10:22
properties_schema:
  [
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "Text",
          "value": "text",
          "builderHint": {
            "propertyHint": "For text generation, reasoning and tools, use AI Agent with OpenAI Chat Model instead of this resource."
          }
        },
        {
          "name": "Image",
          "value": "image"
        },
        {
          "name": "Audio",
          "value": "audio"
        },
        {
          "name": "File",
          "value": "file"
        },
        {
          "name": "Conversation",
          "value": "conversation"
        },
        {
          "name": "Video",
          "value": "video"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "generate",
      "options": [
        {
          "name": "Generate Audio",
          "value": "generate",
          "action": "Generate audio",
          "description": "Creates audio from a text prompt"
        },
        {
          "name": "Transcribe a Recording",
          "value": "transcribe",
          "action": "Transcribe a recording",
          "description": "Transcribes audio into text"
        },
        {
          "name": "Translate a Recording",
          "value": "translate",
          "action": "Translate a recording",
          "description": "Translates audio into text in English"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "audio"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "OpenAI API limits the size of the audio file to 25 MB",
      "name": "fileSizeLimitNotice",
      "type": "notice",
      "default": " ",
      "displayOptions": {
        "show": {
          "resource": [
            "audio"
          ],
          "operation": [
            "translate",
            "transcribe"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "tts-1",
      "options": [
        {
          "name": "TTS-1",
          "value": "tts-1"
        },
        {
          "name": "TTS-1-HD",
          "value": "tts-1-hd"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Text Input",
      "name": "input",
      "type": "string",
      "default": "",
      "description": "The text to generate audio for. The maximum length is 4096 characters.",
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "audio"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Voice",
      "name": "voice",
      "type": "options",
      "default": "alloy",
      "description": "The voice to use when generating the audio",
      "options": [
        {
          "name": "Alloy",
          "value": "alloy"
        },
        {
          "name": "Echo",
          "value": "echo"
        },
        {
          "name": "Fable",
          "value": "fable"
        },
        {
          "name": "Nova",
          "value": "nova"
        },
        {
          "name": "Onyx",
          "value": "onyx"
        },
        {
          "name": "Shimmer",
          "value": "shimmer"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Response Format",
          "name": "response_format",
          "type": "options",
          "default": "mp3",
          "options": [
            {
              "name": "MP3",
              "value": "mp3"
            },
            {
              "name": "OPUS",
              "value": "opus"
            },
            {
              "name": "AAC",
              "value": "aac"
            },
            {
              "name": "FLAC",
              "value": "flac"
            }
          ]
        },
        {
          "displayName": "Audio Speed",
          "name": "speed",
          "type": "number",
          "default": 1,
          "typeOptions": {
            "minValue": 0.25,
            "maxValue": 4,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Put Output in Field",
          "name": "binaryPropertyOutput",
          "type": "string",
          "default": "data",
          "hint": "The name of the output field to put the binary file data in"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Input Data Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm",
      "displayOptions": {
        "show": {
          "operation": [
            "transcribe"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Language of the Audio File",
          "name": "language",
          "type": "string",
          "description": "The language of the input audio. Supplying the input language in <a href=\"https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes\" target=\"_blank\">ISO-639-1</a> format will improve accuracy and latency.",
          "default": ""
        },
        {
          "displayName": "Output Randomness (Temperature)",
          "name": "temperature",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "transcribe"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Input Data Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the audio file in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm",
      "displayOptions": {
        "show": {
          "operation": [
            "translate"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Output Randomness (Temperature)",
          "name": "temperature",
          "type": "number",
          "default": 0,
          "typeOptions": {
            "minValue": 0,
            "maxValue": 1,
            "numberPrecision": 1
          }
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "translate"
          ],
          "resource": [
            "audio"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "upload",
      "options": [
        {
          "name": "Delete a File",
          "value": "deleteFile",
          "action": "Delete a file",
          "description": "Delete a file from the server"
        },
        {
          "name": "List Files",
          "value": "list",
          "action": "List files",
          "description": "Returns a list of files that belong to the user's organization"
        },
        {
          "name": "Upload a File",
          "value": "upload",
          "action": "Upload a file",
          "description": "Upload a file that can be used across various endpoints"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "file"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Input Data Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the file. The size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants.",
      "displayOptions": {
        "show": {
          "operation": [
            "upload"
          ],
          "resource": [
            "file"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Purpose",
          "name": "purpose",
          "type": "options",
          "default": "user_data",
          "description": "The intended purpose of the uploaded file, the 'Fine-tuning' only supports .jsonl files",
          "options": [
            {
              "name": "Assistants",
              "value": "assistants"
            },
            {
              "name": "Fine-Tune",
              "value": "fine-tune"
            },
            {
              "name": "Vision",
              "value": "vision"
            },
            {
              "name": "User Data",
              "value": "user_data"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "upload"
          ],
          "resource": [
            "file"
          ]
        }
      }
    },
    {
      "displayName": "File",
      "name": "fileId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "deleteFile"
          ],
          "resource": [
            "file"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "fileSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "file-[a-zA-Z0-9]",
                "errorMessage": "Not a valid File ID"
              }
            }
          ],
          "placeholder": "e.g. file-1234567890"
        }
      ]
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Purpose",
          "name": "purpose",
          "type": "options",
          "default": "any",
          "description": "Only return files with the given purpose",
          "options": [
            {
              "name": "Any [Default]",
              "value": "any"
            },
            {
              "name": "Assistants",
              "value": "assistants"
            },
            {
              "name": "Fine-Tune",
              "value": "fine-tune"
            },
            {
              "name": "Vision",
              "value": "vision"
            },
            {
              "name": "User Data",
              "value": "user_data"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "list"
          ],
          "resource": [
            "file"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "generate",
      "options": [
        {
          "name": "Analyze Image",
          "value": "analyze",
          "action": "Analyze image",
          "description": "Take in images and answer questions about them"
        },
        {
          "name": "Generate an Image",
          "value": "generate",
          "action": "Generate an image",
          "description": "Creates an image from a text prompt"
        },
        {
          "name": "Edit Image",
          "value": "edit",
          "action": "Edit image",
          "description": "Edit an image"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "image"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "dall-e-3",
      "description": "The model to use for image generation",
      "options": [
        {
          "name": "DALL·E 2",
          "value": "dall-e-2"
        },
        {
          "name": "DALL·E 3",
          "value": "dall-e-3"
        },
        {
          "name": "GPT Image 1",
          "value": "gpt-image-1"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.2
              }
            }
          ],
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": "gpt-image-1-mini"
      },
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.2
              }
            }
          ],
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "imageGenerateModelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. gpt-4"
        }
      ]
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "",
      "description": "A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2 and 4000 characters for dall-e-3.",
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Number of Images",
          "name": "n",
          "default": 1,
          "description": "Number of images to generate",
          "type": "number",
          "typeOptions": {
            "minValue": 1,
            "maxValue": 10
          },
          "displayOptions": {
            "show": {
              "/model": [
                "dall-e-2"
              ]
            }
          }
        },
        {
          "displayName": "Quality",
          "name": "dalleQuality",
          "type": "options",
          "description": "The quality of the image that will be generated, HD creates images with finer details and greater consistency across the image",
          "options": [
            {
              "name": "HD",
              "value": "hd"
            },
            {
              "name": "Standard",
              "value": "standard"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "dall-e-3"
              ]
            }
          },
          "default": "standard"
        },
        {
          "displayName": "Quality",
          "name": "quality",
          "type": "options",
          "description": "The quality of the image that will be generated, High creates images with finer details and greater consistency across the image",
          "options": [
            {
              "name": "High",
              "value": "high"
            },
            {
              "name": "Medium",
              "value": "medium"
            },
            {
              "name": "Low",
              "value": "low"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          },
          "default": "medium"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "256x256",
              "value": "256x256"
            },
            {
              "name": "512x512",
              "value": "512x512"
            },
            {
              "name": "1024x1024",
              "value": "1024x1024"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "dall-e-2"
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "1024x1024",
              "value": "1024x1024"
            },
            {
              "name": "1792x1024",
              "value": "1792x1024"
            },
            {
              "name": "1024x1792",
              "value": "1024x1792"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "dall-e-3"
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "1024x1024",
              "value": "1024x1024"
            },
            {
              "name": "1024x1536",
              "value": "1024x1536"
            },
            {
              "name": "1536x1024",
              "value": "1536x1024"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Style",
          "name": "style",
          "type": "options",
          "options": [
            {
              "name": "Natural",
              "value": "natural",
              "description": "Produce more natural looking images"
            },
            {
              "name": "Vivid",
              "value": "vivid",
              "description": "Lean towards generating hyper-real and dramatic images"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "dall-e-3"
              ]
            }
          },
          "default": "vivid"
        },
        {
          "displayName": "Respond with Image URL(s)",
          "name": "returnImageUrls",
          "type": "boolean",
          "default": false,
          "description": "Whether to return image URL(s) instead of binary file(s)",
          "displayOptions": {
            "hide": {
              "/model": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "Put Output in Field",
          "name": "binaryPropertyOutput",
          "type": "string",
          "default": "data",
          "hint": "The name of the output field to put the binary file data in",
          "displayOptions": {
            "show": {
              "returnImageUrls": [
                false
              ]
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.2
              }
            }
          ],
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Number of Images",
          "name": "n",
          "default": 1,
          "description": "Number of images to generate",
          "type": "number",
          "typeOptions": {
            "minValue": 1,
            "maxValue": 10
          },
          "displayOptions": {
            "show": {
              "/modelId": [
                "dall-e-2"
              ]
            }
          }
        },
        {
          "displayName": "Quality",
          "name": "dalleQuality",
          "type": "options",
          "description": "The quality of the image that will be generated, HD creates images with finer details and greater consistency across the image",
          "options": [
            {
              "name": "HD",
              "value": "hd"
            },
            {
              "name": "Standard",
              "value": "standard"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                "dall-e-3"
              ]
            }
          },
          "default": "standard"
        },
        {
          "displayName": "Quality",
          "name": "quality",
          "type": "options",
          "description": "The quality of the image that will be generated, High creates images with finer details and greater consistency across the image",
          "options": [
            {
              "name": "High",
              "value": "high"
            },
            {
              "name": "Medium",
              "value": "medium"
            },
            {
              "name": "Low",
              "value": "low"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          },
          "default": "medium"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "256x256",
              "value": "256x256"
            },
            {
              "name": "512x512",
              "value": "512x512"
            },
            {
              "name": "1024x1024",
              "value": "1024x1024"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                "dall-e-2"
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "1024x1024",
              "value": "1024x1024"
            },
            {
              "name": "1792x1024",
              "value": "1792x1024"
            },
            {
              "name": "1024x1792",
              "value": "1024x1792"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                "dall-e-3"
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Resolution",
          "name": "size",
          "type": "options",
          "options": [
            {
              "name": "1024x1024",
              "value": "1024x1024"
            },
            {
              "name": "1024x1536",
              "value": "1024x1536"
            },
            {
              "name": "1536x1024",
              "value": "1536x1024"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          },
          "default": "1024x1024"
        },
        {
          "displayName": "Style",
          "name": "style",
          "type": "options",
          "options": [
            {
              "name": "Natural",
              "value": "natural",
              "description": "Produce more natural looking images"
            },
            {
              "name": "Vivid",
              "value": "vivid",
              "description": "Lean towards generating hyper-real and dramatic images"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                "dall-e-3"
              ]
            }
          },
          "default": "vivid"
        },
        {
          "displayName": "Respond with Image URL(s)",
          "name": "returnImageUrls",
          "type": "boolean",
          "default": false,
          "description": "Whether to return image URL(s) instead of binary file(s)",
          "displayOptions": {
            "hide": {
              "/modelId": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "Put Output in Field",
          "name": "binaryPropertyOutput",
          "type": "string",
          "default": "data",
          "hint": "The name of the output field to put the binary file data in",
          "displayOptions": {
            "show": {
              "returnImageUrls": [
                false
              ]
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.2
              }
            }
          ],
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "imageModelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. gpt-4"
        }
      ]
    },
    {
      "displayName": "Text Input",
      "name": "text",
      "type": "string",
      "default": "What's in this image?",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Input Type",
      "name": "inputType",
      "type": "options",
      "default": "url",
      "options": [
        {
          "name": "Image URL(s)",
          "value": "url"
        },
        {
          "name": "Binary File(s)",
          "value": "base64"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "URL(s)",
      "name": "imageUrls",
      "type": "string",
      "default": "",
      "description": "URL(s) of the image(s) to analyze, multiple URLs can be added separated by comma",
      "displayOptions": {
        "show": {
          "inputType": [
            "url"
          ],
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Input Data Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the image(s)",
      "displayOptions": {
        "show": {
          "inputType": [
            "base64"
          ],
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to simplify the response or not",
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Detail",
          "name": "detail",
          "type": "options",
          "default": "auto",
          "options": [
            {
              "name": "Auto",
              "value": "auto",
              "description": "Model will look at the image input size and decide if it should use the low or high setting"
            },
            {
              "name": "Low",
              "value": "low",
              "description": "Return faster responses and consume fewer tokens"
            },
            {
              "name": "High",
              "value": "high",
              "description": "Return more detailed responses, consumes more tokens"
            }
          ]
        },
        {
          "displayName": "Length of Description (Max Tokens)",
          "description": "Fewer tokens will result in shorter, less detailed image description",
          "name": "maxTokens",
          "type": "number",
          "default": 300,
          "typeOptions": {
            "minValue": 1
          }
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "analyze"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "gpt-image-1",
      "description": "The model to use for image generation",
      "options": [
        {
          "name": "DALL·E 2",
          "value": "dall-e-2"
        },
        {
          "name": "GPT Image 1",
          "value": "gpt-image-1"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.3
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": "gpt-image-1"
      },
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.3
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "imageGenerateModelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. gpt-4"
        }
      ]
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "",
      "description": "A text description of the desired image(s). Maximum 1000 characters for dall-e-2, 32000 characters for gpt-image-1.",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Images",
      "name": "images",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "binaryPropertyName": "data"
          }
        ]
      },
      "description": "Add one or more binary fields to include images with your prompt. Each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images.",
      "options": [
        {
          "displayName": "Image",
          "name": "values",
          "values": [
            {
              "displayName": "Binary Field Name",
              "name": "binaryPropertyName",
              "type": "string",
              "default": "data",
              "placeholder": "e.g. data",
              "description": "The name of the binary field containing the image data"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "/model": [
            "gpt-image-1"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "multipleValues": true,
        "multipleValueButtonText": "Add Image"
      }
    },
    {
      "displayName": "Images",
      "name": "images",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "binaryPropertyName": "data"
          }
        ]
      },
      "description": "Add one or more binary fields to include images with your prompt. Each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images.",
      "options": [
        {
          "displayName": "Image",
          "name": "values",
          "values": [
            {
              "displayName": "Binary Field Name",
              "name": "binaryPropertyName",
              "type": "string",
              "default": "data",
              "placeholder": "e.g. data",
              "description": "The name of the binary field containing the image data"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "gpt-image"
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "multipleValues": true,
        "multipleValueButtonText": "Add Image"
      }
    },
    {
      "displayName": "Binary Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the image. It should be a square png file less than 4MB.",
      "displayOptions": {
        "show": {
          "/model": [
            "dall-e-2"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Binary Field Name",
      "name": "binaryPropertyName",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property which contains the image. It should be a square png file less than 4MB.",
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "dall-e"
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Number of Images",
      "name": "n",
      "type": "number",
      "default": 1,
      "description": "The number of images to generate. Must be between 1 and 10.",
      "displayOptions": {
        "show": {
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 10
      }
    },
    {
      "displayName": "Size",
      "name": "size",
      "type": "options",
      "default": "1024x1024",
      "description": "The size of the generated images",
      "options": [
        {
          "name": "256x256",
          "value": "256x256"
        },
        {
          "name": "512x512",
          "value": "512x512"
        },
        {
          "name": "1024x1024",
          "value": "1024x1024"
        },
        {
          "name": "1024x1536 (Portrait)",
          "value": "1024x1536"
        },
        {
          "name": "1536x1024 (Landscape)",
          "value": "1536x1024"
        },
        {
          "name": "Auto",
          "value": "auto"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Quality",
      "name": "quality",
      "type": "options",
      "default": "auto",
      "description": "The quality of the image that will be generated",
      "options": [
        {
          "name": "Auto",
          "value": "auto"
        },
        {
          "name": "High",
          "value": "high"
        },
        {
          "name": "Medium",
          "value": "medium"
        },
        {
          "name": "Low",
          "value": "low"
        },
        {
          "name": "Standard",
          "value": "standard"
        }
      ],
      "displayOptions": {
        "show": {
          "/model": [
            "gpt-image-1"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Quality",
      "name": "quality",
      "type": "options",
      "default": "auto",
      "description": "The quality of the image that will be generated",
      "options": [
        {
          "name": "Auto",
          "value": "auto"
        },
        {
          "name": "High",
          "value": "high"
        },
        {
          "name": "Medium",
          "value": "medium"
        },
        {
          "name": "Low",
          "value": "low"
        },
        {
          "name": "Standard",
          "value": "standard"
        }
      ],
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "gpt-image"
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Response Format",
      "name": "responseFormat",
      "type": "options",
      "default": "url",
      "description": "The format in which the generated images are returned. URLs are only valid for 60 minutes after generation.",
      "options": [
        {
          "name": "URL",
          "value": "url"
        },
        {
          "name": "Base64 JSON",
          "value": "b64_json"
        }
      ],
      "displayOptions": {
        "show": {
          "/model": [
            "dall-e-2"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Response Format",
      "name": "responseFormat",
      "type": "options",
      "default": "url",
      "description": "The format in which the generated images are returned. URLs are only valid for 60 minutes after generation.",
      "options": [
        {
          "name": "URL",
          "value": "url"
        },
        {
          "name": "Base64 JSON",
          "value": "b64_json"
        }
      ],
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "dall-e"
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Output Format",
      "name": "outputFormat",
      "type": "options",
      "default": "png",
      "description": "The format in which the generated images are returned. Only supported for gpt-image-1.",
      "options": [
        {
          "name": "PNG",
          "value": "png"
        },
        {
          "name": "JPEG",
          "value": "jpeg"
        },
        {
          "name": "WebP",
          "value": "webp"
        }
      ],
      "displayOptions": {
        "show": {
          "/model": [
            "gpt-image-1"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Output Format",
      "name": "outputFormat",
      "type": "options",
      "default": "png",
      "description": "The format in which the generated images are returned. Only supported for gpt-image-1.",
      "options": [
        {
          "name": "PNG",
          "value": "png"
        },
        {
          "name": "JPEG",
          "value": "jpeg"
        },
        {
          "name": "WebP",
          "value": "webp"
        }
      ],
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "gpt-image"
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Output Compression",
      "name": "outputCompression",
      "type": "number",
      "default": 100,
      "description": "The compression level (0-100%) for the generated images. Only supported for gpt-image-1 with webp or jpeg output formats.",
      "displayOptions": {
        "show": {
          "/model": [
            "gpt-image-1"
          ],
          "outputFormat": [
            "webp",
            "jpeg"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "minValue": 0,
        "maxValue": 100
      }
    },
    {
      "displayName": "Output Compression",
      "name": "outputCompression",
      "type": "number",
      "default": 100,
      "description": "The compression level (0-100%) for the generated images. Only supported for gpt-image-1 with webp or jpeg output formats.",
      "displayOptions": {
        "show": {
          "/modelId": [
            {
              "_cnd": {
                "includes": "gpt-image"
              }
            }
          ],
          "outputFormat": [
            "webp",
            "jpeg"
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      },
      "typeOptions": {
        "minValue": 0,
        "maxValue": 100
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "User",
          "name": "user",
          "type": "string",
          "default": "",
          "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse",
          "placeholder": "user-12345"
        },
        {
          "displayName": "Background",
          "name": "background",
          "type": "options",
          "default": "auto",
          "description": "Allows to set transparency for the background of the generated image(s). Only supported for gpt-image-1.",
          "options": [
            {
              "name": "Auto",
              "value": "auto"
            },
            {
              "name": "Transparent",
              "value": "transparent"
            },
            {
              "name": "Opaque",
              "value": "opaque"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "gpt-image-1"
              ]
            }
          }
        },
        {
          "displayName": "Input Fidelity",
          "name": "inputFidelity",
          "type": "options",
          "default": "low",
          "description": "Control how much effort the model will exert to match the style and features of input images. Only supported for gpt-image-1.",
          "options": [
            {
              "name": "Low",
              "value": "low"
            },
            {
              "name": "High",
              "value": "high"
            }
          ],
          "displayOptions": {
            "show": {
              "/model": [
                "gpt-image-1"
              ]
            }
          }
        },
        {
          "displayName": "Image Mask",
          "name": "imageMask",
          "type": "string",
          "default": "data",
          "hint": "The name of the input field containing the binary file data to be processed",
          "description": "Name of the binary property which contains the image. An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as image."
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.3
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "User",
          "name": "user",
          "type": "string",
          "default": "",
          "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse",
          "placeholder": "user-12345"
        },
        {
          "displayName": "Background",
          "name": "background",
          "type": "options",
          "default": "auto",
          "description": "Allows to set transparency for the background of the generated image(s). Only supported for gpt-image-1.",
          "options": [
            {
              "name": "Auto",
              "value": "auto"
            },
            {
              "name": "Transparent",
              "value": "transparent"
            },
            {
              "name": "Opaque",
              "value": "opaque"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "Input Fidelity",
          "name": "inputFidelity",
          "type": "options",
          "default": "low",
          "description": "Control how much effort the model will exert to match the style and features of input images. Only supported for gpt-image-1.",
          "options": [
            {
              "name": "Low",
              "value": "low"
            },
            {
              "name": "High",
              "value": "high"
            }
          ],
          "displayOptions": {
            "show": {
              "/modelId": [
                {
                  "_cnd": {
                    "includes": "gpt-image"
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "Image Mask",
          "name": "imageMask",
          "type": "string",
          "default": "data",
          "hint": "The name of the input field containing the binary file data to be processed",
          "description": "Name of the binary property which contains the image. An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as image."
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.3
              }
            }
          ],
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "response",
      "options": [
        {
          "name": "Message a Model",
          "value": "response",
          "action": "Message a model",
          "description": "Generate a model response with GPT 3, 4, 5, etc. using Responses API",
          "builderHint": {
            "propertyHint": "Use operation: 'response' for text generation. Do NOT use 'message' — that v1 value is invalid on v2 and fails validation."
          }
        },
        {
          "name": "Classify Text for Violations",
          "value": "classify",
          "action": "Classify text for violations",
          "description": "Check whether content complies with usage policies"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "text"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Text Input",
      "name": "input",
      "type": "string",
      "default": "",
      "description": "The input text to classify if it is violates the moderation policy",
      "displayOptions": {
        "show": {
          "operation": [
            "classify"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": false,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "classify"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Use Stable Model",
          "name": "useStableModel",
          "type": "boolean",
          "default": false,
          "description": "Whether to use the stable version of the model instead of the latest version, accuracy may be slightly lower"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.1
              }
            }
          ],
          "operation": [
            "classify"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "modelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. gpt-4"
        }
      ]
    },
    {
      "displayName": "Messages",
      "name": "responses",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "type": "text"
          }
        ]
      },
      "options": [
        {
          "displayName": "Message",
          "name": "values",
          "values": [
            {
              "displayName": "Type",
              "name": "type",
              "type": "options",
              "default": "text",
              "options": [
                {
                  "name": "Text",
                  "value": "text"
                },
                {
                  "name": "Image",
                  "value": "image"
                },
                {
                  "name": "File",
                  "value": "file"
                }
              ]
            },
            {
              "displayName": "Role",
              "name": "role",
              "type": "options",
              "description": "Role in shaping the model's response, it tells the model how it should behave and interact with the user",
              "options": [
                {
                  "name": "User",
                  "value": "user",
                  "description": "Send a message as a user and get a response from the model"
                },
                {
                  "name": "Assistant",
                  "value": "assistant",
                  "description": "Tell the model to adopt a specific tone or personality"
                },
                {
                  "name": "System",
                  "value": "system",
                  "description": "Usually used to set the model's behavior or context for the next user message"
                }
              ],
              "default": "user"
            },
            {
              "displayName": "Prompt",
              "name": "content",
              "type": "string",
              "description": "The content of the message to be send",
              "default": "",
              "placeholder": "e.g. Hello, how can you help me?",
              "typeOptions": {
                "rows": 2
              },
              "displayOptions": {
                "show": {
                  "type": [
                    "text"
                  ]
                }
              }
            },
            {
              "displayName": "Image Type",
              "name": "imageType",
              "type": "options",
              "default": "url",
              "options": [
                {
                  "name": "Image URL",
                  "value": "url"
                },
                {
                  "name": "File ID",
                  "value": "fileId"
                },
                {
                  "name": "File Data",
                  "value": "base64"
                }
              ],
              "displayOptions": {
                "show": {
                  "type": [
                    "image"
                  ]
                }
              }
            },
            {
              "displayName": "Image URL",
              "name": "imageUrl",
              "type": "string",
              "default": "",
              "placeholder": "e.g. https://example.com/image.jpeg",
              "description": "URL of the image to be sent",
              "displayOptions": {
                "show": {
                  "type": [
                    "image"
                  ],
                  "imageType": [
                    "url"
                  ]
                }
              }
            },
            {
              "displayName": "Image Data",
              "name": "binaryPropertyName",
              "type": "string",
              "default": "data",
              "placeholder": "e.g. data",
              "hint": "The name of the input field containing the binary file data to be processed",
              "description": "Name of the binary property which contains the image(s)",
              "displayOptions": {
                "show": {
                  "type": [
                    "image"
                  ],
                  "imageType": [
                    "base64"
                  ]
                }
              }
            },
            {
              "displayName": "File ID",
              "name": "fileId",
              "type": "string",
              "default": "",
              "description": "ID of the file to be sent",
              "displayOptions": {
                "show": {
                  "type": [
                    "image"
                  ],
                  "imageType": [
                    "fileId"
                  ]
                }
              }
            },
            {
              "displayName": "Detail",
              "name": "imageDetail",
              "type": "options",
              "default": "auto",
              "description": "The detail level of the image to be sent to the model",
              "options": [
                {
                  "name": "Auto",
                  "value": "auto"
                },
                {
                  "name": "Low",
                  "value": "low"
                },
                {
                  "name": "High",
                  "value": "high"
                }
              ],
              "displayOptions": {
                "show": {
                  "type": [
                    "image"
                  ]
                }
              }
            },
            {
              "displayName": "File Type",
              "name": "fileType",
              "type": "options",
              "default": "url",
              "options": [
                {
                  "name": "File URL",
                  "value": "url"
                },
                {
                  "name": "File ID",
                  "value": "fileId"
                },
                {
                  "name": "File Data",
                  "value": "base64"
                }
              ],
              "displayOptions": {
                "show": {
                  "type": [
                    "file"
                  ]
                }
              }
            },
            {
              "displayName": "File URL",
              "name": "fileUrl",
              "type": "string",
              "default": "",
              "placeholder": "e.g. https://example.com/file.pdf",
              "description": "URL of the file to be sent. Accepts base64 encoded files as well.",
              "displayOptions": {
                "show": {
                  "type": [
                    "file"
                  ],
                  "fileType": [
                    "url"
                  ]
                }
              }
            },
            {
              "displayName": "File ID",
              "name": "fileId",
              "type": "string",
              "default": "",
              "description": "ID of the file to be sent",
              "displayOptions": {
                "show": {
                  "type": [
                    "file"
                  ],
                  "fileType": [
                    "fileId"
                  ]
                }
              }
            },
            {
              "displayName": "File Data",
              "name": "binaryPropertyName",
              "type": "string",
              "default": "data",
              "placeholder": "e.g. data",
              "hint": "The name of the input field containing the binary file data to be processed",
              "description": "Name of the binary property which contains the file",
              "displayOptions": {
                "show": {
                  "type": [
                    "file"
                  ],
                  "fileType": [
                    "base64"
                  ]
                }
              }
            },
            {
              "displayName": "File Name",
              "name": "fileName",
              "type": "string",
              "default": "",
              "required": true,
              "displayOptions": {
                "show": {
                  "type": [
                    "file"
                  ],
                  "fileType": [
                    "base64"
                  ]
                }
              }
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      },
      "typeOptions": {
        "sortable": true,
        "multipleValues": true
      }
    },
    {
      "displayName": "Simplify Output",
      "name": "simplify",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Hide Tools",
      "name": "hideTools",
      "type": "hidden",
      "default": "hide",
      "displayOptions": {
        "show": {
          "modelId": [
            "gpt-3.5-turbo-16k-0613",
            "dall-e-3",
            "text-embedding-3-large",
            "dall-e-2",
            "whisper-1",
            "tts-1-hd-1106",
            "tts-1-hd",
            "gpt-4-0314",
            "text-embedding-3-small",
            "gpt-4-32k-0314",
            "gpt-3.5-turbo-0301",
            "gpt-4-vision-preview",
            "gpt-3.5-turbo-16k",
            "gpt-3.5-turbo-instruct-0914",
            "tts-1",
            "davinci-002",
            "gpt-3.5-turbo-instruct",
            "babbage-002",
            "tts-1-1106",
            "text-embedding-ada-002"
          ],
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Connect your own custom n8n tools to this node on the canvas",
      "name": "noticeTools",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "hide": {
          "hideTools": [
            "hide"
          ]
        },
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Built-in Tools",
      "name": "builtInTools",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Web Search",
          "name": "webSearch",
          "type": "collection",
          "default": {
            "searchContextSize": "medium"
          },
          "options": [
            {
              "displayName": "Search Context Size",
              "description": "High level guidance for the amount of context window space to use for the search",
              "name": "searchContextSize",
              "type": "options",
              "default": "medium",
              "options": [
                {
                  "name": "Low",
                  "value": "low"
                },
                {
                  "name": "Medium",
                  "value": "medium"
                },
                {
                  "name": "High",
                  "value": "high"
                }
              ]
            },
            {
              "displayName": "Web Search Allowed Domains",
              "name": "allowedDomains",
              "type": "string",
              "default": "",
              "description": "Comma-separated list of domains to search. Only domains in this list will be searched.",
              "placeholder": "e.g. google.com, wikipedia.org"
            },
            {
              "displayName": "Country",
              "name": "country",
              "type": "string",
              "default": "",
              "placeholder": "e.g. US, GB"
            },
            {
              "displayName": "City",
              "name": "city",
              "type": "string",
              "default": "",
              "placeholder": "e.g. New York, London"
            },
            {
              "displayName": "Region",
              "name": "region",
              "type": "string",
              "default": "",
              "placeholder": "e.g. New York, London"
            }
          ]
        },
        {
          "displayName": "File Search",
          "name": "fileSearch",
          "type": "collection",
          "default": {
            "vectorStoreIds": "[]"
          },
          "options": [
            {
              "displayName": "Vector Store IDs",
              "name": "vectorStoreIds",
              "description": "The vector store IDs to use for the file search. Vector stores are managed via OpenAI Dashboard.",
              "type": "json",
              "default": "[]",
              "required": true
            },
            {
              "displayName": "Filters",
              "name": "filters",
              "type": "json",
              "default": "{}"
            },
            {
              "displayName": "Max Results",
              "name": "maxResults",
              "type": "number",
              "default": 1,
              "typeOptions": {
                "minValue": 1,
                "maxValue": 50
              }
            }
          ]
        },
        {
          "displayName": "Code Interpreter",
          "name": "codeInterpreter",
          "type": "boolean",
          "default": true,
          "description": "Whether to allow the model to execute code in a sandboxed environment"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Conversation ID",
          "name": "conversationId",
          "default": "",
          "description": "The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation after this response completes.",
          "type": "string"
        },
        {
          "displayName": "Include Additional Data",
          "name": "include",
          "default": [],
          "type": "multiOptions",
          "description": "Specify additional output data to include in the model response",
          "options": [
            {
              "name": "Code Interpreter Call Outputs",
              "value": "code_interpreter_call.outputs"
            },
            {
              "name": "Computer Call Output Image URL",
              "value": "computer_call_output.output.image_url"
            },
            {
              "name": "File Search Call Results",
              "value": "file_search_call.results"
            },
            {
              "name": "Message Input Image URL",
              "value": "message.input_image.image_url"
            },
            {
              "name": "Message Output Text Logprobs",
              "value": "message.output_text.logprobs"
            },
            {
              "name": "Reasoning Encrypted Content",
              "value": "reasoning.encrypted_content"
            },
            {
              "name": "Web Search Tool Call Sources",
              "value": "web_search_call.action.sources"
            }
          ]
        },
        {
          "displayName": "Instructions",
          "name": "instructions",
          "type": "string",
          "default": "",
          "description": "Instructions for the model to follow",
          "typeOptions": {
            "rows": 2
          }
        },
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxTokens",
          "default": 16,
          "description": "The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).",
          "type": "number",
          "typeOptions": {
            "maxValue": 32768
          }
        },
        {
          "displayName": "Max Tool Calls Iterations",
          "name": "maxToolsIterations",
          "type": "number",
          "default": 15,
          "description": "The maximum number of tool iteration cycles the LLM will run before stopping. A single iteration can contain multiple tool calls. Set to 0 for no limit."
        },
        {
          "displayName": "Max Built-in Tool Calls",
          "name": "maxToolCalls",
          "type": "number",
          "default": 15,
          "description": "The maximum number of total calls to built-in tools that can be processed in a response. This maximum number applies across all built-in tool calls, not per individual tool. Any further attempts to call a tool by the model will be ignored."
        },
        {
          "displayName": "Metadata",
          "name": "metadata",
          "type": "json",
          "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.",
          "default": "{}"
        },
        {
          "displayName": "Parallel Tool Calls",
          "name": "parallelToolCalls",
          "type": "boolean",
          "default": false,
          "description": "Whether to allow parallel tool calls. If true, the model can call multiple tools at once."
        },
        {
          "displayName": "Previous Response ID",
          "name": "previousResponseId",
          "type": "string",
          "default": "",
          "description": "The ID of the previous response to continue from. Cannot be used in conjunction with Conversation ID."
        },
        {
          "displayName": "Prompt",
          "name": "promptConfig",
          "type": "fixedCollection",
          "description": "Configure the reusable prompt template configured via OpenAI Dashboard. <a href=\"https://platform.openai.com/docs/guides/prompt-engineering#reusable-prompts\">Learn more</a>.",
          "default": {
            "promptOptions": [
              {
                "promptId": ""
              }
            ]
          },
          "options": [
            {
              "displayName": "Prompt",
              "name": "promptOptions",
              "values": [
                {
                  "displayName": "Prompt ID",
                  "name": "promptId",
                  "type": "string",
                  "default": "",
                  "description": "The unique identifier of the prompt template to use"
                },
                {
                  "displayName": "Version",
                  "name": "version",
                  "type": "string",
                  "default": "",
                  "description": "Optional version of the prompt template"
                },
                {
                  "displayName": "Variables",
                  "name": "variables",
                  "type": "json",
                  "default": "{}",
                  "description": "Variables to be substituted into the prompt template"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Prompt Cache Key",
          "name": "promptCacheKey",
          "type": "string",
          "default": "",
          "description": "Used by OpenAI to cache responses for similar requests to optimize your cache hit rates"
        },
        {
          "displayName": "Reasoning",
          "name": "reasoning",
          "type": "fixedCollection",
          "default": {
            "reasoningOptions": [
              {
                "effort": "medium",
                "summary": "none"
              }
            ]
          },
          "options": [
            {
              "displayName": "Reasoning",
              "name": "reasoningOptions",
              "values": [
                {
                  "displayName": "Effort",
                  "name": "effort",
                  "type": "options",
                  "default": "medium",
                  "options": [
                    {
                      "name": "Low",
                      "value": "low"
                    },
                    {
                      "name": "Medium",
                      "value": "medium"
                    },
                    {
                      "name": "High",
                      "value": "high"
                    }
                  ]
                },
                {
                  "displayName": "Summary",
                  "name": "summary",
                  "type": "options",
                  "default": "auto",
                  "description": "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process.",
                  "options": [
                    {
                      "name": "None",
                      "value": "none"
                    },
                    {
                      "name": "Auto",
                      "value": "auto"
                    },
                    {
                      "name": "Concise",
                      "value": "concise"
                    },
                    {
                      "name": "Detailed",
                      "value": "detailed"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "displayName": "Safety Identifier",
          "name": "safetyIdentifier",
          "type": "string",
          "default": "",
          "description": "A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user."
        },
        {
          "displayName": "Service Tier",
          "name": "serviceTier",
          "type": "options",
          "default": "auto",
          "description": "The service tier to use for the request",
          "options": [
            {
              "name": "Auto",
              "value": "auto"
            },
            {
              "name": "Flex",
              "value": "flex"
            },
            {
              "name": "Default",
              "value": "default"
            },
            {
              "name": "Priority",
              "value": "priority"
            }
          ]
        },
        {
          "displayName": "Store",
          "name": "store",
          "type": "boolean",
          "default": true,
          "description": "Whether to store the generated model response for later retrieval via API"
        },
        {
          "displayName": "Output Format",
          "name": "textFormat",
          "type": "fixedCollection",
          "default": {
            "textOptions": [
              {
                "type": "text"
              }
            ]
          },
          "options": [
            {
              "displayName": "Text",
              "name": "textOptions",
              "values": [
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "default": "",
                  "options": [
                    {
                      "name": "Text",
                      "value": "text"
                    },
                    {
                      "name": "JSON Schema (recommended)",
                      "value": "json_schema"
                    },
                    {
                      "name": "JSON Object",
                      "value": "json_object"
                    }
                  ]
                },
                {
                  "displayName": "Verbosity",
                  "name": "verbosity",
                  "type": "options",
                  "default": "medium",
                  "options": [
                    {
                      "name": "Low",
                      "value": "low"
                    },
                    {
                      "name": "Medium",
                      "value": "medium"
                    },
                    {
                      "name": "High",
                      "value": "high"
                    }
                  ]
                },
                {
                  "displayName": "Name",
                  "name": "name",
                  "type": "string",
                  "default": "my_schema",
                  "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "json_schema"
                      ]
                    }
                  }
                },
                {
                  "displayName": "All properties in the schema must be set to \"required\", when using \"strict\" mode.",
                  "name": "requiredNotice",
                  "type": "notice",
                  "default": "",
                  "displayOptions": {
                    "show": {
                      "strict": [
                        true
                      ]
                    }
                  }
                },
                {
                  "displayName": "Schema",
                  "name": "schema",
                  "type": "json",
                  "default": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"message\": {\n      \"type\": \"string\"\n    }\n  },\n  \"additionalProperties\": false,\n  \"required\": [\"message\"]\n}",
                  "description": "The schema of the response format",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "json_schema"
                      ]
                    }
                  }
                },
                {
                  "displayName": "Description",
                  "name": "description",
                  "type": "string",
                  "default": "",
                  "description": "The description of the response format",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "json_schema"
                      ]
                    }
                  }
                },
                {
                  "displayName": "Strict",
                  "name": "strict",
                  "type": "boolean",
                  "default": false,
                  "description": "Whether to require that the AI will always generate responses that match the provided JSON Schema",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "json_schema"
                      ]
                    }
                  }
                }
              ]
            }
          ]
        },
        {
          "displayName": "Top Logprobs",
          "name": "topLogprobs",
          "type": "number",
          "default": 0,
          "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 20
          }
        },
        {
          "displayName": "Output Randomness (Temperature)",
          "name": "temperature",
          "type": "number",
          "default": 1,
          "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both",
          "typeOptions": {
            "minValue": 0,
            "maxValue": 2,
            "numberPrecision": 1
          }
        },
        {
          "displayName": "Output Randomness (Top P)",
          "name": "topP",
          "default": 1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "An alternative to sampling with temperature, controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.",
          "type": "number"
        },
        {
          "displayName": "Truncation",
          "name": "truncation",
          "type": "boolean",
          "default": false,
          "description": "Whether to truncate the input to the model's context window size. When disabled will throw a 400 error instead."
        },
        {
          "displayName": "Background Mode",
          "name": "backgroundMode",
          "type": "fixedCollection",
          "default": {
            "values": [
              {
                "backgroundMode": true
              }
            ]
          },
          "options": [
            {
              "displayName": "Bakground",
              "name": "values",
              "values": [
                {
                  "displayName": "Background Mode",
                  "name": "enabled",
                  "type": "boolean",
                  "default": false,
                  "description": "Whether to run the model in background mode. If true, the model will run in background mode."
                },
                {
                  "displayName": "Timeout",
                  "name": "timeout",
                  "type": "number",
                  "default": 300,
                  "description": "The timeout for the background mode in seconds. If 0, the timeout is infinite.",
                  "typeOptions": {
                    "minValue": 0,
                    "maxValue": 3600
                  }
                }
              ]
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "response"
          ],
          "resource": [
            "text"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "action": "Create a conversation",
          "description": "Create a conversation"
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get a conversation",
          "description": "Get a conversation"
        },
        {
          "name": "Remove",
          "value": "remove",
          "action": "Remove a conversation",
          "description": "Remove a conversation"
        },
        {
          "name": "Update",
          "value": "update",
          "action": "Update a conversation",
          "description": "Update a conversation"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "conversation"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Messages",
      "name": "messages",
      "type": "fixedCollection",
      "default": {
        "values": [
          {
            "type": "text"
          }
        ]
      },
      "options": [
        {
          "displayName": "Message",
          "name": "values",
          "values": [
            {
              "displayName": "Role",
              "name": "role",
              "type": "options",
              "description": "Role in shaping the model's response, it tells the model how it should behave and interact with the user",
              "options": [
                {
                  "name": "User",
                  "value": "user",
                  "description": "Send a message as a user and get a response from the model"
                },
                {
                  "name": "Assistant",
                  "value": "assistant",
                  "description": "Tell the model to adopt a specific tone or personality"
                },
                {
                  "name": "System",
                  "value": "system",
                  "description": "Usually used to set the model's behavior or context for the next user message"
                }
              ],
              "default": "user"
            },
            {
              "displayName": "Prompt",
              "name": "content",
              "type": "string",
              "description": "The content of the message to be send",
              "default": "",
              "placeholder": "e.g. Hello, how can you help me?",
              "typeOptions": {
                "rows": 2
              },
              "displayOptions": {}
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "conversation"
          ]
        }
      },
      "typeOptions": {
        "sortable": true,
        "multipleValues": true
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Metadata",
          "name": "metadata",
          "type": "json",
          "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.",
          "default": "{}"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "conversation"
          ]
        }
      }
    },
    {
      "displayName": "Conversation ID",
      "name": "conversationId",
      "type": "string",
      "default": "",
      "description": "The ID of the conversation to delete",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "remove"
          ],
          "resource": [
            "conversation"
          ]
        }
      }
    },
    {
      "displayName": "Conversation ID",
      "name": "conversationId",
      "type": "string",
      "default": "",
      "description": "The ID of the conversation to update",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "update"
          ],
          "resource": [
            "conversation"
          ]
        }
      }
    },
    {
      "displayName": "Metadata",
      "name": "metadata",
      "type": "json",
      "default": "{}",
      "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "update"
          ],
          "resource": [
            "conversation"
          ]
        }
      }
    },
    {
      "displayName": "Conversation ID",
      "name": "conversationId",
      "type": "string",
      "default": "",
      "description": "The ID of the conversation to retrieve",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "conversation"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "generate",
      "options": [
        {
          "name": "Generate",
          "value": "generate",
          "action": "Generate a video",
          "description": "Creates a video from a text prompt"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "video"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Model",
      "name": "modelId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "video"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "videoModelSearch",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "e.g. gpt-4"
        }
      ]
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "A video of a cat playing with a ball",
      "description": "The prompt to generate a video from",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "video"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Seconds",
      "name": "seconds",
      "type": "number",
      "default": 4,
      "description": "Clip duration in seconds",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "video"
          ]
        }
      }
    },
    {
      "displayName": "Size",
      "name": "size",
      "type": "options",
      "default": "1280x720",
      "description": "Output resolution formatted as width x height. 1024x1792 and 1792x1024 are only supported by Sora 2 Pro.",
      "options": [
        {
          "name": "720x1280",
          "value": "720x1280"
        },
        {
          "name": "1280x720",
          "value": "1280x720"
        },
        {
          "name": "1024x1792",
          "value": "1024x1792"
        },
        {
          "name": "1792x1024",
          "value": "1792x1024"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "video"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Reference",
          "description": "Optional image reference that guides generation",
          "name": "binaryPropertyNameReference",
          "type": "string",
          "default": "data",
          "placeholder": "e.g. data"
        },
        {
          "displayName": "Wait Timeout",
          "name": "waitTime",
          "type": "number",
          "default": 300,
          "description": "Time to wait for the video to be generated in seconds",
          "typeOptions": {
            "minValue": 5,
            "maxValue": 7200
          }
        },
        {
          "displayName": "Output Field Name",
          "name": "fileName",
          "type": "string",
          "default": "data",
          "hint": "The name of the output field to put the binary file data in"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "generate"
          ],
          "resource": [
            "video"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "generate",
      "name": "Generate Audio",
      "description": "Creates audio from a text prompt",
      "resource": "audio"
    },
    {
      "operation": "transcribe",
      "name": "Transcribe a Recording",
      "description": "Transcribes audio into text",
      "resource": "audio"
    },
    {
      "operation": "translate",
      "name": "Translate a Recording",
      "description": "Translates audio into text in English",
      "resource": "audio"
    },
    {
      "operation": "deleteFile",
      "name": "Delete a File",
      "description": "Delete a file from the server",
      "resource": "file"
    },
    {
      "operation": "list",
      "name": "List Files",
      "description": "Returns a list of files that belong to the user's organization",
      "resource": "file"
    },
    {
      "operation": "upload",
      "name": "Upload a File",
      "description": "Upload a file that can be used across various endpoints",
      "resource": "file"
    },
    {
      "operation": "analyze",
      "name": "Analyze Image",
      "description": "Take in images and answer questions about them",
      "resource": "image"
    },
    {
      "operation": "generate",
      "name": "Generate an Image",
      "description": "Creates an image from a text prompt",
      "resource": "image"
    },
    {
      "operation": "edit",
      "name": "Edit Image",
      "description": "Edit an image",
      "resource": "image"
    },
    {
      "operation": "response",
      "name": "Message a Model",
      "description": "Generate a model response with GPT 3, 4, 5, etc. using Responses API",
      "resource": "text"
    },
    {
      "operation": "classify",
      "name": "Classify Text for Violations",
      "description": "Check whether content complies with usage policies",
      "resource": "text"
    },
    {
      "operation": "create",
      "name": "Create",
      "description": "Create a conversation",
      "resource": "conversation"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a conversation",
      "resource": "conversation"
    },
    {
      "operation": "remove",
      "name": "Remove",
      "description": "Remove a conversation",
      "resource": "conversation"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update a conversation",
      "resource": "conversation"
    },
    {
      "operation": "generate",
      "name": "Generate",
      "description": "Creates a video from a text prompt",
      "resource": "video"
    }
  ]


node_type: nodes-langchain.microsoftAgent365Trigger
package_name: @n8n/n8n-nodes-langchain
display_name: Microsoft Agent 365 Trigger
description: Trigger for Microsoft Agent 365
category: trigger
development_style: programmatic
version: 1.1
operations: []
credentials_required:
  [
  {
  "name": "microsoftAgent365Api",
  "required": true
  }
  ]

outputs:
  [
  "main"
  ]

updated_at: 2026-07-16 12:10:22
properties_schema:
  [
    {
      "displayName": "This is an early preview for building Agents with Microsoft Agent 365 and n8n. You need to be part of the <a href=\"https://adoption.microsoft.com/copilot/frontier-program/\" target=\"_blank\">Frontier preview program</a> to get early access to Microsoft Agent 365. <a href=\"https://github.com/microsoft/Agent365-Samples/tree/main/nodejs/n8n/sample-agent\" target=\"_blank\">Learn more</a>",
      "name": "previewNotice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "System Prompt",
      "name": "systemPrompt",
      "type": "string",
      "default": "",
      "typeOptions": {
        "rows": 4
      }
    },
    {
      "displayName": "Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require",
      "name": "notice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "hasOutputParser": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Enable Fallback Model",
      "name": "needsFallback",
      "type": "boolean",
      "default": false,
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.1
              }
            }
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Connect an additional language model on the canvas to use it as a fallback if the main model fails",
      "name": "fallbackNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "needsFallback": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Enable Microsoft Work IQ Tools for A365",
      "name": "useMcpTools",
      "type": "boolean",
      "default": false,
      "description": "Whether to allow the agent to use Microsoft MCP tools like Calendar, Email, and OneDrive to assist in completing tasks. Requires appropriate permissions in your Microsoft account."
    },
    {
      "displayName": "Tools to Include",
      "name": "include",
      "type": "options",
      "default": "all",
      "options": [
        {
          "name": "All",
          "value": "all"
        },
        {
          "name": "Selected",
          "value": "selected"
        }
      ],
      "displayOptions": {
        "show": {
          "useMcpTools": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Tools to Include",
      "name": "includeTools",
      "type": "multiOptions",
      "default": [],
      "options": [
        {
          "name": "Admin 365",
          "value": "mcp_Admin365_GraphTools"
        },
        {
          "name": "Admin Tools",
          "value": "mcp_AdminTools"
        },
        {
          "name": "Calendar",
          "value": "mcp_CalendarTools"
        },
        {
          "name": "DA Search",
          "value": "mcp_DASearch"
        },
        {
          "name": "Excel",
          "value": "mcp_ExcelServer"
        },
        {
          "name": "Knowledge",
          "value": "mcp_KnowledgeTools"
        },
        {
          "name": "M365 Copilot",
          "value": "mcp_M365Copilot"
        },
        {
          "name": "Mail",
          "value": "mcp_MailTools"
        },
        {
          "name": "OneDrive",
          "value": "mcp_OneDriveRemoteServer"
        },
        {
          "name": "OneDrive & SharePoint",
          "value": "mcp_ODSPRemoteServer"
        },
        {
          "name": "Planner",
          "value": "mcp_PlannerServer"
        },
        {
          "name": "SharePoint",
          "value": "mcp_SharePointRemoteServer"
        },
        {
          "name": "SharePoint Lists",
          "value": "mcp_SharePointListsTools"
        },
        {
          "name": "Task Personalization",
          "value": "mcp_TaskPersonalizationServer"
        },
        {
          "name": "Teams",
          "value": "mcp_TeamsServer"
        },
        {
          "name": "Teams Canary",
          "value": "mcp_TeamsCanaryServer"
        },
        {
          "name": "Teams V1",
          "value": "mcp_TeamsServerV1"
        },
        {
          "name": "Web Search",
          "value": "mcp_WebSearchTools"
        },
        {
          "name": "Windows 365 Computer Use",
          "value": "mcp_W365ComputerUse"
        },
        {
          "name": "Word",
          "value": "mcp_WordServer"
        }
      ],
      "displayOptions": {
        "show": {
          "useMcpTools": [
            true
          ],
          "include": [
            "selected"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Require Specific Output Format",
      "name": "hasOutputParser",
      "type": "boolean",
      "default": false,
      "noDataExpression": true
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Max Iterations",
          "name": "maxIterations",
          "type": "number",
          "default": 10,
          "description": "The maximum number of iterations the agent will run before stopping"
        },
        {
          "displayName": "Welcome Message",
          "name": "welcomeMessage",
          "type": "string",
          "placeholder": "e.g. Hello! I'm here to help you!",
          "default": "Hello! I'm here to help you!"
        }
      ]
    }
  ]


node_type: nodes-langchain.agent
package_name: @n8n/n8n-nodes-langchain
display_name: AI Agent
description: Generates an action plan and executes it. Can use external tools.
category: transform
development_style: programmatic
version: 3.1
operations: []
credentials_required: []
outputs:
  [
  "main"
  ]

updated_at: 2026-07-16 12:10:22
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: AI Agent node documentation
  description: Learn how to use the AI Agent node in n8n. Follow technical documentation to integrate AI Agent node into your workflows.
  contentType: [integration, reference]
  priority: critical
  ---

  # AI Agent node

  An [AI agent](/glossary.md#ai-agent) is an autonomous system that receives data, makes rational decisions, and acts within its environment to achieve specific goals. The AI agent's environment is everything the agent can access that isn't the agent itself. This agent uses external [tools](/glossary.md#ai-tool) and APIs to perform actions and retrieve information. It can understand the capabilities of different tools and determine which tool to use depending on the task. 

  /// note | Connect a tool
  You must connect at least one tool [sub-node](/integrations/builtin/cluster-nodes/sub-nodes/index.md) to an AI Agent node.
  ///

  /// note | Agent type
  Prior to version 1.82.0, the AI Agent had a setting for working as different agent types. This has now been removed and all AI Agent nodes work as a `Tools Agent` which was the recommended and most frequently used setting. If you're working with older versions of the AI Agent in workflows or templates, as long as they were set to 'Tools Agent', they should continue to behave as intended with the updated node.
  ///


  ## Templates and examples
  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'agent') ]]

  ## Related resources

  Refer to [LangChain's documentation on agents](https://js.langchain.com/docs/concepts/agents/){:target=_blank .external-link} for more information about the service.

  New to AI Agents? Read the [n8n blog introduction to AI agents](https://blog.n8n.io/ai-agents/){:target=_blank .external-link}.

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"

  ## Common issues

  For common errors or issues and suggested resolution steps, refer to [Common Issues](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/common-issues.md).

  --8<-- "_glossary/ai-glossary.md"

properties_schema:
  [
    {
      "displayName": "Tip: Get a feel for agents with our quick <a href=\"https://docs.n8n.io/advanced-ai/intro-tutorial/\" target=\"_blank\">tutorial</a> or see an <a href=\"/workflows/templates/1954\" target=\"_blank\">example</a> of how this node works",
      "name": "aiAgentStarterCallout",
      "type": "callout",
      "default": ""
    },
    {
      "displayName": "Source for Prompt (User Message)",
      "name": "promptType",
      "type": "options",
      "default": "auto",
      "options": [
        {
          "name": "Connected Chat Trigger Node",
          "value": "auto",
          "description": "Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"
        },
        {
          "name": "Connected Guardrails Node",
          "value": "guardrails",
          "description": "Looks for an input field called 'guardrailsInput' that is coming from a directly connected Guardrails Node"
        },
        {
          "name": "Define below",
          "value": "define",
          "description": "Use an expression to reference data in previous nodes or enter static text"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 3.1
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Source for Prompt (User Message)",
      "name": "promptType",
      "type": "options",
      "default": "auto",
      "options": [
        {
          "name": "Connected Chat Trigger Node",
          "value": "auto",
          "description": "Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"
        },
        {
          "name": "Define below",
          "value": "define",
          "description": "Use an expression to reference data in previous nodes or enter static text"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 3.1
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "={{ $json.guardrailsInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "guardrails"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "auto"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "define"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Require Specific Output Format",
      "name": "hasOutputParser",
      "type": "boolean",
      "default": false,
      "noDataExpression": true
    },
    {
      "displayName": "Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require",
      "name": "notice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "hasOutputParser": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Enable Fallback Model",
      "name": "needsFallback",
      "type": "boolean",
      "default": false,
      "noDataExpression": true
    },
    {
      "displayName": "Connect an additional language model on the canvas to use it as a fallback if the main model fails",
      "name": "fallbackNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "needsFallback": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "System Message",
          "name": "systemMessage",
          "type": "string",
          "default": "You are a helpful assistant",
          "description": "The message that will be sent to the agent before the conversation starts",
          "builderHint": {
            "propertyHint": "Must include: agent's purpose, exact names of connected tools, and response instructions"
          },
          "typeOptions": {
            "rows": 6
          }
        },
        {
          "displayName": "Max Iterations",
          "name": "maxIterations",
          "type": "number",
          "default": 10,
          "description": "The maximum number of iterations the agent will run before stopping"
        },
        {
          "displayName": "Return Intermediate Steps",
          "name": "returnIntermediateSteps",
          "type": "boolean",
          "default": false,
          "description": "Whether or not the output should include intermediate steps the agent took"
        },
        {
          "displayName": "Automatically Passthrough Binary Images",
          "name": "passthroughBinaryImages",
          "type": "boolean",
          "default": true,
          "description": "Whether or not binary images should be automatically passed through to the agent as image type messages"
        },
        {
          "displayName": "Automatically Passthrough Binary PDFs",
          "name": "passthroughBinaryPdfs",
          "type": "boolean",
          "default": false,
          "description": "Whether or not binary PDF documents should be automatically passed through to the agent. Useful for models that natively support PDF input (e.g. Google Gemini)."
        },
        {
          "displayName": "Tracing Metadata",
          "name": "tracingMetadata",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "placeholder": "Add Metadata",
          "description": "Custom metadata added to tracing events",
          "options": [
            {
              "displayName": "Metadata",
              "name": "values",
              "values": [
                {
                  "displayName": "Key",
                  "name": "key",
                  "type": "string",
                  "default": ""
                },
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "description": "The field value type",
                  "options": [
                    {
                      "name": "Array",
                      "value": "arrayValue"
                    },
                    {
                      "name": "Boolean",
                      "value": "booleanValue"
                    },
                    {
                      "name": "Number",
                      "value": "numberValue"
                    },
                    {
                      "name": "Object",
                      "value": "objectValue"
                    },
                    {
                      "name": "String",
                      "value": "stringValue"
                    }
                  ],
                  "default": "stringValue"
                },
                {
                  "displayName": "Value",
                  "name": "stringValue",
                  "type": "string",
                  "default": "",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "stringValue"
                      ]
                    }
                  }
                },
                {
                  "displayName": "Value",
                  "name": "numberValue",
                  "type": "string",
                  "default": "",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "numberValue"
                      ]
                    }
                  },
                  "validateType": "number"
                },
                {
                  "displayName": "Value",
                  "name": "booleanValue",
                  "type": "options",
                  "default": "true",
                  "options": [
                    {
                      "name": "True",
                      "value": "true"
                    },
                    {
                      "name": "False",
                      "value": "false"
                    }
                  ],
                  "displayOptions": {
                    "show": {
                      "type": [
                        "booleanValue"
                      ]
                    }
                  }
                },
                {
                  "displayName": "Value",
                  "name": "arrayValue",
                  "type": "string",
                  "default": "",
                  "placeholder": "e.g. [ arrayItem1, arrayItem2, arrayItem3 ]",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "arrayValue"
                      ]
                    }
                  },
                  "validateType": "array"
                },
                {
                  "displayName": "Value",
                  "name": "objectValue",
                  "type": "json",
                  "default": "={}",
                  "typeOptions": {
                    "rows": 2
                  },
                  "displayOptions": {
                    "show": {
                      "type": [
                        "objectValue"
                      ]
                    }
                  },
                  "validateType": "object"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Auto-save highlighted data",
          "name": "autoSaveHighlightedData",
          "type": "boolean",
          "default": true,
          "description": "Whether to automatically save <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executiondata/\" target=\"_blank\">highlighted data</a>. This data can then be used to filter executions in the Executions view. Available on Pro and Enterprise plans in n8n Cloud, and on Enterprise or registered Community Edition for self-hosted. Defaults to true."
        },
        {
          "displayName": "Enable Streaming",
          "name": "enableStreaming",
          "type": "boolean",
          "default": true,
          "description": "Whether this agent will stream the response in real-time as it generates text"
        },
        {
          "displayName": "Batch Processing",
          "name": "batching",
          "type": "collection",
          "placeholder": "Add Batch Processing Option",
          "description": "Batch processing options for rate limiting",
          "default": {},
          "options": [
            {
              "displayName": "Batch Size",
              "name": "batchSize",
              "default": 1,
              "type": "number",
              "description": "How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."
            },
            {
              "displayName": "Delay Between Batches",
              "name": "delayBetweenBatches",
              "default": 0,
              "type": "number",
              "description": "Delay in milliseconds between batches. This is useful for rate limiting."
            }
          ]
        },
        {
          "displayName": "Max Tokens To Read From Memory",
          "name": "maxTokensFromMemory",
          "type": "hidden",
          "default": 0,
          "description": "The maximum number of tokens to read from the chat memory history. Set to 0 to read all history."
        }
      ]
    }
  ]


node_type: nodes-langchain.agentTool
package_name: @n8n/n8n-nodes-langchain
display_name: AI Agent Tool
description: Generates an action plan and executes it. Can use external tools.
category: transform
development_style: programmatic
version: 3
operations: []
credentials_required: []
outputs:
  [
  "ai_tool"
  ]

updated_at: 2026-07-16 12:10:22
properties_schema:
  [
    {
      "displayName": "Description",
      "name": "toolDescription",
      "type": "string",
      "default": "AI Agent that can call other tools",
      "description": "Explain to the LLM what this tool does, a good, specific description would allow LLMs to produce expected results much more often",
      "required": true,
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "",
      "required": true,
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Require Specific Output Format",
      "name": "hasOutputParser",
      "type": "boolean",
      "default": false,
      "noDataExpression": true
    },
    {
      "displayName": "Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require",
      "name": "notice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "hasOutputParser": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Enable Fallback Model",
      "name": "needsFallback",
      "type": "boolean",
      "default": false,
      "noDataExpression": true
    },
    {
      "displayName": "Connect an additional language model on the canvas to use it as a fallback if the main model fails",
      "name": "fallbackNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "needsFallback": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "System Message",
          "name": "systemMessage",
          "type": "string",
          "default": "You are a helpful assistant",
          "description": "The message that will be sent to the agent before the conversation starts",
          "builderHint": {
            "propertyHint": "Must include: agent's purpose, exact names of connected tools, and response instructions"
          },
          "typeOptions": {
            "rows": 6
          }
        },
        {
          "displayName": "Max Iterations",
          "name": "maxIterations",
          "type": "number",
          "default": 10,
          "description": "The maximum number of iterations the agent will run before stopping"
        },
        {
          "displayName": "Return Intermediate Steps",
          "name": "returnIntermediateSteps",
          "type": "boolean",
          "default": false,
          "description": "Whether or not the output should include intermediate steps the agent took"
        },
        {
          "displayName": "Automatically Passthrough Binary Images",
          "name": "passthroughBinaryImages",
          "type": "boolean",
          "default": true,
          "description": "Whether or not binary images should be automatically passed through to the agent as image type messages"
        },
        {
          "displayName": "Automatically Passthrough Binary PDFs",
          "name": "passthroughBinaryPdfs",
          "type": "boolean",
          "default": false,
          "description": "Whether or not binary PDF documents should be automatically passed through to the agent. Useful for models that natively support PDF input (e.g. Google Gemini)."
        },
        {
          "displayName": "Tracing Metadata",
          "name": "tracingMetadata",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "placeholder": "Add Metadata",
          "description": "Custom metadata added to tracing events",
          "options": [
            {
              "displayName": "Metadata",
              "name": "values",
              "values": [
                {
                  "displayName": "Key",
                  "name": "key",
                  "type": "string",
                  "default": ""
                },
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "description": "The field value type",
                  "options": [
                    {
                      "name": "Array",
                      "value": "arrayValue"
                    },
                    {
                      "name": "Boolean",
                      "value": "booleanValue"
                    },
                    {
                      "name": "Number",
                      "value": "numberValue"
                    },
                    {
                      "name": "Object",
                      "value": "objectValue"
                    },
                    {
                      "name": "String",
                      "value": "stringValue"
                    }
                  ],
                  "default": "stringValue"
                },
                {
                  "displayName": "Value",
                  "name": "stringValue",
                  "type": "string",
                  "default": "",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "stringValue"
                      ]
                    }
                  }
                },
                {
                  "displayName": "Value",
                  "name": "numberValue",
                  "type": "string",
                  "default": "",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "numberValue"
                      ]
                    }
                  },
                  "validateType": "number"
                },
                {
                  "displayName": "Value",
                  "name": "booleanValue",
                  "type": "options",
                  "default": "true",
                  "options": [
                    {
                      "name": "True",
                      "value": "true"
                    },
                    {
                      "name": "False",
                      "value": "false"
                    }
                  ],
                  "displayOptions": {
                    "show": {
                      "type": [
                        "booleanValue"
                      ]
                    }
                  }
                },
                {
                  "displayName": "Value",
                  "name": "arrayValue",
                  "type": "string",
                  "default": "",
                  "placeholder": "e.g. [ arrayItem1, arrayItem2, arrayItem3 ]",
                  "displayOptions": {
                    "show": {
                      "type": [
                        "arrayValue"
                      ]
                    }
                  },
                  "validateType": "array"
                },
                {
                  "displayName": "Value",
                  "name": "objectValue",
                  "type": "json",
                  "default": "={}",
                  "typeOptions": {
                    "rows": 2
                  },
                  "displayOptions": {
                    "show": {
                      "type": [
                        "objectValue"
                      ]
                    }
                  },
                  "validateType": "object"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Auto-save highlighted data",
          "name": "autoSaveHighlightedData",
          "type": "boolean",
          "default": true,
          "description": "Whether to automatically save <a href=\"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executiondata/\" target=\"_blank\">highlighted data</a>. This data can then be used to filter executions in the Executions view. Available on Pro and Enterprise plans in n8n Cloud, and on Enterprise or registered Community Edition for self-hosted. Defaults to true."
        },
        {
          "displayName": "Enable Streaming",
          "name": "enableStreaming",
          "type": "boolean",
          "default": true,
          "description": "Whether this agent will stream the response in real-time as it generates text"
        },
        {
          "displayName": "Batch Processing",
          "name": "batching",
          "type": "collection",
          "placeholder": "Add Batch Processing Option",
          "description": "Batch processing options for rate limiting",
          "default": {},
          "options": [
            {
              "displayName": "Batch Size",
              "name": "batchSize",
              "default": 1,
              "type": "number",
              "description": "How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."
            },
            {
              "displayName": "Delay Between Batches",
              "name": "delayBetweenBatches",
              "default": 0,
              "type": "number",
              "description": "Delay in milliseconds between batches. This is useful for rate limiting."
            }
          ]
        },
        {
          "displayName": "Max Tokens To Read From Memory",
          "name": "maxTokensFromMemory",
          "type": "hidden",
          "default": 0,
          "description": "The maximum number of tokens to read from the chat memory history. Set to 0 to read all history."
        }
      ]
    }
  ]


node_type: nodes-langchain.openAiAssistantTool
package_name: @n8n/n8n-nodes-langchain
display_name: OpenAI Assistant Tool
description: Utilizes Assistant API from Open AI. (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1.1
operations: []
credentials_required:
  [
  {
  "name": "openAiApi",
  "required": true
  }
  ]

outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-07-16 12:10:22
tool_variant_of: nodes-langchain.openAiAssistant
properties_schema:
  [
    {
      "displayName": "Tool Description",
      "name": "toolDescription",
      "type": "string",
      "default": "",
      "required": false,
      "description": "Description for the AI to understand what this tool does and when to use it",
      "typeOptions": {
        "rows": 3
      },
      "placeholder": "e.g., Use this tool to interact with OpenAI Assistant"
    },
    {
      "displayName": "Operation",
      "name": "mode",
      "type": "options",
      "default": "existing",
      "options": [
        {
          "name": "Use New Assistant",
          "value": "new"
        },
        {
          "name": "Use Existing Assistant",
          "value": "existing"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Name",
      "name": "name",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "/mode": [
            "new"
          ]
        }
      }
    },
    {
      "displayName": "Instructions",
      "name": "instructions",
      "type": "string",
      "default": "",
      "description": "How the Assistant and model should behave or respond",
      "displayOptions": {
        "show": {
          "/mode": [
            "new"
          ]
        }
      },
      "typeOptions": {
        "rows": 5
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "gpt-3.5-turbo-1106",
      "description": "The model which will be used to power the assistant. <a href=\"https://beta.openai.com/docs/models/overview\">Learn more</a>. The Retrieval tool requires gpt-3.5-turbo-1106 and gpt-4-1106-preview models.",
      "required": true,
      "displayOptions": {
        "show": {
          "/mode": [
            "new"
          ]
        }
      },
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "={{ $parameter.options?.baseURL?.split(\"/\").slice(-1).pop() || \"v1\"  }}/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "filter",
                  "properties": {
                    "pass": "={{ $responseItem.id.startsWith('gpt-') && !$responseItem.id.includes('instruct') }}"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.id}}",
                    "value": "={{$responseItem.id}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Assistant",
      "name": "assistantId",
      "type": "options",
      "default": "",
      "description": "The assistant to use. <a href=\"https://beta.openai.com/docs/assistants/overview\">Learn more</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "/mode": [
            "existing"
          ]
        }
      },
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "headers": {
                "OpenAI-Beta": "assistants=v1"
              },
              "url": "={{ $parameter.options?.baseURL?.split(\"/\").slice(-1).pop() || \"v1\"  }}/assistants"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.name}}",
                    "value": "={{$responseItem.id}}",
                    "description": "={{$responseItem.model}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Text",
      "name": "text",
      "type": "string",
      "default": "={{ $json.chat_input }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1
          ]
        }
      }
    },
    {
      "displayName": "Text",
      "name": "text",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.1
          ]
        }
      }
    },
    {
      "displayName": "OpenAI Tools",
      "name": "nativeTools",
      "type": "multiOptions",
      "default": [],
      "options": [
        {
          "name": "Code Interpreter",
          "value": "code_interpreter"
        },
        {
          "name": "Knowledge Retrieval",
          "value": "retrieval"
        }
      ]
    },
    {
      "displayName": "Connect your own custom tools to this node on the canvas",
      "name": "noticeTools",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Upload files for retrieval using the <a href=\"https://platform.openai.com/playground\" target=\"_blank\">OpenAI website<a/>",
      "name": "noticeTools",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "/nativeTools": [
            "retrieval"
          ]
        }
      },
      "typeOptions": {
        "noticeTheme": "info"
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Base URL",
          "name": "baseURL",
          "default": "https://api.openai.com/v1",
          "description": "Override the default base URL for the API",
          "type": "string"
        },
        {
          "displayName": "Max Retries",
          "name": "maxRetries",
          "default": 2,
          "description": "Maximum number of retries to attempt",
          "type": "number"
        },
        {
          "displayName": "Timeout",
          "name": "timeout",
          "default": 10000,
          "description": "Maximum amount of time a request is allowed to take in milliseconds",
          "type": "number"
        }
      ]
    }
  ]


node_type: nodes-langchain.openAiAssistant
package_name: @n8n/n8n-nodes-langchain
display_name: OpenAI Assistant
description: Utilizes Assistant API from Open AI.
category: transform
development_style: programmatic
version: 1.1
operations: []
credentials_required:
  [
  {
  "name": "openAiApi",
  "required": true
  }
  ]

outputs:
  [
  "main"
  ]

updated_at: 2026-07-16 12:10:22
properties_schema:
  [
    {
      "displayName": "Operation",
      "name": "mode",
      "type": "options",
      "default": "existing",
      "options": [
        {
          "name": "Use New Assistant",
          "value": "new"
        },
        {
          "name": "Use Existing Assistant",
          "value": "existing"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Name",
      "name": "name",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "/mode": [
            "new"
          ]
        }
      }
    },
    {
      "displayName": "Instructions",
      "name": "instructions",
      "type": "string",
      "default": "",
      "description": "How the Assistant and model should behave or respond",
      "displayOptions": {
        "show": {
          "/mode": [
            "new"
          ]
        }
      },
      "typeOptions": {
        "rows": 5
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "gpt-3.5-turbo-1106",
      "description": "The model which will be used to power the assistant. <a href=\"https://beta.openai.com/docs/models/overview\">Learn more</a>. The Retrieval tool requires gpt-3.5-turbo-1106 and gpt-4-1106-preview models.",
      "required": true,
      "displayOptions": {
        "show": {
          "/mode": [
            "new"
          ]
        }
      },
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "={{ $parameter.options?.baseURL?.split(\"/\").slice(-1).pop() || \"v1\"  }}/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "filter",
                  "properties": {
                    "pass": "={{ $responseItem.id.startsWith('gpt-') && !$responseItem.id.includes('instruct') }}"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.id}}",
                    "value": "={{$responseItem.id}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Assistant",
      "name": "assistantId",
      "type": "options",
      "default": "",
      "description": "The assistant to use. <a href=\"https://beta.openai.com/docs/assistants/overview\">Learn more</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "/mode": [
            "existing"
          ]
        }
      },
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "headers": {
                "OpenAI-Beta": "assistants=v1"
              },
              "url": "={{ $parameter.options?.baseURL?.split(\"/\").slice(-1).pop() || \"v1\"  }}/assistants"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.name}}",
                    "value": "={{$responseItem.id}}",
                    "description": "={{$responseItem.model}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Text",
      "name": "text",
      "type": "string",
      "default": "={{ $json.chat_input }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1
          ]
        }
      }
    },
    {
      "displayName": "Text",
      "name": "text",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.1
          ]
        }
      }
    },
    {
      "displayName": "OpenAI Tools",
      "name": "nativeTools",
      "type": "multiOptions",
      "default": [],
      "options": [
        {
          "name": "Code Interpreter",
          "value": "code_interpreter"
        },
        {
          "name": "Knowledge Retrieval",
          "value": "retrieval"
        }
      ]
    },
    {
      "displayName": "Connect your own custom tools to this node on the canvas",
      "name": "noticeTools",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Upload files for retrieval using the <a href=\"https://platform.openai.com/playground\" target=\"_blank\">OpenAI website<a/>",
      "name": "noticeTools",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "/nativeTools": [
            "retrieval"
          ]
        }
      },
      "typeOptions": {
        "noticeTheme": "info"
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Base URL",
          "name": "baseURL",
          "default": "https://api.openai.com/v1",
          "description": "Override the default base URL for the API",
          "type": "string"
        },
        {
          "displayName": "Max Retries",
          "name": "maxRetries",
          "default": 2,
          "description": "Maximum number of retries to attempt",
          "type": "number"
        },
        {
          "displayName": "Timeout",
          "name": "timeout",
          "default": 10000,
          "description": "Maximum amount of time a request is allowed to take in milliseconds",
          "type": "number"
        }
      ]
    }
  ]


node_type: nodes-langchain.chainSummarizationTool
package_name: @n8n/n8n-nodes-langchain
display_name: Summarization Chain Tool
description: Transforms text into a concise summary (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 2.1
operations: []
credentials_required: []
outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-07-16 12:10:22
tool_variant_of: nodes-langchain.chainSummarization
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Summarization Chain node documentation
  description: Learn how to use the Summarize Chain node in n8n. Follow technical documentation to integrate Summarize Chain node into your workflows.
  contentType: [integration, reference]
  priority: high
  ---

  # Summarization Chain node

  Use the Summarization Chain node to summarize multiple documents.

  On this page, you'll find the node parameters for the Summarization Chain node, and links to more resources.

  ## Node parameters

  Choose the type of data you need to summarize in **Data to Summarize**. The data type you choose determines the other node parameters.

  * **Use Node Input (JSON)** and **Use Node Input (Binary)**: summarize the data coming into the node from the workflow. 
  	* You can configure the **Chunking Strategy**: choose what strategy to use to define the data chunk sizes.
  		* If you choose **Simple (Define Below)** you can then set **Characters Per Chunk** and **Chunk Overlap (Characters)**.
  		* Choose **Advanced** if you want to connect a splitter sub-node that provides more configuration options.
  * **Use Document Loader**: summarize data provided by a document loader sub-node.

  ## Node Options

  You can configure the summarization method and prompts. Select **Add Option** > **Summarization Method and Prompts**.

  Options in **Summarization Method**:

  * **Map Reduce**: this is the recommended option. Learn more about [Map Reduce](https://js.langchain.com/v0.1/docs/modules/chains/document/map_reduce/){:target=_blank .external-link} in the LangChain documentation.
  * **Refine**: learn more about [Refine](https://js.langchain.com/v0.1/docs/modules/chains/document/refine/){:target=_blank .external-link} in the LangChain documentation.
  * **Stuff**: learn more about [Stuff](https://js.langchain.com/v0.1/docs/modules/chains/document/stuff/){:target=_blank .external-link} in the LangChain documentation.

  You can customize the **Individual Summary Prompts** and the **Final Prompt to Combine**. There are examples in the node. You must include the `"{text}"` placeholder.

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'summarization-chain') ]]

  ## Related resources

  Refer to [LangChain's documentation on summarization](https://js.langchain.com/docs/tutorials/summarization/){:target=_blank .external-link} for more information about the service.

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
  --8<-- "_glossary/ai-glossary.md"

properties_schema:
  [
    {
      "displayName": "Tool Description",
      "name": "toolDescription",
      "type": "string",
      "default": "",
      "required": false,
      "description": "Description for the AI to understand what this tool does and when to use it",
      "typeOptions": {
        "rows": 3
      },
      "placeholder": "e.g., Use this tool to interact with Summarization Chain"
    },
    {
      "displayName": "Save time with an <a href=\"/templates/1951\" target=\"_blank\">example</a> of how this node works",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Data to Summarize",
      "name": "operationMode",
      "type": "options",
      "default": "nodeInputJson",
      "description": "How to pass data into the summarization chain",
      "options": [
        {
          "name": "Use Node Input (JSON)",
          "value": "nodeInputJson",
          "description": "Summarize the JSON data coming into this node from the previous one"
        },
        {
          "name": "Use Node Input (Binary)",
          "value": "nodeInputBinary",
          "description": "Summarize the binary data coming into this node from the previous one"
        },
        {
          "name": "Use Document Loader",
          "value": "documentLoader",
          "description": "Use a loader sub-node with more configuration options"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Chunking Strategy",
      "name": "chunkingMode",
      "type": "options",
      "default": "simple",
      "description": "Chunk splitting strategy",
      "options": [
        {
          "name": "Simple (Define Below)",
          "value": "simple"
        },
        {
          "name": "Advanced",
          "value": "advanced",
          "description": "Use a splitter sub-node with more configuration options"
        }
      ],
      "displayOptions": {
        "show": {
          "/operationMode": [
            "nodeInputJson",
            "nodeInputBinary"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Characters Per Chunk",
      "name": "chunkSize",
      "type": "number",
      "default": 1000,
      "description": "Controls the max size (in terms of number of characters) of the final document chunk",
      "displayOptions": {
        "show": {
          "/chunkingMode": [
            "simple"
          ]
        }
      }
    },
    {
      "displayName": "Chunk Overlap (Characters)",
      "name": "chunkOverlap",
      "type": "number",
      "default": 200,
      "description": "Specifies how much characters overlap there should be between chunks",
      "displayOptions": {
        "show": {
          "/chunkingMode": [
            "simple"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Input Data Field Name",
          "name": "binaryDataKey",
          "type": "string",
          "default": "data",
          "description": "The name of the field in the agent or chain’s input that contains the binary file to be processed",
          "displayOptions": {
            "show": {
              "/operationMode": [
                "nodeInputBinary"
              ]
            }
          }
        },
        {
          "displayName": "Summarization Method and Prompts",
          "name": "summarizationMethodAndPrompts",
          "type": "fixedCollection",
          "default": {
            "values": {
              "summarizationMethod": "map_reduce",
              "prompt": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
              "combineMapPrompt": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:"
            }
          },
          "placeholder": "Add Option",
          "typeOptions": {},
          "options": [
            {
              "name": "values",
              "displayName": "Values",
              "values": [
                {
                  "displayName": "Summarization Method",
                  "name": "summarizationMethod",
                  "type": "options",
                  "description": "The type of summarization to run",
                  "default": "map_reduce",
                  "options": [
                    {
                      "name": "Map Reduce (Recommended)",
                      "value": "map_reduce",
                      "description": "Summarize each document (or chunk) individually, then summarize those summaries"
                    },
                    {
                      "name": "Refine",
                      "value": "refine",
                      "description": "Summarize the first document (or chunk). Then update that summary based on the next document (or chunk), and repeat."
                    },
                    {
                      "name": "Stuff",
                      "value": "stuff",
                      "description": "Pass all documents (or chunks) at once. Ideal for small datasets."
                    }
                  ]
                },
                {
                  "displayName": "Individual Summary Prompt",
                  "name": "combineMapPrompt",
                  "type": "string",
                  "hint": "The prompt to summarize an individual document (or chunk)",
                  "displayOptions": {
                    "hide": {
                      "/options.summarizationMethodAndPrompts.values.summarizationMethod": [
                        "stuff",
                        "refine"
                      ]
                    }
                  },
                  "default": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
                  "typeOptions": {
                    "rows": 9
                  }
                },
                {
                  "displayName": "Final Prompt to Combine",
                  "name": "prompt",
                  "type": "string",
                  "default": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
                  "hint": "The prompt to combine individual summaries",
                  "displayOptions": {
                    "hide": {
                      "/options.summarizationMethodAndPrompts.values.summarizationMethod": [
                        "stuff",
                        "refine"
                      ]
                    }
                  },
                  "typeOptions": {
                    "rows": 9
                  }
                },
                {
                  "displayName": "Prompt",
                  "name": "prompt",
                  "type": "string",
                  "default": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
                  "displayOptions": {
                    "hide": {
                      "/options.summarizationMethodAndPrompts.values.summarizationMethod": [
                        "refine",
                        "map_reduce"
                      ]
                    }
                  },
                  "typeOptions": {
                    "rows": 9
                  }
                },
                {
                  "displayName": "Subsequent (Refine) Prompt",
                  "name": "refinePrompt",
                  "type": "string",
                  "displayOptions": {
                    "hide": {
                      "/options.summarizationMethodAndPrompts.values.summarizationMethod": [
                        "stuff",
                        "map_reduce"
                      ]
                    }
                  },
                  "default": "Your job is to produce a final summary\nWe have provided an existing summary up to a certain point: \"{existing_answer}\"\nWe have the opportunity to refine the existing summary\n(only if needed) with some more context below.\n------------\n\"{text}\"\n------------\n\nGiven the new context, refine the original summary\nIf the context isn't useful, return the original summary.\n\nREFINED SUMMARY:",
                  "hint": "The prompt to refine the summary based on the next document (or chunk)",
                  "typeOptions": {
                    "rows": 9
                  }
                },
                {
                  "displayName": "Initial Prompt",
                  "name": "refineQuestionPrompt",
                  "type": "string",
                  "displayOptions": {
                    "hide": {
                      "/options.summarizationMethodAndPrompts.values.summarizationMethod": [
                        "stuff",
                        "map_reduce"
                      ]
                    }
                  },
                  "default": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
                  "hint": "The prompt for the first document (or chunk)",
                  "typeOptions": {
                    "rows": 9
                  }
                }
              ]
            }
          ]
        },
        {
          "displayName": "Batch Processing",
          "name": "batching",
          "type": "collection",
          "placeholder": "Add Batch Processing Option",
          "description": "Batch processing options for rate limiting",
          "default": {},
          "options": [
            {
              "displayName": "Batch Size",
              "name": "batchSize",
              "default": 5,
              "type": "number",
              "description": "How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."
            },
            {
              "displayName": "Delay Between Batches",
              "name": "delayBetweenBatches",
              "default": 0,
              "type": "number",
              "description": "Delay in milliseconds between batches. This is useful for rate limiting."
            }
          ],
          "displayOptions": {
            "show": {
              "@version": [
                {
                  "_cnd": {
                    "gte": 2.1
                  }
                }
              ]
            }
          }
        }
      ]
    }
  ]


node_type: nodes-langchain.chainSummarization
package_name: @n8n/n8n-nodes-langchain
display_name: Summarization Chain
description: Transforms text into a concise summary
category: transform
development_style: programmatic
version: 2.1
operations: []
credentials_required: []
outputs:
  [
  "main"
  ]

updated_at: 2026-07-16 12:10:22
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Summarization Chain node documentation
  description: Learn how to use the Summarize Chain node in n8n. Follow technical documentation to integrate Summarize Chain node into your workflows.
  contentType: [integration, reference]
  priority: high
  ---

  # Summarization Chain node

  Use the Summarization Chain node to summarize multiple documents.

  On this page, you'll find the node parameters for the Summarization Chain node, and links to more resources.

  ## Node parameters

  Choose the type of data you need to summarize in **Data to Summarize**. The data type you choose determines the other node parameters.

  * **Use Node Input (JSON)** and **Use Node Input (Binary)**: summarize the data coming into the node from the workflow. 
  	* You can configure the **Chunking Strategy**: choose what strategy to use to define the data chunk sizes.
  		* If you choose **Simple (Define Below)** you can then set **Characters Per Chunk** and **Chunk Overlap (Characters)**.
  		* Choose **Advanced** if you want to connect a splitter sub-node that provides more configuration options.
  * **Use Document Loader**: summarize data provided by a document loader sub-node.

  ## Node Options

  You can configure the summarization method and prompts. Select **Add Option** > **Summarization Method and Prompts**.

  Options in **Summarization Method**:

  * **Map Reduce**: this is the recommended option. Learn more about [Map Reduce](https://js.langchain.com/v0.1/docs/modules/chains/document/map_reduce/){:target=_blank .external-link} in the LangChain documentation.
  * **Refine**: learn more about [Refine](https://js.langchain.com/v0.1/docs/modules/chains/document/refine/){:target=_blank .external-link} in the LangChain documentation.
  * **Stuff**: learn more about [Stuff](https://js.langchain.com/v0.1/docs/modules/chains/document/stuff/){:target=_blank .external-link} in the LangChain documentation.

  You can customize the **Individual Summary Prompts** and the **Final Prompt to Combine**. There are examples in the node. You must include the `"{text}"` placeholder.

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'summarization-chain') ]]

  ## Related resources

  Refer to [LangChain's documentation on summarization](https://js.langchain.com/docs/tutorials/summarization/){:target=_blank .external-link} for more information about the service.

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
  --8<-- "_glossary/ai-glossary.md"

properties_schema:
  [
    {
      "displayName": "Save time with an <a href=\"/templates/1951\" target=\"_blank\">example</a> of how this node works",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Data to Summarize",
      "name": "operationMode",
      "type": "options",
      "default": "nodeInputJson",
      "description": "How to pass data into the summarization chain",
      "options": [
        {
          "name": "Use Node Input (JSON)",
          "value": "nodeInputJson",
          "description": "Summarize the JSON data coming into this node from the previous one"
        },
        {
          "name": "Use Node Input (Binary)",
          "value": "nodeInputBinary",
          "description": "Summarize the binary data coming into this node from the previous one"
        },
        {
          "name": "Use Document Loader",
          "value": "documentLoader",
          "description": "Use a loader sub-node with more configuration options"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Chunking Strategy",
      "name": "chunkingMode",
      "type": "options",
      "default": "simple",
      "description": "Chunk splitting strategy",
      "options": [
        {
          "name": "Simple (Define Below)",
          "value": "simple"
        },
        {
          "name": "Advanced",
          "value": "advanced",
          "description": "Use a splitter sub-node with more configuration options"
        }
      ],
      "displayOptions": {
        "show": {
          "/operationMode": [
            "nodeInputJson",
            "nodeInputBinary"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Characters Per Chunk",
      "name": "chunkSize",
      "type": "number",
      "default": 1000,
      "description": "Controls the max size (in terms of number of characters) of the final document chunk",
      "displayOptions": {
        "show": {
          "/chunkingMode": [
            "simple"
          ]
        }
      }
    },
    {
      "displayName": "Chunk Overlap (Characters)",
      "name": "chunkOverlap",
      "type": "number",
      "default": 200,
      "description": "Specifies how much characters overlap there should be between chunks",
      "displayOptions": {
        "show": {
          "/chunkingMode": [
            "simple"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Input Data Field Name",
          "name": "binaryDataKey",
          "type": "string",
          "default": "data",
          "description": "The name of the field in the agent or chain’s input that contains the binary file to be processed",
          "displayOptions": {
            "show": {
              "/operationMode": [
                "nodeInputBinary"
              ]
            }
          }
        },
        {
          "displayName": "Summarization Method and Prompts",
          "name": "summarizationMethodAndPrompts",
          "type": "fixedCollection",
          "default": {
            "values": {
              "summarizationMethod": "map_reduce",
              "prompt": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
              "combineMapPrompt": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:"
            }
          },
          "placeholder": "Add Option",
          "typeOptions": {},
          "options": [
            {
              "name": "values",
              "displayName": "Values",
              "values": [
                {
                  "displayName": "Summarization Method",
                  "name": "summarizationMethod",
                  "type": "options",
                  "description": "The type of summarization to run",
                  "default": "map_reduce",
                  "options": [
                    {
                      "name": "Map Reduce (Recommended)",
                      "value": "map_reduce",
                      "description": "Summarize each document (or chunk) individually, then summarize those summaries"
                    },
                    {
                      "name": "Refine",
                      "value": "refine",
                      "description": "Summarize the first document (or chunk). Then update that summary based on the next document (or chunk), and repeat."
                    },
                    {
                      "name": "Stuff",
                      "value": "stuff",
                      "description": "Pass all documents (or chunks) at once. Ideal for small datasets."
                    }
                  ]
                },
                {
                  "displayName": "Individual Summary Prompt",
                  "name": "combineMapPrompt",
                  "type": "string",
                  "hint": "The prompt to summarize an individual document (or chunk)",
                  "displayOptions": {
                    "hide": {
                      "/options.summarizationMethodAndPrompts.values.summarizationMethod": [
                        "stuff",
                        "refine"
                      ]
                    }
                  },
                  "default": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
                  "typeOptions": {
                    "rows": 9
                  }
                },
                {
                  "displayName": "Final Prompt to Combine",
                  "name": "prompt",
                  "type": "string",
                  "default": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
                  "hint": "The prompt to combine individual summaries",
                  "displayOptions": {
                    "hide": {
                      "/options.summarizationMethodAndPrompts.values.summarizationMethod": [
                        "stuff",
                        "refine"
                      ]
                    }
                  },
                  "typeOptions": {
                    "rows": 9
                  }
                },
                {
                  "displayName": "Prompt",
                  "name": "prompt",
                  "type": "string",
                  "default": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
                  "displayOptions": {
                    "hide": {
                      "/options.summarizationMethodAndPrompts.values.summarizationMethod": [
                        "refine",
                        "map_reduce"
                      ]
                    }
                  },
                  "typeOptions": {
                    "rows": 9
                  }
                },
                {
                  "displayName": "Subsequent (Refine) Prompt",
                  "name": "refinePrompt",
                  "type": "string",
                  "displayOptions": {
                    "hide": {
                      "/options.summarizationMethodAndPrompts.values.summarizationMethod": [
                        "stuff",
                        "map_reduce"
                      ]
                    }
                  },
                  "default": "Your job is to produce a final summary\nWe have provided an existing summary up to a certain point: \"{existing_answer}\"\nWe have the opportunity to refine the existing summary\n(only if needed) with some more context below.\n------------\n\"{text}\"\n------------\n\nGiven the new context, refine the original summary\nIf the context isn't useful, return the original summary.\n\nREFINED SUMMARY:",
                  "hint": "The prompt to refine the summary based on the next document (or chunk)",
                  "typeOptions": {
                    "rows": 9
                  }
                },
                {
                  "displayName": "Initial Prompt",
                  "name": "refineQuestionPrompt",
                  "type": "string",
                  "displayOptions": {
                    "hide": {
                      "/options.summarizationMethodAndPrompts.values.summarizationMethod": [
                        "stuff",
                        "map_reduce"
                      ]
                    }
                  },
                  "default": "Write a concise summary of the following:\n\n\n\"{text}\"\n\n\nCONCISE SUMMARY:",
                  "hint": "The prompt for the first document (or chunk)",
                  "typeOptions": {
                    "rows": 9
                  }
                }
              ]
            }
          ]
        },
        {
          "displayName": "Batch Processing",
          "name": "batching",
          "type": "collection",
          "placeholder": "Add Batch Processing Option",
          "description": "Batch processing options for rate limiting",
          "default": {},
          "options": [
            {
              "displayName": "Batch Size",
              "name": "batchSize",
              "default": 5,
              "type": "number",
              "description": "How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."
            },
            {
              "displayName": "Delay Between Batches",
              "name": "delayBetweenBatches",
              "default": 0,
              "type": "number",
              "description": "Delay in milliseconds between batches. This is useful for rate limiting."
            }
          ],
          "displayOptions": {
            "show": {
              "@version": [
                {
                  "_cnd": {
                    "gte": 2.1
                  }
                }
              ]
            }
          }
        }
      ]
    }
  ]


node_type: nodes-langchain.chainLlmTool
package_name: @n8n/n8n-nodes-langchain
display_name: Basic LLM Chain Tool
description: A simple chain to prompt a large language model (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1.9
operations: []
credentials_required: []
outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-07-16 12:10:22
tool_variant_of: nodes-langchain.chainLlm
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Basic LLM Chain node documentation
  description: Learn how to use the Basic LLM Chain node in n8n. Follow technical documentation to integrate Basic LLM Chain node into your workflows.
  contentType: [integration, reference]
  priority: critical
  ---

  # Basic LLM Chain node

  Use the Basic LLM Chain node to set the prompt that the model will use along with setting an optional parser for the response.

  On this page, you'll find the node parameters for the Basic LLM Chain node and links to more resources.

  /// note | Examples and templates
  For usage examples and templates to help you get started, refer to n8n's [Basic LLM Chain integrations](https://n8n.io/integrations/basic-llm-chain/){:target=_blank .external-link} page.
  ///	

  ## Node parameters

  ### Prompt

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/prompt.md"

  ### Require Specific Output Format

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/output-format.md"

  ## Chat Messages

  Use **Chat Messages** when you're using a chat model to set a message.

  n8n ignores these options if you don't connect a chat model. Select the **Type Name or ID** you want the node to use:

  #### AI

  Enter a sample expected response in the **Message** field. The model will try to respond in the same way in its messages.

  #### System

  Enter a system **Message** to include with the user input to help guide the model in what it should do.

  Use this option for things like defining tone, for example: `Always respond talking like a pirate`.

  #### User

  Enter a sample user input. Using this with the AI option can help improve the output of the agent. Using both together provides a sample of an input and expected response (the **AI Message**) for the model to follow.

  Select one of these input types:

  * **Text**: Enter a sample user input as a text **Message**.
  * **Image (Binary)**: Select a binary input from a previous node. Enter the **Image Data Field Name** to identify which binary field from the previous node contains the image data.
  * **Image (URL)**: Use this option to feed an image in from a URL. Enter the **Image URL**.

  For both the **Image** types, select the **Image Details** to control how the model processes the image and generates its textual understanding. Choose from:

  * **Auto**: The model uses the auto setting, which looks at the image input size and decide if it should use the Low or High setting.
  * **Low**: The model receives a low-resolution 512px x 512px version of the image and represents the image with a budget of 65 tokens. This allows the API to return faster responses and consume fewer input tokens. Use this option for use cases that don't require high detail.
  * **High**: The model can access the low-resolution image and then creates detailed crops of input images as 512px squares based on the input image size. Each of the detailed crops uses twice the token budget (65 tokens) for a total of 129 tokens. Use this option for use cases that require high detail.

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'basic-llm-chain') ]]

  ## Related resources

  Refer to [LangChain's documentation on Basic LLM Chains](https://js.langchain.com/docs/tutorials/llm_chain/){:target=_blank .external-link} for more information about the service.

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
  --8<-- "_glossary/ai-glossary.md"

  ## Common issues

  Here are some common errors and issues with the Basic LLM Chain node and steps to resolve or troubleshoot them.

  ### No prompt specified error

  This error displays when the **Prompt** is empty or invalid.

  You might see this error in one of two scenarios:

  1. When you've set the **Prompt** to **Define below** and haven't entered anything in the **Text** field.
      * To resolve, enter a valid prompt in the **Text** field.
  2. When you've set the **Prompt** to **Connected Chat Trigger Node** and the incoming data has no field called `chatInput`. 
      * The node expects the `chatInput` field. If your previous node doesn't have this field, add an [Edit Fields (Set)](/integrations/builtin/core-nodes/n8n-nodes-base.set.md) node to edit an incoming field name to `chatInput`.

properties_schema:
  [
    {
      "displayName": "Tool Description",
      "name": "toolDescription",
      "type": "string",
      "default": "",
      "required": false,
      "description": "Description for the AI to understand what this tool does and when to use it",
      "typeOptions": {
        "rows": 3
      },
      "placeholder": "e.g., Use this tool to interact with Basic LLM Chain"
    },
    {
      "displayName": "Save time with an <a href=\"/templates/1978\" target=\"_blank\">example</a> of how this node works",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "={{ $json.input }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1
          ]
        }
      }
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "={{ $json.chat_input }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.1,
            1.2
          ]
        }
      }
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.3
          ]
        }
      }
    },
    {
      "displayName": "Source for Prompt (User Message)",
      "name": "promptType",
      "type": "options",
      "default": "auto",
      "options": [
        {
          "name": "Connected Chat Trigger Node",
          "value": "auto",
          "description": "Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"
        },
        {
          "name": "Connected Guardrails Node",
          "value": "guardrails",
          "description": "Looks for an input field called 'guardrailsInput' that is coming from a directly connected Guardrails Node"
        },
        {
          "name": "Define below",
          "value": "define",
          "description": "Use an expression to reference data in previous nodes or enter static text"
        }
      ],
      "displayOptions": {
        "hide": {
          "@version": [
            {
              "_cnd": {
                "lte": 1.3
              }
            },
            {
              "_cnd": {
                "gte": 1.8
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Source for Prompt (User Message)",
      "name": "promptType",
      "type": "options",
      "default": "auto",
      "options": [
        {
          "name": "Connected Chat Trigger Node",
          "value": "auto",
          "description": "Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"
        },
        {
          "name": "Define below",
          "value": "define",
          "description": "Use an expression to reference data in previous nodes or enter static text"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 1.8
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "={{ $json.guardrailsInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "guardrails"
          ],
          "@version": [
            {
              "_cnd": {
                "gte": 1.5
              }
            }
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "auto"
          ],
          "@version": [
            {
              "_cnd": {
                "gte": 1.5
              }
            }
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "define"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Require Specific Output Format",
      "name": "hasOutputParser",
      "type": "boolean",
      "default": false,
      "displayOptions": {
        "hide": {
          "@version": [
            1,
            1.1,
            1.3
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Enable Fallback Model",
      "name": "needsFallback",
      "type": "boolean",
      "default": false,
      "displayOptions": {
        "hide": {
          "@version": [
            1,
            1.1,
            1.3
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Chat Messages (if Using a Chat Model)",
      "name": "messages",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "name": "messageValues",
          "displayName": "Prompt",
          "values": [
            {
              "displayName": "Type Name or ID",
              "name": "type",
              "type": "options",
              "options": [
                {
                  "name": "AI",
                  "value": "AIMessagePromptTemplate"
                },
                {
                  "name": "System",
                  "value": "SystemMessagePromptTemplate"
                },
                {
                  "name": "User",
                  "value": "HumanMessagePromptTemplate"
                }
              ],
              "default": "SystemMessagePromptTemplate"
            },
            {
              "displayName": "Message Type",
              "name": "messageType",
              "type": "options",
              "displayOptions": {
                "show": {
                  "type": [
                    "HumanMessagePromptTemplate"
                  ]
                }
              },
              "options": [
                {
                  "name": "Text",
                  "value": "text",
                  "description": "Simple text message"
                },
                {
                  "name": "Image (Binary)",
                  "value": "imageBinary",
                  "description": "Process the binary input from the previous node"
                },
                {
                  "name": "Image (URL)",
                  "value": "imageUrl",
                  "description": "Process the image from the specified URL"
                }
              ],
              "default": "text"
            },
            {
              "displayName": "Image Data Field Name",
              "name": "binaryImageDataKey",
              "type": "string",
              "default": "data",
              "required": true,
              "description": "The name of the field in the chain's input that contains the binary image file to be processed",
              "displayOptions": {
                "show": {
                  "messageType": [
                    "imageBinary"
                  ]
                }
              }
            },
            {
              "displayName": "Image URL",
              "name": "imageUrl",
              "type": "string",
              "default": "",
              "required": true,
              "description": "URL to the image to be processed",
              "displayOptions": {
                "show": {
                  "messageType": [
                    "imageUrl"
                  ]
                }
              }
            },
            {
              "displayName": "Image Details",
              "description": "Control how the model processes the image and generates its textual understanding",
              "name": "imageDetail",
              "type": "options",
              "displayOptions": {
                "show": {
                  "type": [
                    "HumanMessagePromptTemplate"
                  ],
                  "messageType": [
                    "imageBinary",
                    "imageUrl"
                  ]
                }
              },
              "options": [
                {
                  "name": "Auto",
                  "value": "auto",
                  "description": "Model will use the auto setting which will look at the image input size and decide if it should use the low or high setting"
                },
                {
                  "name": "Low",
                  "value": "low",
                  "description": "The model will receive a low-res 512px x 512px version of the image, and represent the image with a budget of 65 tokens. This allows the API to return faster responses and consume fewer input tokens for use cases that do not require high detail."
                },
                {
                  "name": "High",
                  "value": "high",
                  "description": "Allows the model to see the low res image and then creates detailed crops of input images as 512px squares based on the input image size. Each of the detailed crops uses twice the token budget (65 tokens) for a total of 129 tokens."
                }
              ],
              "default": "auto"
            },
            {
              "displayName": "Message",
              "name": "message",
              "type": "string",
              "required": true,
              "displayOptions": {
                "hide": {
                  "messageType": [
                    "imageBinary",
                    "imageUrl"
                  ]
                }
              },
              "default": ""
            }
          ]
        }
      ],
      "typeOptions": {
        "multipleValues": true
      }
    },
    {
      "displayName": "Batch Processing",
      "name": "batching",
      "type": "collection",
      "default": {},
      "description": "Batch processing options for rate limiting",
      "options": [
        {
          "displayName": "Batch Size",
          "name": "batchSize",
          "default": 5,
          "type": "number",
          "description": "How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."
        },
        {
          "displayName": "Delay Between Batches",
          "name": "delayBetweenBatches",
          "default": 0,
          "type": "number",
          "description": "Delay in milliseconds between batches. This is useful for rate limiting."
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 1.7
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require",
      "name": "notice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "hasOutputParser": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Connect an additional language model on the canvas to use it as a fallback if the main model fails",
      "name": "fallbackNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "needsFallback": [
            true
          ]
        }
      }
    }
  ]


node_type: nodes-langchain.chainLlm
package_name: @n8n/n8n-nodes-langchain
display_name: Basic LLM Chain
description: A simple chain to prompt a large language model
category: transform
development_style: programmatic
version: 1.9
operations: []
credentials_required: []
outputs:
  [
  "main"
  ]

updated_at: 2026-07-16 12:10:22
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Basic LLM Chain node documentation
  description: Learn how to use the Basic LLM Chain node in n8n. Follow technical documentation to integrate Basic LLM Chain node into your workflows.
  contentType: [integration, reference]
  priority: critical
  ---

  # Basic LLM Chain node

  Use the Basic LLM Chain node to set the prompt that the model will use along with setting an optional parser for the response.

  On this page, you'll find the node parameters for the Basic LLM Chain node and links to more resources.

  /// note | Examples and templates
  For usage examples and templates to help you get started, refer to n8n's [Basic LLM Chain integrations](https://n8n.io/integrations/basic-llm-chain/){:target=_blank .external-link} page.
  ///	

  ## Node parameters

  ### Prompt

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/prompt.md"

  ### Require Specific Output Format

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-root-nodes/output-format.md"

  ## Chat Messages

  Use **Chat Messages** when you're using a chat model to set a message.

  n8n ignores these options if you don't connect a chat model. Select the **Type Name or ID** you want the node to use:

  #### AI

  Enter a sample expected response in the **Message** field. The model will try to respond in the same way in its messages.

  #### System

  Enter a system **Message** to include with the user input to help guide the model in what it should do.

  Use this option for things like defining tone, for example: `Always respond talking like a pirate`.

  #### User

  Enter a sample user input. Using this with the AI option can help improve the output of the agent. Using both together provides a sample of an input and expected response (the **AI Message**) for the model to follow.

  Select one of these input types:

  * **Text**: Enter a sample user input as a text **Message**.
  * **Image (Binary)**: Select a binary input from a previous node. Enter the **Image Data Field Name** to identify which binary field from the previous node contains the image data.
  * **Image (URL)**: Use this option to feed an image in from a URL. Enter the **Image URL**.

  For both the **Image** types, select the **Image Details** to control how the model processes the image and generates its textual understanding. Choose from:

  * **Auto**: The model uses the auto setting, which looks at the image input size and decide if it should use the Low or High setting.
  * **Low**: The model receives a low-resolution 512px x 512px version of the image and represents the image with a budget of 65 tokens. This allows the API to return faster responses and consume fewer input tokens. Use this option for use cases that don't require high detail.
  * **High**: The model can access the low-resolution image and then creates detailed crops of input images as 512px squares based on the input image size. Each of the detailed crops uses twice the token budget (65 tokens) for a total of 129 tokens. Use this option for use cases that require high detail.

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'basic-llm-chain') ]]

  ## Related resources

  Refer to [LangChain's documentation on Basic LLM Chains](https://js.langchain.com/docs/tutorials/llm_chain/){:target=_blank .external-link} for more information about the service.

  --8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md"
  --8<-- "_glossary/ai-glossary.md"

  ## Common issues

  Here are some common errors and issues with the Basic LLM Chain node and steps to resolve or troubleshoot them.

  ### No prompt specified error

  This error displays when the **Prompt** is empty or invalid.

  You might see this error in one of two scenarios:

  1. When you've set the **Prompt** to **Define below** and haven't entered anything in the **Text** field.
      * To resolve, enter a valid prompt in the **Text** field.
  2. When you've set the **Prompt** to **Connected Chat Trigger Node** and the incoming data has no field called `chatInput`. 
      * The node expects the `chatInput` field. If your previous node doesn't have this field, add an [Edit Fields (Set)](/integrations/builtin/core-nodes/n8n-nodes-base.set.md) node to edit an incoming field name to `chatInput`.

properties_schema:
  [
    {
      "displayName": "Save time with an <a href=\"/templates/1978\" target=\"_blank\">example</a> of how this node works",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "={{ $json.input }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1
          ]
        }
      }
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "={{ $json.chat_input }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.1,
            1.2
          ]
        }
      }
    },
    {
      "displayName": "Prompt",
      "name": "prompt",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.3
          ]
        }
      }
    },
    {
      "displayName": "Source for Prompt (User Message)",
      "name": "promptType",
      "type": "options",
      "default": "auto",
      "options": [
        {
          "name": "Connected Chat Trigger Node",
          "value": "auto",
          "description": "Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"
        },
        {
          "name": "Connected Guardrails Node",
          "value": "guardrails",
          "description": "Looks for an input field called 'guardrailsInput' that is coming from a directly connected Guardrails Node"
        },
        {
          "name": "Define below",
          "value": "define",
          "description": "Use an expression to reference data in previous nodes or enter static text"
        }
      ],
      "displayOptions": {
        "hide": {
          "@version": [
            {
              "_cnd": {
                "lte": 1.3
              }
            },
            {
              "_cnd": {
                "gte": 1.8
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Source for Prompt (User Message)",
      "name": "promptType",
      "type": "options",
      "default": "auto",
      "options": [
        {
          "name": "Connected Chat Trigger Node",
          "value": "auto",
          "description": "Looks for an input field called 'chatInput' that is coming from a directly connected Chat Trigger"
        },
        {
          "name": "Define below",
          "value": "define",
          "description": "Use an expression to reference data in previous nodes or enter static text"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 1.8
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "={{ $json.guardrailsInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "guardrails"
          ],
          "@version": [
            {
              "_cnd": {
                "gte": 1.5
              }
            }
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "auto"
          ],
          "@version": [
            {
              "_cnd": {
                "gte": 1.5
              }
            }
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "define"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Require Specific Output Format",
      "name": "hasOutputParser",
      "type": "boolean",
      "default": false,
      "displayOptions": {
        "hide": {
          "@version": [
            1,
            1.1,
            1.3
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Enable Fallback Model",
      "name": "needsFallback",
      "type": "boolean",
      "default": false,
      "displayOptions": {
        "hide": {
          "@version": [
            1,
            1.1,
            1.3
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Chat Messages (if Using a Chat Model)",
      "name": "messages",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "name": "messageValues",
          "displayName": "Prompt",
          "values": [
            {
              "displayName": "Type Name or ID",
              "name": "type",
              "type": "options",
              "options": [
                {
                  "name": "AI",
                  "value": "AIMessagePromptTemplate"
                },
                {
                  "name": "System",
                  "value": "SystemMessagePromptTemplate"
                },
                {
                  "name": "User",
                  "value": "HumanMessagePromptTemplate"
                }
              ],
              "default": "SystemMessagePromptTemplate"
            },
            {
              "displayName": "Message Type",
              "name": "messageType",
              "type": "options",
              "displayOptions": {
                "show": {
                  "type": [
                    "HumanMessagePromptTemplate"
                  ]
                }
              },
              "options": [
                {
                  "name": "Text",
                  "value": "text",
                  "description": "Simple text message"
                },
                {
                  "name": "Image (Binary)",
                  "value": "imageBinary",
                  "description": "Process the binary input from the previous node"
                },
                {
                  "name": "Image (URL)",
                  "value": "imageUrl",
                  "description": "Process the image from the specified URL"
                }
              ],
              "default": "text"
            },
            {
              "displayName": "Image Data Field Name",
              "name": "binaryImageDataKey",
              "type": "string",
              "default": "data",
              "required": true,
              "description": "The name of the field in the chain's input that contains the binary image file to be processed",
              "displayOptions": {
                "show": {
                  "messageType": [
                    "imageBinary"
                  ]
                }
              }
            },
            {
              "displayName": "Image URL",
              "name": "imageUrl",
              "type": "string",
              "default": "",
              "required": true,
              "description": "URL to the image to be processed",
              "displayOptions": {
                "show": {
                  "messageType": [
                    "imageUrl"
                  ]
                }
              }
            },
            {
              "displayName": "Image Details",
              "description": "Control how the model processes the image and generates its textual understanding",
              "name": "imageDetail",
              "type": "options",
              "displayOptions": {
                "show": {
                  "type": [
                    "HumanMessagePromptTemplate"
                  ],
                  "messageType": [
                    "imageBinary",
                    "imageUrl"
                  ]
                }
              },
              "options": [
                {
                  "name": "Auto",
                  "value": "auto",
                  "description": "Model will use the auto setting which will look at the image input size and decide if it should use the low or high setting"
                },
                {
                  "name": "Low",
                  "value": "low",
                  "description": "The model will receive a low-res 512px x 512px version of the image, and represent the image with a budget of 65 tokens. This allows the API to return faster responses and consume fewer input tokens for use cases that do not require high detail."
                },
                {
                  "name": "High",
                  "value": "high",
                  "description": "Allows the model to see the low res image and then creates detailed crops of input images as 512px squares based on the input image size. Each of the detailed crops uses twice the token budget (65 tokens) for a total of 129 tokens."
                }
              ],
              "default": "auto"
            },
            {
              "displayName": "Message",
              "name": "message",
              "type": "string",
              "required": true,
              "displayOptions": {
                "hide": {
                  "messageType": [
                    "imageBinary",
                    "imageUrl"
                  ]
                }
              },
              "default": ""
            }
          ]
        }
      ],
      "typeOptions": {
        "multipleValues": true
      }
    },
    {
      "displayName": "Batch Processing",
      "name": "batching",
      "type": "collection",
      "default": {},
      "description": "Batch processing options for rate limiting",
      "options": [
        {
          "displayName": "Batch Size",
          "name": "batchSize",
          "default": 5,
          "type": "number",
          "description": "How many items to process in parallel. This is useful for rate limiting, but might impact the log output ordering."
        },
        {
          "displayName": "Delay Between Batches",
          "name": "delayBetweenBatches",
          "default": 0,
          "type": "number",
          "description": "Delay in milliseconds between batches. This is useful for rate limiting."
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 1.7
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Connect an <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_outputParser'>output parser</a> on the canvas to specify the output format you require",
      "name": "notice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "hasOutputParser": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Connect an additional language model on the canvas to use it as a fallback if the main model fails",
      "name": "fallbackNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "needsFallback": [
            true
          ]
        }
      }
    }
  ]


