{"record":{"id":"51e4520bc25c39ee","repo":"n8n-io/n8n","slug":"failed-to-create-video-generation-task-createre","errorCode":null,"errorMessage":"Failed to create video generation task: ${createResponse?.message || 'No task_id returned'}","messagePattern":"Failed to create video generation task: (.+?)","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/vendors/AlibabaCloud/actions/video/generate.i2v.operation.ts","lineNumber":311,"sourceCode":"\t} else if (options.audioUrl) {\n\t\tbody.input.audio_url = options.audioUrl as string;\n\t}\n\n\tconst createResponse = await apiRequest.call(\n\t\tthis,\n\t\t'POST',\n\t\t'/api/v1/services/aigc/video-generation/video-synthesis',\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'X-DashScope-Async': 'enable',\n\t\t\t},\n\t\t\tbody,\n\t\t},\n\t);\n\n\tconst taskId = createResponse?.output?.task_id as string;\n\tif (!taskId) {\n\t\tthrow new NodeOperationError(\n\t\t\tthis.getNode(),\n\t\t\t`Failed to create video generation task: ${createResponse?.message || 'No task_id returned'}`,\n\t\t);\n\t}\n\n\tconst result = await pollTaskResult.call(this, taskId);\n\n\tconst output = result.output as IDataObject;\n\tconst videoUrl = (output?.video_url as string) || '';\n\n\tconst jsonData = simplify\n\t\t? { videoUrl }\n\t\t: {\n\t\t\t\tvideoUrl,\n\t\t\t\tmodel,\n\t\t\t\ttaskId,\n\t\t\t\tusage: result.usage,\n\t\t\t\ttaskStatus: output?.task_status,","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/AlibabaCloud/actions/video/generate.i2v.operation.ts#L293-L329","documentation":"Thrown by the AlibabaCloud image-to-video operation when the POST to /api/v1/services/aigc/video-generation/video-synthesis returns a response without an output.task_id. The task_id is required to poll for the asynchronous video generation result; without it, polling cannot proceed. The error includes the API's message field if present, or 'No task_id returned' as fallback.","triggerScenarios":"The DashScope video-synthesis API call fails to return a task_id. This occurs when the API rejects the request (invalid model, invalid parameters, content policy violation, insufficient quota), when authentication fails, or when the API returns an error envelope that the code does not detect as an error (since it only checks for the presence of task_id).","commonSituations":"Invalid or unsupported model name for i2v; input image URL inaccessible or invalid format; resolution/duration parameters outside allowed ranges; API key lacks video generation permissions; API rate limit or temporary service error returning an error body instead of a task.","solutions":["Inspect the full createResponse object — the error message includes createResponse.message if present, which often contains the API's reason for rejection.","Verify the model ID supports image-to-video generation (e.g. wanx2.1-i2v-turbo).","Ensure the input image URL is publicly accessible and uses a supported format (PNG, JPEG).","Check that resolution, duration, and shot_type parameters are within the model's supported ranges.","Verify the Alibaba Cloud API key has DashScope/video-generation permissions and sufficient quota."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  // ... i2v task creation ...\n} catch (error) {\n  if (error instanceof NodeOperationError && error.message.includes('Failed to create video generation task')) {\n    // inspect error.message for API's reason, then retry or notify user\n    console.error('Video task creation failed:', error.message);\n    // optionally retry with simplified parameters\n  }\n  throw error;\n}","preventionTips":["Verify the DashScope API key has video generation permissions before running the workflow.","Ensure the input image URL is publicly accessible and uses a supported format (PNG/JPEG).","Validate resolution, duration, and shot_type parameters are within the model's documented ranges.","Test with a simple, known-good input before running production workflows.","Monitor DashScope quota and top up if low."],"tags":["video-generation","async-task","alibabacloud","dashscope"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}