Wan-Image

Copy success!
Add to Compare

Overview

Wan2.7–image-pro,supports text to image, text/image to sequential images, image editing, multi-image reference generation, and interactive editing. Delivers enhanced performance in text rendering, subject consistency, and complex instruction following.

Input

ImageText

Output

Image

Features

Prefix Completion

Enable Partial Mode when calling the Qwen API to make the model continue strictly from your provided prefix text.View docs

Function Calling

Use function calling to connect large language models with external tools and systems.View docs

Cache

Context Cache stores shared prefixes for long-context requests to reduce repeated computation, improve latency, and lower cost.View docs

Structured Outputs

Structured Outputs help ensure the model returns a JSON string in the expected format.View docs

Batches

Asynchronously process requests in batches to reduce costs.View docs

Web Search

Enable web search so the model can answer with real-time retrieved data.View docs

Fine-tuning

Train models on sample data to better adapt them to specific tasks.View docs

Pricing

  • Image Generation
    $0.075Per image

Rate Limits

  • Concurrency
    5concurrent
  • Async Queue Limit
    500tasks
  • RPMRequests Per Minute
    300

API Reference

Call API
Copy success!
1234567891011121314151617181920212223242526272829
import os
import dashscope
from dashscope.aigc.image_generation import ImageGeneration
from dashscope.api_entities.dashscope_response import Message

dashscope.base_http_api_url = 'https://dashscope-intl.aliyuncs.com/api/v1'

api_key = os.getenv("DASHSCOPE_API_KEY")

message = Message(
    role="user",
    content=[
        {
            "text": "A cinematic photo series documenting the same stray ginger cat, ensuring its physical characteristics remain consistent across all images. Image 1: Spring—the ginger cat weaves beneath blooming cherry blossom trees. Image 2: Summer—the cat seeks respite from the heat in the shade of trees along an old street. Image 3: Autumn—the cat walks across a ground carpeted with golden fallen leaves. Image 4: Winter—the cat traverses the snow, leaving a trail of paw prints behind."
        }
    ]
)

print("----sync call, please wait a moment----")
rsp = ImageGeneration.call(
        model='wan2.7-image-pro',
        api_key=api_key,
        messages=[message],
        enable_sequential=True,
        n=4,
        size="2K"
    )

print(rsp)