sub2api转发生图Error: network error

Moling 2026-06-18 00:18 1

sub2api转发别的渠道的生图Error: network error

直接调用上游的生图接口是没问题的

查询官方的issue也没找到解决方案

最新回复 (1)
  • yuancjun 06-18 08:22
    1

    在你的 sub2api 部署的服务器上运行,看看具体的报错信息是什么,可能是通往上游的网络环境有问题


    替换 <你的上游生图域名> <你的上游生图密钥> 为实际信息


    curl -v '<你的上游生图域名>/v1/images/generations' \
    -H 'Authorization: Bearer <你的上游生图密钥>' \
    -H 'Content-Type: application/json' \
    -H 'User-Agent: Go-http-client/1.1' \
    -d '{
    "model": "gpt-image-2",
    "n": 1,
    "prompt": "Generate a cute orange cat astronaut sticker on a clean pastel background.",
    "response_format": "b64_json"
    }'
* 帖子来源Linux.do
返回