vercel/ai · error · AISDKError
BLACK_FOREST_LABS_VIDEO_GENERATION_ERROR
BLACK_FOREST_LABS_VIDEO_GENERATION_ERROR
Error message
Black Forest Labs reported the video as Ready but returned no result.sample URL. Request id: ${operation.requestId} What it means
Thrown in doStatus when Black Forest Labs reports the video operation status as 'Ready' but the `result` payload fails bflVideoResultSchema validation, i.e. no result.sample URL was returned. The SDK treats a Ready status without a usable sample URL as a malformed provider response and raises AISDKError named BLACK_FOREST_LABS_VIDEO_GENERATION_ERROR. This indicates a provider-side response anomaly, not a problem with the caller's request.
Source
Thrown at packages/black-forest-labs/src/black-forest-labs-video-model.ts:633
failedResponseHandler: bflFailedResponseHandler,
successfulResponseHandler: createJsonResponseHandler(bflVideoPollSchema),
abortSignal: options.abortSignal,
fetch: this.config.fetch,
});
const response = {
modelId: this.modelId,
timestamp: currentDate,
headers: responseHeaders,
};
const { status, result } = value;
const cost = value.cost ?? operation.cost;
if (status === 'Ready') {
const parsed = bflVideoResultSchema.safeParse(result);
if (!parsed.success) {
throw new AISDKError({
name: 'BLACK_FOREST_LABS_VIDEO_GENERATION_ERROR',
message:
'Black Forest Labs reported the video as Ready but returned no result.sample URL. ' +
`Request id: ${operation.requestId}`,
});
}
return {
status: 'completed',
videos: [
{
type: 'url',
url: parsed.data.sample,
mediaType: 'video/mp4',
},
],
warnings: [],
providerMetadata: {View on GitHub (pinned to 69428b1f8b)
Solutions
- Retry the generation; if reproducible, capture the raw response and report it to Black Forest Labs support with the request id.
- Check whether you are behind a proxy/gateway that could alter the response body and bypass it.
- Update @ai-sdk/black-forest-labs in case the result schema needs to match a newer BFL API shape.
Defensive patterns
Strategy: retry
Try / catch
try {
const video = await generateVideo({ model, prompt });
} catch (e) {
if (AISDKError.isInstance(e) && e.name === 'BLACK_FOREST_LABS_VIDEO_GENERATION_ERROR') {
// log e.message (contains request id) and retry or report to BFL support
}
throw e;
} Prevention
- Keep @ai-sdk/black-forest-labs updated to track BFL API schema changes.
- Avoid proxying BFL responses through gateways that rewrite bodies.
- Log request ids from the error message to speed up provider support tickets.
When it happens
Trigger: Polling a BFL video operation that returns status 'Ready' while its result object lacks (or malforms) the `sample` field, so bflVideoResultSchema.safeParse fails during doStatus/statusResult.
Common situations: Transient BFL API bugs where the result payload is incomplete; BFL API schema changes that moved/renamed the sample field; proxy or gateway responses that strip fields; an operation that finished but whose asset upload failed silently.
Related errors
- BLACK_FOREST_LABS_VIDEO_GENERATION_FAILED
- BLACK_FOREST_LABS_VIDEO_GENERATION_TIMEOUT
- MINIMAX_VIDEO_GENERATION_TIMEOUT
- xAI video status response exceeded ${MAX_PENDING_BODY_BYTES}
- Video generation timed out after ${timeoutMs}ms.
AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30).
Data as JSON: /api/errors/db0128034b6371e4.
Report an issue: GitHub.