---
title: "Generate video using Wan 2.7 reference-to-video"
method: POST
path: "/api/v1/client/job/CreateTask"
---

# Generate video using Wan 2.7 reference-to-video

`POST /api/v1/client/job/CreateTask`

## Request body

- object
  - `model` 'wan/2-7-r2v', required — The model name to use for generation. Required field. - Must be `wan/2-7-r2v` for this endpoint
  - `callback_url` string, uri — Optional. Callback URL for receiving task completion notifications. - System will POST task status and results to this URL when generation completes - Callback payloads structure is consistent with the `data` object returned by the task status query - Your callback endpoint should accept POST requests with JSON payload containing results - It returns an HTTP 200 status code upon successful receipt
  - `input` object, required — Input parameters for the Wan 2.7 reference-to-video generation task.
    - `prompt` string, required — Text prompt describing the video content or editing request.
    - `negative_prompt` string — Negative prompt to exclude unwanted elements. Optional.
    - `reference_medias` object[], required — Reference media list. Supports 1 to 5 objects. Each object must provide either `reference_image` or `reference_video`, and may include `reference_voice`. **Duration rule**: - When any reference media item includes `reference_video`, `duration` must be 10 seconds or less. - Durations longer than 10 seconds are only supported when all reference media are images. **Reference image restrictions**: - Supported formats: JPEG, JPG, PNG (transparent channel not supported), BMP, WEBP. - Resolution: width and height must both be within [240, 8000] pixels. - Aspect ratio: 1:8 to 8:1. - File size: up to 20 MB per image. **Reference video restrictions**: - Supported formats: MP4, MOV. - Duration: 1 to 30 seconds. - Resolution: width and height must both be within [240, 4096] pixels. - Aspect ratio: 1:8 to 8:1. - File size: up to 100 MB per video. **Reference voice restrictions**: - Supported formats: WAV, MP3. - Duration: 1 to 10 seconds. - File size: up to 15 MB.
      - `reference_image` string, uri — Reference image URL. **Image restrictions**: - Supported formats: JPEG, JPG, PNG (transparent channel not supported), BMP, WEBP. - Resolution: width and height must both be within [240, 8000] pixels. - Aspect ratio: 1:8 to 8:1. - File size: up to 20 MB.
      - `reference_video` string, uri — Reference video URL. When this field is provided in any `reference_medias` item, `duration` must be 10 seconds or less. **Video restrictions**: - Supported formats: MP4, MOV. - Duration: 1 to 30 seconds. - Resolution: width and height must both be within [240, 4096] pixels. - Aspect ratio: 1:8 to 8:1. - File size: up to 100 MB.
      - `reference_voice` string, uri — Audio URL used to specify the voice timbre of the subject character in the reference media (image or video). Use it together with `reference_image` or `reference_video`. This audio is used only as a voice timbre reference and is unrelated to spoken content. For better matching, keep the reference audio language consistent with the prompt language. **Voice audio behavior**: - Default: if `reference_video` contains audio and `reference_voice` is not specified, the original video audio is used by default. - Priority: if both `reference_video` with audio and `reference_voice` are provided, `reference_voice` takes priority and overrides the original video audio timbre. **Audio restrictions**: - Supported formats: WAV, MP3. - Duration: 1 to 10 seconds. - File size: up to 15 MB.
    - `duration` integer — Video duration in seconds. Supports 2 to 15 seconds. When any item in `reference_medias` includes `reference_video`, the duration must be 10 seconds or less.
    - `resolution` '1080P' | '720P' — Output video resolution.
    - `aspect_ratio` '16:9' | '9:16' | '4:3' | '3:4' | '1:1' — Aspect ratio of the generated video.
    - `region` 'mainland' | 'global', nullable — Service region. mainland: China Mainland, global: International
    - `prompt_extend` boolean — Whether to automatically extend the prompt.
    - `input_compliance` 'disable' | 'enable', nullable — Optional input compliance check switch. Use `enable` to turn input checks on, `disable` to turn them off, or omit/pass `null` to use the default setting.
    - `output_compliance` 'disable' | 'enable', nullable — Optional output compliance check switch. Use `enable` to turn output checks on, `disable` to turn them off, or omit/pass `null` to use the default setting.

## Response `200`

Request successful

- object
  - `code` 200 | 401 | 402 | 404 | 422 | 429 | 455 | 500 | 501 | 505 — Response status code - **200**: Success - Request has been processed successfully - **401**: Unauthorized - Authentication credentials are missing or invalid - **402**: Insufficient Credits - Account does not have enough credits to perform the operation - **404**: Not Found - The requested resource or endpoint does not exist - **422**: Validation Error - The request parameters failed validation checks - **429**: Rate Limited - Request limit has been exceeded for this resource - **455**: Service Unavailable - System is currently undergoing maintenance - **500**: Server Error - An unexpected error occurred while processing the request - **501**: Generation Failed - Content generation task failed - **505**: Feature Disabled - The requested feature is currently disabled
  - `message` string — Response message, error description when failed
  - `data` object
    - `task_id` string — Task ID, can be used with Get Task Details endpoint to query task status

## Other responses

- `422` — Validation Error
- `500` — Server Error

---

[API](https://skmtc.dev/crun/apis/google-veo-3-1-fast-api.md) · [All operations](https://skmtc.dev/crun/apis/google-veo-3-1-fast-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/crun/google-veo-3-1-fast-api/revisions/c14300d4601e/schema)
