跳到正文
alpharouter

开发文档

图像 API

图像专用路径。无需对话上下文、仅做生成与编辑时,这条路径更简单。

生成

向 POST /images/generations 传入 prompt 与 size,用 n 指定生成数量。

EndpointFieldNote
/images/generationspromptRequired
/images/generationssizeModel dependent
/images/generationsn1–4
/images/editsimageSource file
/images/editsmaskTransparent area is repainted

编辑

向 POST /images/edits 同时上传原图与 mask,仅重绘 mask 的透明区域。

参考图像

使用 reference_images 保持风格或人物一致性。仅支持该功能的模型会进入候选。