vercel/ai · error · AISDKError
BLACK_FOREST_LABS_VIDEO_GENERATION_FAILED
BLACK_FOREST_LABS_VIDEO_GENERATION_FAILED
Error message
${statusResult.error} What it means
Thrown in doGenerate when the polled BFL status result reports status 'error'; the SDK surfaces the provider's own error text (statusResult.error) as the message of an AISDKError named BLACK_FOREST_LABS_VIDEO_GENERATION_FAILED. This is the BFL API explicitly failing the job (e.g. content policy rejection or invalid input), not an SDK-side bug.
Source
Thrown at packages/black-forest-labs/src/black-forest-labs-video-model.ts:733
name: 'BLACK_FOREST_LABS_VIDEO_GENERATION_TIMEOUT',
message:
`Black Forest Labs video generation timed out after ${pollTimeoutMillis}ms. ` +
`Request id: ${operation.requestId}`,
});
}
const statusResult = await this.doStatus({
operation,
headers: options.headers,
abortSignal: options.abortSignal,
});
if (statusResult.status === 'pending') {
continue;
}
if (statusResult.status === 'error') {
throw new AISDKError({
name: 'BLACK_FOREST_LABS_VIDEO_GENERATION_FAILED',
message: statusResult.error,
});
}
return {
videos: statusResult.videos,
warnings: [...startResult.warnings, ...statusResult.warnings],
providerMetadata: statusResult.providerMetadata,
response: statusResult.response,
};
}
}
}
const bflVideoSubmitSchema = z.object({
id: z.string(),
polling_url: z.url(),View on GitHub (pinned to 69428b1f8b)
Solutions
- Read the message (the provider's error text) and fix the underlying request issue it describes.
- If it is a safety/policy rejection, adjust the prompt or keyframe images, or lower safetyTolerance within allowed limits.
- Retry with a new generation request; if the same input always fails, contact BFL support with the request id.
Defensive patterns
Strategy: try-catch
Try / catch
try {
const video = await generateVideo({ model, prompt });
} catch (e) {
if (AISDKError.isInstance(e) && e.name === 'BLACK_FOREST_LABS_VIDEO_GENERATION_FAILED') {
console.error('BFL rejected the job:', e.message); // provider error text
return;
}
throw e;
} Prevention
- Pre-screen prompts and keyframe images against BFL content policies.
- Validate aspect ratio, duration (5-20 whole seconds), and resolution combinations before submitting.
- Surface the provider error message to users instead of retrying blindly.
When it happens
Trigger: Polling a BFL video operation whose status comes back 'error' during doGenerate's loop; the provider-supplied error string becomes the exception message.
Common situations: Prompt or keyframe images rejected by BFL safety filters; unsupported aspect ratio/duration/resolution combination reaching the API; expired or invalid operation id polled after a previous failure; BFL service-side processing failure.
Related errors
- BLACK_FOREST_LABS_VIDEO_GENERATION_ERROR
- BLACK_FOREST_LABS_VIDEO_GENERATION_TIMEOUT
- MINIMAX_VIDEO_GENERATION_TIMEOUT
- xAI video status response exceeded ${MAX_PENDING_BODY_BYTES}
- No video generated.
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/59777f0244da527d.
Report an issue: GitHub.