由 Alibaba 提供
Alibaba Qwen Image 3.0 Pro text-to-image and image editing, billed per generated image at the price of its size tier — 1K (up to 2,250,000 pixels) or 2K (above) — plus a price per reference image. Up to 6 images per request (`n`, default 1). `size` is `<width>x<height>`, 262,144 to 4,194,304 pixels in total with an aspect ratio of at most 8:1 (e.g. 1328x1328 at 1K, 2048x2048 at 2K). Up to 3 reference images in `image` or `images` (a string or an array of HTTP or `data:image/...` URLs). Optional: `negative_prompt`, `seed`, `prompt_extend` (let the model rewrite the prompt), `watermark`. Images come back as URLs only (download them: they expire).
$0.048
每張圖片
curl "https://router-api.0g.ai/v1/images/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "qwen-image-3.0-pro",
"prompt": "A futuristic city skyline at sunset",
"n": 1,
"response_format": "b64_json"
}'
# Response: {"data": [{"b64_json": "..."}], "x_0g_trace": {...}}
# Generation takes seconds to about a minute; the request stays open until the images are ready.| 欄位 | 值 | 預設 | 說明 |
|---|---|---|---|
| seed | 0–2147483647 | — | Fixes the random seed; reuse it to make a result easier to reproduce. |
| prompt_extend | true · false | — | Let the model rewrite the prompt. |
| watermark | true · false | — | Adds an AI-generated mark. |
供應商路由
使用 X-0G-Provider-* 請求標頭,控制哪個供應商處理您的請求。
X-0G-Provider-Address 固定供應商;X-0G-Provider-Identity 固定要透過該供應商的哪個上游進行路由。這兩個值都來自 GET /v1/providers 回應中的 address 與 provider_identity 欄位。兩者搭配即可指定某個供應商的特定上游。若兩者都不傳送,路由會依價格與健康狀況挑選,和先前完全相同。
curl "https://router-api.0g.ai/v1/images/generations" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-H "X-0G-Provider-Address: <PROVIDER_ADDRESS>" \
-H "X-0G-Provider-Identity: <UPSTREAM>" \
-H "X-0G-Provider-Sort: latency" \
-H "X-0G-Provider-Allow-Fallbacks: true" \
-d '{
"model": "qwen-image-3.0-pro",
"prompt": "A futuristic city skyline at sunset"
}'