# nodes

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.1
credentials_required:
  [
  {
  "name": "openAiApi",
  "required": true
  }
  ]

outputs:
  [
  "main"
  ]

updated_at: 2026-03-18 15:15:49
properties_schema:
  [
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "Text",
          "value": "text",
          "builderHint": {
            "message": "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": {
          "operation": [
            "generate"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "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": [
                "gpt-image-1"
              ]
            }
          },
          "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": [
                "gpt-image-1"
              ]
            }
          },
          "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": [
                "gpt-image-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": {
              "returnImageUrls": [
                false
              ]
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "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": {
          "operation": [
            "edit"
          ],
          "resource": [
            "image"
          ]
        }
      }
    },
    {
      "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": "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": "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": "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": "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 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": "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": {
          "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"
        },
        {
          "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"
    },
    {
      "operation": "transcribe",
      "name": "Transcribe a Recording",
      "description": "Transcribes audio into text"
    },
    {
      "operation": "translate",
      "name": "Translate a Recording",
      "description": "Translates audio into text in English"
    }
  ]


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
operations: []
credentials_required:
  [
  {
  "name": "microsoftAgent365Api",
  "required": true
  }
  ]

outputs:
  [
  "main"
  ]

updated_at: 2026-03-18 15:15:49
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 MCP Tools",
      "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": "Calendar",
          "value": "mcp_CalendarTools"
        },
        {
          "name": "Mail",
          "value": "mcp_MailTools"
        },
        {
          "name": "Me",
          "value": "mcp_MeServer"
        },
        {
          "name": "OneDrive & SharePoint",
          "value": "mcp_ODSPRemoteServer"
        },
        {
          "name": "SharePoint Lists",
          "value": "mcp_SharePointListsTools"
        },
        {
          "name": "Teams",
          "value": "mcp_TeamsServer"
        },
        {
          "name": "Teams Canary",
          "value": "mcp_TeamsCanaryServer"
        },
        {
          "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": ""
        }
      ]
    }
  ]


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-03-18 15:15:49
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": {
            "message": "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": "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-03-18 15:15:49
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": {
            "message": "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": "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-03-18 15:15:49
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-03-18 15:15:49
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-03-18 15:15:49
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-03-18 15:15:49
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-03-18 15:15:49
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-03-18 15:15:49
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
          ]
        }
      }
    }
  ]


node_type: nodes-langchain.chainRetrievalQaTool
package_name: @n8n/n8n-nodes-langchain
display_name: Question and Answer Chain Tool
description: Answer questions about retrieved documents (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1.7
operations: []
credentials_required: []
outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-18 15:15:49
tool_variant_of: nodes-langchain.chainRetrievalQa
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Question and Answer Chain node documentation
  description: Learn how to use the Question and Answer Chain node in n8n. Follow technical documentation to integrate Question and Answer Chain node into your workflows.
  contentType: [integration, reference]
  priority: high
  ---

  # Question and Answer Chain node

  Use the Question and Answer Chain node to use a [vector store](/glossary.md#ai-vector-store) as a retriever.

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

  ## Node parameters

  ### Query

  The question you want to ask.

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChain's documentation on retrieval chains](https://js.langchain.com/docs/tutorials/rag/){:target=_blank .external-link} for examples of how LangChain can use a vector store as a retriever.

  --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.chainretrievalqa/common-issues.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 Question and Answer Chain"
    },
    {
      "displayName": "Save time with an <a href=\"/templates/1960\" target=\"_blank\">example</a> of how this node works",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Query",
      "name": "query",
      "type": "string",
      "default": "={{ $json.input }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1
          ]
        }
      }
    },
    {
      "displayName": "Query",
      "name": "query",
      "type": "string",
      "default": "={{ $json.chat_input }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.1
          ]
        }
      }
    },
    {
      "displayName": "Query",
      "name": "query",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.2
          ]
        }
      }
    },
    {
      "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.2
              }
            },
            {
              "_cnd": {
                "gte": 1.7
              }
            }
          ]
        }
      }
    },
    {
      "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.7
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "={{ $json.guardrailsInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "guardrails"
          ],
          "@version": [
            {
              "_cnd": {
                "gte": 1.4
              }
            }
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "auto"
          ],
          "@version": [
            {
              "_cnd": {
                "gte": 1.4
              }
            }
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "define"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "System Prompt Template",
          "name": "systemPromptTemplate",
          "type": "string",
          "default": "You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question.\nIf you don't know the answer, just say that you don't know, don't try to make up an answer.\n----------------\nContext: {context}",
          "typeOptions": {
            "rows": 6
          },
          "description": "Template string used for the system prompt. This should include the variable `{context}` for the provided context. For text completion models, you should also include the variable `{question}` for the user’s query.",
          "displayOptions": {
            "show": {
              "@version": [
                {
                  "_cnd": {
                    "lt": 1.5
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "System Prompt Template",
          "name": "systemPromptTemplate",
          "type": "string",
          "default": "You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question.\nIf you don't know the answer, just say that you don't know, don't try to make up an answer.\n----------------\nContext: {context}",
          "typeOptions": {
            "rows": 6
          },
          "description": "Template string used for the system prompt. This should include the variable `{context}` for the provided context. For text completion models, you should also include the variable `{input}` for the user’s query.",
          "displayOptions": {
            "show": {
              "@version": [
                {
                  "_cnd": {
                    "gte": 1.5
                  }
                }
              ]
            }
          }
        },
        {
          "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": 1.6
                  }
                }
              ]
            }
          }
        }
      ]
    }
  ]


node_type: nodes-langchain.chainRetrievalQa
package_name: @n8n/n8n-nodes-langchain
display_name: Question and Answer Chain
description: Answer questions about retrieved documents
category: transform
development_style: programmatic
version: 1.7
operations: []
credentials_required: []
outputs:
  [
  "main"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Question and Answer Chain node documentation
  description: Learn how to use the Question and Answer Chain node in n8n. Follow technical documentation to integrate Question and Answer Chain node into your workflows.
  contentType: [integration, reference]
  priority: high
  ---

  # Question and Answer Chain node

  Use the Question and Answer Chain node to use a [vector store](/glossary.md#ai-vector-store) as a retriever.

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

  ## Node parameters

  ### Query

  The question you want to ask.

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChain's documentation on retrieval chains](https://js.langchain.com/docs/tutorials/rag/){:target=_blank .external-link} for examples of how LangChain can use a vector store as a retriever.

  --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.chainretrievalqa/common-issues.md).

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

properties_schema:
  [
    {
      "displayName": "Save time with an <a href=\"/templates/1960\" target=\"_blank\">example</a> of how this node works",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Query",
      "name": "query",
      "type": "string",
      "default": "={{ $json.input }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1
          ]
        }
      }
    },
    {
      "displayName": "Query",
      "name": "query",
      "type": "string",
      "default": "={{ $json.chat_input }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.1
          ]
        }
      }
    },
    {
      "displayName": "Query",
      "name": "query",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.2
          ]
        }
      }
    },
    {
      "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.2
              }
            },
            {
              "_cnd": {
                "gte": 1.7
              }
            }
          ]
        }
      }
    },
    {
      "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.7
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "={{ $json.guardrailsInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "guardrails"
          ],
          "@version": [
            {
              "_cnd": {
                "gte": 1.4
              }
            }
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "={{ $json.chatInput }}",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "auto"
          ],
          "@version": [
            {
              "_cnd": {
                "gte": 1.4
              }
            }
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Prompt (User Message)",
      "name": "text",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "promptType": [
            "define"
          ]
        }
      },
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "System Prompt Template",
          "name": "systemPromptTemplate",
          "type": "string",
          "default": "You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question.\nIf you don't know the answer, just say that you don't know, don't try to make up an answer.\n----------------\nContext: {context}",
          "typeOptions": {
            "rows": 6
          },
          "description": "Template string used for the system prompt. This should include the variable `{context}` for the provided context. For text completion models, you should also include the variable `{question}` for the user’s query.",
          "displayOptions": {
            "show": {
              "@version": [
                {
                  "_cnd": {
                    "lt": 1.5
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "System Prompt Template",
          "name": "systemPromptTemplate",
          "type": "string",
          "default": "You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question.\nIf you don't know the answer, just say that you don't know, don't try to make up an answer.\n----------------\nContext: {context}",
          "typeOptions": {
            "rows": 6
          },
          "description": "Template string used for the system prompt. This should include the variable `{context}` for the provided context. For text completion models, you should also include the variable `{input}` for the user’s query.",
          "displayOptions": {
            "show": {
              "@version": [
                {
                  "_cnd": {
                    "gte": 1.5
                  }
                }
              ]
            }
          }
        },
        {
          "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": 1.6
                  }
                }
              ]
            }
          }
        }
      ]
    }
  ]


node_type: nodes-langchain.sentimentAnalysis
package_name: @n8n/n8n-nodes-langchain
display_name: Sentiment Analysis
description: Analyze the sentiment of your text
category: transform
development_style: programmatic
version: 1.1
operations: []
credentials_required: []
updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Sentiment Analysis node documentation
  description: Learn how to use the Sentiment Analysis node in n8n. Follow technical documentation to integrate Sentiment Analysis node into your workflows.
  contentType: [integration, reference]
  ---

  # Sentiment Analysis node

  Use the Sentiment Analysis node to analyze the sentiment of incoming text data.

  The language model uses the [**Sentiment Categories**](#node-options) in the node options to determine each item's sentiment.

  ## Node parameters

  * **Text to Analyze** defines the input text for sentiment analysis. This is an expression that references a field from the input items. For example, this could be 
  `{{ $json.chatInput }}` if the input is from a chat or message source. By default, it expects a `text` field.

  ## Node options

  * **Sentiment Categories**: Define the categories that you want to classify your input as.
      * By default, these are `Positive, Neutral, Negative`. You can customize these categories to fit your specific use case, such as `Very Positive, Positive, Neutral, Negative, Very Negative` for more granular analysis.
  * **Include Detailed Results**: When turned on, this option includes sentiment strength and confidence scores in the output. Note that these scores are estimates generated by the language model and are rough indicators rather than precise measurements.
  * **System Prompt Template**: Use this option to change the system prompt that's used for the sentiment analysis. It uses the `{categories}` placeholder for the categories.
  * **Enable Auto-Fixing**: When enabled, the node automatically fixes model outputs to ensure they match the expected format. Do this by sending the schema parsing error to the LLM and asking it to fix it.

  ## Usage Notes

  ### Model Temperature Setting

  It's strongly advised to set the temperature of the connected language model to 0 or a value close to 0. This helps ensure that the results are as deterministic as possible, providing more consistent and reliable sentiment analysis across multiple runs.

  ### Language Considerations

  The node's performance may vary depending on the language of the input text.

  For best results, ensure your chosen language model supports the input language.

  ### Processing Large Volumes

  When analyzing large amounts of text, consider splitting the input into smaller chunks to optimize processing time and resource usage.

  ### Iterative Refinement

  For complex sentiment analysis tasks, you may need to iteratively refine the system prompt and categories to achieve the desired results.

  ## Example Usage

  ### Basic Sentiment Analysis

  1. Connect a data source (for example, RSS Feed, HTTP Request) to the Sentiment Analysis node.
  2. Set the "Text to Analyze" field to the relevant item property (for example, `{{ $json.content }}` for blog post content).
  3. Keep the default sentiment categories.
  4. Connect the node's outputs to separate paths for processing positive, neutral, and negative sentiments differently.

  ### Custom Category Analysis

  1. Change the **Sentiment Categories** to `Excited, Happy, Neutral, Disappointed, Angry`.
  2. Adjust your workflow to handle these five output categories.
  3. Use this setup to analyze customer feedback with more nuanced emotional categories.

  ## Related resources

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

properties_schema:
  [
    {
      "displayName": "Text to Analyze",
      "name": "inputText",
      "type": "string",
      "default": "",
      "description": "Use an expression to reference data in previous nodes or enter static text",
      "required": true,
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Sentiment scores are LLM-generated estimates, not statistically rigorous measurements. They may be inconsistent across runs and should be used as rough indicators only.",
      "name": "detailedResultsNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "/options.includeDetailedResults": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Sentiment Categories",
          "name": "categories",
          "type": "string",
          "default": "Positive, Neutral, Negative",
          "description": "A comma-separated list of categories to analyze",
          "noDataExpression": true,
          "typeOptions": {
            "rows": 2
          }
        },
        {
          "displayName": "System Prompt Template",
          "name": "systemPromptTemplate",
          "type": "string",
          "default": "You are highly intelligent and accurate sentiment analyzer. Analyze the sentiment of the provided text. Categorize it into one of the following: {categories}. Use the provided formatting instructions. Only output the JSON.",
          "description": "String to use directly as the system prompt template",
          "typeOptions": {
            "rows": 6
          }
        },
        {
          "displayName": "Include Detailed Results",
          "name": "includeDetailedResults",
          "type": "boolean",
          "default": false,
          "description": "Whether to include sentiment strength and confidence scores in the output"
        },
        {
          "displayName": "Enable Auto-Fixing",
          "name": "enableAutoFixing",
          "type": "boolean",
          "default": true,
          "description": "Whether to enable auto-fixing (may trigger an additional LLM call if output is broken)"
        },
        {
          "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": 1.1
                  }
                }
              ]
            }
          }
        }
      ]
    }
  ]

outputs:
  [
    "={{((parameters, defaultCategories) => {\n    const options = (parameters?.options ?? {});\n    const categories = options?.categories ?? defaultCategories;\n    const categoriesArray = categories.split(',').map((cat) => cat.trim());\n    const ret = categoriesArray.map((cat) => ({ type: 'main', displayName: cat }));\n    return ret;\n})($parameter, \"Positive, Neutral, Negative\")}}"
  ]


node_type: nodes-langchain.informationExtractor
package_name: @n8n/n8n-nodes-langchain
display_name: Information Extractor
description: Extract information from text in a structured format
category: transform
development_style: programmatic
version: 1.2
operations: []
credentials_required: []
outputs:
  [
  "main"
  ]

