编辑图像(qwen-image-edit)
post/v1/images/edits
百炼qwen-image系列图片生成
鉴权
把 OLETOKEN 的 API Key 作为 Bearer Token 放进 Authorization 请求头。密钥在控制台的「API 密钥」页创建。
Authorization: Bearer $OLETOKEN_API_KEY请求体
Content-Type:application/json
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| model | string | — | |
| input | object | — | |
| messages | object[] | — | |
| role | string | — | — |
| content | object[] | — | — |
| image | string | — | — |
| text | string | — | — |
| parameters | object | — | — |
| n | integer | — | — |
| negative_prompt | string | — | — |
| prompt_extend | boolean | — | — |
| watermark | boolean | — | — |
| size | string | — | — |
响应
200成功生成图像
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| created | integer | — | — |
| data | object[] | — | — |
| url | string | — | — |
| b64_json | string | — | — |
| revised_prompt | string | — | — |
请求示例
curl -X POST 'https://api.oletoken.ai/v1/images/edits' \
-H "Authorization: Bearer $OLETOKEN_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "string",
"input": {}
}'
