{"record":{"id":"db0128034b6371e4","repo":"vercel/ai","slug":"black-forest-labs-video-generation-error","errorCode":"BLACK_FOREST_LABS_VIDEO_GENERATION_ERROR","errorMessage":"Black Forest Labs reported the video as Ready but returned no result.sample URL. Request id: ${operation.requestId}","messagePattern":"Black Forest Labs reported the video as Ready but returned no result\\.sample URL\\. Request id: (.+?)","errorType":"exception","errorClass":"AISDKError","httpStatus":null,"severity":"error","filePath":"packages/black-forest-labs/src/black-forest-labs-video-model.ts","lineNumber":633,"sourceCode":"      failedResponseHandler: bflFailedResponseHandler,\n      successfulResponseHandler: createJsonResponseHandler(bflVideoPollSchema),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch,\n    });\n\n    const response = {\n      modelId: this.modelId,\n      timestamp: currentDate,\n      headers: responseHeaders,\n    };\n    const { status, result } = value;\n\n    const cost = value.cost ?? operation.cost;\n\n    if (status === 'Ready') {\n      const parsed = bflVideoResultSchema.safeParse(result);\n      if (!parsed.success) {\n        throw new AISDKError({\n          name: 'BLACK_FOREST_LABS_VIDEO_GENERATION_ERROR',\n          message:\n            'Black Forest Labs reported the video as Ready but returned no result.sample URL. ' +\n            `Request id: ${operation.requestId}`,\n        });\n      }\n\n      return {\n        status: 'completed',\n        videos: [\n          {\n            type: 'url',\n            url: parsed.data.sample,\n            mediaType: 'video/mp4',\n          },\n        ],\n        warnings: [],\n        providerMetadata: {","sourceCodeStart":615,"sourceCodeEnd":651,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/black-forest-labs/src/black-forest-labs-video-model.ts#L615-L651","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"retry","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_ERROR') {\n    // log e.message (contains request id) and retry or report to BFL support\n  }\n  throw e;\n}","preventionTips":["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."],"tags":["video-generation","provider-api","response-validation","polling"],"backgroundTag":"provider-response-schema-mismatch","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}