updated_at: 2026-03-18 15:15:49
properties_schema:
  [
    {
      "displayName": "Text",
      "name": "text",
      "type": "string",
      "default": "",
      "description": "The text to extract information from",
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Schema Type",
      "name": "schemaType",
      "type": "options",
      "default": "fromAttributes",
      "description": "How to specify the schema for the desired output",
      "options": [
        {
          "name": "From Attribute Descriptions",
          "value": "fromAttributes",
          "description": "Extract specific attributes from the text based on types and descriptions"
        },
        {
          "name": "Generate From JSON Example",
          "value": "fromJson",
          "description": "Generate a schema from an example JSON object"
        },
        {
          "name": "Define using JSON Schema",
          "value": "manual",
          "description": "Define the JSON schema manually"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "JSON Example",
      "name": "jsonSchemaExample",
      "type": "json",
      "default": "{\n\t\"state\": \"California\",\n\t\"cities\": [\"Los Angeles\", \"San Francisco\", \"San Diego\"]\n}",
      "description": "Example JSON object to use to generate the schema",
      "displayOptions": {
        "show": {
          "schemaType": [
            "fromJson"
          ]
        }
      },
      "typeOptions": {
        "rows": 10
      },
      "noDataExpression": true
    },
    {
      "displayName": "All properties will be required. To make them optional, use the 'JSON Schema' schema type instead",
      "name": "notice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 1.2
              }
            }
          ],
          "schemaType": [
            "fromJson"
          ]
        }
      }
    },
    {
      "displayName": "Input Schema",
      "name": "inputSchema",
      "type": "json",
      "default": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"state\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"cities\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"items\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t}\n\t\t}\n\t}\n}",
      "description": "Schema to use for the function",
      "displayOptions": {
        "show": {
          "schemaType": [
            "manual"
          ]
        }
      },
      "typeOptions": {
        "rows": 10
      },
      "noDataExpression": false
    },
    {
      "displayName": "Attributes",
      "name": "attributes",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "name": "attributes",
          "displayName": "Attribute List",
          "values": [
            {
              "displayName": "Name",
              "name": "name",
              "type": "string",
              "default": "",
              "description": "Attribute to extract",
              "placeholder": "e.g. company_name",
              "required": true
            },
            {
              "displayName": "Type",
              "name": "type",
              "type": "options",
              "description": "Data type of the attribute",
              "required": true,
              "options": [
                {
                  "name": "Boolean",
                  "value": "boolean"
                },
                {
                  "name": "Date",
                  "value": "date"
                },
                {
                  "name": "Number",
                  "value": "number"
                },
                {
                  "name": "String",
                  "value": "string"
                }
              ],
              "default": "string"
            },
            {
              "displayName": "Description",
              "name": "description",
              "type": "string",
              "default": "",
              "description": "Describe your attribute",
              "placeholder": "Add description for the attribute",
              "required": true
            },
            {
              "displayName": "Required",
              "name": "required",
              "type": "boolean",
              "default": false,
              "description": "Whether attribute is required",
              "required": true
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "schemaType": [
            "fromAttributes"
          ]
        }
      },
      "typeOptions": {
        "multipleValues": true
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "System Prompt Template",
          "name": "systemPromptTemplate",
          "type": "string",
          "default": "You are an expert extraction algorithm.\nOnly extract relevant information from the text.\nIf you do not know the value of an attribute asked to extract, you may omit the attribute's value.",
          "description": "String to use directly as the system prompt template",
          "typeOptions": {
            "rows": 6
          }
        },
        {
          "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": 1.1
                  }
                }
              ]
            }
          }
        }
      ]
    }
  ]


node_type: nodes-langchain.textClassifier
package_name: @n8n/n8n-nodes-langchain
display_name: Text Classifier
description: Classify your text into distinct categories
category: transform
development_style: programmatic
version: 1.1
operations: []
credentials_required: []
updated_at: 2026-03-18 15:15:49
properties_schema:
  [
    {
      "displayName": "Text to Classify",
      "name": "inputText",
      "type": "string",
      "default": "",
      "description": "Use an expression to reference data in previous nodes or enter static text",
      "required": true,
      "typeOptions": {
        "rows": 2
      }
    },
    {
      "displayName": "Categories",
      "name": "categories",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "name": "categories",
          "displayName": "Categories",
          "values": [
            {
              "displayName": "Category",
              "name": "category",
              "type": "string",
              "default": "",
              "description": "Category to add",
              "required": true
            },
            {
              "displayName": "Description",
              "name": "description",
              "type": "string",
              "default": "",
              "description": "Describe your category if it's not obvious"
            }
          ]
        }
      ],
      "typeOptions": {
        "multipleValues": true
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Allow Multiple Classes To Be True",
          "name": "multiClass",
          "type": "boolean",
          "default": false
        },
        {
          "displayName": "When No Clear Match",
          "name": "fallback",
          "type": "options",
          "default": "discard",
          "description": "What to do with items that don’t match the categories exactly",
          "options": [
            {
              "name": "Discard Item",
              "value": "discard",
              "description": "Ignore the item and drop it from the output"
            },
            {
              "name": "Output on Extra, 'Other' Branch",
              "value": "other",
              "description": "Create a separate output branch called 'Other'"
            }
          ]
        },
        {
          "displayName": "System Prompt Template",
          "name": "systemPromptTemplate",
          "type": "string",
          "default": "Please classify the text provided by the user into one of the following categories: {categories}, and use the provided formatting instructions below. Don't explain, and only output the json.",
          "description": "String to use directly as the system prompt template",
          "typeOptions": {
            "rows": 6
          }
        },
        {
          "displayName": "Enable Auto-Fixing",
          "name": "enableAutoFixing",
          "type": "boolean",
          "default": true,
          "description": "Whether to enable auto-fixing (may trigger an additional LLM call if output is broken)"
        },
        {
          "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": 1.1
                  }
                }
              ]
            }
          }
        }
      ]
    }
  ]

outputs:
  [
    "={{((parameters) => {\n    const categories = parameters.categories?.categories ?? [];\n    const fallback = parameters.options?.fallback;\n    const ret = categories.map((cat) => {\n        return { type: 'main', displayName: cat.category };\n    });\n    if (fallback === 'other')\n        ret.push({ type: 'main', displayName: 'Other' });\n    return ret;\n})($parameter)}}"
  ]


node_type: nodes-langchain.code
package_name: @n8n/n8n-nodes-langchain
display_name: LangChain Code
description: LangChain Code Node
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required: []
updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: LangChain Code node documentation
  description: Learn how to use the LangChain Code node in n8n. Follow technical documentation to integrate LangChain Code node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # LangChain Code node

  Use the LangChain Code node to import LangChain. This means if there is functionality you need that n8n hasn't created a node for, you can still use it. By configuring the LangChain Code node connectors you can use it as a normal node, root node or sub-node.

  On this page, you'll find the node parameters, guidance on configuring the node, and links to more resources.

  /// note | Not available on Cloud
  This node is only available on self-hosted n8n.
  ///

  ## Node parameters

  ### Add Code

  Add your custom code. Choose either **Execute** or **Supply Data** mode. You can only use one mode.

  Unlike the [Code node](/integrations/builtin/core-nodes/n8n-nodes-base.code/index.md), the LangChain Code node doesn't support Python.

  * **Execute**: use the LangChain Code node like n8n's own Code node. This takes input data from the workflow, processes it, and returns it as the node output. This mode requires a main input and output. You must create these connections in **Inputs** and **Outputs**.
  * **Supply Data**: use the LangChain Code node as a sub-node, sending data to a root node. This uses an output other than main.

  By default, you can't load built-in or external modules in this node. Self-hosted users can [enable built-in and external modules](/hosting/configuration/configuration-methods.md).

  ### Inputs

  Choose the input types. 

  The main input is the normal connector found in all n8n workflows. If you have a main input and output set in the node, **Execute** code is required.

  ### Outputs

  Choose the output types. 

  The main output is the normal connector found in all n8n workflows. If you have a main input and output set in the node, **Execute** code is required.

  ## Node inputs and outputs configuration

  By configuring the LangChain Code node connectors (inputs and outputs) you can use it as an app node, root node or sub-node.

  ![Screenshot of a workflow with four LangChain nodes, configured as different node types](/_images/integrations/builtin/cluster-nodes/langchaincode/create-node-types.png)

  | Node type | Inputs | Outputs | Code mode |
  | --------- | ------ | ------- | --------- |
  | App node. Similar to the [Code node](/integrations/builtin/core-nodes/n8n-nodes-base.code/index.md). | Main | Main | Execute |
  | Root node | Main; at least one other type | Main | Execute |
  | Sub-node | - | A type other than main. Must match the input type you want to connect to. | Supply Data |
  | Sub-node with sub-nodes | A type other than main |A type other than main. Must match the input type you want to connect to. | Supply Data |

  ## Built-in methods

  n8n provides these methods to make it easier to perform common tasks in the LangChain Code node.

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

  ## Templates and examples

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

  ## Related resources

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

properties_schema:
  [
    {
      "displayName": "Code",
      "name": "code",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "name": "execute",
          "displayName": "Execute",
          "values": [
            {
              "displayName": "JavaScript - Execute",
              "name": "code",
              "type": "string",
              "typeOptions": {
                "editor": "jsEditor"
              },
              "default": "const { PromptTemplate } = require('@langchain/core/prompts');\n\nconst query = 'Tell me a joke';\nconst prompt = PromptTemplate.fromTemplate(query);\n\n// If you are allowing more than one language model input connection (-1 or\n// anything greater than 1), getInputConnectionData returns an array, so you\n// will have to change the code below it to deal with that. For example, use\n// llm[0] in the chain definition\n\nconst llm = await this.getInputConnectionData('ai_languageModel', 0);\nlet chain = prompt.pipe(llm);\nconst output = await chain.invoke();\nreturn [ {json: { output } } ];\n\n// NOTE: Old langchain imports (e.g., 'langchain/chains') are automatically\n// converted to '@langchain/classic' imports for backwards compatibility.",
              "hint": "This code will only run and return data if a \"Main\" input & output got created.",
              "noDataExpression": true
            }
          ]
        },
        {
          "name": "supplyData",
          "displayName": "Supply Data",
          "values": [
            {
              "displayName": "JavaScript - Supply Data",
              "name": "code",
              "type": "string",
              "typeOptions": {
                "editor": "jsEditor"
              },
              "default": "const { WikipediaQueryRun } = require( '@langchain/community/tools/wikipedia_query_run');\nreturn new WikipediaQueryRun();",
              "hint": "This code will only run and return data if an output got created which is not \"Main\".",
              "noDataExpression": true
            }
          ]
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "You can import LangChain and use all available functionality. Debug by using <code>console.log()</code> statements and viewing their output in the browser console.",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Inputs",
      "name": "inputs",
      "type": "fixedCollection",
      "default": {},
      "description": "The input to add",
      "options": [
        {
          "name": "input",
          "displayName": "Input",
          "values": [
            {
              "displayName": "Type",
              "name": "type",
              "type": "options",
              "options": [
                {
                  "name": "Chain",
                  "value": "ai_chain"
                },
                {
                  "name": "Document",
                  "value": "ai_document"
                },
                {
                  "name": "Embedding",
                  "value": "ai_embedding"
                },
                {
                  "name": "Language Model",
                  "value": "ai_languageModel"
                },
                {
                  "name": "Memory",
                  "value": "ai_memory"
                },
                {
                  "name": "Output Parser",
                  "value": "ai_outputParser"
                },
                {
                  "name": "Text Splitter",
                  "value": "ai_textSplitter"
                },
                {
                  "name": "Tool",
                  "value": "ai_tool"
                },
                {
                  "name": "Vector Store",
                  "value": "ai_vectorStore"
                },
                {
                  "name": "Main",
                  "value": "main"
                }
              ],
              "noDataExpression": true,
              "default": "",
              "required": true,
              "description": "The type of the input"
            },
            {
              "displayName": "Max Connections",
              "name": "maxConnections",
              "type": "number",
              "noDataExpression": true,
              "default": -1,
              "required": true,
              "description": "How many nodes of this type are allowed to be connected. Set it to -1 for unlimited."
            },
            {
              "displayName": "Required",
              "name": "required",
              "type": "boolean",
              "noDataExpression": true,
              "default": false,
              "required": true,
              "description": "Whether the input needs a connection"
            }
          ]
        }
      ],
      "typeOptions": {
        "multipleValues": true,
        "sortable": true
      },
      "noDataExpression": true
    },
    {
      "displayName": "Outputs",
      "name": "outputs",
      "type": "fixedCollection",
      "default": {},
      "description": "The output to add",
      "options": [
        {
          "name": "output",
          "displayName": "Output",
          "values": [
            {
              "displayName": "Type",
              "name": "type",
              "type": "options",
              "options": [
                {
                  "name": "Chain",
                  "value": "ai_chain"
                },
                {
                  "name": "Document",
                  "value": "ai_document"
                },
                {
                  "name": "Embedding",
                  "value": "ai_embedding"
                },
                {
                  "name": "Language Model",
                  "value": "ai_languageModel"
                },
                {
                  "name": "Memory",
                  "value": "ai_memory"
                },
                {
                  "name": "Output Parser",
                  "value": "ai_outputParser"
                },
                {
                  "name": "Text Splitter",
                  "value": "ai_textSplitter"
                },
                {
                  "name": "Tool",
                  "value": "ai_tool"
                },
                {
                  "name": "Vector Store",
                  "value": "ai_vectorStore"
                },
                {
                  "name": "Main",
                  "value": "main"
                }
              ],
              "noDataExpression": true,
              "default": "",
              "required": true,
              "description": "The type of the input"
            }
          ]
        }
      ],
      "typeOptions": {
        "multipleValues": true,
        "sortable": true
      },
      "noDataExpression": true
    }
  ]

outputs:
  [
    "={{ ((values) => { const connectorTypes = {\"ai_chain\":\"Chain\",\"ai_document\":\"Document\",\"ai_embedding\":\"Embedding\",\"ai_languageModel\":\"Language Model\",\"ai_memory\":\"Memory\",\"ai_outputParser\":\"Output Parser\",\"ai_textSplitter\":\"Text Splitter\",\"ai_tool\":\"Tool\",\"ai_vectorStore\":\"Vector Store\",\"main\":\"Main\"}; return values.map(value => { return { type: value.type, displayName: connectorTypes[value.type] !== 'Main' ? connectorTypes[value.type] : undefined } } ) })($parameter.outputs.output) }}"
  ]


node_type: nodes-langchain.documentDefaultDataLoader
package_name: @n8n/n8n-nodes-langchain
display_name: Default Data Loader
description: Load data from previous step in the workflow
category: transform
development_style: programmatic
version: 1.1
operations: []
credentials_required: []
outputs:
  [
  "ai_document"
  ]

