Unode
User GuideAPI ReferenceHelp & SupportBusiness Cooperation

Wan Video Generation

Wan provides text-to-video, image-to-video, first-and-last-frame, and reference-video generation through the same asynchronous video API.


Supported Models

ModelModeDescription
wan2.5-t2v-previewText-to-videoWan 2.5 preview model
wan2.6-t2vText-to-videoWan 2.6 model
wan2.7-t2vText-to-videoWan 2.7 model
wan2.5-i2v-previewImage-to-videoWan 2.5 preview model
wan2.6-i2vImage-to-videoWan 2.6 model
wan2.1-kf2v-plusFirst/last framesWan 2.1 keyframe model
wan2.6-r2vReference-to-videoWan 2.6 character-reference model

Overview

All modes use POST /v1/video/generations. Select a mode with the model and its input fields: text-to-video uses a prompt alone, image-to-video adds input_reference, first-and-last-frame generation uses two URLs under metadata.input, and reference-to-video uses metadata.input.reference_video_urls.

Generation is asynchronous: submit a task, poll it by ID, and retrieve the result URL when it succeeds.

Task Status Flow

queued → in_progress → completed
                ↓
              failed

API List

MethodPathDescription
POST/v1/video/generationsSubmit a video generation task
GET/v1/video/generations/{task_id}Query task status and retrieve its result

Model and Mode Differences

CapabilityText-to-videoImage-to-videoFirst/last framesReference-to-video
InputPromptFirst-frame URL or data URIFirst- and last-frame URLs1–3 reference-video URLs
Resolution fieldparameters.sizeparameters.resolutionFixed at 720Pparameters.size
Duration5, 10; 15 on 2.65, 10; 15 on 2.6Fixed at 55 or 10
AudioWan 2.5/2.6Wan 2.5/2.6Not supportedCharacter voice from references
Multi-shotWan 2.6 with prompt extensionWan 2.6 with prompt extensionNot supportedSupported

1. Submit Video Generation Task (/v1/video/generations)

Choose the example matching your input assets and model family.

Usage Examples

{
  "prompt": "A marble hand statue stands in a shallow pool as vines move in the breeze.",
  "model": "wan2.6-t2v",
  "metadata": {
    "input": {
      "negative_prompt": "trees, animals"
    },
    "parameters": {
      "size": "1920*1080",
      "duration": 10,
      "audio": true,
      "prompt_extend": true
    }
  }
}

Provide the first frame as an HTTP(S) URL or an image data URI in input_reference. Plain, unprefixed base64 is not accepted.

{
  "prompt": "The light turns red and water begins overflowing around the statue.",
  "model": "wan2.5-i2v-preview",
  "input_reference": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
  "metadata": {
    "input": {
      "negative_prompt": "blurry, low quality, distorted"
    },
    "parameters": {
      "resolution": "1080P",
      "duration": 5,
      "audio": true,
      "watermark": false
    }
  }
}

wan2.1-kf2v-plus accepts URL inputs only. Resolution is fixed at 720P, duration at five seconds, and audio and shot controls are unavailable.

{
  "prompt": "The hand-shaped statue cracks and collapses into the water.",
  "model": "wan2.1-kf2v-plus",
  "metadata": {
    "input": {
      "first_frame_url": "https://example.com/first-frame.png",
      "last_frame_url": "https://example.com/last-frame.png",
      "negative_prompt": "blurry, low quality"
    },
    "parameters": {
      "watermark": false,
      "prompt_extend": false,
      "seed": 12345
    }
  }
}

Reference a character's appearance and voice with one video. In the prompt, refer to it as character1.

{
  "prompt": "character1 drinks bubble tea while dancing to the music.",
  "model": "wan2.6-r2v",
  "metadata": {
    "input": {
      "reference_video_urls": [
        "https://example.com/reference-video.mp4"
      ]
    },
    "parameters": {
      "size": "1280*720",
      "duration": 5,
      "shot_type": "multi"
    }
  }
}

