错误信息: The parameter `size` specified in the request is not valid: image size mus...
错误信息
错误名称: AI_APICallError
错误信息: The parameter `size` specified in the request is not valid: image size must be at least 3686400 pixels. Request id: 021784653694188d7de4542f2cb4665397a3eedddf0de61142623 (request id: 2026072117080967820372396e93ae3d1l5Y46V)
堆栈信息: AI_APICallError: The parameter `size` specified in the request is not valid: image size must be at least 3686400 pixels. Request id: 021784653694188d7de4542f2cb4665397a3eedddf0de61142623 (request id: 2026072117080967820372396e93ae3d1l5Y46V)
at file:///E:/AI/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-SasHqsyc.js:52078:11
at async postToApi$2 (file:///E:/AI/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-SasHqsyc.js:51973:24)
at async OpenAICompatibleImageModel.doGenerate (file:///E:/AI/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-SasHqsyc.js:70784:48)
at async _retryWithExponentialBackoff (file:///E:/AI/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-SasHqsyc.js:100894:10)
at async Promise.all (index 0)
at async generateImage (file:///E:/AI/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-SasHqsyc.js:105591:18)
at async PluginEngine.executeImageWithPlugins (file:///E:/AI/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-SasHqsyc.js:153400:19)
at async AiProvider.modernGenerateImage (file:///E:/AI/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-SasHqsyc.js:353904:18)
at async AiProvider.generateImage (file:///E:/AI/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-SasHqsyc.js:353890:10)
at async fetchImageGeneration (file:///E:/AI/Cherry%20Studio/resources/app.asar/out/renderer/assets/store-SasHqsyc.js:354163:17)
错误原因: "[undefined]"
状态码: 400
请求路径: https://www.dmxapi.cn/v1/images/generations
请求体: {
"model": "doubao-seedream-4-5-251128",
"prompt": "1920x1920, highres, masterpiece, best quality, cinematic lighting, warm amber tones, traditional Liyue room, wooden floor, red lanterns, soft shadows.\n\nHu Tao, fully nude, lying on her back on the floor. Her red-brown twintails spread out, tips coated with thick white semen, glistening. She wears a red leather collar with white Chinese characters \"性奴隶\" (sex slave), a metal leash held taut by a man's hand off-frame. Beside her, neatly folded dark brown ritual clothes, a black hat (her signature), a Pyro Vision, and a Liyue ID card — all indicating her true identity.\n\nHer legs wide open, knees bent, soles together, exposing her naked groin. A man stands between her thighs (lower body only, dark pants down, erect penis). His penis is fully inserted into her vagina, deep inside. At the entrance, a mix of semen and clear fluids trickles down her perineum onto the floor, forming a small puddle.\n\nHer lower belly is slightly swollen from the cum inside, smooth and rounded. One of her hands rests on her belly, fingers gently pressing. The man grips her semen-stained twintail roots in both hands, pulling backward, arching her neck and exposing her throat.\n\nHer face is flushed deep red, eyes half-lidded and dazed, expression lost in pleasure and submission. Her mouth is slightly open, tongue barely touching lower lip; a thin string of saliva at the corner. Small breasts, nipples erect and pink. Her skin has a warm blush all over.\n\nWarm light from the right highlights her body curves, the wet shine on her hair and the fluid on the floor. Soft erotic mood, no gore, no distortion, no horrific details.\n\nnegative prompt: ugly, deformed, grotesque, horror, open wound, extreme close-up, low quality, worst quality, messy, body horror, prolapse, gory, blood, awful, mutilated, distorted face, bad anatomy, watermark, text, signature.",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json"
}
响应首部: {
"content-length": "307",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 21 Jul 2026 17:08:14 GMT",
"document-policy": "include-js-call-stacks-in-crash-reports",
"server": "nginx",
"strict-transport-security": "max-age=31536000",
"x-content-type-options": "nosniff",
"x-dmx-api-version": "v2.9.6",
"x-frame-options": "DENY",
"x-oneapi-request-id": "20260721170808959839807c14228f50nQvzZVr"
}
响应内容: {
"error": {
"message": "The parameter `size` specified in the request is not valid: image size must be at least 3686400 pixels. Request id: 021784653694188d7de4542f2cb4665397a3eedddf0de61142623 (request id: 2026072117080967820372396e93ae3d1l5Y46V)",
"type": "rix_api_error",
"param": "",
"code": "InvalidParameter"
}
}
数据: {
"error": {
"message": "The parameter `size` specified in the request is not valid: image size must be at least 3686400 pixels. Request id: 021784653694188d7de4542f2cb4665397a3eedddf0de61142623 (request id: 2026072117080967820372396e93ae3d1l5Y46V)",
"type": "rix_api_error",
"param": "",
"code": "InvalidParameter"
}
}
AI 解决方案
🔧 问题诊断报告
- 错误翻译
原文:The parameter `size` specified in the request is not valid: image size must be at least 3686400 pixels. Request id: 021784653694188d7de4542f2cb4665397a3eedddf0de61142623 (request id: 2026072117080967820372396e93ae3d1l5Y46V)
译文:请求中指定的参数`size`无效:图像大小必须至少为3686400像素。请求ID:021784653694188d7de4542f2cb4665397a3eedddf0de61142623(请求ID:2026072117080967820372396e93ae3d1l5Y46V)
- 原因分析
- 解决方案
- 根本原因:用户在请求中提供的图像尺寸参数
size不符合API的要求,即图像大小必须至少为3686400像素。- 具体位置和上下文:错误发生在文件
store-SasHqsyc.js的第52078行,这是一个与图像生成相关的API调用过程中抛出的错误。// 修复后的代码示例(假设这是客户端代码):
const { model, prompt, n, size, response_format } = requestBody; // 从请求体中获取参数
if (size < 3686400) {
console.error("图像大小必须至少为3686400像素,请修改请求参数中的size值。");
return { error: "Invalid size parameter"};
}
// 继续后续的图像生成逻辑...
请注意,这只是一个示例代码,实际修复应根据具体业务逻辑和API文档进行调整。
- 预防措施
- 最佳实践建议:在使用API时,务必仔细阅读API文档,了解每个参数的取值范围和要求。对于图像生成等涉及大量数据处理的场景,提前规划好图像尺寸、质量等参数,避免因参数设置不当导致请求失败。
- 开发工具或检查方法:可以使用代码审查工具或编写自动化测试来检查请求参数是否符合API要求。例如,使用Postman等API测试工具进行预发环境测试,确保所有参数都符合预期。
```markdown
温馨提示:在使用DMX API平台时,请务必遵循API文档中的规范和限制。如果遇到类似的问题,可以先检查请求参数是否满足API的要求,再根据实际情况调整代码或参数设置。同时,建议定期查看API文档的更新日志,以便及时了解平台的最新变化和要求。