output_names:
  [
  "Document"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Default Data Loader node documentation
  description: Learn how to use the Default Data Loader node in n8n. Follow technical documentation to integrate Default Data Loader node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Default Data Loader node

  Use the Default Data Loader node to load binary data files or JSON data for [vector stores](/glossary.md#ai-vector-store) or summarization.

  On this page, you'll find a list of parameters the Default Data Loader node supports, and links to more resources.

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Text Splitting**: Choose from:
  	* **Simple**: Uses the [Recursive Character Text Splitter](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter.md) with a chunk size of 1000 and an overlap of 200.
  	* **Custom**: Allows you to connect a text splitter of your choice.
  * **Type of Data**: Select **Binary** or **JSON**.
  * **Mode**: Choose from:
  	* **Load All Input Data**: Use all the node's input data.
  	* **Load Specific Data**: Use [expressions](/code/expressions.md) to define the data you want to load. You can add text as well as expressions. This means you can create a custom document from a mix of text and expressions.
  * **Data Format**: Displays when you set **Type of Data** to **Binary**. Select the file MIME type for your binary data. Set to **Automatically Detect by MIME Type** if you want n8n to set the data format for you. If you set a specific data format and the incoming file MIME type doesn't match it, the node errors. If you use **Automatically Detect by MIME Type**, the node falls back to text format if it can't match the file MIME type to a supported data format.

  ## Node options

  * **Metadata**: Set the metadata that should accompany the document in the vector store. This is what you match to using the **Metadata Filter** option when retrieving data using the vector store nodes.

  ## Templates and examples

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

  ## Related resources

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

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

properties_schema:
  [
    {
      "displayName": "This will load data from a previous step in the workflow. <a href=\"/templates/1962\" target=\"_blank\">Example</a>",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Type of Data",
      "name": "dataType",
      "type": "options",
      "default": "json",
      "options": [
        {
          "name": "JSON",
          "value": "json",
          "description": "Process JSON data from previous step in the workflow"
        },
        {
          "name": "Binary",
          "value": "binary",
          "description": "Process binary data from previous step in the workflow"
        }
      ],
      "required": true,
      "noDataExpression": true
    },
    {
      "displayName": "Mode",
      "name": "jsonMode",
      "type": "options",
      "default": "allInputData",
      "options": [
        {
          "name": "Load All Input Data",
          "value": "allInputData",
          "description": "Use all JSON data that flows into the parent agent or chain"
        },
        {
          "name": "Load Specific Data",
          "value": "expressionData",
          "description": "Load a subset of data, and/or data from any previous step in the workflow"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "dataType": [
            "json"
          ]
        }
      }
    },
    {
      "displayName": "Mode",
      "name": "binaryMode",
      "type": "options",
      "default": "allInputData",
      "options": [
        {
          "name": "Load All Input Data",
          "value": "allInputData",
          "description": "Use all Binary data that flows into the parent agent or chain"
        },
        {
          "name": "Load Specific Data",
          "value": "specificField",
          "description": "Load data from a specific field in the parent agent or chain"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "dataType": [
            "binary"
          ]
        }
      }
    },
    {
      "displayName": "Data Format",
      "name": "loader",
      "type": "options",
      "default": "auto",
      "options": [
        {
          "name": "Automatically Detect by Mime Type",
          "value": "auto",
          "description": "Uses the mime type to detect the format"
        },
        {
          "name": "CSV",
          "value": "csvLoader",
          "description": "Load CSV files"
        },
        {
          "name": "Docx",
          "value": "docxLoader",
          "description": "Load Docx documents"
        },
        {
          "name": "EPub",
          "value": "epubLoader",
          "description": "Load EPub files"
        },
        {
          "name": "JSON",
          "value": "jsonLoader",
          "description": "Load JSON files"
        },
        {
          "name": "PDF",
          "value": "pdfLoader",
          "description": "Load PDF documents"
        },
        {
          "name": "Text",
          "value": "textLoader",
          "description": "Load plain text files"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "dataType": [
            "binary"
          ]
        }
      }
    },
    {
      "displayName": "Data",
      "name": "jsonData",
      "type": "string",
      "default": "",
      "description": "Drag and drop fields from the input pane, or use an expression",
      "required": true,
      "displayOptions": {
        "show": {
          "dataType": [
            "json"
          ],
          "jsonMode": [
            "expressionData"
          ]
        }
      },
      "typeOptions": {
        "rows": 6
      }
    },
    {
      "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",
      "required": true,
      "displayOptions": {
        "show": {
          "dataType": [
            "binary"
          ]
        },
        "hide": {
          "binaryMode": [
            "allInputData"
          ]
        }
      }
    },
    {
      "displayName": "Text Splitting",
      "name": "textSplittingMode",
      "type": "options",
      "default": "simple",
      "options": [
        {
          "name": "Simple",
          "value": "simple",
          "description": "Splits every 1000 characters with a 200 character overlap"
        },
        {
          "name": "Custom",
          "value": "custom",
          "description": "Connect a custom text-splitting sub-node"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.1
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "JSON Pointers",
          "name": "pointers",
          "type": "string",
          "default": "",
          "description": "Pointers to extract from JSON, e.g. \"/text\" or \"/text, /meta/title\"",
          "displayOptions": {
            "show": {
              "/loader": [
                "jsonLoader",
                "auto"
              ]
            }
          }
        },
        {
          "displayName": "CSV Separator",
          "name": "separator",
          "type": "string",
          "description": "Separator to use for CSV",
          "default": ",",
          "displayOptions": {
            "show": {
              "/loader": [
                "csvLoader",
                "auto"
              ]
            }
          }
        },
        {
          "displayName": "CSV Column",
          "name": "column",
          "type": "string",
          "default": "",
          "description": "Column to extract from CSV",
          "displayOptions": {
            "show": {
              "/loader": [
                "csvLoader",
                "auto"
              ]
            }
          }
        },
        {
          "displayName": "Split Pages in PDF",
          "description": "Whether to split PDF pages into separate documents",
          "name": "splitPages",
          "type": "boolean",
          "default": true,
          "displayOptions": {
            "show": {
              "/loader": [
                "pdfLoader",
                "auto"
              ]
            }
          }
        },
        {
          "displayName": "Metadata",
          "name": "metadata",
          "type": "fixedCollection",
          "description": "Metadata to add to each document. Could be used for filtering during retrieval",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "placeholder": "Add property",
          "options": [
            {
              "name": "metadataValues",
              "displayName": "Fields to Set",
              "values": [
                {
                  "displayName": "Name",
                  "name": "name",
                  "type": "string",
                  "default": "",
                  "required": true
                },
                {
                  "displayName": "Value",
                  "name": "value",
                  "type": "string",
                  "default": ""
                }
              ]
            }
          ]
        }
      ]
    }
  ]


node_type: nodes-langchain.documentBinaryInputLoader
package_name: @n8n/n8n-nodes-langchain
display_name: Binary Input Loader
description: Use binary data from a previous step in the workflow
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required: []
outputs:
  [
  "ai_document"
  ]

output_names:
  [
  "Document"
  ]

updated_at: 2026-03-18 15:15:49
properties_schema:
  [
    {
      "displayName": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Loader Type",
      "name": "loader",
      "type": "options",
      "default": "jsonLoader",
      "options": [
        {
          "name": "CSV Loader",
          "value": "csvLoader",
          "description": "Load CSV files"
        },
        {
          "name": "Docx Loader",
          "value": "docxLoader",
          "description": "Load Docx documents"
        },
        {
          "name": "EPub Loader",
          "value": "epubLoader",
          "description": "Load EPub files"
        },
        {
          "name": "JSON Loader",
          "value": "jsonLoader",
          "description": "Load JSON files"
        },
        {
          "name": "PDF Loader",
          "value": "pdfLoader",
          "description": "Load PDF documents"
        },
        {
          "name": "Text Loader",
          "value": "textLoader",
          "description": "Load plain text files"
        }
      ],
      "required": true
    },
    {
      "displayName": "Binary Data Key",
      "name": "binaryDataKey",
      "type": "string",
      "default": "data",
      "description": "Name of the binary property from which to read the file buffer",
      "required": true
    },
    {
      "displayName": "Split Pages",
      "name": "splitPages",
      "type": "boolean",
      "default": true,
      "displayOptions": {
        "show": {
          "loader": [
            "pdfLoader"
          ]
        }
      }
    },
    {
      "displayName": "Column",
      "name": "column",
      "type": "string",
      "default": "",
      "description": "Column to extract from CSV",
      "displayOptions": {
        "show": {
          "loader": [
            "csvLoader"
          ]
        }
      }
    },
    {
      "displayName": "Separator",
      "name": "separator",
      "type": "string",
      "default": ",",
      "description": "Separator to use for CSV",
      "displayOptions": {
        "show": {
          "loader": [
            "csvLoader"
          ]
        }
      }
    },
    {
      "displayName": "Pointers",
      "name": "pointers",
      "type": "string",
      "default": "",
      "description": "Pointers to extract from JSON, e.g. \"/text\" or \"/text, /meta/title\"",
      "displayOptions": {
        "show": {
          "loader": [
            "jsonLoader"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Metadata",
          "name": "metadata",
          "type": "fixedCollection",
          "description": "Metadata to add to each document. Could be used for filtering during retrieval",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "placeholder": "Add property",
          "options": [
            {
              "name": "metadataValues",
              "displayName": "Fields to Set",
              "values": [
                {
                  "displayName": "Name",
                  "name": "name",
                  "type": "string",
                  "default": "",
                  "required": true
                },
                {
                  "displayName": "Value",
                  "name": "value",
                  "type": "string",
                  "default": ""
                }
              ]
            }
          ]
        }
      ]
    }
  ]


node_type: nodes-langchain.documentGithubLoader
package_name: @n8n/n8n-nodes-langchain
display_name: GitHub Document Loader
description: Use GitHub data as input to this chain
category: transform
development_style: programmatic
version: 1.1
operations: []
credentials_required:
  [
  {
  "name": "githubApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_document"
  ]

output_names:
  [
  "Document"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: GitHub Document Loader node documentation
  description: Learn how to use the GitHub Document Loader node in n8n. Follow technical documentation to integrate GitHub Document Loader node into your workflows.
  contentType: [integration, reference]
  ---

  # GitHub Document Loader node

  Use the GitHub Document Loader node to load data from a GitHub repository for [vector stores](/glossary.md#ai-vector-store) or summarization.

  On this page, you'll find the node parameters for the GitHub Document Loader node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/github.md). This node doesn't support OAuth for authentication.
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Text Splitting**: Choose from:
  	* **Simple**: Uses the [Recursive Character Text Splitter](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter.md) with a chunk size of 1000 and an overlap of 200.
      * **Custom**: Allows you to connect a text splitter of your choice.
  * **Repository Link**: Enter the URL of your GitHub repository.
  * **Branch**: Enter the branch name to use.

  ## Node options

  * **Recursive**: Select whether to include sub-folders and files (turned on) or not (turned off).
  * **Ignore Paths**: Enter directories to ignore.

  ## Templates and examples

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

  ## Related resources

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

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

properties_schema:
  [
    {
      "displayName": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Repository Link",
      "name": "repository",
      "type": "string",
      "default": ""
    },
    {
      "displayName": "Branch",
      "name": "branch",
      "type": "string",
      "default": "main"
    },
    {
      "displayName": "Text Splitting",
      "name": "textSplittingMode",
      "type": "options",
      "default": "simple",
      "options": [
        {
          "name": "Simple",
          "value": "simple",
          "description": "Splits every 1000 characters with a 200 character overlap"
        },
        {
          "name": "Custom",
          "value": "custom",
          "description": "Connect a custom text-splitting sub-node"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            1.1
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Options",
      "name": "additionalOptions",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Recursive",
          "name": "recursive",
          "type": "boolean",
          "default": false
        },
        {
          "displayName": "Ignore Paths",
          "name": "ignorePaths",
          "type": "string",
          "description": "Comma-separated list of paths to ignore, e.g. \"docs, src/tests",
          "default": ""
        }
      ]
    }
  ]


node_type: nodes-langchain.documentJsonInputLoader
package_name: @n8n/n8n-nodes-langchain
display_name: JSON Input Loader
description: Use JSON data from a previous step in the workflow
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required: []
outputs:
  [
  "ai_document"
  ]

output_names:
  [
  "Document"
  ]

updated_at: 2026-03-18 15:15:49
properties_schema:
  [
    {
      "displayName": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Pointers",
      "name": "pointers",
      "type": "string",
      "default": "",
      "description": "Pointers to extract from JSON, e.g. \"/text\" or \"/text, /meta/title\""
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Metadata",
          "name": "metadata",
          "type": "fixedCollection",
          "description": "Metadata to add to each document. Could be used for filtering during retrieval",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "placeholder": "Add property",
          "options": [
            {
              "name": "metadataValues",
              "displayName": "Fields to Set",
              "values": [
                {
                  "displayName": "Name",
                  "name": "name",
                  "type": "string",
                  "default": "",
                  "required": true
                },
                {
                  "displayName": "Value",
                  "name": "value",
                  "type": "string",
                  "default": ""
                }
              ]
            }
          ]
        }
      ]
    }
  ]


node_type: nodes-langchain.embeddingsCohereTool
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Cohere Tool
description: Use Cohere Embeddings (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "cohereApi",
  "required": true
  }
  ]

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

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-18 15:15:49
tool_variant_of: nodes-langchain.embeddingsCohere
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings Cohere node documentation
  description: Learn how to use the Embeddings Cohere node in n8n. Follow technical documentation to integrate Embeddings Cohere node into your workflows.
  contentType: [integration, reference]
  ---

  # Embeddings Cohere node

  Use the Embeddings Cohere node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

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

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/cohere.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the embedding. Choose from:
      * **Embed-English-v2.0(4096 Dimensions)**
  	* **Embed-English-Light-v2.0(1024 Dimensions)**
  	* **Embed-Multilingual-v2.0(768 Dimensions)**

  Learn more about available models in [Cohere's models documentation](https://docs.cohere.com/docs/models){:target=_blank .external-link}.

  ## Templates and examples

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

  ## Related resources

  Refer to [Langchain's Cohere embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/cohere/){: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 Embeddings Cohere"
    },
    {
      "displayName": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Each model is using different dimensional density for embeddings. Please make sure to use the same dimensionality for your vector store. The default model is using 768-dimensional embeddings.",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Model",
      "name": "modelName",
      "type": "options",
      "default": "embed-english-v2.0",
      "description": "The model which will generate the embeddings. <a href=\"https://docs.cohere.com/docs/models\">Learn more</a>.",
      "options": [
        {
          "name": "Embed-English-Light-v2.0 (1024 Dimensions)",
          "value": "embed-english-light-v2.0"
        },
        {
          "name": "Embed-English-Light-v3.0 (384 Dimensions)",
          "value": "embed-english-light-v3.0"
        },
        {
          "name": "Embed-English-v2.0 (4096 Dimensions)",
          "value": "embed-english-v2.0"
        },
        {
          "name": "Embed-English-v3.0 (1024 Dimensions)",
          "value": "embed-english-v3.0"
        },
        {
          "name": "Embed-Multilingual-Light-v3.0 (384 Dimensions)",
          "value": "embed-multilingual-light-v3.0"
        },
        {
          "name": "Embed-Multilingual-v2.0 (768 Dimensions)",
          "value": "embed-multilingual-v2.0"
        },
        {
          "name": "Embed-Multilingual-v3.0 (1024 Dimensions)",
          "value": "embed-multilingual-v3.0"
        }
      ]
    }
  ]


node_type: nodes-langchain.embeddingsCohere
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Cohere
description: Use Cohere Embeddings
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "cohereApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_embedding"
  ]

output_names:
  [
  "Embeddings"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings Cohere node documentation
  description: Learn how to use the Embeddings Cohere node in n8n. Follow technical documentation to integrate Embeddings Cohere node into your workflows.
  contentType: [integration, reference]
  ---

  # Embeddings Cohere node

  Use the Embeddings Cohere node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

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

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/cohere.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the embedding. Choose from:
      * **Embed-English-v2.0(4096 Dimensions)**
  	* **Embed-English-Light-v2.0(1024 Dimensions)**
  	* **Embed-Multilingual-v2.0(768 Dimensions)**

  Learn more about available models in [Cohere's models documentation](https://docs.cohere.com/docs/models){:target=_blank .external-link}.

  ## Templates and examples

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

  ## Related resources

  Refer to [Langchain's Cohere embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/cohere/){: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": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Each model is using different dimensional density for embeddings. Please make sure to use the same dimensionality for your vector store. The default model is using 768-dimensional embeddings.",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Model",
      "name": "modelName",
      "type": "options",
      "default": "embed-english-v2.0",
      "description": "The model which will generate the embeddings. <a href=\"https://docs.cohere.com/docs/models\">Learn more</a>.",
      "options": [
        {
          "name": "Embed-English-Light-v2.0 (1024 Dimensions)",
          "value": "embed-english-light-v2.0"
        },
        {
          "name": "Embed-English-Light-v3.0 (384 Dimensions)",
          "value": "embed-english-light-v3.0"
        },
        {
          "name": "Embed-English-v2.0 (4096 Dimensions)",
          "value": "embed-english-v2.0"
        },
        {
          "name": "Embed-English-v3.0 (1024 Dimensions)",
          "value": "embed-english-v3.0"
        },
        {
          "name": "Embed-Multilingual-Light-v3.0 (384 Dimensions)",
          "value": "embed-multilingual-light-v3.0"
        },
        {
          "name": "Embed-Multilingual-v2.0 (768 Dimensions)",
          "value": "embed-multilingual-v2.0"
        },
        {
          "name": "Embed-Multilingual-v3.0 (1024 Dimensions)",
          "value": "embed-multilingual-v3.0"
        }
      ]
    }
  ]


node_type: nodes-langchain.embeddingsAwsBedrock
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings AWS Bedrock
description: Use Embeddings AWS Bedrock
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "aws",
  "required": true
  }
  ]

outputs:
  [
  "ai_embedding"
  ]

output_names:
  [
  "Embeddings"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings AWS Bedrock node documentation
  description: Learn how to use the Embeddings AWS Bedrock node in n8n. Follow technical documentation to integrate Embeddings AWS Bedrock node into your workflows.
  contentType: [integration, reference]
  ---

  # Embeddings AWS Bedrock node

  Use the Embeddings AWS Bedrock node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

  On this page, you'll find the node parameters for the Embeddings AWS Bedrock node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/aws.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the embedding.

  Learn more about available models in the [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html){:target=_blank .external-link}. 

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's AWS Bedrock embeddings documentation](https://js.langchain.com/docs/integrations/platforms/aws/#text-embedding-models){:target=_blank .external-link} and the [AWS Bedrock documentation](https://docs.aws.amazon.com/bedrock/){:target=_blank .external-link} for more information about AWS Bedrock.

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

properties_schema:
  [
    {
      "displayName": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "",
      "description": "The model which will generate the completion. <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/foundation-models.html\">Learn more</a>.",
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/foundation-models?byInferenceType=ON_DEMAND&byOutputModality=EMBEDDING"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "modelSummaries"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.modelName}}",
                    "description": "={{$responseItem.modelArn}}",
                    "value": "={{$responseItem.modelId}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    }
  ]


node_type: nodes-langchain.embeddingsAzureOpenAiTool
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Azure OpenAI Tool
description: Use Embeddings Azure OpenAI (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "azureOpenAiApi",
  "required": true
  }
  ]

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

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-18 15:15:49
tool_variant_of: nodes-langchain.embeddingsAzureOpenAi
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings Azure OpenAI node documentation
  description: Learn how to use the Embeddings Azure OpenAI node in n8n. Follow technical documentation to integrate Embeddings Azure OpenAI node into your workflows.
  contentType: [integration, reference]
  ---

  # Embeddings Azure OpenAI node

  Use the Embeddings Azure OpenAI node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

  On this page, you'll find the node parameters for the Embeddings Azure OpenAI node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/azureopenai.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"


  ## Node options

  * **Model (Deployment) Name**: Select the model (deployment) to use for generating embeddings.
  * **Batch Size**: Enter the maximum number of documents to send in each request.
  * **Strip New Lines**: Select whether to remove new line characters from input text (turned on) or not (turned off). n8n enables this by default.
  * **Timeout**: Enter the maximum amount of time a request can take in seconds. Set to `-1` for no timeout.

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's OpenAI embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/azure_openai/){: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 Embeddings Azure OpenAI"
    },
    {
      "displayName": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model (Deployment) Name",
      "name": "model",
      "type": "string",
      "default": "",
      "description": "The name of the model(deployment) to use"
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Batch Size",
          "name": "batchSize",
          "default": 512,
          "typeOptions": {
            "maxValue": 2048
          },
          "description": "Maximum number of documents to send in each request",
          "type": "number"
        },
        {
          "displayName": "Strip New Lines",
          "name": "stripNewLines",
          "default": true,
          "description": "Whether to strip new lines from the input text",
          "type": "boolean"
        },
        {
          "displayName": "Timeout",
          "name": "timeout",
          "default": -1,
          "description": "Maximum amount of time a request is allowed to take in seconds. Set to -1 for no timeout.",
          "type": "number"
        },
        {
          "displayName": "Dimensions",
          "name": "dimensions",
          "default": 1536,
          "description": "The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.",
          "type": "options",
          "options": [
            {
              "name": "256",
              "value": 256
            },
            {
              "name": "512",
              "value": 512
            },
            {
              "name": "1024",
              "value": 1024
            },
            {
              "name": "1536",
              "value": 1536
            },
            {
              "name": "3072",
              "value": 3072
            }
          ]
        }
      ]
    }
  ]


