yuan_dev 发表于 2026-11-9 13:15:00

用 Claude(Yuan API / OpenAI 兼容)写 SD 提示词 + Yuan Image 出图

本地 SD / ComfyUI 之外,我现在用 Claude(通过 Yuan API 的 OpenAI 兼容接口)先润色提示词,再用 Yuan Image 出图,适合快速试构图。


准备:
- 对话 / 提示词润色:https://api.apixhm.com
- 文生图:https://image.apixhm.com
- 文档与模型列表:https://doc.apixhm.com

步骤:
1. 在 https://api.apixhm.com 创建对话 Key,Base URL 填 https://api.apixhm.com/v1,模型选控制台里的 Claude 兼容名
2. 让 Claude 把你的中文想法扩成英文 SD 提示词(主体、风格、光线、负向提示)
3. 把提示词拿到 https://image.apixhm.com 按文档字段出图;模型 ID 以 https://doc.apixhm.com 为准

短示例(把 YOUR_KEY 换成自己的,不要公开真实 Key):

curl https://api.apixhm.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"claude-3-5-sonnet","messages":[{"role":"user","content":"把这句话扩成英文 SD 提示词:一只橘猫坐在窗台上看雨,电影感光线"}]}'

curl https://image.apixhm.com/v1/images/generations \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"a ginger cat sitting on a windowsill watching the rain, cinematic lighting","size":"1024x1024"}'

细节见 https://doc.apixhm.com 。利益披露:作者使用并推广 Yuan API / Yuan Image。欢迎补充你们用大模型写提示词再出图的经验。
页: [1]
查看完整版本: 用 Claude(Yuan API / OpenAI 兼容)写 SD 提示词 + Yuan Image 出图