{"record":{"id":"59777f0244da527d","repo":"vercel/ai","slug":"black-forest-labs-video-generation-failed","errorCode":"BLACK_FOREST_LABS_VIDEO_GENERATION_FAILED","errorMessage":"${statusResult.error}","messagePattern":"\\$\\{statusResult\\.error\\}","errorType":"exception","errorClass":"AISDKError","httpStatus":null,"severity":"error","filePath":"packages/black-forest-labs/src/black-forest-labs-video-model.ts","lineNumber":733,"sourceCode":"          name: 'BLACK_FOREST_LABS_VIDEO_GENERATION_TIMEOUT',\n          message:\n            `Black Forest Labs video generation timed out after ${pollTimeoutMillis}ms. ` +\n            `Request id: ${operation.requestId}`,\n        });\n      }\n\n      const statusResult = await this.doStatus({\n        operation,\n        headers: options.headers,\n        abortSignal: options.abortSignal,\n      });\n\n      if (statusResult.status === 'pending') {\n        continue;\n      }\n\n      if (statusResult.status === 'error') {\n        throw new AISDKError({\n          name: 'BLACK_FOREST_LABS_VIDEO_GENERATION_FAILED',\n          message: statusResult.error,\n        });\n      }\n\n      return {\n        videos: statusResult.videos,\n        warnings: [...startResult.warnings, ...statusResult.warnings],\n        providerMetadata: statusResult.providerMetadata,\n        response: statusResult.response,\n      };\n    }\n  }\n}\n\nconst bflVideoSubmitSchema = z.object({\n  id: z.string(),\n  polling_url: z.url(),","sourceCodeStart":715,"sourceCodeEnd":751,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/black-forest-labs/src/black-forest-labs-video-model.ts#L715-L751","documentation":"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.","triggerScenarios":"Polling a BFL video operation whose status comes back 'error' during doGenerate's loop; the provider-supplied error string becomes the exception message.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const video = await generateVideo({ model, prompt });\n} catch (e) {\n  if (AISDKError.isInstance(e) && e.name === 'BLACK_FOREST_LABS_VIDEO_GENERATION_FAILED') {\n    console.error('BFL rejected the job:', e.message); // provider error text\n    return;\n  }\n  throw e;\n}","preventionTips":["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."],"tags":["video-generation","provider-api","polling","content-policy"],"backgroundTag":"provider-job-failed","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}