n8n-io/n8n · error · NodeOperationError
Failed to create video task: ${createResponse.base_resp?.sta
Error message
Failed to create video task: ${createResponse.base_resp?.status_msg || 'Unknown error'} What it means
Thrown by the MiniMax text-to-video (t2v) operation after POST /video_generation when createResponse.base_resp.status_code is non-zero. Identical pattern to the i2v create failure (error 868) but for the text-only video path; status_msg is mirrored into the error.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vendors/MiniMax/actions/video/generate.t2v.operation.ts:142
};
const body: IDataObject = {
model,
prompt,
duration,
resolution,
};
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,View on GitHub (pinned to 5ac6606e81)
Solutions
- Read status_msg in the error for the upstream reason.
- Simplify/soften the prompt and retry.
- Verify model and resolution are supported for the account tier.
- Check video-generation credits and API key scopes.
- Drop optional fields (prompt_optimizer) to isolate a rejected parameter.
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_T2V_MODELS = ['video-01', 'video-01-live2d'] as const;
const SUPPORTED_T2V_RESOLUTIONS = ['720p', '1080p'] as const;
function validateT2vInput(opts: { prompt?: string; model?: string; resolution?: string; promptOptimizer?: boolean }) {
if (!opts.prompt || opts.prompt.trim().length === 0) return 'prompt is required for t2v';
if (opts.prompt.length > 4000) return `prompt length ${opts.prompt.length} likely exceeds the limit`;
if (opts.model && !SUPPORTED_T2V_MODELS.includes(opts.model as never)) return `model '${opts.model}' is not recognized for t2v`;
if (opts.resolution && !SUPPORTED_T2V_RESOLUTIONS.includes(opts.resolution as never)) return `resolution '${opts.resolution}' is not recognized`;
return null;
} Type guard
function isT2vCreateSuccess(r: unknown): r is { base_resp: { status_code: 0 }; task_id: string } {
const b = (r as { base_resp?: { status_code?: number } })?.base_resp;
return !!b && b.status_code === 0 && typeof (r as { task_id?: unknown })?.task_id === 'string';
} Try / catch
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'}`,
);
} Prevention
- Sanitize prompts to avoid content-moderation rejection before sending.
- Validate model/resolution against the account tier before deploying.
- Drop optional prompt_optimizer to isolate a rejected parameter if failures recur.
- Monitor video-generation credits and alert before exhaustion.
When it happens
Trigger: Prompt triggers content moderation; model/resolution/prompt_optimizer combination unsupported; account out of video credits; API key lacks video permission; prompt exceeds length limit.
Common situations: Disallowed prompt content; resolution not enabled for tier; quota exhausted; rotated API key without video scope.
Related errors
- Failed to create video task: ${createResponse.base_resp?.sta
- No task_id returned from video generation request
- ${response.error.message}
- Text-to-speech failed: ${response.base_resp?.status_msg || '
- Image generation failed: ${response.base_resp?.status_msg ||
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/51d1100e4e55cb9e.
Report an issue: GitHub.