{"record":{"id":"d377fbfea8a3def1","repo":"n8n-io/n8n","slug":"failed-to-create-video-task-createresponse-base","errorCode":null,"errorMessage":"Failed to create video task: ${createResponse.base_resp?.status_msg || 'Unknown error'}","messagePattern":"Failed to create video task: (.+?)","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.ts","lineNumber":330,"sourceCode":"\t\tbody.subject_reference = [\n\t\t\t{\n\t\t\t\timage: await resolveImageInput(\n\t\t\t\t\tthis,\n\t\t\t\t\titemIndex,\n\t\t\t\t\tsubjectRefInputType,\n\t\t\t\t\t(options.subjectReferenceImageUrl as string) || '',\n\t\t\t\t\t(options.subjectReferenceBinaryPropertyName as string) || 'subjectReference',\n\t\t\t\t),\n\t\t\t},\n\t\t];\n\t}\n\n\tconst createResponse = (await apiRequest.call(this, 'POST', '/video_generation', {\n\t\tbody,\n\t})) as VideoGenerationResponse;\n\n\tif (createResponse.base_resp?.status_code !== 0) {\n\t\tthrow new NodeOperationError(\n\t\t\tthis.getNode(),\n\t\t\t`Failed to create video task: ${createResponse.base_resp?.status_msg || 'Unknown error'}`,\n\t\t);\n\t}\n\n\tconst taskId = createResponse.task_id;\n\tif (!taskId) {\n\t\tthrow new NodeOperationError(\n\t\t\tthis.getNode(),\n\t\t\t'No task_id returned from video generation request',\n\t\t);\n\t}\n\n\tconst { fileId } = await pollVideoTask.call(this, taskId);\n\tconst videoUrl = await getVideoDownloadUrl.call(this, fileId);\n\n\tconst jsonData: IDataObject = {\n\t\tvideoUrl,","sourceCodeStart":312,"sourceCodeEnd":348,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/video/generate.i2v.operation.ts#L312-L348","documentation":"Thrown by the MiniMax image-to-video (i2v) operation after POST /video_generation when createResponse.base_resp.status_code is non-zero. Same base_resp pattern as other MiniMax operations: status_msg carries the upstream reason, 'Unknown error' is the fallback. This specifically covers task creation rejection — the asynchronous video job was never accepted.","triggerScenarios":"Reference image URL unreachable or in an unsupported format; prompt triggers moderation; model/resolution/first_frame_image combination unsupported; account out of video-generation credits; API key lacks video permission; subject/first-frame image binary property empty.","commonSituations":"Signed URL in subjectReferenceImageUrl expired before MiniMax fetched it; resolution not enabled for the account tier; prompt disallowed; binary property name mismatch (defaults to 'subjectReference' / 'firstFrame'); quota exhausted.","solutions":["Read status_msg in the error for the exact rejection reason.","Verify reference image URLs are publicly reachable and in a supported format (PNG/JPEG).","Confirm model and resolution are enabled for the account tier.","Check video-generation credits and API key scopes.","Ensure the binary property names in options match the actual item binary keys."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const SUPPORTED_I2V_MODELS = ['video-01-live2d', 'video-01'] as const;\nconst SUPPORTED_RESOLUTIONS = ['720p', '1080p'] as const;\nfunction validateI2vInput(opts: {\n  model?: string; resolution?: string;\n  firstFrameImageUrl?: string; firstFrameBinaryPropertyName?: string;\n  subjectReferenceImageUrl?: string;\n}) {\n  if (opts.model && !SUPPORTED_I2V_MODELS.includes(opts.model as never)) return `model '${opts.model}' is not recognized for i2v`;\n  if (opts.resolution && !SUPPORTED_RESOLUTIONS.includes(opts.resolution as never)) return `resolution '${opts.resolution}' is not recognized`;\n  const hasFirstFrame = !!opts.firstFrameImageUrl || !!opts.firstFrameBinaryPropertyName;\n  if (!hasFirstFrame && !opts.subjectReferenceImageUrl) {\n    return 'i2v requires a first frame or subject reference image';\n  }\n  return null;\n}","typeGuard":"function isPublicImageUrl(u: unknown): u is string {\n  if (typeof u !== 'string' || u.length === 0) return false;\n  try { const p = new URL(u); return p.protocol === 'http:' || p.protocol === 'https:'; } catch { return false; }\n}","tryCatchPattern":"const createResponse = (await apiRequest.call(this, 'POST', '/video_generation', { body })) as VideoGenerationResponse;\nif (createResponse.base_resp?.status_code !== 0) {\n  throw new NodeOperationError(\n    this.getNode(),\n    `Failed to create video task: ${createResponse.base_resp?.status_msg || 'Unknown error'}`,\n  );\n}","preventionTips":["Ensure reference image URLs are public and unexpired before the call — MiniMax must fetch them.","Confirm model and resolution are enabled for the account tier before deploying.","Match binary property names to the actual item binary keys (defaults 'firstFrame' / 'subjectReference').","Monitor video-generation credits and API key scopes."],"tags":["minimax","video-generation","i2v","api-error","task-creation"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}