Skip to main content
POST
/
v1
/
ai
/
reference-to-video
/
wan-2-7
WAN 2.7 - Create video from reference characters
curl --request POST \
  --url https://api.freepik.com/v1/ai/reference-to-video/wan-2-7 \
  --header 'Content-Type: application/json' \
  --header 'x-freepik-api-key: <api-key>' \
  --data '
{
  "prompt": "Image 1 is dancing in a garden while Video 1 plays guitar in the background",
  "webhook_url": "https://www.example.com/webhook",
  "negative_prompt": "watermark, text, distortion, blurry, extra limbs",
  "image_urls": [
    {
      "url": "https://example.com/character1.jpg",
      "reference_voice": "https://example.com/voice1.wav"
    }
  ],
  "video_urls": [
    {
      "url": "https://example.com/character1.mp4",
      "reference_voice": "https://example.com/voice1.wav"
    }
  ],
  "start_image_url": "https://example.com/start-frame.jpg",
  "aspect_ratio": "16:9",
  "resolution": "1080P",
  "duration": 5,
  "seed": 12345,
  "additional_settings": {
    "prompt_extend": true
  }
}
'
{
  "data": {
    "generated": [],
    "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "status": "CREATED"
  }
}

Authorizations

x-freepik-api-key
string
header
required

Your Freepik API key. Required for authentication. Learn how to obtain an API key

Body

application/json

Generate video featuring characters from reference images or videos using WAN 2.7. At least one of image_urls or video_urls must be provided. The combined total of image and video references must not exceed 5. Reference characters in the prompt as "Image 1", "Image 2", "Video 1", etc.

prompt
string
required

Text description of the video to generate. Reference characters using their position labels: "Image 1", "Image 2", "Video 1", etc.

Example: "Image 1 and Image 2 are walking together in a park while Video 1 plays guitar in the background."

Maximum string length: 5000
Example:

"Image 1 is dancing in a garden while Video 1 plays guitar in the background"

webhook_url
string<uri>

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

Example:

"https://www.example.com/webhook"

negative_prompt
string

Elements to avoid in the generated video.

Examples: "blurry, low quality, watermark, text, distortion, extra limbs"

Maximum string length: 500
Example:

"watermark, text, distortion, blurry, extra limbs"

image_urls
object[]

List of character reference images. Each image represents one character. Combined total with video_urls must not exceed 5.

video_urls
object[]

List of character reference videos. Each video represents one character. Combined total with image_urls must not exceed 5.

start_image_url
string<uri>

Optional first-frame image. If provided, the output aspect ratio is determined by this image instead of the aspect_ratio parameter.

Supported formats: JPEG, PNG, BMP, WEBP Dimensions: 240-8000px per side Maximum file size: 20MB

Example:

"https://example.com/start-frame.jpg"

aspect_ratio
enum<string>
default:16:9

Output video aspect ratio:

  • 16:9: Landscape (widescreen)
  • 9:16: Portrait (vertical, mobile-optimized)
  • 1:1: Square
  • 4:3: Standard landscape
  • 3:4: Standard portrait
Available options:
16:9,
9:16,
1:1,
4:3,
3:4
resolution
enum<string>
default:1080P

Output video resolution:

  • 720P: 720p HD (1280x720)
  • 1080P: 1080p Full HD (1920x1080)
Available options:
720P,
1080P
duration
integer
default:5

Duration of the output video in seconds.

Required range: 2 <= x <= 10
Example:

5

seed
integer

Random seed for reproducible generation. Use the same seed with identical parameters to reproduce results. Leave unset for random seed.

Required range: 0 <= x <= 2147483647
Example:

12345

additional_settings
object

Additional generation settings.

Response

OK - The task exists and the status is returned

data
object
required
Example:
{
"task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"status": "CREATED",
"generated": [
"https://openapi-generator.tech",
"https://openapi-generator.tech"
]
}