node_type: nodes-langchain.embeddingsAzureOpenAi
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Azure OpenAI
description: Use Embeddings Azure OpenAI
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "azureOpenAiApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_embedding"
  ]

output_names:
  [
  "Embeddings"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings Azure OpenAI node documentation
  description: Learn how to use the Embeddings Azure OpenAI node in n8n. Follow technical documentation to integrate Embeddings Azure OpenAI node into your workflows.
  contentType: [integration, reference]
  ---

  # Embeddings Azure OpenAI node

  Use the Embeddings Azure OpenAI node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

  On this page, you'll find the node parameters for the Embeddings Azure OpenAI node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/azureopenai.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"


  ## Node options

  * **Model (Deployment) Name**: Select the model (deployment) to use for generating embeddings.
  * **Batch Size**: Enter the maximum number of documents to send in each request.
  * **Strip New Lines**: Select whether to remove new line characters from input text (turned on) or not (turned off). n8n enables this by default.
  * **Timeout**: Enter the maximum amount of time a request can take in seconds. Set to `-1` for no timeout.

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's OpenAI embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/azure_openai/){: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": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model (Deployment) Name",
      "name": "model",
      "type": "string",
      "default": "",
      "description": "The name of the model(deployment) to use"
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Batch Size",
          "name": "batchSize",
          "default": 512,
          "typeOptions": {
            "maxValue": 2048
          },
          "description": "Maximum number of documents to send in each request",
          "type": "number"
        },
        {
          "displayName": "Strip New Lines",
          "name": "stripNewLines",
          "default": true,
          "description": "Whether to strip new lines from the input text",
          "type": "boolean"
        },
        {
          "displayName": "Timeout",
          "name": "timeout",
          "default": -1,
          "description": "Maximum amount of time a request is allowed to take in seconds. Set to -1 for no timeout.",
          "type": "number"
        },
        {
          "displayName": "Dimensions",
          "name": "dimensions",
          "default": 1536,
          "description": "The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.",
          "type": "options",
          "options": [
            {
              "name": "256",
              "value": 256
            },
            {
              "name": "512",
              "value": 512
            },
            {
              "name": "1024",
              "value": 1024
            },
            {
              "name": "1536",
              "value": 1536
            },
            {
              "name": "3072",
              "value": 3072
            }
          ]
        }
      ]
    }
  ]


node_type: nodes-langchain.embeddingsGoogleGemini
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Google Gemini
description: Use Google Gemini Embeddings
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "googlePalmApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_embedding"
  ]

output_names:
  [
  "Embeddings"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings Google Gemini node documentation
  description: Learn how to use the Embeddings Google Gemini node in n8n. Follow technical documentation to integrate Embeddings Google Gemini node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Embeddings Google Gemini node

  Use the Embeddings Google Gemini node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

  On this page, you'll find the node parameters for the Embeddings Google Gemini node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/googleai.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the embedding.

  Learn more about available models in [Google Gemini's models documentation](https://ai.google.dev/models/gemini){:target=_blank .external-link}.

  ## Templates and examples

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

  ## Related resources

  Refer to [Langchain's Google Generative AI embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/google_generativeai){: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": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Each model is using different dimensional density for embeddings. Please make sure to use the same dimensionality for your vector store. The default model is using 768-dimensional embeddings.",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Model",
      "name": "modelName",
      "type": "options",
      "default": "models/text-embedding-004",
      "description": "The model which will generate the embeddings. <a href=\"https://developers.generativeai.google/api/rest/generativelanguage/models/list\">Learn more</a>.",
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/v1beta/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "models"
                  }
                },
                {
                  "type": "filter",
                  "properties": {
                    "pass": "={{ $responseItem.name.includes('embedding') }}"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.name}}",
                    "value": "={{$responseItem.name}}",
                    "description": "={{$responseItem.description}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    }
  ]


node_type: nodes-langchain.embeddingsGoogleVertex
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Google Vertex
description: Use Google Vertex Embeddings
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "googleApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_embedding"
  ]

output_names:
  [
  "Embeddings"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings Google Vertex node documentation
  description: Learn how to use the Embeddings Google Vertex node in n8n. Follow technical documentation to integrate Embeddings Google Gemini node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Embeddings Google Vertex node

  Use the Embeddings Google Vertex node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

  On this page, you'll find the node parameters for the Embeddings Google Vertex node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/google/service-account.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  - **Model**: Select the model to use to generate the embedding.

  Learn more about available embedding models in [Google VertexAI embeddings API documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api).

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->

  [[templatesWidget(page.title, 'embeddings-google-vertex')]]

  ## Related resources

  Refer to [LangChain's Google Generative AI embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/google_generativeai) for more information about the service.

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

properties_schema:
  [
    {
      "displayName": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Each model is using different dimensional density for embeddings. Please make sure to use the same dimensionality for your vector store. The default model is using 768-dimensional embeddings. You can find available models <a href=\"https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api\">here</a>.",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Project ID",
      "name": "projectId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select or enter your Google Cloud project ID",
      "required": true,
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "gcpProjectsList"
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string"
        }
      ]
    },
    {
      "displayName": "Model Name",
      "name": "modelName",
      "type": "string",
      "default": "text-embedding-005",
      "description": "The model which will generate the embeddings. <a href=\"https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api\">Learn more</a>."
    }
  ]


node_type: nodes-langchain.embeddingsHuggingFaceInferenceTool
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Hugging Face Inference Tool
description: Use HuggingFace Inference Embeddings (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "huggingFaceApi",
  "required": true
  }
  ]

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

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-18 15:15:49
tool_variant_of: nodes-langchain.embeddingsHuggingFaceInference
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings HuggingFace Inference node documentation
  description: Learn how to use the Embeddings HuggingFace Inference node in n8n. Follow technical documentation to integrate Embeddings HuggingFace Inference node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Embeddings HuggingFace Inference node

  Use the Embeddings HuggingFace Inference node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

  On this page, you'll find the node parameters for the Embeddings HuggingFace Inference, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/huggingface.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the embedding.

  Refer to the [Hugging Face models documentation](https://huggingface.co/models?other=embeddings){:target=_blank .external-link} for available models.

  ## Node options

  * **Custom Inference Endpoint**: Enter the URL of your deployed model, hosted by HuggingFace. If you set this, n8n ignores the **Model Name**.

  Refer to [HuggingFace's guide to inference](https://huggingface.co/inference-endpoints){:target=_blank .external-link} for more information.

  ## Templates and examples

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

  ## Related resources

  Refer to [Langchain's HuggingFace Inference embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/hugging_face_inference/){: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 Embeddings Hugging Face Inference"
    },
    {
      "displayName": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Each model is using different dimensional density for embeddings. Please make sure to use the same dimensionality for your vector store. The default model is using 768-dimensional embeddings.",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Model Name",
      "name": "modelName",
      "type": "string",
      "default": "sentence-transformers/distilbert-base-nli-mean-tokens",
      "description": "The model name to use from HuggingFace library"
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Custom Inference Endpoint",
          "name": "endpointUrl",
          "default": "",
          "description": "Custom endpoint URL",
          "type": "string"
        },
        {
          "displayName": "Provider",
          "name": "provider",
          "type": "options",
          "options": [
            {
              "value": "black-forest-labs",
              "name": "black-forest-labs"
            },
            {
              "value": "cerebras",
              "name": "cerebras"
            },
            {
              "value": "cohere",
              "name": "cohere"
            },
            {
              "value": "fal-ai",
              "name": "fal-ai"
            },
            {
              "value": "featherless-ai",
              "name": "featherless-ai"
            },
            {
              "value": "fireworks-ai",
              "name": "fireworks-ai"
            },
            {
              "value": "groq",
              "name": "groq"
            },
            {
              "value": "hf-inference",
              "name": "hf-inference"
            },
            {
              "value": "hyperbolic",
              "name": "hyperbolic"
            },
            {
              "value": "nebius",
              "name": "nebius"
            },
            {
              "value": "novita",
              "name": "novita"
            },
            {
              "value": "nscale",
              "name": "nscale"
            },
            {
              "value": "openai",
              "name": "openai"
            },
            {
              "value": "ovhcloud",
              "name": "ovhcloud"
            },
            {
              "value": "replicate",
              "name": "replicate"
            },
            {
              "value": "sambanova",
              "name": "sambanova"
            },
            {
              "value": "together",
              "name": "together"
            },
            {
              "value": "auto",
              "name": "auto"
            }
          ],
          "default": "auto"
        }
      ]
    }
  ]


