prompt-optimizer icon indicating copy to clipboard operation
prompt-optimizer copied to clipboard

Doubao Seedream 4.0 接入api后报错‘’接测试错误: Failed to fetch‘’

Open wuaojun opened this issue 1 month ago • 11 comments

Doubao Seedream 4.0 接入api后报错‘’接测试错误: Failed to fetch‘’

wuaojun avatar Oct 23 '25 05:10 wuaojun

需要下载桌面版,豆包的模型有跨域限制

linshenkx avatar Oct 23 '25 05:10 linshenkx

原来如此,谢谢发自我的 iPhone在 2025年10月23日,13:38,且炼时光 @.***> 写道:linshenkx left a comment (linshenkx/prompt-optimizer#192) 需要下载桌面版,豆包的模型有跨域限制

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

wuaojun avatar Oct 23 '25 06:10 wuaojun

下载后还是同样的问题发自我的 iPhone在 2025年10月23日,14:01,wuaojun @.> 写道:原来如此,谢谢发自我的 iPhone在 2025年10月23日,13:38,且炼时光 @.> 写道:linshenkx left a comment (linshenkx/prompt-optimizer#192) 需要下载桌面版,豆包的模型有跨域限制

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

wuaojun avatar Oct 23 '25 06:10 wuaojun

一般应该是可以的,可以参考官方api文档 https://www.volcengine.com/docs/82379/1541523 ,使用curl测试一下apikey是否可用:

curl -X POST https://ark.cn-beijing.volces.com/api/v3/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ARK_API_KEY" \
  -d '{
    "model": "doubao-seedream-4-0-250828",
    "prompt": "星际穿越,黑洞,黑洞里冲出一辆快支离破碎的复古列车,抢视觉冲击力,电影大片,末日既视感,动感,对比色,oc渲染,光线追踪,动态模糊,景深,超现实主义,深蓝,画面通过细腻的丰富的色彩层次塑造主体与场景,质感真实,暗黑风背景的光影效果营造出氛围,整体兼具艺术幻想感,夸张的广角透视效果,耀光,反射,极致的光影,强引力,吞噬",
    "size": "2K",
    "sequential_image_generation": "disabled",
    "stream": false,
    "response_format": "url",
    "watermark": true
}'
Image

linshenkx avatar Oct 23 '25 06:10 linshenkx

测试了能用在 2025年10月23日,14:23,且炼时光 @.***> 写道:linshenkx left a comment (linshenkx/prompt-optimizer#192) 一般应该是可以的,可以参考官方api文档 https://www.volcengine.com/docs/82379/1541523 ,使用curl测试一下apikey是否可用: curl -X POST https://ark.cn-beijing.volces.com/api/v3/images/generations
-H "Content-Type: application/json"
-H "Authorization: Bearer $ARK_API_KEY"
-d '{ "model": "doubao-seedream-4-0-250828", "prompt": "星际穿越,黑洞,黑洞里冲出一辆快支离破碎的复古列车,抢视觉冲击力,电影大片,末日既视感,动感,对比色,oc渲染,光线追踪,动态模糊,景深,超现实主义,深蓝,画面通过细腻的丰富的色彩层次塑造主体与场景,质感真实,暗黑风背景的光影效果营造出氛围,整体兼具艺术幻想感,夸张的广角透视效果,耀光,反射,极致的光影,强引力,吞噬", "size": "2K", "sequential_image_generation": "disabled", "stream": false, "response_format": "url", "watermark": true }' 1761200381647.png (view on web)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

wuaojun avatar Oct 23 '25 06:10 wuaojun

Image Image 还是不行

wuaojun avatar Oct 23 '25 07:10 wuaojun

api地址是https://ark.cn-beijing.volces.com/api/v3 ,没有后面的 images/generations

linshenkx avatar Oct 24 '25 01:10 linshenkx

我也遇到了同样的问题

Image 在火山里面测试是可以的,用postman在本地测试也是可以的,但是在本项目上不可以,项目是用docker部署的,使用的28081接口 Image

sjhm131 avatar Oct 28 '25 12:10 sjhm131

我使用这个软件的exe安装到本地可以使用豆包seedream4.0,但是很遗憾,我又碰到了另一个问题,我无法使用gemini了,你也可以尝试一下下载exe安装到本地。发自我的 iPhone在 2025年10月28日,20:10,sjhm131 @.***> 写道:sjhm131 left a comment (linshenkx/prompt-optimizer#192) 我也遇到了同样的问题 image.png (view on web) 在火山里面测试是可以的,用postman在本地测试也是可以的,但是在本项目上不可以,项目是用docker部署的,使用的28081接口 image.png (view on web)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

wuaojun avatar Oct 29 '25 02:10 wuaojun

@wuaojun 如果非要用docker部署的话,那么只能走oneapi这样的中转一下才可以是么?如果在docker创建容器的时候定义好环境变量可以解决这个问题么?

sjhm131 avatar Oct 29 '25 03:10 sjhm131

@wuaojun 如果非要用docker部署的话,那么只能走oneapi这样的中转一下才可以是么?如果在docker创建容器的时候定义好环境变量可以解决这个问题么?

不行,docker也是从浏览器端发起的请求,还是会被跨域限制。之前本来实现了docker代理避免跨域问题,但不安全,容易被攻击,所以就移除这部分功能支持了。

linshenkx avatar Oct 29 '25 03:10 linshenkx