{"record":{"id":"9a821ad0c35de953","repo":"vercel/ai","slug":"bytedance-video-generation-error","errorCode":"BYTEDANCE_VIDEO_GENERATION_ERROR","errorMessage":"No task ID returned from API","messagePattern":"No task ID returned from API","errorType":"exception","errorClass":"AISDKError","httpStatus":null,"severity":"error","filePath":"packages/bytedance/src/bytedance-video-model.ts","lineNumber":370,"sourceCode":"    const { value: createResponse, responseHeaders } = await postJsonToApi({\n      url: `${this.config.baseURL}/contents/generations/tasks`,\n      headers: combineHeaders(\n        await resolve(this.config.headers),\n        options.headers,\n      ),\n      body,\n      failedResponseHandler: byteDanceFailedResponseHandler,\n      successfulResponseHandler: createJsonResponseHandler(\n        byteDanceTaskResponseSchema,\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch,\n    });\n\n    const taskId = createResponse.id;\n\n    if (!taskId) {\n      throw new AISDKError({\n        name: 'BYTEDANCE_VIDEO_GENERATION_ERROR',\n        message: 'No task ID returned from API',\n      });\n    }\n\n    return {\n      operation: { taskId },\n      warnings,\n      response: {\n        timestamp: currentDate,\n        modelId: this.modelId,\n        headers: responseHeaders,\n      },\n    };\n  }\n\n  async doStatus(\n    options: Parameters<NonNullable<VideoModelV4['doStatus']>>[0],","sourceCodeStart":352,"sourceCodeEnd":388,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/bytedance/src/bytedance-video-model.ts#L352-L388","documentation":"After POSTing a video generation request, doStart reads createResponse.id as the task ID. If the API response has no id, the model cannot poll for status later, so it throws an AISDKError named BYTEDANCE_VIDEO_GENERATION_ERROR. This indicates the API responded but not with the expected creation payload (often an error body that still returned HTTP 200, or a schema change).","triggerScenarios":"bytedance.video(modelId).doStart(...) where the create-video API response JSON lacks the id field — e.g. auth/quota error payloads, malformed request, or an upstream API response format change.","commonSituations":"Invalid or expired ByteDance/Volcano API key returning a 200 with an error body; hit rate limits; using an old model ID that the API silently rejects; ByteDance changing the response schema.","solutions":["Log the raw create response (enable fetch debugging or intercept) to see what the API actually returned instead of a task id.","Verify your ARK/ByteDance API key and account quota; auth failures can surface as unexpected payloads.","Confirm the requested model ID is valid for video generation on your account.","Update @ai-sdk/bytedance in case the provider needs to handle a changed API response schema."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await videoModel.doGenerateVideo(request);\n} catch (e) {\n  if (AISDKError.isInstance(e) && e.name === 'BYTEDANCE_VIDEO_GENERATION_ERROR') {\n    // inspect request/response via logging; treat as failed generation\n    console.error('Video start failed: no task id returned', e.message);\n  }\n  throw e;\n}","preventionTips":["Validate API key and quota before submitting video jobs.","Keep @ai-sdk/bytedance up to date for API schema changes.","Log raw provider responses in dev to diagnose unexpected payloads."],"tags":["video-generation","api-response","bytedance"],"backgroundTag":"unexpected-api-response-shape","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}