Alibaba tarafından
Alibaba Wan 2.7 Image Pro text-to-image and image editing, billed per generated image at one price whatever the size. Up to 4 images per request (`n`, default 1). `size` is `<width>x<height>` with an aspect ratio of at most 8:1, up to 4096x4096 in area for text-to-image and 2048x2048 with reference images. Up to 9 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.075
görsel başına
curl "https://router-api.0g.ai/v1/images/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
"model": "wan2.7-image-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.| Alan | Değerler | Varsayılan | Açıklama |
|---|---|---|---|
| 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. |
Sağlayıcı Yönlendirme
X-0G-Provider-* istek başlıklarını kullanarak isteğinizi hangi sağlayıcının işleyeceğini belirleyin.
X-0G-Provider-Address bir sağlayıcıyı sabitler; X-0G-Provider-Identity, sağlayıcının üst akışlarından hangisine yönlendirme yapılacağını sabitler. Her iki değer de GET /v1/providers uç noktasındaki address ve provider_identity alanlarından gelir. Birlikte, bir sağlayıcının belirli bir üst akışını adreslerler. İkisi de gönderilmezse yönlendirme katmanı, tıpkı önceki gibi fiyata ve sağlık durumuna göre seçer.
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": "wan2.7-image-pro",
"prompt": "A futuristic city skyline at sunset"
}'