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 t2v video operation when POST /video_generation returned success (status_code 0) but createResponse.task_id is missing. Same response-shape inconsistency as error 869 but on the text-to-video path; the node cannot poll without a task_id and aborts.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.ts:150
if (options.promptOptimizer !== undefined) {
body.prompt_optimizer = options.promptOptimizer;
}
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
- Retry the create request.
- Log the full createResponse to confirm task_id absence.
- Verify the credentials base URL is the official MiniMax endpoint.
- If recurring, report to MiniMax 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 validateT2vRequestShape(body: IDataObject): string | null {
if (typeof body.prompt !== 'string' || body.prompt.length === 0) return 'body.prompt must be a non-empty string';
if (typeof body.model !== 'string') return 'body.model is required';
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 createT2vWithRetry(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
- Treat success-without-task_id as transient and retry before failing.
- Log the full createResponse to detect a real API field rename versus a glitch.
- Use the official MiniMax base URL to avoid response-filtering proxies.
- If it persists, report the response body to MiniMax support.
When it happens
Trigger: Transient backend inconsistency returning success without task_id; API revision relocating the field; proxy stripping the field; truncated response under load.
Common situations: Rare upstream glitch; non-official base URL filtering the response.
Related errors
- No task_id returned from video generation request
- Failed to create video task: ${createResponse.base_resp?.sta
- Video generation succeeded but no file_id was returned
- Failed to retrieve download URL for file ${fileId}
- No audio data returned
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/112688535e1ad393.
Report an issue: GitHub.