AI 服务/图像生成
异步编辑图像
接口说明:异步编辑图像,立即返回 logId,通过查询任务状态接口轮询结果。
调用本接口前,请先请求「图像编辑模型」接口(GET /api/ai/models/image/edit),获取当前可用的模型列表及各模型支持的尺寸、最大输入图片数与价格,再据此填写本接口参数。
图像编辑为图生图:必须传入参考图片 image,按提示词在其基础上修改、重绘。如需仅用文字生成全新图像(文生图),请使用「异步生成图像」接口。
post/api/ai/image/edit/async
Request
- Base URLhttps://aitoearn.cn
- AuthAPI key in header X-Api-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"model": "gpt-image-2",
"prompt": "Edit the provided image into a cozy realistic scene by placing the cute orange cat beside a sunlit window. Preserve its orange fur, seated pose, and facial expression, enhance the soft natural light, add warm tones and subtle detail, and maintain a realistic photography style.",
"n": 1,
"size": "1024x1024",
"response_format": "url"
}Response
请求已被服务处理。业务是否成功以响应体 code === 0 为准。
Changes
No recorded changes to this operation across all 2 revisions of this API.