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

Source

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

	} else if (options.audioUrl) {
		body.input.audio_url = options.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 full createResponse object — the error message includes createResponse.message if present, which often contains the API's reason for rejection.
  2. Verify the model ID supports image-to-video generation (e.g. wanx2.1-i2v-turbo).
  3. Ensure the input image URL is publicly accessible and uses a supported format (PNG, JPEG).
  4. Check that resolution, duration, and shot_type parameters are within the model's supported ranges.
  5. Verify the Alibaba Cloud API key has DashScope/video-generation permissions and sufficient quota.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  // ... i2v task creation ...
} catch (error) {
  if (error instanceof NodeOperationError && error.message.includes('Failed to create video generation task')) {
    // inspect error.message for API's reason, then retry or notify user
    console.error('Video task creation failed:', error.message);
    // optionally retry with simplified parameters
  }
  throw error;
}

Prevention

When it happens

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

Common situations: 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.

Related errors


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