{"record":{"id":"51d1100e4e55cb9e","repo":"n8n-io/n8n","slug":"failed-to-create-video-task-createresponse-base-51d110","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.t2v.operation.ts","lineNumber":142,"sourceCode":"\t};\n\n\tconst body: IDataObject = {\n\t\tmodel,\n\t\tprompt,\n\t\tduration,\n\t\tresolution,\n\t};\n\n\tif (options.promptOptimizer !== undefined) {\n\t\tbody.prompt_optimizer = options.promptOptimizer;\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":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.ts#L124-L160","documentation":"Thrown by the MiniMax text-to-video (t2v) operation after POST /video_generation when createResponse.base_resp.status_code is non-zero. Identical pattern to the i2v create failure (error 868) but for the text-only video path; status_msg is mirrored into the error.","triggerScenarios":"Prompt triggers content moderation; model/resolution/prompt_optimizer combination unsupported; account out of video credits; API key lacks video permission; prompt exceeds length limit.","commonSituations":"Disallowed prompt content; resolution not enabled for tier; quota exhausted; rotated API key without video scope.","solutions":["Read status_msg in the error for the upstream reason.","Simplify/soften the prompt and retry.","Verify model and resolution are supported for the account tier.","Check video-generation credits and API key scopes.","Drop optional fields (prompt_optimizer) to isolate a rejected parameter."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const SUPPORTED_T2V_MODELS = ['video-01', 'video-01-live2d'] as const;\nconst SUPPORTED_T2V_RESOLUTIONS = ['720p', '1080p'] as const;\nfunction validateT2vInput(opts: { prompt?: string; model?: string; resolution?: string; promptOptimizer?: boolean }) {\n  if (!opts.prompt || opts.prompt.trim().length === 0) return 'prompt is required for t2v';\n  if (opts.prompt.length > 4000) return `prompt length ${opts.prompt.length} likely exceeds the limit`;\n  if (opts.model && !SUPPORTED_T2V_MODELS.includes(opts.model as never)) return `model '${opts.model}' is not recognized for t2v`;\n  if (opts.resolution && !SUPPORTED_T2V_RESOLUTIONS.includes(opts.resolution as never)) return `resolution '${opts.resolution}' is not recognized`;\n  return null;\n}","typeGuard":"function isT2vCreateSuccess(r: unknown): r is { base_resp: { status_code: 0 }; task_id: string } {\n  const b = (r as { base_resp?: { status_code?: number } })?.base_resp;\n  return !!b && b.status_code === 0 && typeof (r as { task_id?: unknown })?.task_id === 'string';\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":["Sanitize prompts to avoid content-moderation rejection before sending.","Validate model/resolution against the account tier before deploying.","Drop optional prompt_optimizer to isolate a rejected parameter if failures recur.","Monitor video-generation credits and alert before exhaustion."],"tags":["minimax","video-generation","t2v","api-error","task-creation"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}