Reference videos map by array position to character1, character2, and character3 in the prompt.

{
  "prompt": "character1 and character2 talk to each other in an office.",
  "model": "wan2.6-r2v",
  "metadata": {
    "input": {
      "reference_video_urls": [
        "https://example.com/character1.mp4",
        "https://example.com/character2.mp4"
      ],
      "negative_prompt": "white walls"
    },
    "parameters": {
      "size": "1280*720",
      "duration": 10,
      "shot_type": "multi",
      "watermark": true
    }
  }
}

Complete Request

curl -X POST "https://www.unodetech.xyz/v1/video/generations" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer API_KEY" \
  -d @request-body.json

Request Headers

HeaderRequiredValue
Content-TypeYesapplication/json
AuthorizationYesBearer API_KEY

Request Body Fields

Audio priority is metadata.input.audio_url over metadata.parameters.audio. Omit both (or set audio to false) for silent video, set audio to true for generated audio, or provide audio_url for custom synchronized audio.

Response Example

{
  "id": "TASK_ID",
  "object": "video",
  "model": "wan2.6-t2v",
  "status": "queued",
  "progress": 0,
  "created_at": 1765328779
}

Response Body Fields

2. Query Task Status (/v1/video/generations/{task_id})

Complete Request

curl -X GET "https://www.unodetech.xyz/v1/video/generations/TASK_ID" \
  -H "Authorization: Bearer API_KEY"

Request Headers

HeaderRequiredValue
AuthorizationYesBearer API_KEY

Path Parameters

Response Examples

{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "TASK_ID",
    "action": "textGenerate",
    "status": "IN_PROGRESS",
    "fail_reason": "",
    "submit_time": 1765328779,
    "start_time": 1765328794,
    "finish_time": 0,
    "progress": "30%",
    "data": {
      "output": {
        "task_id": "TASK_ID",
        "task_status": "RUNNING"
      },
      "request_id": "REQUEST_ID"
    }
  }
}
{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "TASK_ID",
    "action": "textGenerate",
    "status": "SUCCESS",
    "fail_reason": "<OUTPUT_URL>",
    "submit_time": 1765328779,
    "start_time": 1765328794,
    "finish_time": 1765328947,
    "progress": "100%",
    "data": {
      "output": {
        "actual_prompt": "<EDITED_PROMPT>",
        "orig_prompt": "<ORIGINAL_PROMPT>",
        "task_id": "TASK_ID",
        "task_status": "SUCCEEDED",
        "video_url": "<OUTPUT_URL>"
      },
      "request_id": "REQUEST_ID",
      "usage": {
        "video_count": 1,
        "video_duration": 10,
        "video_ratio": "1920*1080"
      }
    }
  }
}

Prefer data.data.output.video_url when retrieving the result. The upstream API also places the URL in data.fail_reason on success.

{
  "code": "success",
  "message": "",
  "data": {
    "task_id": "TASK_ID",
    "action": "textGenerate",
    "status": "FAILURE",
    "fail_reason": "task failed, code: InvalidParameter",
    "progress": "100%",
    "data": {
      "output": {
        "code": "InvalidParameter",
        "message": "The request parameters are invalid.",
        "task_id": "TASK_ID",
        "task_status": "FAILED"
      },
      "request_id": "REQUEST_ID"
    }
  }
}

Response Body Fields

Important Notes

  1. Image data in input_reference must be an HTTP(S) URL or a complete data URI; plain base64 is not accepted.
  2. wan2.1-kf2v-plus first/last-frame inputs accept URLs only.
  3. Task IDs and output URLs are retained for 24 hours.
  4. Reference-to-video accepts one to three reference videos. Each should contain one character; array order defines character1, character2, and character3.
  5. Reference-to-video billing uses the combined input and output duration. Truncated input durations contribute at most five billable seconds, and failed generations are not billed.
  6. Prompts, input assets, and output videos undergo content moderation.

Last updated on