{"record":{"id":"ade6d45f7bce64d8","repo":"n8n-io/n8n","slug":"failed-to-create-video-generation-task-createre-ade6d4","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.t2v.operation.ts","lineNumber":249,"sourceCode":"\t} else if (videoOptions.audioUrl) {\n\t\tbody.input.audio_url = videoOptions.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":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/vendors/AlibabaCloud/actions/video/generate.t2v.operation.ts#L231-L267","documentation":"Thrown by the AlibabaCloud text-to-video operation when the POST to /api/v1/services/aigc/video-generation/video-synthesis returns a response without an output.task_id. Identical logic to the i2v operation: the task_id is required to begin polling for the async result. The error message surfaces the API's message field or defaults to 'No task_id returned'.","triggerScenarios":"The DashScope video-synthesis API call for text-to-video fails to return a task_id. Occurs when the prompt is rejected (content policy, empty/invalid prompt), the model name is wrong, parameters are out of range, or the API returns an error envelope without a task_id.","commonSituations":"Prompt triggers content moderation filter; unsupported model name for t2v; resolution/duration parameters invalid; API key permissions or quota exhausted; transient API error.","solutions":["Inspect the createResponse.message in the execution error output — it usually contains the API's rejection reason.","Verify the model ID supports text-to-video generation (e.g. wanx2.1-t2v-turbo, wanx2.1-t2v-plus).","Check that the prompt is non-empty and does not trigger content policy violations.","Validate resolution, duration, and shot_type are within supported values for the selected model.","Confirm API key permissions and quota for DashScope video generation."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  // ... t2v task creation ...\n} catch (error) {\n  if (error instanceof NodeOperationError && error.message.includes('Failed to create video generation task')) {\n    console.error('Video task creation failed:', error.message);\n    // retry with adjusted prompt or parameters\n  }\n  throw error;\n}","preventionTips":["Write clear, non-prohibited prompts to avoid content policy rejections.","Verify the model ID supports text-to-video generation.","Check resolution, duration, and shot_type are within supported values for the chosen model.","Ensure the DashScope API key has adequate quota and video generation permissions.","Test with a short, simple prompt first to verify the setup works."],"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"}