Alibaba

Qwen 2.1 edit image

圖像
即將推出 此模型尚未在 RunAPI 推出,API 呼叫將於發佈時開放。

Qwen 2.1 圖片編輯,最多十張來源圖片,支援遮罩局部編輯

模型健康狀態 數據不足
curl -X POST https://runapi.ai/api/v1/qwen_2_1/edit_image \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen-2.1-edit-image",
  "source_image_urls": [
    "https://cdn.runapi.ai/public/samples/image.jpg"
  ],
  "prompt": "生成一張 4K 產品主圖,主體為啞黑色水樽,擺放在米色石面上,柔和側光。"
}'
https://runapi.ai 1 endpoint

2 個版本可用

規格

技術詳情

提供者 Alibaba
模型 ID qwen-2.1-edit-image
模態 圖像
任務類型 Asynchronous
API 端點 /api/v1/qwen_2_1/edit_image
計費單位 次請求
輸入參數 aspect_ratio, background, callback_url, enable_prompt_expansion, mask_url, model, output_format, output_resolution, prompt, seed, source_image_urls
最大解像度 1k, 2k
長寬比 auto, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21
輸出格式 png, webp, jpeg
目錄狀態 即將推出
使用方法

3 個步驟使用此模型

  1. 取得 API 金鑰

    免費註冊後,在控制台建立 qwen-2.1-edit-image 的 API 金鑰。

  2. 發送請求

    向 /api/v1/qwen_2_1/edit_image 發送 POST 請求,並傳入 qwen-2.1-edit-image 模型 ID 和參數。

  3. 取得結果

    輪詢工作或按照回呼取得已完成的 qwen-2.1-edit-image 結果。

此模型提供的功能

輸出解析度

根據已發布的 endpoint schema,支援 1k, 2k。

靈活的參數

可設定 9 個已記錄的參數,包括 aspect_ratio, background, enable_prompt_expansion, mask_url, output_format。

Endpoint 涵蓋範圍

開放 1 個公開 endpoint:edit_image。

Webhook 推送

非同步任務接受回調 URL,用於接收完成通知。

API 參考

端點規格

端點
POST /api/v1/qwen_2_1/edit_image
模型 ID
qwen-2.1-edit-image
工作類型
edit_image
最長時長
暫無資料
解析度
1k, 2k
長寬比
auto, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21
輸出格式
PNG, WEBP, JPEG
平均生成時間
暫無資料

請求參數

seed

選填 integer

Integer seed for reproducible results; omit for a random seed.

prompt

必填 string

Image editing prompt. With mask_url, describes what to generate inside the white area of the mask.

mask_url

選填 string

Public mask image URL for local editing: white marks the area to change, black is kept. Requires exactly one source image and cannot be combined with a transparent background; aspect_ratio and enable_prompt_expansion are ignored.

background

選填 string

Background type. A transparent background requires output_format png or webp and cannot be combined with mask_url; describe only the subject in the prompt. (opaque, transparent)

aspect_ratio

選填 string

Output aspect ratio. auto follows the first source image. Ignored when mask_url is set. (auto, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21)

callback_url

選填 string

Webhook URL for asynchronous task updates.

output_format

選填 string

Output image format. jpeg cannot be combined with a transparent background. (png, webp, jpeg)

output_resolution

選填 string

Output image resolution. (1k, 2k)

source_image_urls

必填 array

Public source image URLs; one to ten images, in the order the prompt refers to them.

enable_prompt_expansion

選填 boolean

Whether RunAPI expands the prompt before generation. Ignored when mask_url is set.

使用場景

產品攝影

自動生成適合電商 catalog、但冇 studio 攝影的 lifestyle 產品相。

遊戲及概念美術

在落實最終美術之前,快速構思場景同角色。

編輯插畫

大規模生成獨特封面圖同插畫,適合 blog post 同文章。

FAQ

關於 Qwen 2.1 edit image 的常見問題

點樣選擇 qwen-2.1-edit-image?

傳入 quickstart 顯示嘅 model ID。

這個 variant 的 rate limit 係多少?

每個 key 的 rate limit 會按使用層級而定。請查看定價頁了解最新限制。

之後可以切換 variant 嗎?

可以——variant 只係一個旗標。只要更改 model 參數就可以切換。

支援 streaming 嗎?

在可用 streaming 的情況下,RunAPI 會端到端串流。

我應該在邊度回報品質問題?

可以在公開 GitHub repo 開 issue,或者電郵支援團隊。

需要獨立的供應商帳戶嗎?

不需要。你的 RunAPI API key 足以存取此 variant 及目錄中的所有其他模型,無需底層供應商帳戶。

正在與團隊一起建立?

我們可以協助企業設定、整合和技術問題。

聯絡我們