n8n-io/n8n · error · NodeOperationError

No task_id returned from video generation request

Error message

No task_id returned from video generation request

What it means

Thrown by the i2v video operation when POST /video_generation returned success (status_code 0) but createResponse.task_id is missing. Without a task_id the node cannot poll for the asynchronous video result, so it aborts. A response-shape inconsistency: MiniMax signalled acceptance but did not return the job identifier.

Source

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

				),
			},
		];
	}

	const createResponse = (await apiRequest.call(this, 'POST', '/video_generation', {
		body,
	})) as VideoGenerationResponse;

	if (createResponse.base_resp?.status_code !== 0) {
		throw new NodeOperationError(
			this.getNode(),
			`Failed to create video task: ${createResponse.base_resp?.status_msg || 'Unknown error'}`,
		);
	}

	const taskId = createResponse.task_id;
	if (!taskId) {
		throw new NodeOperationError(
			this.getNode(),
			'No task_id returned from video generation request',
		);
	}

	const { fileId } = await pollVideoTask.call(this, taskId);
	const videoUrl = await getVideoDownloadUrl.call(this, fileId);

	const jsonData: IDataObject = {
		videoUrl,
		taskId,
		fileId,
	};

	if (downloadVideo && videoUrl) {
		const videoResponse = await this.helpers.httpRequest({
			method: 'GET',
			url: videoUrl,

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Retry the create request — most occurrences are transient.
  2. Log the full createResponse to confirm task_id is truly absent vs. relocated.
  3. Verify the credentials base URL is the official MiniMax endpoint.
  4. If recurring, open a MiniMax support ticket with the response body.
Defensive patterns

Strategy: retry

Validate before calling

// No caller-side input prevents an upstream success-without-task_id glitch.
// Validate only the request shape before sending.
function validateI2vRequestShape(body: IDataObject): string | null {
  if (typeof body.model !== 'string') return 'body.model is required';
  if (!body.first_frame_image && !body.subject_reference) {
    return 'i2v body requires first_frame_image or subject_reference';
  }
  return null;
}

Type guard

function hasTaskId(r: unknown): r is { task_id: string } {
  return typeof (r as { task_id?: unknown })?.task_id === 'string' &&
    ((r as { task_id: string }).task_id.length > 0);
}

Try / catch

async function createI2vWithRetry(apiRequest: any, body: IDataObject, maxAttempts = 3): Promise<string> {
  for (let attempt = 0; attempt < maxAttempts; attempt++) {
    const createResponse = (await apiRequest.call(this, 'POST', '/video_generation', { body })) as VideoGenerationResponse;
    if (createResponse.base_resp?.status_code !== 0) {
      throw new NodeOperationError(this.getNode(), `Failed to create video task: ${createResponse.base_resp?.status_msg || 'Unknown error'}`);
    }
    if (createResponse.task_id) return createResponse.task_id;
    await sleep(1000 * (attempt + 1));
  }
  throw new NodeOperationError(this.getNode(), 'No task_id returned from video generation request');
}

Prevention

When it happens

Trigger: Transient backend inconsistency returning success without task_id; API revision moving the task id to a different field; intermediary proxy stripping the task_id field; race where the job was accepted but the response payload was truncated.

Common situations: Rare upstream glitch; non-official base URL filtering the response; degraded response under high load.

Related errors


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