y
用 OpenAI SDK / 兼容客户端把 base_url 指到 Yuan,一套 Key 就能对话+生图。
## 准备
- 对话:https://api.apixhm.com
- 生图:https://image.apixhm.com
- 文档:https://doc.apixhm.com
## 对话示例
curl https://api.apixhm.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"用三句话介绍兼容接口"}]}'
## 生图示例
curl https://image.apixhm.com/v1/images/generations \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"dall-e-3","prompt":"clean AI studio desk","size":"1024x1024"}'
细节见 https://doc.apixhm.com 。欢迎回帖交流。
## 准备
- 对话:https://api.apixhm.com
- 生图:https://image.apixhm.com
- 文档:https://doc.apixhm.com
## 对话示例
curl https://api.apixhm.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"用三句话介绍兼容接口"}]}'
## 生图示例
curl https://image.apixhm.com/v1/images/generations \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"dall-e-3","prompt":"clean AI studio desk","size":"1024x1024"}'
细节见 https://doc.apixhm.com 。欢迎回帖交流。