Kling 4.0 Reference to Video

kwaivgi/kling-v4.0/reference-to-video

kwaivgi/kling-v4.0/reference-to-video. 이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.

관련 모델

Kling 4.0 Reference to Video 관련 모델 1

전체 매개변수, 출력 스키마 및 실시간 요금

AI 모델 API 마켓하나의 플랫폼, 모든 기능가장 인기이용약관이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.
prompt *Prompttextarea—≤ 5000 chars
imagesReference imagesimage_upload—image/* · 0–10 items
audiosReference audioaudio_upload_group—audio/* · 0–3 items
keep_original_soundKeep original soundbooleanfalse—
resolutionResolutionselect720p720p | 1080p
durationDurationselect53 ~ 30 · step 1 · 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | …
aspect_ratioAspect ratioselectautoauto | 16:9 | 9:16 | 1:1 | 21:9

전체 매개변수, 출력 스키마 및 실시간 요금

자세히 보기하나의 플랫폼, 모든 기능이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.
videosarray<string>

API

이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.

cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/kwaivgi/kling-v4.0/reference-to-video" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "prompt": "A cinematic portrait, dramatic rim light, shallow depth of field",
    "keep_original_sound": false,
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "auto"
  }
}'

# 2) Poll until status is "completed", then read the output URLs
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
import time, requests

API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1) Submit
resp = requests.post(
    "https://www.namifusion.com/api/v1/marketplace/run/kwaivgi/kling-v4.0/reference-to-video",
    headers=HEADERS,
    json={
        "input": {
            "prompt": "A cinematic portrait, dramatic rim light, shallow depth of field",
            "keep_original_sound": False,
            "resolution": "720p",
            "duration": 5,
            "aspect_ratio": "auto"
        }
    },
)
resp.raise_for_status()  # 401/402/429/5xx stop here instead of polling a bad task
task = resp.json()

# 2) Poll until a terminal state (completed / failed / cancelled).
#    This model is allowed up to 1800s server-side.
deadline = time.time() + 1860
while task.get("status") not in ("completed", "failed", "cancelled"):
    if time.time() > deadline:
        raise TimeoutError(f"still {task.get('status')} — keep the task_uuid and poll later")
    time.sleep(3)
    poll = requests.get(f"https://www.namifusion.com/api/v1/marketplace/run/tasks/{task['task_uuid']}", headers=HEADERS)
    poll.raise_for_status()
    task = poll.json()

print(task["status"], task.get("output"))
JavaScript
const API_KEY = "YOUR_API_KEY";
const HEADERS = { Authorization: `Bearer ${API_KEY}` };

// 1) Submit
const resp = await fetch("https://www.namifusion.com/api/v1/marketplace/run/kwaivgi/kling-v4.0/reference-to-video", {
  method: "POST",
  headers: { ...HEADERS, "Content-Type": "application/json" },
  body: JSON.stringify({
    "input": {
      "prompt": "A cinematic portrait, dramatic rim light, shallow depth of field",
      "keep_original_sound": false,
      "resolution": "720p",
      "duration": 5,
      "aspect_ratio": "auto"
    }
  }),
});
if (!resp.ok) throw new Error(`submit failed: ${resp.status} ${await resp.text()}`);
let task = await resp.json();

// 2) Poll until a terminal state (completed / failed / cancelled).
//    This model is allowed up to 1800s server-side.
const deadline = Date.now() + 1860 * 1000;
while (!["completed", "failed", "cancelled"].includes(task.status)) {
  if (Date.now() > deadline) throw new Error(`still ${task.status} — keep the task_uuid and poll later`);
  await new Promise((r) => setTimeout(r, 3000));
  const poll = await fetch(`https://www.namifusion.com/api/v1/marketplace/run/tasks/${task.task_uuid}`, { headers: HEADERS });
  if (!poll.ok) throw new Error(`poll failed: ${poll.status}`);
  task = await poll.json();
}

console.log(task.status, task.output);

API 문서

Kling 4.0 · Reference to Video

Create a new 3–30 second video from a prompt with optional image, video and audio references. Output duration is chosen independently of reference-video duration.

Inputs

  • prompt: required string.
  • images: optional image-URL array, at most 10.
  • videos: optional video-URL array, at most 5. Each source must be at least 3 seconds; at most 30 seconds of video is used in total.
  • audios: optional audio-URL array, at most 3; each clip must be 5–30 seconds.
  • keep_original_sound: boolean, default false. Set true to preserve reference-video audio; requires videos.
  • resolution: "720p" (default) or "1080p".
  • duration: integer from 3 through 30, default 5.
  • aspect_ratio: "auto" (default), "16:9", "9:16", "1:1" or "21:9".

Limits and references

Use at most 15 reference files across images, videos and audios. Longer source footage is trimmed to the 30-second total budget. In prompt, @Image1, @Video1 and @Audio1 refer to the first item in their respective arrays; numbering starts at 1 separately for each media type. Explain the role of each reference.

List price and initial credit charge

Input video720p1080pBilling basis
None$0.157$0.235Per output second
Present$0.094$0.141Per counted second

Without reference video: Cost = output seconds × resolution rate. A 5-second clip costs $0.785 at 720p or $1.175 at 1080p.

Let D be output seconds and V = ceil(min(total input-video seconds, 30)). With video input, cost = rate × (D + max(D, V)). At 720p, D=5 and an 8.2-second input give V=9 and a cost of $1.316; the initial charge is 131.60 credits.

1 USD = 100 Nami credits. Round the total charge upward to 0.01 credit: credits = ceil(cost_usd × 10000) / 100. These are list prices; no promotional discount is applied.

Images, reference audio, aspect ratio and audio-preservation settings add no separate charge under this formula.

MaaS mapping

images, videos and audios remain URL arrays in MaaS. Never send videos as a single string. All other named fields retain their names in MaaS. Send duration as an integer and keep_original_sound as a boolean where supported. Array order is preserved.

Nami API

Send a POST request with Authorization: Bearer YOUR_NAMI_API_KEY and Content-Type: application/json to:

https://www.namifusion.com/api/v1/marketplace/run/kwaivgi/kling-v4.0/reference-to-video

Example request body:

{
  "input": {
    "prompt": "Use the person from @Image1, follow the camera movement of @Video1, and use @Audio1 as the voice reference. The person greets the viewer in a quiet studio.",
    "images": [
      "https://example.com/person.jpg"
    ],
    "videos": [
      "https://example.com/camera-reference.mp4"
    ],
    "audios": [
      "https://example.com/voice-reference.mp3"
    ],
    "keep_original_sound": false,
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "auto"
  }
}

Replace example.com URLs with publicly accessible media URLs. Use the returned task_uuid to poll GET https://www.namifusion.com/api/v1/marketplace/run/tasks/{task_uuid} with the same authorization. On success, read generated video URLs from output.videos.

관련 모델

xAI Grok Imagine Video v1.5 Reference to Video
참조 이미지 비디오 생성X Ai

xAI Grok Imagine Video v1.5 Reference to Video

x-ai/grok-imagine-video-v1.5/reference-to-video. 이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.

최저 $0.850 / 실행당
Vidu Q4 Preview Reference to Video
참조 이미지 비디오 생성Vidu

Vidu Q4 Preview Reference to Video

vidu/q4-preview/reference-to-video. 이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.

최저 $0.475 / 실행당
MiniMax H3 Reference to Video
참조 이미지 비디오 생성Minimax

MiniMax H3 Reference to Video

minimax/h3/reference-to-video. 이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.

최저 $0.650 / 실행당
MiniMax H3 Singularity Reference-to-Video LoRA
참조 이미지 비디오 생성Minimax H3 Singularity

MiniMax H3 Singularity Reference-to-Video LoRA

minimax-h3-singularity/reference-to-video-lora. 이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.

최저 $0.300 / 실행당
MiniMax H3 Singularity Reference-to-Video
참조 이미지 비디오 생성Minimax H3 Singularity

MiniMax H3 Singularity Reference-to-Video

minimax-h3-singularity/reference-to-video. 이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.

최저 $0.250 / 실행당
Gemini Omni Flash Reference to Video API
참조 이미지 비디오 생성Google

Gemini Omni Flash Reference to Video API

google/gemini-omni-flash/reference-to-video. 이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.

최저 $1.28 / 실행당
Seedance 2.0 Mini Reference to Video
참조 이미지 비디오 생성Doubao

Seedance 2.0 Mini Reference to Video

doubao/seedance-2.0-mini/reference-to-video. 이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.

최저 $0.3591 / 실행당
Seedance 2.5 Reference to Video
참조 이미지 비디오 생성Doubao

Seedance 2.5 Reference to Video

doubao/seedance-2-5/reference-to-video. 이미지, 동영상, 얼굴 바꾸기 모델 API를 살펴보세요. 모델을 시험한 뒤 하나의 통합 REST API로 연결할 수 있습니다.

최저 $0.6565 / 실행당