node_type: nodes-langchain.embeddingsHuggingFaceInference
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Hugging Face Inference
description: Use HuggingFace Inference Embeddings
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "huggingFaceApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_embedding"
  ]

output_names:
  [
  "Embeddings"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings HuggingFace Inference node documentation
  description: Learn how to use the Embeddings HuggingFace Inference node in n8n. Follow technical documentation to integrate Embeddings HuggingFace Inference node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Embeddings HuggingFace Inference node

  Use the Embeddings HuggingFace Inference node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

  On this page, you'll find the node parameters for the Embeddings HuggingFace Inference, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/huggingface.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the embedding.

  Refer to the [Hugging Face models documentation](https://huggingface.co/models?other=embeddings){:target=_blank .external-link} for available models.

  ## Node options

  * **Custom Inference Endpoint**: Enter the URL of your deployed model, hosted by HuggingFace. If you set this, n8n ignores the **Model Name**.

  Refer to [HuggingFace's guide to inference](https://huggingface.co/inference-endpoints){:target=_blank .external-link} for more information.

  ## Templates and examples

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

  ## Related resources

  Refer to [Langchain's HuggingFace Inference embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/hugging_face_inference/){: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": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Each model is using different dimensional density for embeddings. Please make sure to use the same dimensionality for your vector store. The default model is using 768-dimensional embeddings.",
      "name": "notice",
      "type": "notice",
      "default": ""
    },
    {
      "displayName": "Model Name",
      "name": "modelName",
      "type": "string",
      "default": "sentence-transformers/distilbert-base-nli-mean-tokens",
      "description": "The model name to use from HuggingFace library"
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Custom Inference Endpoint",
          "name": "endpointUrl",
          "default": "",
          "description": "Custom endpoint URL",
          "type": "string"
        },
        {
          "displayName": "Provider",
          "name": "provider",
          "type": "options",
          "options": [
            {
              "value": "black-forest-labs",
              "name": "black-forest-labs"
            },
            {
              "value": "cerebras",
              "name": "cerebras"
            },
            {
              "value": "cohere",
              "name": "cohere"
            },
            {
              "value": "fal-ai",
              "name": "fal-ai"
            },
            {
              "value": "featherless-ai",
              "name": "featherless-ai"
            },
            {
              "value": "fireworks-ai",
              "name": "fireworks-ai"
            },
            {
              "value": "groq",
              "name": "groq"
            },
            {
              "value": "hf-inference",
              "name": "hf-inference"
            },
            {
              "value": "hyperbolic",
              "name": "hyperbolic"
            },
            {
              "value": "nebius",
              "name": "nebius"
            },
            {
              "value": "novita",
              "name": "novita"
            },
            {
              "value": "nscale",
              "name": "nscale"
            },
            {
              "value": "openai",
              "name": "openai"
            },
            {
              "value": "ovhcloud",
              "name": "ovhcloud"
            },
            {
              "value": "replicate",
              "name": "replicate"
            },
            {
              "value": "sambanova",
              "name": "sambanova"
            },
            {
              "value": "together",
              "name": "together"
            },
            {
              "value": "auto",
              "name": "auto"
            }
          ],
          "default": "auto"
        }
      ]
    }
  ]


node_type: nodes-langchain.embeddingsMistralCloud
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Mistral Cloud
description: Use Embeddings Mistral Cloud
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "mistralCloudApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_embedding"
  ]

output_names:
  [
  "Embeddings"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings Mistral Cloud node documentation
  description: Learn how to use the Embeddings Mistral Cloud node in n8n. Follow technical documentation to integrate Embeddings Mistral Cloud node into your workflows.
  contentType: [integration, reference]
  ---

  # Embeddings Mistral Cloud node

  Use the Embeddings Mistral Cloud node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

  On this page, you'll find the node parameters for the Embeddings Mistral Cloud node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/mistral.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the embedding.

  Learn more about available models in [Mistral's models documentation](https://docs.mistral.ai/platform/pricing/){:target=_blank .external-link}.

  ## Node options

  * **Batch Size**: Enter the maximum number of documents to send in each request.
  * **Strip New Lines**: Select whether to remove new line characters from input text (turned on) or not (turned off). n8n enables this by default.

  ## Templates and examples

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

  ## Related resources

  Refer to [Langchain's Mistral embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/mistralai){: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": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "mistral-embed",
      "description": "The model which will compute the embeddings. <a href=\"https://docs.mistral.ai/platform/endpoints/\">Learn more</a>.",
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "filter",
                  "properties": {
                    "pass": "={{ $responseItem.id.includes('embed') }}"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{ $responseItem.id }}",
                    "value": "={{ $responseItem.id }}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Batch Size",
          "name": "batchSize",
          "default": 512,
          "typeOptions": {
            "maxValue": 2048
          },
          "description": "Maximum number of documents to send in each request",
          "type": "number"
        },
        {
          "displayName": "Strip New Lines",
          "name": "stripNewLines",
          "default": true,
          "description": "Whether to strip new lines from the input text",
          "type": "boolean"
        }
      ]
    }
  ]


node_type: nodes-langchain.embeddingsOpenAiTool
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings OpenAI Tool
description: Use Embeddings OpenAI (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1.2
operations: []
credentials_required:
  [
  {
  "name": "openAiApi",
  "required": true
  }
  ]

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

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-18 15:15:49
tool_variant_of: nodes-langchain.embeddingsOpenAi
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings OpenAI node documentation
  description: Learn how to use the Embeddings OpenAI node in n8n. Follow technical documentation to integrate Embeddings OpenAI node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Embeddings OpenAI node

  Use the Embeddings OpenAI node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

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

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/openai.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"


  ## Node options

  * **Model**: Select the model to use for generating embeddings.
  * **Base URL**: Enter the URL to send the request to. Use this if you are using a self-hosted OpenAI-like model. 
  * **Batch Size**: Enter the maximum number of documents to send in each request.
  * **Strip New Lines**: Select whether to remove new line characters from input text (turned on) or not (turned off). n8n enables this by default.
  * **Timeout**: Enter the maximum amount of time a request can take in seconds. Set to `-1` for no timeout.

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's OpenAI embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/openai/){: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 Embeddings OpenAI"
    },
    {
      "displayName": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "text-embedding-ada-002",
      "description": "The model which will generate the embeddings. <a href=\"https://platform.openai.com/docs/models/overview\">Learn more</a>.",
      "displayOptions": {
        "show": {
          "@version": [
            1
          ]
        }
      },
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "={{ $parameter.options?.baseURL?.split(\"/\").slice(-1).pop() || $credentials?.url?.split(\"/\").slice(-1).pop() || \"v1\" }}/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "filter",
                  "properties": {
                    "pass": "={{\n\t\t\t\t\t\t\t\t\t($parameter.options?.baseURL && !$parameter.options?.baseURL?.startsWith('https://api.openai.com/')) ||\n\t\t\t\t\t\t\t\t\t($credentials?.url && !$credentials.url.startsWith('https://api.openai.com/')) ||\n\t\t\t\t\t\t\t\t\t$responseItem.id.includes('embed')\n\t\t\t\t\t\t\t\t}}"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.id}}",
                    "value": "={{$responseItem.id}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "text-embedding-3-small",
      "description": "The model which will generate the embeddings. <a href=\"https://platform.openai.com/docs/models/overview\">Learn more</a>.",
      "displayOptions": {
        "hide": {
          "@version": [
            1
          ]
        }
      },
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "={{ $parameter.options?.baseURL?.split(\"/\").slice(-1).pop() || $credentials?.url?.split(\"/\").slice(-1).pop() || \"v1\" }}/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "filter",
                  "properties": {
                    "pass": "={{\n\t\t\t\t\t\t\t\t\t($parameter.options?.baseURL && !$parameter.options?.baseURL?.startsWith('https://api.openai.com/')) ||\n\t\t\t\t\t\t\t\t\t($credentials?.url && !$credentials.url.startsWith('https://api.openai.com/')) ||\n\t\t\t\t\t\t\t\t\t$responseItem.id.includes('embed')\n\t\t\t\t\t\t\t\t}}"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.id}}",
                    "value": "={{$responseItem.id}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Dimensions",
          "name": "dimensions",
          "default": 1536,
          "description": "The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.",
          "type": "options",
          "options": [
            {
              "name": "256",
              "value": 256
            },
            {
              "name": "512",
              "value": 512
            },
            {
              "name": "1024",
              "value": 1024
            },
            {
              "name": "1536",
              "value": 1536
            },
            {
              "name": "3072",
              "value": 3072
            }
          ]
        },
        {
          "displayName": "Base URL",
          "name": "baseURL",
          "default": "https://api.openai.com/v1",
          "description": "Override the default base URL for the API",
          "type": "string",
          "displayOptions": {
            "hide": {
              "@version": [
                {
                  "_cnd": {
                    "gte": 1.2
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "Batch Size",
          "name": "batchSize",
          "default": 512,
          "typeOptions": {
            "maxValue": 2048
          },
          "description": "Maximum number of documents to send in each request",
          "type": "number"
        },
        {
          "displayName": "Strip New Lines",
          "name": "stripNewLines",
          "default": true,
          "description": "Whether to strip new lines from the input text",
          "type": "boolean"
        },
        {
          "displayName": "Timeout",
          "name": "timeout",
          "default": -1,
          "description": "Maximum amount of time a request is allowed to take in seconds. Set to -1 for no timeout.",
          "type": "number"
        },
        {
          "displayName": "Encoding Format",
          "name": "encodingFormat",
          "type": "options",
          "description": "The format to return the embeddings in",
          "default": "float",
          "options": [
            {
              "name": "Float",
              "value": "float"
            },
            {
              "name": "Base64",
              "value": "base64"
            }
          ]
        }
      ]
    }
  ]


node_type: nodes-langchain.embeddingsOpenAi
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings OpenAI
description: Use Embeddings OpenAI
category: transform
development_style: programmatic
version: 1.2
operations: []
credentials_required:
  [
  {
  "name": "openAiApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_embedding"
  ]

output_names:
  [
  "Embeddings"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings OpenAI node documentation
  description: Learn how to use the Embeddings OpenAI node in n8n. Follow technical documentation to integrate Embeddings OpenAI node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Embeddings OpenAI node

  Use the Embeddings OpenAI node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

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

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/openai.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"


  ## Node options

  * **Model**: Select the model to use for generating embeddings.
  * **Base URL**: Enter the URL to send the request to. Use this if you are using a self-hosted OpenAI-like model. 
  * **Batch Size**: Enter the maximum number of documents to send in each request.
  * **Strip New Lines**: Select whether to remove new line characters from input text (turned on) or not (turned off). n8n enables this by default.
  * **Timeout**: Enter the maximum amount of time a request can take in seconds. Set to `-1` for no timeout.

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's OpenAI embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/openai/){: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": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "text-embedding-ada-002",
      "description": "The model which will generate the embeddings. <a href=\"https://platform.openai.com/docs/models/overview\">Learn more</a>.",
      "displayOptions": {
        "show": {
          "@version": [
            1
          ]
        }
      },
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "={{ $parameter.options?.baseURL?.split(\"/\").slice(-1).pop() || $credentials?.url?.split(\"/\").slice(-1).pop() || \"v1\" }}/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "filter",
                  "properties": {
                    "pass": "={{\n\t\t\t\t\t\t\t\t\t($parameter.options?.baseURL && !$parameter.options?.baseURL?.startsWith('https://api.openai.com/')) ||\n\t\t\t\t\t\t\t\t\t($credentials?.url && !$credentials.url.startsWith('https://api.openai.com/')) ||\n\t\t\t\t\t\t\t\t\t$responseItem.id.includes('embed')\n\t\t\t\t\t\t\t\t}}"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.id}}",
                    "value": "={{$responseItem.id}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "text-embedding-3-small",
      "description": "The model which will generate the embeddings. <a href=\"https://platform.openai.com/docs/models/overview\">Learn more</a>.",
      "displayOptions": {
        "hide": {
          "@version": [
            1
          ]
        }
      },
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "={{ $parameter.options?.baseURL?.split(\"/\").slice(-1).pop() || $credentials?.url?.split(\"/\").slice(-1).pop() || \"v1\" }}/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "filter",
                  "properties": {
                    "pass": "={{\n\t\t\t\t\t\t\t\t\t($parameter.options?.baseURL && !$parameter.options?.baseURL?.startsWith('https://api.openai.com/')) ||\n\t\t\t\t\t\t\t\t\t($credentials?.url && !$credentials.url.startsWith('https://api.openai.com/')) ||\n\t\t\t\t\t\t\t\t\t$responseItem.id.includes('embed')\n\t\t\t\t\t\t\t\t}}"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.id}}",
                    "value": "={{$responseItem.id}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Dimensions",
          "name": "dimensions",
          "default": 1536,
          "description": "The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.",
          "type": "options",
          "options": [
            {
              "name": "256",
              "value": 256
            },
            {
              "name": "512",
              "value": 512
            },
            {
              "name": "1024",
              "value": 1024
            },
            {
              "name": "1536",
              "value": 1536
            },
            {
              "name": "3072",
              "value": 3072
            }
          ]
        },
        {
          "displayName": "Base URL",
          "name": "baseURL",
          "default": "https://api.openai.com/v1",
          "description": "Override the default base URL for the API",
          "type": "string",
          "displayOptions": {
            "hide": {
              "@version": [
                {
                  "_cnd": {
                    "gte": 1.2
                  }
                }
              ]
            }
          }
        },
        {
          "displayName": "Batch Size",
          "name": "batchSize",
          "default": 512,
          "typeOptions": {
            "maxValue": 2048
          },
          "description": "Maximum number of documents to send in each request",
          "type": "number"
        },
        {
          "displayName": "Strip New Lines",
          "name": "stripNewLines",
          "default": true,
          "description": "Whether to strip new lines from the input text",
          "type": "boolean"
        },
        {
          "displayName": "Timeout",
          "name": "timeout",
          "default": -1,
          "description": "Maximum amount of time a request is allowed to take in seconds. Set to -1 for no timeout.",
          "type": "number"
        },
        {
          "displayName": "Encoding Format",
          "name": "encodingFormat",
          "type": "options",
          "description": "The format to return the embeddings in",
          "default": "float",
          "options": [
            {
              "name": "Float",
              "value": "float"
            },
            {
              "name": "Base64",
              "value": "base64"
            }
          ]
        }
      ]
    }
  ]


node_type: nodes-langchain.embeddingsLemonade
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Lemonade
description: Use Lemonade Embeddings
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "lemonadeApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_embedding"
  ]

output_names:
  [
  "Embeddings"
  ]

