wan/wan2.5-i2i-preview, served by Comfy Router from Wan.
Quick start
Create a key at platform.comfy.org/profile/api-keys and export it asCOMFY_API_KEY. The Python and TypeScript snippets use the Comfy SDKs (pip install comfy-sdk, npm install @comfyorg/sdk); the cURL snippet is the same call over raw HTTP.
Model ID: wan/wan2.5-i2i-preview
Endpoint: POST https://api.comfy.org/v2/models/wan/wan2.5-i2i-preview
Schema
Input
object
required
Enter basic information, such as prompt words, images, etc.
string[]
required
Array of image URLs for image-to-image generation
string
Reverse prompt words to describe content that you do not want to see in the image
string
required
Positive prompt words to describe expected image elements and visual features. Support Chinese and English, length not exceeding 2000 characters
string
The ID of the model to call for image-to-image generation. NOT constrained on this component: Comfy Router fills it from the
{model} path segment of POST /v2/models/wan/{model}. A direct v1 call to POST /proxy/wan/api/v1/services/aigc/image2image/image-synthesis MUST supply it, and the enum of accepted spellings lives on that operation’s own component, WanImage2ImageGenerationRequest.object
Image processing parameters
integer
default:"1"
Number of generated images. Range 1-4, default is 1Range:
1 to 4integer
Random number seed to control randomness. Range [0, 2147483647]Range:
0 to 2147483647string
default:"\"1280*1280\""
The output image resolution in the format widthheight. Default is 12801280. The API accepts a pixel area between 589824 (768768) and 1638400 (12801280) with an aspect ratio between 1:4 and 4:1
boolean
default:"false"
Whether to add watermark logo in lower right corner
GET /v2/models/wan/wan2.5-i2i-preview/openapi.json, the same document it validates a call against before the request reaches the provider.
Output
object
required
string
Actual prompt after intelligent rewriting (for video tasks)
string
Audio URL for I2V tasks with audio generation
string
The error code for the failed request (not returned if request is successful)
string
Task completion time
string
Detailed information about the failed request (not returned if request is successful)
string
Original input prompt (for video tasks)
object[]
List of task results for image generation tasks
string
Actual prompt after intelligent rewriting (if enabled)
string
Image error code (returned when some tasks fail)
string
Image error information (returned when some tasks fail)
string
Original input prompt
string
Generated image URL address
string
Task execution time
string
Task submission time
string
required
Task ID
object
Task result statistics for image generation tasks
integer
Number of failed tasks
integer
Number of successful tasks
integer
Total number of tasks
string
required
Task statusPossible values:
PENDING, RUNNING, SUCCEEDED, FAILED, CANCELED, UNKNOWNstring
Video URL for completed video generation tasks. Link validity period 24 hours
string
required
Unique request identifier
object
Output information statistics. Only successful results are counted
integer
Video resolution level (I2V and wan3.0-video tasks)
number
Duration of generated video in seconds (I2V and wan3.0-video tasks)
integer
Frame rate of the generated video (wan3.0-video tasks)
integer
Number of generated images (T2I tasks)
number
Duration of the input video in seconds, 0.0 when no video input (wan3.0-video tasks)
number
Duration of the output video in seconds (wan3.0-video tasks)
string
Aspect ratio of the generated video, e.g. 16:9 (wan3.0-video tasks)
string
Image resolution (T2I tasks)
integer
Number of generated videos (T2V tasks)
number
Duration of generated video in seconds (T2V tasks)
string
Video resolution ratio (T2V tasks)
string
Error code for a failed request, reported at the ROOT of the envelope rather than under
output (not returned if the request succeeded).string
Detailed information about a failed request, reported at the ROOT of the envelope rather than under
output (not returned if the request succeeded). Read this before falling back to output.message.Examples
Input
Output
Before you ship
The snippets above are the shortest working call. Three things are the same for every model and are documented once on the Comfy Router headers page: send anIdempotency-Key on every paid call and reuse it when you retry, expect the connection to be held up to Router’s 10 minute deadline, and keep X-Comfy-Request-Id from every response. The SDKs do all three for you; the cURL tab does none of them. On failure, X-Comfy-Error-Type names the bucket, and a 422 means the body failed the model’s schema and was never billed.
Headers
Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
Quick Start
Typed error handling in Python and TypeScript, reading the 422, walking the catalog.
Limitations
What Router does not do today, and what to use instead.