开发文档
图像 API
图像专用路径。无需对话上下文、仅做生成与编辑时,这条路径更简单。
生成
向 POST /images/generations 传入 prompt 与 size,用 n 指定生成数量。
| Endpoint | Field | Note |
|---|---|---|
| /images/generations | prompt | Required |
| /images/generations | size | Model dependent |
| /images/generations | n | 1–4 |
| /images/edits | image | Source file |
| /images/edits | mask | Transparent area is repainted |
编辑
向 POST /images/edits 同时上传原图与 mask,仅重绘 mask 的透明区域。
参考图像
使用 reference_images 保持风格或人物一致性。仅支持该功能的模型会进入候选。