Skip to content

MiniMax 节点#

MiniMax 节点可将 n8n 工作流连接到 MiniMax AI 模型。你可以用它根据文本提示词生成图像、合成语音、根据文本或图像生成视频,以及向 MiniMax 语言模型发送消息。

Credentials

你可以在这里找到此节点的身份验证信息。

Resources and operations 资源和操作#

  • Audio 音频:使用 MiniMax 语音合成模型将文本转换为语音。
  • Image 图像:根据文本提示词生成图像。
  • Text 文本:向 MiniMax 语言模型发送消息并接收响应。
  • Video 视频:根据文本提示词或首帧图像生成视频。

Text to speech 文本转语音#

使用 MiniMax 语音合成模型将文本转换为语音。

Parameters 参数

  • Model 模型(type: options, field: modelId):要使用的语音合成模型。默认值:speech-2.8-hd
  • Text 文本(type: string, field: text):要转换为语音的文本。最大 10,000 个字符。必填。
  • Voice ID(type: string, field: voiceId):合成时使用的声音。可在 MiniMax 文档 中浏览可用声音。默认值:English_Graceful_Lady。必填。
  • Download Audio 下载音频(type: boolean, field: downloadAudio):是否将生成的音频下载为二进制数据。关闭时,节点仅返回音频 URL。默认值:true

Options 选项

  • Audio Format 音频格式(type: options, field: audioFormat):输出音频格式。可选:MP3、PCM、FLAC、WAV。节点仅在非流式模式下支持 WAV。默认值:mp3
  • Emotion 情绪(type: options, field: emotion):应用于合成语音的情绪。模型会自动选择最自然的情绪。默认值:calm
  • Language Boost 语言增强(type: options, field: languageBoost):增强某种特定语言的识别准确率。默认值:auto
  • Pitch 音高(type: number, field: pitch):语音音高调整范围为 -12 到 12。0 表示保持原始音高。默认值:0
  • Speed 语速(type: number, field: speed):语速范围为 0.5 到 2。值越高,语速越快。默认值:1
  • Volume 音量(type: number, field: volume):音量范围为 0.1 到 10。值越高,音量越大。默认值:1

Generate an image 生成图像#

使用 MiniMax 图像生成模型,根据文本提示词生成图像。

Parameters 参数

  • Model 模型(type: options, field: modelId):要使用的图像生成模型。默认值:image-01
  • Prompt 提示词(type: string, field: prompt):用于描述待生成图像的文本。最大 1500 个字符。必填。
  • Aspect Ratio 宽高比(type: options, field: aspectRatio):生成图像的宽高比。可选项包括 1:1、16:9、9:16、4:3、3:4、3:2、2:3 和 21:9。默认值:1:1
  • Number of Images 图像数量(type: number, field: numberOfImages):每次请求生成的图像数量,范围为 1 到 9。默认值:1
  • Download Image 下载图像(type: boolean, field: downloadImage):是否将生成的图像下载为二进制数据。关闭时,节点仅返回图像 URL。默认值:true

Options 选项

  • Prompt Optimizer 提示词优化器(type: boolean, field: promptOptimizer):是否自动优化提示词以获得更好结果。默认值:false
  • Seed 随机种子(type: number, field: seed):用于复现输出的随机种子。相同参数配合相同种子会生成相同图像。默认值:0

Message a model 向模型发送消息#

向 MiniMax 语言模型发送一条或多条消息,并接收响应。

Parameters 参数

  • Model 模型(type: options, field: modelId):要使用的语言模型。默认值:MiniMax-M2.7
  • Messages 消息(type: fixedCollection, field: messages):构成对话的一条或多条消息。每条消息包含:
    • Prompt 提示词(type: string, field: content):消息的文本内容。
    • Role 角色(type: options, field: role):消息发送者的角色。使用 user 发送消息并接收响应,或使用 assistant 设定模型语气或角色。
  • Simplify Output 简化输出(type: boolean, field: simplify):启用后,节点返回简化后的响应,而不是完整原始 API 输出。默认值:true

Options 选项

  • Hide Thinking 隐藏思考(type: boolean, field: hideThinking):从响应中移除 chain-of-thought 推理内容,仅返回最终答案。默认值:true
  • Maximum Number of Tokens 最大令牌数(type: number, field: maxTokens):允许生成的最大令牌数。默认值:1024
  • Max Tool Calls Iterations 最大工具调用迭代次数(type: number, field: maxToolsIterations):模型在停止前可运行的最大工具迭代轮数。一次迭代中可能包含多个工具调用。设为 0 表示不限制。默认值:15
  • Output Randomness (Temperature) 输出随机性(Temperature)(type: number, field: temperature):控制输出随机性。值越低,输出越确定、越重复。范围:0 到 1。默认值:0.7
  • Output Randomness (Top P) 输出随机性(Top P)(type: number, field: topP):采样时考虑的 token 累积概率上限。范围:0 到 1。默认值:0.95
  • System Message 系统消息(type: string, field: system):用于指导模型行为和语气的系统级指令。

