@image_1, @video_1, or custom @name tags.prompt as shown below:| Material | Reference syntax | Limit |
|---|---|---|
Reference images images | @image_1, @image_2, β¦ | 10 images |
Reference videos videos | @video_1, @video_2, β¦ | 5 videos, each 2β30 seconds |
Elements elements | @ElementName | 7, at most 3 of them video elements |
Voices voices | @VoiceName | 3 |
image_N, video_N, first_frame, or last_frame.aspect_ratio is omitted, the ratio adapts to your materials if any are provided, and falls back to 16:9 when none are. When videos is provided, keep_original_sound controls whether the original audio is kept; when videos is omitted, native audio is enabled by default.resolution sets the frame size and dynamic_range sets SDR or HDR; the two are set independently.resolution | dynamic_range | Output (16:9, MP4) |
|---|---|---|
720p | sdr | 1280Γ720 |
1080p | sdr | 1920Γ1080 |
4k | sdr | 3840Γ2160, H.264 8-bit |
1080p | hdr | 1920Γ1080, HEVC 10-bit, BT.2020, HLG |
4k | hdr | 3840Γ2160, HEVC 10-bit, BT.2020, HLG |
720p | hdr | Not supported, returns a parameter error |
4k or hdr task cannot get a result at that spec, the task fails; it never falls back to 1080p SDR.callBackUrl parameter to receive automatic notifications when generation completes, rather than polling the status endpoint.curl --location 'https://api.emix.ai/api/v1/client/tasks' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "kling-4.0/reference-to-video",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"prompt": "@Hero sits at the desk in @video_1, picks up the doll from @image_1, and greets using @Narrator",
"duration": 10,
"resolution": "1080p",
"dynamic_range": "sdr",
"image_urls": [
"https://example.com/doll.png"
],
"video_urls": [
"https://example.com/room.mp4"
],
"keep_original_sound": false,
"elements": [
{
"name": "Hero",
"image_urls": [
"https://example.com/hero-front.jpg",
"https://example.com/hero-side.jpg"
],
"tag": "character",
"description": "Young man in a red jacket"
}
],
"voices": [
{
"name": "Narrator",
"audio_url": "https://example.com/narrator.mp3"
}
]
}
}'{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_kling-4.0-reference-to-video_abc123"
}
}