{"record":{"id":"a6c353e7eaed7ced","repo":"Comfy-Org/ComfyUI","slug":"seed-api-error-response-error-code-response","errorCode":null,"errorMessage":"Seed API error ({response.error.code}): {response.error.message}","messagePattern":"Seed API error \\((.+?)\\): (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance_llm.py","lineNumber":231,"sourceCode":"        if video_inputs:\n            content.extend(await _build_video_content_blocks(cls, video_inputs))\n        content.append(BytePlusInputText(text=prompt))\n\n        response = await sync_op(\n            cls,\n            ApiEndpoint(path=BYTEPLUS_RESPONSES_ENDPOINT, method=\"POST\"),\n            response_model=BytePlusResponseObject,\n            data=BytePlusResponseCreateRequest(\n                model=model_id,\n                input=[BytePlusInputMessage(role=\"user\", content=content)],\n                instructions=system_prompt or None,\n                temperature=temperature,\n                store=False,\n                stream=False,\n            ),\n        )\n        if response.error:\n            raise ValueError(f\"Seed API error ({response.error.code}): {response.error.message}\")\n        result = _get_text_from_response(response)\n        if not result:\n            raise ValueError(\"Empty response from Seed model.\")\n        return IO.NodeOutput(result)\n\n\nclass ByteDanceLLMExtension(ComfyExtension):\n    @override\n    async def get_node_list(self) -> list[type[IO.ComfyNode]]:\n        return [ByteDanceSeedNode]\n\n\nasync def comfy_entrypoint() -> ByteDanceLLMExtension:\n    return ByteDanceLLMExtension()\n","sourceCodeStart":213,"sourceCodeEnd":246,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance_llm.py#L213-L246","documentation":"Raised after a ByteDance Seed (LLM) responses-API call when the parsed response body carries a top-level error object. The error code and message from the BytePlus API are embedded verbatim, so this is the upstream service rejecting the request (auth, model access, bad parameter, quota) rather than a local validation failure.","triggerScenarios":"POST to BYTEPLUS_RESPONSES_ENDPOINT returns a payload with a non-null response.error — invalid API key, unknown model_id, malformed request body, exceeded rate limit/quota, or account not enabled for the model.","commonSituations":"Missing or expired ByteDance API credentials in ComfyUI's API-key manager; using a model label whose SEED_MODELS id is not enabled on the account; hitting QPS/TPM quotas during batched workflows; regional availability gaps.","solutions":["Check the numeric code in the message: 401/403 style codes mean credentials/permissions, 429 quota, 4xx parameter issues.","Verify the ByteDance API key is set and valid in ComfyUI (settings > API keys) and that the account has Seed model access.","For quota errors, reduce parallel requests or add spacing between Seed node executions.","For parameter errors, simplify the request (drop videos, shorten prompt) to isolate the offending input."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    out = await seed_node.execute(...)\nexcept ValueError as e:\n    msg = str(e)\n    if \"Seed API error\" in msg:\n        code = msg.split(\"(\")[1].split(\")\")[0]\n        if code in (\"429\", \"1704\"):  # quota-style codes: back off and retry\n            await asyncio.sleep(5)\n            out = await seed_node.execute(...)\n        else:\n            raise","preventionTips":["Store valid ByteDance credentials in ComfyUI's API-key manager before running.","Throttle batched workflows to stay under QPS/TPM quotas.","Match the error code to auth vs quota vs parameter categories before retrying."],"tags":["comfyui","bytedance","seed-llm","api-error","auth","quota"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}