編輯影像(qwen-image-edit)
post/v1/images/edits
使用 Bailian(百煉)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": {}
}'
