seedinteger
Random seed for reproducibility (0-2147483647).
alibaba/qwen-image-3/text-to-imageQwen Image 3 by Alibaba - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.
試用這個模型
人工偏好
由盲測並排投票得出的 Elo 評分,與其他圖片與影片模型相比。
文字轉圖片 arena:使用者在不看模型名稱的情況下,從同一提示生成的兩張圖片中選出較佳者。
Qwen Image 3 (Pro) generates photorealistic images and dense layouts such as posters, infographics, and slides, with accurate Chinese and English text rendering. Up to 6 images per request at 1K or 2K.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 5,000 characters. |
output_format | jpeg / png | png | Output file format. |
seed | integer | random | Fix it to compare prompt changes. |
num_images | integer 1–6 | 1 | Images to generate (1–6); each is billed. |
resolution | 1K / 2K | 1K | Sets the per-image rate. |
$0.04 per image at 1K and $0.075 at 2K, Alibaba's list price for Qwen Image 3.0 Pro.
| Images | 1K | 2K |
|---|---|---|
| 1 | $0.04 | $0.075 |
| 2 | $0.08 | $0.15 |
| 4 | $0.16 | $0.30 |
| 6 | $0.24 | $0.45 |
Failed runs are not charged.
Related: alibaba/qwen-image-3/edit (edit with Qwen Image 3), alibaba/qwen-image-2.
開始建置
透過 SandBase Unified Run API 提交此模型。
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "alibaba/qwen-image-3/text-to-image",
"prompt": "A cute baby koala holding a card that says \"Qwen Image 3 is now available on fal\" while on a water slide",
"num_images": 1,
"resolution": "1K",
"output_format": "png"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"建立 SandBase API 金鑰,並將其設定在伺服器環境中。所有請求都使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開,也不要提交到儲存庫。
使用此模型 ID 及其輸入,向 /v1/run 發送 POST。上方的請求範例包含提交與輪詢。
使用回傳的執行 ID 持續輪詢,直到狀態為 completed、failed 或 timeout。只有在 completed 之後才讀取輸出。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"在模型的 image、video 或 audio 欄位中傳入可公開存取的檔案 URL。支援格式與限制會顯示在每個 Playground 輸入欄位旁。
在 Playground 中支援的圖片欄位上使用上傳或取代控制項。影片 URL 欄位可接受託管的 driving video;它們不代表支援影片上傳。
seedintegerRandom seed for reproducibility (0-2147483647).
promptstring必填Text prompt describing the desired image. Supports Chinese and English. Max 5000 characters.
num_imagesinteger預設:1
最小值:1
最大值:6
resolutionstringOutput resolution tier used by fal billing.
預設:"1K"
可能值:"1K", "2K"
output_formatstringThe format of the generated image.
預設:"png"
可能值:"jpeg", "png"
{
"model": "alibaba/qwen-image-3/text-to-image",
"prompt": "A cute baby koala holding a card that says \"Qwen Image 3 is now available on fal\" while on a water slide",
"num_images": 1,
"resolution": "1K",
"output_format": "png"
}已完成的執行會在輸出中顯示結果。以下為模型已儲存的範例,並非新的生成結果。
[
{
"source": "Alibaba Model Studio schema mirror",
"source_url": "https://www.alibabacloud.com/help/en/model-studio/",
"url": "https://static.sandbase.ai/examples/6ae3c326-6c22-4cb5-9093-753b27bd5fe1/output/d5763339-81b8-4f20-9651-3faa3df34f52.png"
}
]