{"record":{"id":"4140b089a28ebdcd","repo":"vercel/ai","slug":"fal-video-generation-error","errorCode":"FAL_VIDEO_GENERATION_ERROR","errorMessage":"No response URL returned from queue endpoint","messagePattern":"No response URL returned from queue endpoint","errorType":"exception","errorClass":"AISDKError","httpStatus":null,"severity":"error","filePath":"packages/fal/src/fal-video-model.ts","lineNumber":244,"sourceCode":"\n    const submitUrl = this.config.url({\n      path: queuePath,\n      modelId: this.modelId,\n    });\n    const { value: queueResponse } = await postJsonToApi({\n      url: submitUrl,\n      headers: combineHeaders(this.config.headers?.(), options.headers),\n      body,\n      failedResponseHandler: falFailedResponseHandler,\n      successfulResponseHandler:\n        createJsonResponseHandler(falJobResponseSchema),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch,\n    });\n\n    const responseUrl = queueResponse.response_url;\n    if (!responseUrl) {\n      throw new AISDKError({\n        name: 'FAL_VIDEO_GENERATION_ERROR',\n        message: 'No response URL returned from queue endpoint',\n      });\n    }\n\n    return { responseUrl, submitUrl };\n  }\n\n  private async fetchStatus({\n    responseUrl,\n    submitUrl,\n    headers,\n    abortSignal,\n  }: {\n    responseUrl: string;\n    submitUrl: string;\n    headers?: Record<string, string | undefined>;\n    abortSignal?: AbortSignal;","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/fal/src/fal-video-model.ts#L226-L262","documentation":"After submitting a video generation job to fal.ai's queue, the API response is expected to contain a `response_url` used to poll job status. When that field is missing or empty, the model throws an AISDKError named 'FAL_VIDEO_GENERATION_ERROR' because it cannot continue polling. This indicates an unexpected or malformed fal queue API response.","triggerScenarios":"Calling `fal.video(...).doGenerate` (via generateVideo) where the POST to fal's queue endpoint returns 2xx but with no `response_url` field — e.g. fal API contract change, proxy stripping the body, or account/endpoint issues.","commonSituations":"Running behind a corporate proxy or mock server that alters the response; using an outdated provider version against a changed fal API; intermittent fal API misbehavior.","solutions":["Upgrade @ai-sdk/fal to the latest version so the request/response handling matches the current fal API","Log/inspect the raw queue endpoint response body to see what fal actually returned","Retry the video generation request; if reproducible, report it to fal.ai support","Bypass any proxy/mock that might be rewriting or truncating the response body"],"exampleFix":"// before\npnpm add @ai-sdk/fal@4.0.0\n// after\npnpm add @ai-sdk/fal@latest","handlingStrategy":"retry","validationCode":"// No client-side validation can predict a missing response_url; validate the response shape after submit\nfunction hasResponseUrl(r: unknown): r is { response_url: string } {\n  return typeof r === 'object' && r !== null && 'response_url' in r && typeof (r as any).response_url === 'string';\n}","typeGuard":"function isFalVideoGenerationError(e: unknown): boolean {\n  return AISDKError.isInstance(e) && e.name === 'FAL_VIDEO_GENERATION_ERROR';\n}","tryCatchPattern":"try {\n  return await generateVideo({ model: fal.video(modelId), prompt });\n} catch (e) {\n  if (AISDKError.isInstance(e) && e.name === 'FAL_VIDEO_GENERATION_ERROR') {\n    return retry(() => generateVideo({ model: fal.video(modelId), prompt }));\n  }\n  throw e;\n}","preventionTips":["Keep @ai-sdk/fal up to date with fal's queue API changes","Avoid proxies/mocks that rewrite API response bodies in production paths","Add retry logic around video generation for transient API issues","Log raw queue responses when debugging provider contract drift"],"tags":["api-response","network","video-generation","fal"],"backgroundTag":"malformed-api-response","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}