wan/wan2.5-t2i-preview, served by Comfy Router from Wan.
Quick start
Create a key in your Comfy workspace 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-t2i-preview
Endpoint: POST https://api.comfy.org/v2/models/wan/wan2.5-t2i-preview
Schema
Input
object
required
Enter basic information, such as prompt words, etc.
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 800 characters
string
The ID of the model to call for text-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/text2image/image-synthesis MUST supply it, and the enum of accepted spellings lives on that operation’s own component, WanImageGenerationRequest.object
Image processing parameters
integer
default:"4"
Number of generated images. Range 1-4, default is 4Range:
1 to 4boolean
default:"true"
Enable prompt intelligent rewriting. Default is true
integer
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 1638400 (12801280) and 2073600 (14401440) with an aspect ratio between 1:4 and 4:1, so 768*2700 is valid
boolean
default:"false"
Whether to add watermark logo in lower right corner
GET /v2/models/wan/wan2.5-t2i-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 SDKs create anIdempotency-Key and reuse it for automatic retries. For manual retries, reuse the original key. Router can hold the connection for up to 10 minutes.
When a request fails, Router sends an X-Comfy-Error-Type response header explaining why. A 422 means Router rejected the input before calling the provider. Download generated assets promptly because result URLs can expire.
Headers
Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
Using the Router API
Model discovery, validation errors, retries, and billing.
Limitations
What Router does not do today, and what to use instead.