updated_at: 2026-03-18 15:15:49
properties_schema:
  [
    {
      "displayName": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "",
      "description": "The model which will generate the completion. Models are loaded and managed through the Lemonade server.",
      "required": true,
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.id}}",
                    "value": "={{$responseItem.id}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    }
  ]


node_type: nodes-langchain.embeddingsOllama
package_name: @n8n/n8n-nodes-langchain
display_name: Embeddings Ollama
description: Use Ollama Embeddings
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "ollamaApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_embedding"
  ]

output_names:
  [
  "Embeddings"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Embeddings Ollama node documentation
  description: Learn how to use the Embeddings Ollama node in n8n. Follow technical documentation to integrate Embeddings Ollama node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Embeddings Ollama node

  Use the Embeddings Ollama node to generate [embeddings](/glossary.md#ai-embedding) for a given text.

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

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/ollama.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the embedding. Choose from:
      * [all-minilm](https://ollama.com/library/all-minilm) (384 Dimensions)
      * [nomic-embed-text](https://ollama.com/library/nomic-embed-text) (768 Dimensions)

  Learn more about available models in [Ollama's models documentation](https://ollama.ai/library){:target=_blank .external-link}.

  ## Templates and examples

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

  ## Related resources

  Refer to [Langchain's Ollama embeddings documentation](https://js.langchain.com/docs/integrations/text_embedding/ollama/){: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": "This node must be connected to a vector store. <a data-action='openSelectiveNodeCreator' data-action-parameter-connectiontype='ai_vectorStore'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "llama3.2",
      "description": "The model which will generate the completion. To download models, visit <a href=\"https://ollama.ai/library\">Ollama Models Library</a>.",
      "required": true,
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/api/tags"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "models"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.name}}",
                    "value": "={{$responseItem.name}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    }
  ]


node_type: nodes-langchain.lmChatAnthropicTool
package_name: @n8n/n8n-nodes-langchain
display_name: Anthropic Chat Model Tool
description: Language Model Anthropic (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1.3
operations: []
credentials_required:
  [
  {
  "name": "anthropicApi",
  "required": true
  }
  ]

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

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-18 15:15:49
tool_variant_of: nodes-langchain.lmChatAnthropic
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Anthropic Chat Model node documentation
  description: Learn how to use the Anthropic Chat Model node in n8n. Follow technical documentation to integrate Anthropic Chat Model node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Anthropic Chat Model node

  Use the Anthropic Chat Model node to use Anthropic's Claude family of chat models with conversational [agents](/glossary.md#ai-agent).

  On this page, you'll find the node parameters for the Anthropic Chat Model node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/anthropic.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model that generates the completion. Choose from:
  	* **Claude**
  	* **Claude Instant**

  Learn more in the [Anthropic model documentation](https://docs.anthropic.com/claude/reference/selecting-a-model){:target=_blank .external-link}.

  ## Node options

  * **Maximum Number of Tokens**: Enter the maximum number of tokens used, which sets the completion length.
  * **Sampling Temperature**: Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.
  * **Top K**: Enter the number of token choices the model uses to generate the next token.
  * **Top P**: Use this option to set the probability the completion should use. Use a lower value to ignore less probable options. 

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's Anthropic documentation](https://js.langchain.com/docs/integrations/chat/anthropic/){: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 send messages and communicate"
    },
    {
      "displayName": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "claude-2",
      "description": "The model which will generate the completion. <a href=\"https://docs.anthropic.com/claude/docs/models-overview\">Learn more</a>.",
      "options": [
        {
          "name": "Claude 3.5 Sonnet(20241022)",
          "value": "claude-3-5-sonnet-20241022"
        },
        {
          "name": "Claude 3 Opus(20240229)",
          "value": "claude-3-opus-20240229"
        },
        {
          "name": "Claude 3.5 Sonnet(20240620)",
          "value": "claude-3-5-sonnet-20240620"
        },
        {
          "name": "Claude 3 Sonnet(20240229)",
          "value": "claude-3-sonnet-20240229"
        },
        {
          "name": "Claude 3.5 Haiku(20241022)",
          "value": "claude-3-5-haiku-20241022"
        },
        {
          "name": "Claude 3 Haiku(20240307)",
          "value": "claude-3-haiku-20240307"
        },
        {
          "name": "LEGACY: Claude 2",
          "value": "claude-2"
        },
        {
          "name": "LEGACY: Claude 2.1",
          "value": "claude-2.1"
        },
        {
          "name": "LEGACY: Claude Instant 1.2",
          "value": "claude-instant-1.2"
        },
        {
          "name": "LEGACY: Claude Instant 1",
          "value": "claude-instant-1"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            1
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "claude-3-sonnet-20240229",
      "description": "The model which will generate the completion. <a href=\"https://docs.anthropic.com/claude/docs/models-overview\">Learn more</a>.",
      "options": [
        {
          "name": "Claude 3.5 Sonnet(20241022)",
          "value": "claude-3-5-sonnet-20241022"
        },
        {
          "name": "Claude 3 Opus(20240229)",
          "value": "claude-3-opus-20240229"
        },
        {
          "name": "Claude 3.5 Sonnet(20240620)",
          "value": "claude-3-5-sonnet-20240620"
        },
        {
          "name": "Claude 3 Sonnet(20240229)",
          "value": "claude-3-sonnet-20240229"
        },
        {
          "name": "Claude 3.5 Haiku(20241022)",
          "value": "claude-3-5-haiku-20241022"
        },
        {
          "name": "Claude 3 Haiku(20240307)",
          "value": "claude-3-haiku-20240307"
        },
        {
          "name": "LEGACY: Claude 2",
          "value": "claude-2"
        },
        {
          "name": "LEGACY: Claude 2.1",
          "value": "claude-2.1"
        },
        {
          "name": "LEGACY: Claude Instant 1.2",
          "value": "claude-instant-1.2"
        },
        {
          "name": "LEGACY: Claude Instant 1",
          "value": "claude-instant-1"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            1.1
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "claude-3-5-sonnet-20240620",
      "description": "The model which will generate the completion. <a href=\"https://docs.anthropic.com/claude/docs/models-overview\">Learn more</a>.",
      "options": [
        {
          "name": "Claude 3.5 Sonnet(20241022)",
          "value": "claude-3-5-sonnet-20241022"
        },
        {
          "name": "Claude 3 Opus(20240229)",
          "value": "claude-3-opus-20240229"
        },
        {
          "name": "Claude 3.5 Sonnet(20240620)",
          "value": "claude-3-5-sonnet-20240620"
        },
        {
          "name": "Claude 3 Sonnet(20240229)",
          "value": "claude-3-sonnet-20240229"
        },
        {
          "name": "Claude 3.5 Haiku(20241022)",
          "value": "claude-3-5-haiku-20241022"
        },
        {
          "name": "Claude 3 Haiku(20240307)",
          "value": "claude-3-haiku-20240307"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lte": 1.2
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": "claude-sonnet-4-5-20250929",
        "cachedResultName": "Claude Sonnet 4.5"
      },
      "description": "The model. Choose from the list, or specify an ID. <a href=\"https://docs.anthropic.com/claude/docs/models-overview\">Learn more</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 1.3
              }
            }
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "placeholder": "Select a model...",
          "typeOptions": {
            "searchListMethod": "searchModels",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "Claude Sonnet"
        }
      ]
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxTokensToSample",
          "default": 4096,
          "description": "The maximum number of tokens to generate in the completion",
          "type": "number"
        },
        {
          "displayName": "Sampling Temperature",
          "name": "temperature",
          "default": 0.7,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number",
          "displayOptions": {
            "hide": {
              "thinking": [
                true
              ]
            }
          }
        },
        {
          "displayName": "Top K",
          "name": "topK",
          "default": -1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": -1,
            "numberPrecision": 1
          },
          "description": "Used to remove \"long tail\" low probability responses. Defaults to -1, which disables it.",
          "type": "number",
          "displayOptions": {
            "hide": {
              "thinking": [
                true
              ]
            }
          }
        },
        {
          "displayName": "Top P",
          "name": "topP",
          "default": 1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "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",
          "displayOptions": {
            "hide": {
              "thinking": [
                true
              ]
            }
          }
        },
        {
          "displayName": "Enable Thinking",
          "name": "thinking",
          "type": "boolean",
          "default": false,
          "description": "Whether to enable thinking mode for the model"
        },
        {
          "displayName": "Thinking Budget (Tokens)",
          "name": "thinkingBudget",
          "type": "number",
          "default": 1024,
          "description": "The maximum number of tokens to use for thinking",
          "displayOptions": {
            "show": {
              "thinking": [
                true
              ]
            }
          }
        }
      ]
    }
  ]


node_type: nodes-langchain.lmChatAnthropic
package_name: @n8n/n8n-nodes-langchain
display_name: Anthropic Chat Model
description: Language Model Anthropic
category: transform
development_style: programmatic
version: 1.3
operations: []
credentials_required:
  [
  {
  "name": "anthropicApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_languageModel"
  ]

output_names:
  [
  "Model"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Anthropic Chat Model node documentation
  description: Learn how to use the Anthropic Chat Model node in n8n. Follow technical documentation to integrate Anthropic Chat Model node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Anthropic Chat Model node

  Use the Anthropic Chat Model node to use Anthropic's Claude family of chat models with conversational [agents](/glossary.md#ai-agent).

  On this page, you'll find the node parameters for the Anthropic Chat Model node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/anthropic.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model that generates the completion. Choose from:
  	* **Claude**
  	* **Claude Instant**

  Learn more in the [Anthropic model documentation](https://docs.anthropic.com/claude/reference/selecting-a-model){:target=_blank .external-link}.

  ## Node options

  * **Maximum Number of Tokens**: Enter the maximum number of tokens used, which sets the completion length.
  * **Sampling Temperature**: Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.
  * **Top K**: Enter the number of token choices the model uses to generate the next token.
  * **Top P**: Use this option to set the probability the completion should use. Use a lower value to ignore less probable options. 

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's Anthropic documentation](https://js.langchain.com/docs/integrations/chat/anthropic/){: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": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "claude-2",
      "description": "The model which will generate the completion. <a href=\"https://docs.anthropic.com/claude/docs/models-overview\">Learn more</a>.",
      "options": [
        {
          "name": "Claude 3.5 Sonnet(20241022)",
          "value": "claude-3-5-sonnet-20241022"
        },
        {
          "name": "Claude 3 Opus(20240229)",
          "value": "claude-3-opus-20240229"
        },
        {
          "name": "Claude 3.5 Sonnet(20240620)",
          "value": "claude-3-5-sonnet-20240620"
        },
        {
          "name": "Claude 3 Sonnet(20240229)",
          "value": "claude-3-sonnet-20240229"
        },
        {
          "name": "Claude 3.5 Haiku(20241022)",
          "value": "claude-3-5-haiku-20241022"
        },
        {
          "name": "Claude 3 Haiku(20240307)",
          "value": "claude-3-haiku-20240307"
        },
        {
          "name": "LEGACY: Claude 2",
          "value": "claude-2"
        },
        {
          "name": "LEGACY: Claude 2.1",
          "value": "claude-2.1"
        },
        {
          "name": "LEGACY: Claude Instant 1.2",
          "value": "claude-instant-1.2"
        },
        {
          "name": "LEGACY: Claude Instant 1",
          "value": "claude-instant-1"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            1
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "claude-3-sonnet-20240229",
      "description": "The model which will generate the completion. <a href=\"https://docs.anthropic.com/claude/docs/models-overview\">Learn more</a>.",
      "options": [
        {
          "name": "Claude 3.5 Sonnet(20241022)",
          "value": "claude-3-5-sonnet-20241022"
        },
        {
          "name": "Claude 3 Opus(20240229)",
          "value": "claude-3-opus-20240229"
        },
        {
          "name": "Claude 3.5 Sonnet(20240620)",
          "value": "claude-3-5-sonnet-20240620"
        },
        {
          "name": "Claude 3 Sonnet(20240229)",
          "value": "claude-3-sonnet-20240229"
        },
        {
          "name": "Claude 3.5 Haiku(20241022)",
          "value": "claude-3-5-haiku-20241022"
        },
        {
          "name": "Claude 3 Haiku(20240307)",
          "value": "claude-3-haiku-20240307"
        },
        {
          "name": "LEGACY: Claude 2",
          "value": "claude-2"
        },
        {
          "name": "LEGACY: Claude 2.1",
          "value": "claude-2.1"
        },
        {
          "name": "LEGACY: Claude Instant 1.2",
          "value": "claude-instant-1.2"
        },
        {
          "name": "LEGACY: Claude Instant 1",
          "value": "claude-instant-1"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            1.1
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "claude-3-5-sonnet-20240620",
      "description": "The model which will generate the completion. <a href=\"https://docs.anthropic.com/claude/docs/models-overview\">Learn more</a>.",
      "options": [
        {
          "name": "Claude 3.5 Sonnet(20241022)",
          "value": "claude-3-5-sonnet-20241022"
        },
        {
          "name": "Claude 3 Opus(20240229)",
          "value": "claude-3-opus-20240229"
        },
        {
          "name": "Claude 3.5 Sonnet(20240620)",
          "value": "claude-3-5-sonnet-20240620"
        },
        {
          "name": "Claude 3 Sonnet(20240229)",
          "value": "claude-3-sonnet-20240229"
        },
        {
          "name": "Claude 3.5 Haiku(20241022)",
          "value": "claude-3-5-haiku-20241022"
        },
        {
          "name": "Claude 3 Haiku(20240307)",
          "value": "claude-3-haiku-20240307"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lte": 1.2
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": "claude-sonnet-4-5-20250929",
        "cachedResultName": "Claude Sonnet 4.5"
      },
      "description": "The model. Choose from the list, or specify an ID. <a href=\"https://docs.anthropic.com/claude/docs/models-overview\">Learn more</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 1.3
              }
            }
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "placeholder": "Select a model...",
          "typeOptions": {
            "searchListMethod": "searchModels",
            "searchable": true
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string",
          "placeholder": "Claude Sonnet"
        }
      ]
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxTokensToSample",
          "default": 4096,
          "description": "The maximum number of tokens to generate in the completion",
          "type": "number"
        },
        {
          "displayName": "Sampling Temperature",
          "name": "temperature",
          "default": 0.7,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number",
          "displayOptions": {
            "hide": {
              "thinking": [
                true
              ]
            }
          }
        },
        {
          "displayName": "Top K",
          "name": "topK",
          "default": -1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": -1,
            "numberPrecision": 1
          },
          "description": "Used to remove \"long tail\" low probability responses. Defaults to -1, which disables it.",
          "type": "number",
          "displayOptions": {
            "hide": {
              "thinking": [
                true
              ]
            }
          }
        },
        {
          "displayName": "Top P",
          "name": "topP",
          "default": 1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "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",
          "displayOptions": {
            "hide": {
              "thinking": [
                true
              ]
            }
          }
        },
        {
          "displayName": "Enable Thinking",
          "name": "thinking",
          "type": "boolean",
          "default": false,
          "description": "Whether to enable thinking mode for the model"
        },
        {
          "displayName": "Thinking Budget (Tokens)",
          "name": "thinkingBudget",
          "type": "number",
          "default": 1024,
          "description": "The maximum number of tokens to use for thinking",
          "displayOptions": {
            "show": {
              "thinking": [
                true
              ]
            }
          }
        }
      ]
    }
  ]


node_type: nodes-langchain.lmChatAzureOpenAiTool
package_name: @n8n/n8n-nodes-langchain
display_name: Azure OpenAI Chat Model Tool
description: For advanced usage with an AI chain (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1
operations: []
outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-18 15:15:49
tool_variant_of: nodes-langchain.lmChatAzureOpenAi
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Azure OpenAI Chat Model node documentation
  description: Learn how to use the Azure OpenAI Chat Model node in n8n. Follow technical documentation to integrate Azure OpenAI Chat Model node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Azure OpenAI Chat Model node

  Use the Azure OpenAI Chat Model node to use OpenAI's chat models with conversational [agents](/glossary.md#ai-agent).

  On this page, you'll find the node parameters for the Azure OpenAI Chat Model node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/azureopenai.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the completion.

  ## Node options

  * **Frequency Penalty**: Use this option to control the chances of the model repeating itself. Higher values reduce the chance of the model repeating itself.
  * **Maximum Number of Tokens**: Enter the maximum number of tokens used, which sets the completion length.
  * **Response Format**: Choose **Text** or **JSON**. **JSON** ensures the model returns valid JSON.
  * **Presence Penalty**: Use this option to control the chances of the model talking about new topics. Higher values increase the chance of the model talking about new topics.
  * **Sampling Temperature**: Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.
  * **Timeout**: Enter the maximum request time in milliseconds.
  * **Max Retries**: Enter the maximum number of times to retry a request.
  * **Top P**: Use this option to set the probability the completion should use. Use a lower value to ignore less probable options. 

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's Azure OpenAI documentation](https://js.langchain.com/docs/integrations/chat/azure){: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 send messages and communicate"
    },
    {
      "displayName": "Authentication",
      "name": "authentication",
      "type": "options",
      "default": "azureOpenAiApi",
      "options": [
        {
          "name": "API Key",
          "value": "azureOpenAiApi"
        },
        {
          "name": "Azure Entra ID (OAuth2)",
          "value": "azureEntraCognitiveServicesOAuth2Api"
        }
      ]
    },
    {
      "displayName": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.",
      "name": "notice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "/options.responseFormat": [
            "json_object"
          ]
        }
      }
    },
    {
      "displayName": "Model (Deployment) Name",
      "name": "model",
      "type": "string",
      "default": "",
      "description": "The name of the model(deployment) to use (e.g., gpt-4, gpt-35-turbo)",
      "required": true
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "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": "Maximum Number of Tokens",
          "name": "maxTokens",
          "default": -1,
          "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). Use -1 for default.",
          "type": "number",
          "typeOptions": {
            "maxValue": 128000
          }
        },
        {
          "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": "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": "Sampling Temperature",
          "name": "temperature",
          "default": 0.7,
          "typeOptions": {
            "maxValue": 2,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number"
        },
        {
          "displayName": "Timeout (Ms)",
          "name": "timeout",
          "default": 60000,
          "description": "Maximum amount of time a request is allowed to take in milliseconds",
          "type": "number"
        },
        {
          "displayName": "Max Retries",
          "name": "maxRetries",
          "default": 2,
          "description": "Maximum number of retries to attempt on failure",
          "type": "number"
        },
        {
          "displayName": "Top P",
          "name": "topP",
          "default": 1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "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"
        }
      ]
    }
  ]

