imagesarrayआवश्यक
List of input image URLs for editing. Up to 4 images.
alibaba/wan/2.7/pro/image-to-imageAlibaba Wan 2.7 Pro image-to-image model that edits images from a natural-language instruction, with multi-reference support and selectable aspect ratio.
model को आज़माएँ
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"images": [
"https://static.sandbase.ai/examples/b6b5c008-4e2b-443b-a9ce-2fcf162ecdb1/input/53727e1f-7615-415c-b23b-2afcd51b167a.webp"
],
"prompt": "Edit based on image 1. Replace the raspberry selected in box 1 with a lemon, the raspberry in box 2 with a strawberry, and the raspberry in box 3 with a blueberry. The result should be harmoniously integrated with the original image, without the reference boxes and numbers, and keep the rest of the content unchanged."
}{
"images": [
"https://static.sandbase.ai/examples/4edfb8e5-a83b-47fc-9ff3-2764e41487c8/input/3f453edf-2a53-4ec4-8c0a-f3109581ae39.webp"
],
"prompt": "Please generate a set of four Polaroid photos with the theme \"Seasonal Changes\". Each photo is taken at the same location, under a tree in a park, but shows the scenes of spring, summer, autumn, and winter respectively. The person's attire should also match the season: a light jacket in spring, a short-sleeved shirt in summer, a trench coat in autumn, and a scarf and thick coat in winter. Place this set of photos on a dining table."
}{
"images": [
"https://static.sandbase.ai/examples/b6784267-a660-4ca5-8f02-8e1632103a5b/input/8bf3bbc9-8c95-4aa8-9df3-e23e52acb9c4.webp"
],
"prompt": "Extract the clothing items from the uploaded photo and arrange them in a flat-lay display on a pure white background. Maintain realistic details and material textures. Fashion e-commerce style, suitable for clothing display."
}{
"images": [
"https://static.sandbase.ai/examples/6ea41cfa-7caf-4f99-82eb-b9b3f69165b2/input/5e329c11-64d7-4bcf-88ad-6bc085bb7c04.webp"
],
"prompt": "Casually write \"Time for Holiday?\" on the sand with a hand."
}{
"images": [
"https://static.sandbase.ai/examples/03f79ad0-5c89-4ced-bb0c-bc6f3168fe2c/input/da26bcee-7731-4aa4-9dfe-0b287e5bd0b2.webp"
],
"prompt": "Keep the person's features unchanged and generate front, side, and back views."
}{
"images": [
"https://static.sandbase.ai/examples/8a27df1b-431e-4b6b-b786-ca30b5b414f8/input/0546190f-782a-462e-8bc4-d7ac703002d3.webp"
],
"prompt": "Reshoot this photo with a fisheye lens."
}मानवीय पसंद
ब्लाइंड साइड-बाय-साइड वोटों से प्राप्त Elo रेटिंग, अन्य इमेज और वीडियो मॉडलों से तुलना में।
रैंकिंग का स्रोत Artificial Analysis Arena
इमेज-एडिटिंग Arena: लोग एक ही छवि और निर्देश के दो संपादनों में से बेहतर चुनते हैं, मॉडल नाम देखे बिना।
The Pro tier of Wan 2.7 image editing: the same instruction-based edits as the standard tier, rendered with more detail and better preservation of faces, text, and fine texture.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 10,000 characters. |
images | image URL[], required | — | Images to edit or combine, referred to as Image 1, Image 2, … |
aspect_ratio | 21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16 / 9:21 | — | Omit to follow the first input image. |
$0.075 per output image, Alibaba's list price. Input images are not metered.
| Request | Price |
|---|---|
| One image | $0.075 |
Failed runs are not charged.
Other Wan 2.7 image endpoints: alibaba/wan/2.7/text-to-image, alibaba/wan/2.7/image-to-image, alibaba/wan/2.7/pro/text-to-image.
बिल्डिंग शुरू करें
इस model को 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/wan/2.7/pro/image-to-image",
"images": [
"https://static.sandbase.ai/samples/image-editing/edit-time-of-day-source.png"
],
"prompt": "Change the time to dramatic sunset with orange and purple sky, long shadows, warm golden light on the lighthouse"
}
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 key बनाएँ और इसे अपने server environment में सेट करें। सभी requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"Key को सर्वर पर रखें। इसे browser code में expose न करें या repository में commit न करें।
इस model ID और इसके inputs के साथ /v1/run पर POST करें। ऊपर दिया गया request example submission और polling दोनों शामिल करता है।
Completed, failed या timeout होने तक poll करने के लिए लौटाए गए run ID का उपयोग करें। Output केवल completed होने के बाद पढ़ें।
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Model के image, video या audio field में सार्वजनिक रूप से उपलब्ध फ़ाइल URL पास करें। समर्थित formats और limits प्रत्येक Playground input के पास दिखाए गए हैं।
Playground में समर्थित image fields पर upload या replace control का उपयोग करें। Video URL fields hosted driving video स्वीकार करते हैं; इससे video-upload support का संकेत नहीं मिलता।
imagesarrayआवश्यकList of input image URLs for editing. Up to 4 images.
promptstringआवश्यकThe editing instruction describing what changes to make.
डिफ़ॉल्ट: "Change the time to dramatic sunset with orange and purple sky, long shadows, warm golden light on the lighthouse"
aspect_ratiostringThe aspect ratio of the generated image.
संभावित मान: "21:9", "16:9", "4:3", "1:1", "3:4", "9:16", "9:21"
{
"model": "alibaba/wan/2.7/pro/image-to-image",
"images": [
"https://static.sandbase.ai/samples/image-editing/edit-time-of-day-source.png"
],
"prompt": "Change the time to dramatic sunset with orange and purple sky, long shadows, warm golden light on the lighthouse"
}पूरा हुआ run अपना परिणाम output में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"source": "Alibaba Cloud",
"source_url": "https://www.alibabacloud.com/help/en/model-studio/wan-image-edit",
"url": "https://static.sandbase.ai/examples/b6b5c008-4e2b-443b-a9ce-2fcf162ecdb1/output/46e6059b-1776-4312-a1a6-cd3fe7be1782.webp"
}
]