Generate video from text 从文本生成视频#

使用 MiniMax 视频生成模型,根据文本提示词生成视频。

Parameters 参数

  • Model 模型(type: options, field: modelId):要使用的视频生成模型。默认值:MiniMax-Hailuo-2.3
  • Prompt 提示词(type: string, field: prompt):视频的文本描述。最大 2000 个字符。你可以使用 [command] 语法控制镜头运动,例如 [Push in][Pan left]。必填。
  • Duration (Seconds) 时长(秒)(type: options, field: duration):生成视频的时长。可选 6 秒或 10 秒。默认值:6
  • Resolution 分辨率(type: options, field: resolution):生成视频的分辨率。可选项取决于模型。可选:720P、768P、1080P。默认值:768P
  • Download Video 下载视频(type: boolean, field: downloadVideo):是否将生成的视频下载为二进制数据。关闭时,节点仅返回视频 URL。默认值:true

Options 选项

  • Prompt Optimizer 提示词优化器(type: boolean, field: promptOptimizer):是否自动优化提示词以获得更好结果。默认值:true

Generate video from image 从图像生成视频#

使用图像作为首帧生成视频。

Parameters 参数

  • Model 模型(type: options, field: modelId):要使用的视频生成模型。默认值:MiniMax-Hailuo-2.3
  • Image Input Type 图像输入类型(type: options, field: imageInputType):如何提供首帧图像。可选:URL 或 Binary File。默认值:url
  • Image URL 图像 URL(type: string, field: imageUrl):首帧图像的公开 URL。支持大小不超过 20MB 的 JPG、JPEG、PNG 和 WebP 文件。当 Image Input Type 图像输入类型URL 时显示。必填。
  • Input Data Field Name 输入数据字段名(type: string, field: binaryPropertyName):包含二进制图像数据的输入字段名称。当 Image Input Type 图像输入类型Binary File 时显示。默认值:data。必填。
  • Prompt 提示词(type: string, field: prompt):可选的视频文本描述。最大 2000 个字符。你可以使用 [command] 语法控制镜头运动,例如 [Zoom in]
  • Duration (Seconds) 时长(秒)(type: options, field: duration):生成视频的时长。可选 6 秒或 10 秒。默认值:6
  • Resolution 分辨率(type: options, field: resolution):生成视频的分辨率。可选项取决于模型。可选:512P、720P、768P、1080P。默认值:768P
  • Download Video 下载视频(type: boolean, field: downloadVideo):是否将生成的视频下载为二进制数据。关闭时,节点仅返回视频 URL。默认值:true

Options 选项

  • Prompt Optimizer 提示词优化器(type: boolean, field: promptOptimizer):是否自动优化提示词。默认值:true
  • Last Frame Image Input Type 末帧图像输入类型(type: options, field: lastFrameInputType):提供末帧图像以生成首尾帧视频。仅 MiniMax-Hailuo-2.3 和 MiniMax-Hailuo-02 支持该选项。默认值:none
    • Last Frame Image URL 末帧图像 URL(type: string, field: lastFrameImageUrl):末帧图像的公开 URL。当 Last Frame Image Input Type 末帧图像输入类型URL 时显示。
    • Last Frame Data Field Name 末帧数据字段名(type: string, field: lastFrameBinaryPropertyName):包含末帧图像的二进制字段名称。当 Last Frame Image Input Type 末帧图像输入类型Binary File 时显示。默认值:lastFrame
  • Subject Reference Input Type 主体参考图输入类型(type: options, field: subjectReferenceInputType):提供一张人脸照片,以在生成视频中保持面部一致性。仅 MiniMax-Hailuo-2.3 支持该选项。默认值:none
    • Subject Reference Image URL 主体参考图 URL(type: string, field: subjectReferenceImageUrl):参考人脸图像的公开 URL。当 Subject Reference Input Type 主体参考图输入类型URL 时显示。
    • Subject Reference Data Field Name 主体参考图数据字段名(type: string, field: subjectReferenceBinaryPropertyName):包含参考人脸图像的二进制字段名称。当 Subject Reference Input Type 主体参考图输入类型Binary File 时显示。默认值:subjectReference

Templates and examples 模板和示例#

Template widget placeholder.

关于该服务的更多信息,请参阅 MiniMax 文档