credentials_required:
  [
    {
      "name": "azureOpenAiApi",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "azureOpenAiApi"
          ]
        }
      }
    },
    {
      "name": "azureEntraCognitiveServicesOAuth2Api",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "azureEntraCognitiveServicesOAuth2Api"
          ]
        }
      }
    }
  ]


node_type: nodes-langchain.lmChatAzureOpenAi
package_name: @n8n/n8n-nodes-langchain
display_name: Azure OpenAI Chat Model
description: For advanced usage with an AI chain
category: transform
development_style: programmatic
version: 1
operations: []
outputs:
  [
  "ai_languageModel"
  ]

output_names:
  [
  "Model"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Azure OpenAI Chat Model node documentation
  description: Learn how to use the Azure OpenAI Chat Model node in n8n. Follow technical documentation to integrate Azure OpenAI Chat Model node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Azure OpenAI Chat Model node

  Use the Azure OpenAI Chat Model node to use OpenAI's chat models with conversational [agents](/glossary.md#ai-agent).

  On this page, you'll find the node parameters for the Azure OpenAI Chat Model node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/azureopenai.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the completion.

  ## Node options

  * **Frequency Penalty**: Use this option to control the chances of the model repeating itself. Higher values reduce the chance of the model repeating itself.
  * **Maximum Number of Tokens**: Enter the maximum number of tokens used, which sets the completion length.
  * **Response Format**: Choose **Text** or **JSON**. **JSON** ensures the model returns valid JSON.
  * **Presence Penalty**: Use this option to control the chances of the model talking about new topics. Higher values increase the chance of the model talking about new topics.
  * **Sampling Temperature**: Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.
  * **Timeout**: Enter the maximum request time in milliseconds.
  * **Max Retries**: Enter the maximum number of times to retry a request.
  * **Top P**: Use this option to set the probability the completion should use. Use a lower value to ignore less probable options. 

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's Azure OpenAI documentation](https://js.langchain.com/docs/integrations/chat/azure){: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": "Authentication",
      "name": "authentication",
      "type": "options",
      "default": "azureOpenAiApi",
      "options": [
        {
          "name": "API Key",
          "value": "azureOpenAiApi"
        },
        {
          "name": "Azure Entra ID (OAuth2)",
          "value": "azureEntraCognitiveServicesOAuth2Api"
        }
      ]
    },
    {
      "displayName": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.",
      "name": "notice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "/options.responseFormat": [
            "json_object"
          ]
        }
      }
    },
    {
      "displayName": "Model (Deployment) Name",
      "name": "model",
      "type": "string",
      "default": "",
      "description": "The name of the model(deployment) to use (e.g., gpt-4, gpt-35-turbo)",
      "required": true
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "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": "Maximum Number of Tokens",
          "name": "maxTokens",
          "default": -1,
          "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). Use -1 for default.",
          "type": "number",
          "typeOptions": {
            "maxValue": 128000
          }
        },
        {
          "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": "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": "Sampling Temperature",
          "name": "temperature",
          "default": 0.7,
          "typeOptions": {
            "maxValue": 2,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number"
        },
        {
          "displayName": "Timeout (Ms)",
          "name": "timeout",
          "default": 60000,
          "description": "Maximum amount of time a request is allowed to take in milliseconds",
          "type": "number"
        },
        {
          "displayName": "Max Retries",
          "name": "maxRetries",
          "default": 2,
          "description": "Maximum number of retries to attempt on failure",
          "type": "number"
        },
        {
          "displayName": "Top P",
          "name": "topP",
          "default": 1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "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"
        }
      ]
    }
  ]

credentials_required:
  [
    {
      "name": "azureOpenAiApi",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "azureOpenAiApi"
          ]
        }
      }
    },
    {
      "name": "azureEntraCognitiveServicesOAuth2Api",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "azureEntraCognitiveServicesOAuth2Api"
          ]
        }
      }
    }
  ]


node_type: nodes-langchain.lmChatAwsBedrock
package_name: @n8n/n8n-nodes-langchain
display_name: AWS Bedrock Chat Model
description: Language Model AWS Bedrock
category: transform
development_style: programmatic
version: 1.1
operations: []
credentials_required:
  [
  {
  "name": "aws",
  "required": true
  }
  ]

outputs:
  [
  "ai_languageModel"
  ]

output_names:
  [
  "Model"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: AWS Bedrock Chat Model node documentation
  description: Learn how to use the AWS Bedrock Chat Model node in n8n. Follow technical documentation to integrate AWS Bedrock Chat Model node into your workflows.
  contentType: [integration, reference]
  ---

  # AWS Bedrock Chat Model node

  The AWS Bedrock Chat Model node allows you use LLM models utilising AWS Bedrock platform.

  On this page, you'll find the node parameters for the AWS Bedrock Chat Model node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/aws.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"
  	
  ## Node parameters

  * **Model**: Select the model that generates the completion.

  Learn more about available models in the [Amazon Bedrock model documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html){:target=_blank .external-link}.

  ## Node options

  * **Maximum Number of Tokens**: Enter the maximum number of tokens used, which sets the completion length.
  * **Sampling Temperature**: Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChains's AWS Bedrock Chat Model documentation](https://js.langchain.com/docs/integrations/chat/bedrock/){: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": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model Source",
      "name": "modelSource",
      "type": "options",
      "default": "onDemand",
      "description": "Choose between on-demand foundation models or inference profiles",
      "options": [
        {
          "name": "On-Demand Models",
          "value": "onDemand",
          "description": "Standard foundation models with on-demand pricing"
        },
        {
          "name": "Inference Profiles",
          "value": "inferenceProfile",
          "description": "Cross-region inference profiles (required for models like Claude Sonnet 4 and others)"
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 1.1
              }
            }
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "",
      "description": "The model which will generate the completion. <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/foundation-models.html\">Learn more</a>.",
      "displayOptions": {
        "hide": {
          "modelSource": [
            "inferenceProfile"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsDependsOn": [
          "modelSource"
        ],
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/foundation-models?&byOutputModality=TEXT&byInferenceType=ON_DEMAND"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "modelSummaries"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.modelName}}",
                    "description": "={{$responseItem.modelArn}}",
                    "value": "={{$responseItem.modelId}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "",
      "description": "The inference profile which will generate the completion. <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-use.html\">Learn more</a>.",
      "displayOptions": {
        "show": {
          "modelSource": [
            "inferenceProfile"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsDependsOn": [
          "modelSource"
        ],
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/inference-profiles?maxResults=1000"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "inferenceProfileSummaries"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.inferenceProfileName}}",
                    "description": "={{$responseItem.description || $responseItem.inferenceProfileArn}}",
                    "value": "={{$responseItem.inferenceProfileId}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxTokensToSample",
          "default": 2000,
          "description": "The maximum number of tokens to generate in the completion",
          "type": "number"
        },
        {
          "displayName": "Sampling Temperature",
          "name": "temperature",
          "default": 0.7,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number"
        }
      ]
    }
  ]


node_type: nodes-langchain.lmChatCohereTool
package_name: @n8n/n8n-nodes-langchain
display_name: Cohere Chat Model Tool
description: For advanced usage with an AI chain (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "cohereApi",
  "required": true
  }
  ]

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

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-18 15:15:49
tool_variant_of: nodes-langchain.lmChatCohere
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 send messages and communicate"
    },
    {
      "displayName": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "command-a-03-2025",
      "description": "The model which will generate the completion. <a href=\"https://docs.cohere.com/docs/models\">Learn more</a>.",
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/v1/models?page_size=100&endpoint=chat"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "models"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.name}}",
                    "value": "={{$responseItem.name}}",
                    "description": "={{$responseItem.description}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Sampling Temperature",
          "name": "temperature",
          "default": 0.7,
          "typeOptions": {
            "maxValue": 2,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number"
        },
        {
          "displayName": "Max Retries",
          "name": "maxRetries",
          "default": 2,
          "description": "Maximum number of retries to attempt",
          "type": "number"
        }
      ]
    }
  ]


node_type: nodes-langchain.lmChatCohere
package_name: @n8n/n8n-nodes-langchain
display_name: Cohere Chat Model
description: For advanced usage with an AI chain
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "cohereApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_languageModel"
  ]

output_names:
  [
  "Model"
  ]

updated_at: 2026-03-18 15:15:49
properties_schema:
  [
    {
      "displayName": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "command-a-03-2025",
      "description": "The model which will generate the completion. <a href=\"https://docs.cohere.com/docs/models\">Learn more</a>.",
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/v1/models?page_size=100&endpoint=chat"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "models"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.name}}",
                    "value": "={{$responseItem.name}}",
                    "description": "={{$responseItem.description}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Sampling Temperature",
          "name": "temperature",
          "default": 0.7,
          "typeOptions": {
            "maxValue": 2,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number"
        },
        {
          "displayName": "Max Retries",
          "name": "maxRetries",
          "default": 2,
          "description": "Maximum number of retries to attempt",
          "type": "number"
        }
      ]
    }
  ]


node_type: nodes-langchain.lmChatDeepSeek
package_name: @n8n/n8n-nodes-langchain
display_name: DeepSeek Chat Model
description: For advanced usage with an AI chain
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "deepSeekApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_languageModel"
  ]

output_names:
  [
  "Model"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: DeepSeek Chat Model node documentation
  description: Learn how to use the DeepSeek Chat Model node in n8n. Follow technical documentation to integrate DeepSeek Chat Model node into your workflows.
  contentType: [integration, reference]
  priority: high
  ---

  # DeepSeek Chat Model node

  Use the DeepSeek Chat Model node to use DeepSeek's chat models with conversational [agents](/glossary.md#ai-agent).

  On this page, you'll find the node parameters for the DeepSeek Chat Model node and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/deepseek.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  ### Model

  Select the model to use to generate the completion.

  n8n dynamically loads models from DeepSeek and you'll only see the models available to your account.

  ## Node options

  Use these options to further refine the node's behavior.

  ### Base URL

  Enter a URL here to override the default URL for the API.

  ### Frequency Penalty

  Use this option to control the chances of the model repeating itself. Higher values reduce the chance of the model repeating itself.

  ### Maximum Number of Tokens

  Enter the maximum number of tokens used, which sets the completion length.

  ### Response Format

  Choose **Text** or **JSON**. **JSON** ensures the model returns valid JSON.

  ### Presence Penalty

  Use this option to control the chances of the model talking about new topics. Higher values increase the chance of the model talking about new topics.

  ### Sampling Temperature

  Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.

  ### Timeout

  Enter the maximum request time in milliseconds.

  ### Max Retries

  Enter the maximum number of times to retry a request.

  ### Top P

  Use this option to set the probability the completion should use. Use a lower value to ignore less probable options. 

  ## Templates and examples

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

  ## Related resources

  As DeepSeek is API-compatible with OpenAI, you can refer to [LangChains's OpenAI documentation](https://js.langchain.com/docs/integrations/chat/openai/){: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": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.",
      "name": "notice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "/options.responseFormat": [
            "json_object"
          ]
        }
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "deepseek-chat",
      "description": "The model which will generate the completion. <a href=\"https://api-docs.deepseek.com/quick_start/pricing\">Learn more</a>.",
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.id}}",
                    "value": "={{$responseItem.id}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "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": "Maximum Number of Tokens",
          "name": "maxTokens",
          "default": -1,
          "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": "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": "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": "Sampling Temperature",
          "name": "temperature",
          "default": 0.7,
          "typeOptions": {
            "maxValue": 2,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number"
        },
        {
          "displayName": "Timeout",
          "name": "timeout",
          "default": 360000,
          "description": "Maximum amount of time a request is allowed to take in milliseconds",
          "type": "number"
        },
        {
          "displayName": "Max Retries",
          "name": "maxRetries",
          "default": 2,
          "description": "Maximum number of retries to attempt",
          "type": "number"
        },
        {
          "displayName": "Top P",
          "name": "topP",
          "default": 1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "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"
        }
      ]
    }
  ]


