Skip to main content
Use wan/wan2.7-i2v with the Comfy Router API. Wan provides the model; Router gives it the shared authentication and request route below.

Quick start

Create a key at platform.comfy.org/profile/api-keys and export it as COMFY_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.7-i2v Endpoint: POST https://api.comfy.org/v2/models/wan/wan2.7-i2v

Schema

Input

Router has not published an authored input schema for this model yet: GET /v2/models/wan/wan2.7-i2v/openapi.json returns an open object with x-comfy-input-schema-authored: false. Router forwards the body to Wan unchanged, so Wan’s own API documentation is authoritative for the request fields, and nothing is validated server side.

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, UNKNOWN
string
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

Output

Before you ship

Save one Idempotency-Key for each call and reuse it for retries. Router can hold the connection for up to 10 minutes. The SDKs handle authentication; raw HTTP clients send the headers themselves. Use X-Comfy-Error-Type to classify a failure. 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

Find models, inspect schemas, and retry safely.

Limitations

What Router does not do today, and what to use instead.