Qwen Image Edit Spicy
Model ID alibaba/qwen-image-edit-spicy
概览
文本引导的图像编辑模型:支持添加、移除或修改元素,以及风格迁移和背景替换。
接口
POST /v1/images/generations/async
认证
Authorization: Bearer <AIAPIAIAPI_API_KEY>
请求体
| 参数 | 类型 | 必填 | 可空 | 默认值 | 约束 | 说明 |
|---|---|---|---|---|---|---|
model | string | 是 | 否 | - | values: alibaba/qwen-image-edit-spicy | 用于路由请求的模型 ID。 |
prompt | string | 是 | 否 | - | - | 描述需要对输入图像执行何种编辑的文本提示词。 |
image | string | 是 | 否 | - | accepts: HTTPS URL, Base64 data URL | 待编辑的输入图像,支持 HTTPS URL 或 Base64 编码的图像数据。 |
seed | integer | 否 | 是 | - | min: 0 | 随机种子;省略、设为 null 或设为 0 时随机生成,使用正整数时可复现结果。 |
model
类型:string · 必填:是 · 可空:否
用于路由请求的模型 ID。
prompt
类型:string · 必填:是 · 可空:否
描述需要对输入图像执行何种编辑的文本提示词。
image
类型:string · 必填:是 · 可空:否
待编辑的输入图像,支持 HTTPS URL 或 Base64 编码的图像数据。
seed
类型:integer · 必填:否 · 可空:是
随机种子;省略、设为 null 或设为 0 时随机生成,使用正整数时可复现结果。
请求示例
curl --request POST \
--url https://aiapiaiapi.com/v1/images/generations/async \
--header 'Authorization: Bearer $AIAPIAIAPI_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "alibaba/qwen-image-edit-spicy",
"prompt": "A cinematic camera movement through a forest",
"image": "https://example.com/reference.jpg"
}'JSON
{
"model": "alibaba/qwen-image-edit-spicy",
"prompt": "A cinematic camera movement through a forest",
"image": "https://example.com/reference.jpg"
}响应
{
"code": "success",
"message": "",
"data": { "task_id": "image_01K2ABC123" }
}任务状态
使用创建响应中的 task_id 查询:
GET /v1/images/generations/async/{task_id}
{
"code": "success",
"message": "",
"data": {
"task_id": "image_01K2ABC123",
"status": "SUCCESS",
"progress": "100%",
"outputs": ["https://cdn.example.com/images/image_01K2ABC123.png"],
"start_time": 1786960805,
"finish_time": 1786960900,
"submit_time": 1786960800,
"fail_reason": ""
}
}错误响应
参数校验错误返回 HTTP 400,并包含稳定的错误代码。
{
"code": "unsupported_parameter",
"message": "The parameter is not supported by this model.",
"data": null
}文档索引
获取完整文档索引:
https://aiapiaiapi.com/llms.txt
使用该文件发现所有可用的 API 文档。