node_type: nodes-langchain.lmChatGoogleGemini
package_name: @n8n/n8n-nodes-langchain
display_name: Google Gemini Chat Model
description: Chat Model Google Gemini
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "googlePalmApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_languageModel"
  ]

output_names:
  [
  "Model"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Google Gemini Chat Model node documentation
  description: Learn how to use the Google Gemini Chat Model node in n8n. Follow technical documentation to integrate Google Gemini Chat Model node into your workflows.
  contentType: [integration, reference]
  priority: high
  ---

  # Google Gemini Chat Model node

  Use the Google Gemini Chat Model node to use Google's Gemini chat models with conversational agents.

  On this page, you'll find the node parameters for the Google Gemini Chat Model node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/googleai.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model to use to generate the completion.

  n8n dynamically loads models from the Google Gemini API and you'll only see the models available to your account.

  ## Node options

  * **Maximum Number of Tokens**: Enter the maximum number of tokens used, which sets the completion length.
  * **Sampling Temperature**: Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.
  * **Top K**: Enter the number of token choices the model uses to generate the next token.
  * **Top P**: Use this option to set the probability the completion should use. Use a lower value to ignore less probable options. 
  * **Safety Settings**: Gemini supports adjustable safety settings. Refer to Google's [Gemini API safety settings](https://ai.google.dev/docs/safety_setting_gemini){:target=_blank .external-link} for information on the available filters and levels.

  ## Templates and examples

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

  ## Related resources

  Refer to [LangChain's Google Gemini documentation](https://js.langchain.com/docs/integrations/chat/google_generativeai){: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": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "modelName",
      "type": "options",
      "default": "models/gemini-2.5-flash",
      "description": "The model which will generate the completion. <a href=\"https://developers.generativeai.google/api/rest/generativelanguage/models/list\">Learn more</a>.",
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/v1beta/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "models"
                  }
                },
                {
                  "type": "filter",
                  "properties": {
                    "pass": "={{ !$responseItem.name.includes('embedding') }}"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.name}}",
                    "value": "={{$responseItem.name}}",
                    "description": "={{$responseItem.description}}"
                  }
                },
                {
                  "type": "sort",
                  "properties": {
                    "key": "name"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxOutputTokens",
          "default": 2048,
          "description": "The maximum number of tokens to generate in the completion",
          "type": "number"
        },
        {
          "displayName": "Sampling Temperature",
          "name": "temperature",
          "default": 0.4,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number"
        },
        {
          "displayName": "Top K",
          "name": "topK",
          "default": 32,
          "typeOptions": {
            "maxValue": 40,
            "minValue": -1,
            "numberPrecision": 1
          },
          "description": "Used to remove \"long tail\" low probability responses. Defaults to -1, which disables it.",
          "type": "number"
        },
        {
          "displayName": "Top P",
          "name": "topP",
          "default": 1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "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": "Safety Settings",
          "name": "safetySettings",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {
            "values": {
              "category": "HARM_CATEGORY_HARASSMENT",
              "threshold": "HARM_BLOCK_THRESHOLD_UNSPECIFIED"
            }
          },
          "placeholder": "Add Option",
          "options": [
            {
              "name": "values",
              "displayName": "Values",
              "values": [
                {
                  "displayName": "Safety Category",
                  "name": "category",
                  "type": "options",
                  "description": "The category of harmful content to block",
                  "default": "HARM_CATEGORY_UNSPECIFIED",
                  "options": [
                    {
                      "value": "HARM_CATEGORY_HARASSMENT",
                      "name": "HARM_CATEGORY_HARASSMENT",
                      "description": "Harassment content"
                    },
                    {
                      "value": "HARM_CATEGORY_HATE_SPEECH",
                      "name": "HARM_CATEGORY_HATE_SPEECH",
                      "description": "Hate speech and content"
                    },
                    {
                      "value": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                      "name": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                      "description": "Sexually explicit content"
                    },
                    {
                      "value": "HARM_CATEGORY_DANGEROUS_CONTENT",
                      "name": "HARM_CATEGORY_DANGEROUS_CONTENT",
                      "description": "Dangerous content"
                    }
                  ]
                },
                {
                  "displayName": "Safety Threshold",
                  "name": "threshold",
                  "type": "options",
                  "description": "The threshold of harmful content to block",
                  "default": "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
                  "options": [
                    {
                      "value": "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
                      "name": "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
                      "description": "Threshold is unspecified"
                    },
                    {
                      "value": "BLOCK_LOW_AND_ABOVE",
                      "name": "BLOCK_LOW_AND_ABOVE",
                      "description": "Content with NEGLIGIBLE will be allowed"
                    },
                    {
                      "value": "BLOCK_MEDIUM_AND_ABOVE",
                      "name": "BLOCK_MEDIUM_AND_ABOVE",
                      "description": "Content with NEGLIGIBLE and LOW will be allowed"
                    },
                    {
                      "value": "BLOCK_ONLY_HIGH",
                      "name": "BLOCK_ONLY_HIGH",
                      "description": "Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed"
                    },
                    {
                      "value": "BLOCK_NONE",
                      "name": "BLOCK_NONE",
                      "description": "All content will be allowed"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]


node_type: nodes-langchain.lmChatGoogleVertex
package_name: @n8n/n8n-nodes-langchain
display_name: Google Vertex Chat Model
description: Chat Model Google Vertex
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "googleApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_languageModel"
  ]

output_names:
  [
  "Model"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Google Vertex Chat Model node documentation
  description: Learn how to use the Google Vertex Chat Model node in n8n. Follow technical documentation to integrate Google Vertex Chat Model node into your workflows.
  contentType: [integration, reference]
  ---

  # Google Vertex Chat Model node

  Use the Google Vertex AI Chat Model node to use Google's Vertex AI chat models with conversational [agents](/glossary.md#ai-agent).

  On this page, you'll find the node parameters for the Google Vertex AI Chat Model node, and links to more resources.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/google/service-account.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Project ID**: Select the project ID from your Google Cloud account to use. n8n dynamically loads projects from the Google Cloud account, but you can also enter it manually.
  * **Model Name**: Select the name of the model to use to generate the completion, for example `gemini-1.5-flash-001`, `gemini-1.5-pro-001`, etc. Refer to [Google models](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models){:target=_blank .external-link} for a list of available models.

  ## Node options

  * **Maximum Number of Tokens**: Enter the maximum number of tokens used, which sets the completion length.
  * **Sampling Temperature**: Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.
  * **Top K**: Enter the number of token choices the model uses to generate the next token.
  * **Top P**: Use this option to set the probability the completion should use. Use a lower value to ignore less probable options. 
  * **Safety Settings**: Gemini supports adjustable safety settings. Refer to Google's [Gemini API safety settings](https://ai.google.dev/docs/safety_setting_gemini){:target=_blank .external-link} for information on the available filters and levels.

  ## Templates and examples

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

  ## Related resources


  Refer to [LangChain's Google Vertex AI documentation](https://js.langchain.com/docs/integrations/chat/google_vertex_ai/){: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": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Project ID",
      "name": "projectId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select or enter your Google Cloud project ID",
      "required": true,
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "gcpProjectsList"
          }
        },
        {
          "displayName": "ID",
          "name": "id",
          "type": "string"
        }
      ]
    },
    {
      "displayName": "Model Name",
      "name": "modelName",
      "type": "string",
      "default": "gemini-2.5-flash",
      "description": "The model which will generate the completion. <a href=\"https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models\">Learn more</a>."
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxOutputTokens",
          "default": 2048,
          "description": "The maximum number of tokens to generate in the completion",
          "type": "number"
        },
        {
          "displayName": "Sampling Temperature",
          "name": "temperature",
          "default": 0.4,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number"
        },
        {
          "displayName": "Top K",
          "name": "topK",
          "default": 32,
          "typeOptions": {
            "maxValue": 40,
            "minValue": -1,
            "numberPrecision": 1
          },
          "description": "Used to remove \"long tail\" low probability responses. Defaults to -1, which disables it.",
          "type": "number"
        },
        {
          "displayName": "Top P",
          "name": "topP",
          "default": 1,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "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": "Safety Settings",
          "name": "safetySettings",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {
            "values": {
              "category": "HARM_CATEGORY_HARASSMENT",
              "threshold": "HARM_BLOCK_THRESHOLD_UNSPECIFIED"
            }
          },
          "placeholder": "Add Option",
          "options": [
            {
              "name": "values",
              "displayName": "Values",
              "values": [
                {
                  "displayName": "Safety Category",
                  "name": "category",
                  "type": "options",
                  "description": "The category of harmful content to block",
                  "default": "HARM_CATEGORY_UNSPECIFIED",
                  "options": [
                    {
                      "value": "HARM_CATEGORY_HARASSMENT",
                      "name": "HARM_CATEGORY_HARASSMENT",
                      "description": "Harassment content"
                    },
                    {
                      "value": "HARM_CATEGORY_HATE_SPEECH",
                      "name": "HARM_CATEGORY_HATE_SPEECH",
                      "description": "Hate speech and content"
                    },
                    {
                      "value": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                      "name": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                      "description": "Sexually explicit content"
                    },
                    {
                      "value": "HARM_CATEGORY_DANGEROUS_CONTENT",
                      "name": "HARM_CATEGORY_DANGEROUS_CONTENT",
                      "description": "Dangerous content"
                    }
                  ]
                },
                {
                  "displayName": "Safety Threshold",
                  "name": "threshold",
                  "type": "options",
                  "description": "The threshold of harmful content to block",
                  "default": "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
                  "options": [
                    {
                      "value": "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
                      "name": "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
                      "description": "Threshold is unspecified"
                    },
                    {
                      "value": "BLOCK_LOW_AND_ABOVE",
                      "name": "BLOCK_LOW_AND_ABOVE",
                      "description": "Content with NEGLIGIBLE will be allowed"
                    },
                    {
                      "value": "BLOCK_MEDIUM_AND_ABOVE",
                      "name": "BLOCK_MEDIUM_AND_ABOVE",
                      "description": "Content with NEGLIGIBLE and LOW will be allowed"
                    },
                    {
                      "value": "BLOCK_ONLY_HIGH",
                      "name": "BLOCK_ONLY_HIGH",
                      "description": "Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed"
                    },
                    {
                      "value": "BLOCK_NONE",
                      "name": "BLOCK_NONE",
                      "description": "All content will be allowed"
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "displayName": "Thinking Budget",
          "name": "thinkingBudget",
          "default": -1,
          "description": "Controls reasoning tokens for thinking models. Set to 0 to disable automatic thinking. Set to -1 for dynamic thinking (default).",
          "type": "number",
          "typeOptions": {
            "minValue": -1,
            "numberPrecision": 0
          }
        }
      ]
    }
  ]


node_type: nodes-langchain.lmChatGroq
package_name: @n8n/n8n-nodes-langchain
display_name: Groq Chat Model
description: Language Model Groq
category: transform
development_style: programmatic
version: 1
operations: []
credentials_required:
  [
  {
  "name": "groqApi",
  "required": true
  }
  ]

outputs:
  [
  "ai_languageModel"
  ]

output_names:
  [
  "Model"
  ]

updated_at: 2026-03-18 15:15:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Groq Chat Model node documentation
  description: Learn how to use the Groq Chat Model node in n8n. Follow technical documentation to integrate Groq Chat Model node into your workflows.
  contentType: [integration, reference]
  priority: medium
  ---

  # Groq Chat Model node

  Use the Groq Chat Model node to access Groq's large language models for conversational AI and text generation tasks.

  On this page, you'll find the node parameters for the Groq Chat Model node, and links to more resources.

  /// note | Credentials 
  You can find authentication information for this node [here](/integrations/builtin/credentials/groq.md).
  ///

  --8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md"

  ## Node parameters

  * **Model**: Select the model which will generate the completion. n8n dynamically loads available models from the Groq API. Learn more in the [Groq model documentation](https://console.groq.com/docs/models){:target=_blank .external-link}.

  ## Node options

  * **Maximum Number of Tokens**: Enter the maximum number of tokens used, which sets the completion length.
  * **Sampling Temperature**: Use this option to control the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations.

  ## Templates and examples

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

  ## Related resources

  Refer to [Groq's API documentation](https://console.groq.com/docs/quickstart){: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": "This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>",
      "name": "notice",
      "type": "notice",
      "default": "",
      "typeOptions": {
        "containerClass": "ndv-connection-hint-notice"
      }
    },
    {
      "displayName": "Model",
      "name": "model",
      "type": "options",
      "default": "llama3-8b-8192",
      "description": "The model which will generate the completion. <a href=\"https://console.groq.com/docs/models\">Learn more</a>.",
      "typeOptions": {
        "loadOptions": {
          "routing": {
            "request": {
              "method": "GET",
              "url": "/models"
            },
            "output": {
              "postReceive": [
                {
                  "type": "rootProperty",
                  "properties": {
                    "property": "data"
                  }
                },
                {
                  "type": "filter",
                  "properties": {
                    "pass": "={{ $responseItem.active === true && $responseItem.object === \"model\" }}"
                  }
                },
                {
                  "type": "setKeyValue",
                  "properties": {
                    "name": "={{$responseItem.id}}",
                    "value": "={{$responseItem.id}}"
                  }
                }
              ]
            }
          }
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "description": "Additional options to add",
      "options": [
        {
          "displayName": "Maximum Number of Tokens",
          "name": "maxTokensToSample",
          "default": 4096,
          "description": "The maximum number of tokens to generate in the completion",
          "type": "number"
        },
        {
          "displayName": "Sampling Temperature",
          "name": "temperature",
          "default": 0.7,
          "typeOptions": {
            "maxValue": 1,
            "minValue": 0,
            "numberPrecision": 1
          },
          "description": "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
          "type": "number"
        }
      ]
    }
  ]


