alibaba/qwen-image-2.1-turbo/text-to-image3 點數起 /張· 生成圖片

8 步快速出圖,一次最多六張。

在 POST /jobs/createTask 把模型名稱填成 alibaba/qwen-image-2.1-turbo/text-to-image 就能呼叫,3 點數/張起(US$0.03)。新帳戶送 30 點數,可以先在 Playground 免費試用。

  • 生成圖片
  • 編輯圖片
  • 最高 2K
  • 最多 10 張參考圖
  • 15 種畫面比例
  • 一次最多 6 張

這份指南目前只有英文版。 →

請求參數

參數必填說明
seed否用同一個數字,結果就能重現。 ≥ 0 · ≤ 2147483647
prompt是Describe the subject, composition, lighting, and any wording to render. There is no negative prompt: write what to leave out directly in the prompt.
resolution否輸出尺寸。越大越清晰,價格也越高。 1k · 1.5k · 2k · 預設值: 2k
num_outputs否一次生成幾張。 ≥ 1 · ≤ 6 · 預設值: 1
aspect_ratio否畫面形狀:橫式、方形或直式。 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 21:9 · 9:21 · 2:1 · 1:2 · 3:1 · 1:3 · 5:4 · 4:5 · 預設值: 1:1
enable_thinking否Spend extra reasoning on the rewrite for better images, at the cost of a longer wait. Only works while prompt expansion is on. 預設值: true
enable_prompt_expansion否讓模型替簡短的提示詞補上細節。 預設值: false
prompt_optimization_mode否How prompt expansion rewrites the brief: direct is a single pass that suits most prompts; agent is a multi-step rewrite with finer detail. direct · agent · 預設值: direct

價格

價格以點數計,和網站上用的是同一種點數(1 點 = $0.01)。任務受理時先凍結點數,完成後依實際費用結算;失敗的任務會退還。

選項點數 /張≈ 美元
標準2.16US$0.022

每個任務會無條件進位到整數點數,所以最低檔跑一次是 3 點數/張(US$0.03)。

想在執行前知道確切金額,把相同的請求內容送到 POST /jobs/quote 即可。

API 快速上手

三步驟呼叫 Qwen Image 2.1 Turbo API

  1. 建立 API 金鑰. 登入 PopNow,在 API 主控台建立金鑰。金鑰以 sk-popnow- 開頭,和網站共用同一份點數。
  2. 送出請求. 對 POST /jobs/createTask 送出請求,model 填 alibaba/qwen-image-2.1-turbo/text-to-image,input 依照參數表填寫。回應會立即傳回任務 ID。
  3. 取得結果. 用任務 ID 輪詢 GET /jobs/recordInfo,或帶上 callBackUrl,結果會推送到該網址。任務成功後下載輸出連結。
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "alibaba/qwen-image-2.1-turbo/text-to-image",
  "input": {
    "prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
    "aspect_ratio": "1:1",
    "resolution": "2k",
    "num_outputs": 1
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

請把提示詞和連結換成你自己的。API 頁籤裡有回應、輪詢和回呼的參考。

Qwen Image 2.1 Turbo API 常見問題

Qwen Image 2.1 Turbo API 怎麼收費?

Qwen Image 2.1 Turbo:最便宜的任務是生成圖片,3 點數(US$0.03)/張起。點數和網站通用(1 點數 = $0.01),新帳號贈送 30 點數,失敗的任務會退還。

Qwen Image 2.1 Turbo 在 API 裡的模型名稱是什麼?

在 POST /jobs/createTask 的 model 欄位填 生成圖片用 alibaba/qwen-image-2.1-turbo/text-to-image;編輯圖片用 alibaba/qwen-image-2.1-turbo/edit。

Qwen Image 2.1 Turbo API 有哪些限制?

解析度:1K · 1.5K · 2K;畫面比例:1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 +9;每次輸出數量:1–6;提示詞長度(字元):5,000。超出這些限制的請求會在扣款之前被拒絕。

不寫程式能試 Qwen Image 2.1 Turbo 嗎?

可以。Playground 用你的 PopNow 點數執行 Qwen Image 2.1 Turbo,不需要 API 金鑰,每次執行都會附上對應的程式碼。

所有 Qwen Image 模型

更多 Qwen Image 2.1 Turbo 相關內容