用 Yuan Image 做文生图:OpenAI 兼容接口实操(附 Yuan API)

yuan_dev 25天前

最近把文生图接到 OpenAI 兼容中转,记录可复现步骤(对话和生图可共用 Key,换 Base URL)。

1. 准备

  • 文档:https://doc.apixhm.com
  • 对话 API:https://api.apixhm.com
  • 生图 API:https://image.apixhm.com

申请 Key 后,客户端选 OpenAI 兼容即可。

2. 文生图示例

curl https://image.apixhm.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"dall-e-3","prompt":"minimal product photo on white desk","size":"1024x1024"}'

3. 对话(同一套 Key)

Base URL 指到 https://api.apixhm.com ;模型名以文档为准。

4. 注意

密钥只放本地;超时/429 时降并发并核对额度。更多说明见 https://doc.apixhm.com 。

欢迎补充在本站主题/插件里嵌生图的经验。

该用户暂未填写签名

最新回复 (0)

你可以在 登录 或 注册 后,对此帖发表评论!

返回