n8n-io/n8n · error · NodeOperationError

Failed to create video generation task: ${createResponse?.me

Error message

Failed to create video generation task: ${createResponse?.message || 'No task_id returned'}

What it means

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'.

Source

Thrown at packages/@n8n/nodes-langchain/nodes/vendors/AlibabaCloud/actions/video/generate.t2v.operation.ts:249

	} else if (videoOptions.audioUrl) {
		body.input.audio_url = videoOptions.audioUrl as string;
	}

	const createResponse = await apiRequest.call(
		this,
		'POST',
		'/api/v1/services/aigc/video-generation/video-synthesis',
		{
			headers: {
				'X-DashScope-Async': 'enable',
			},
			body,
		},
	);

	const taskId = createResponse?.output?.task_id as string;
	if (!taskId) {
		throw new NodeOperationError(
			this.getNode(),
			`Failed to create video generation task: ${createResponse?.message || 'No task_id returned'}`,
		);
	}

	const result = await pollTaskResult.call(this, taskId);

	const output = result.output as IDataObject;
	const videoUrl = (output?.video_url as string) || '';

	const jsonData = simplify
		? { videoUrl }
		: {
				videoUrl,
				model,
				taskId,
				usage: result.usage,
				taskStatus: output?.task_status,

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Inspect the createResponse.message in the execution error output — it usually contains the API's rejection reason.
  2. Verify the model ID supports text-to-video generation (e.g. wanx2.1-t2v-turbo, wanx2.1-t2v-plus).
  3. Check that the prompt is non-empty and does not trigger content policy violations.
  4. Validate resolution, duration, and shot_type are within supported values for the selected model.
  5. Confirm API key permissions and quota for DashScope video generation.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  // ... t2v task creation ...
} catch (error) {
  if (error instanceof NodeOperationError && error.message.includes('Failed to create video generation task')) {
    console.error('Video task creation failed:', error.message);
    // retry with adjusted prompt or parameters
  }
  throw error;
}

Prevention

When it happens

Trigger: 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.

Common situations: Prompt triggers content moderation filter; unsupported model name for t2v; resolution/duration parameters invalid; API key permissions or quota exhausted; transient API error.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/ade6d45f7bce64d8. Report an issue: GitHub.