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"
}
]