Vidu 동영상 생성
CometAPI에서 POST /v1/videos를 통해 Vidu Q3 또는 Q4 동영상 작업을 생성합니다. 텍스트-동영상 또는 이미지-동영상에는 Q3를 사용하고, 이미지-동영상 또는 참조-동영상에는 Q4를 사용합니다. এরপর 작업을 폴링하고 완료된 MP4 파일을 다운로드합니다.
{
"id": "task_example",
"task_id": "task_example",
"object": "video",
"model": "viduq3-turbo",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}viduq4-preview은 이미지-동영상 및 참조-동영상 작업을 생성합니다. API는 즉시 작업 ID를 반환하므로 반환된 id 값을 저장하고 작업이 종료 상태에 도달할 때까지 폴링하세요.
POST /v1/videos multipart/form-data을 사용합니다. 스칼라 제어 값은 폼 필드로, 참조 이미지는 input_reference 필드로 전송하세요.
입력 모드 선택
| 목적 | 모델 ID | 필수 필드 | 선택적 필드 |
|---|---|---|---|
| 텍스트-동영상 | viduq3, viduq3-turbo | model, prompt | seconds, size |
| 이미지-동영상 | viduq3, viduq3-turbo | model, prompt, input_reference 파일 하나 | seconds, size |
| 이미지-동영상 | viduq4-preview | model, prompt, input_reference 파일 하나 또는 HTTPS 이미지 URL | seconds, size |
| 참조-동영상 | viduq4-preview | model, prompt, 2–12 input_reference HTTPS 이미지 URL | seconds, size, reference_audios |
viduq4-preview 요청에 따라 모드를 선택합니다. 참조 오디오 없이 참조 이미지 하나를 사용하면 이미지-동영상 작업이 생성됩니다. 참조 이미지가 두 개 이상이거나 reference_audios가 포함된 참조 이미지 하나를 사용하면 참조-동영상 작업이 생성됩니다.
API 키에서 viduq3 또는 viduq3-turbo를 사용할 수 있는지 확인하려면 다음을 사용하세요. 사용 가능한 모델 나열.
참조 이미지 사용
Q3 이미지-동영상의 경우input_reference 멀티파트 필드를 통해 참조 이미지 하나를 업로드하세요. 파일 크기는 최대 20 MB입니다.
이미지는 생성된 동영상의 구도와 외형을 안내합니다. 프롬프트를 사용하여 동영상에서 유지해야 하는 움직임, 카메라 동작, 세부 사항을 설명하세요.
viduq4-preview 이미지-동영상의 경우 업로드한 파일 또는 input_reference의 공개적으로 액세스 가능한 HTTPS URL로 이미지 하나를 전송하세요. 동영상은 이 이미지에서 시작되며 종횡비를 유지합니다.
viduq4-preview 참조-동영상의 경우 공개적으로 액세스 가능한 HTTPS 이미지 URL을 2~12개 전송하세요. 이미지마다 input_reference를 한 번씩 반복하고 각 URL을 별도의 필드로 전송하세요. PNG, JPEG 또는 WEBP 이미지를 사용하세요.
프롬프트에서 요청 내 순서에 따라 참조 이미지를 지칭하세요. @1은 첫 번째 input_reference 이미지이고, @2은 두 번째 이미지이며, 이후에도 같은 방식입니다. 예: The pink car from @1 drives across the snowy hill from @2.
참조 오디오 추가
viduq4-preview 참조-동영상의 경우 reference_audios를 사용하면 음성 참조를 추가할 수 있습니다. 각각 길이가 3~12초인 공개적으로 액세스 가능한 MP3 클립의 HTTPS URL을 최대 3개 전송하고, 클립마다 reference_audios을 한 번씩 반복하세요. 동일한 요청에서 input_reference 이미지도 최소 하나 전송하세요.
길이 및 크기 설정
| 모델 ID | seconds | 기본값 |
|---|---|---|
viduq3-turbo | 정수 1-16 | 5 초, 1280x720 |
viduq3 | 정수 1-16 | 5 초, 1280x720 |
viduq4-preview | 정수 3-16 | 5 초, 1280x720 |
size에 아래 WxH 값 중 하나를 설정합니다.
| 해상도 등급 | 종횡비 | size (WxH) |
|---|---|---|
540p | 16:9 | 960x528 |
720p | 16:9 | 1280x720 |
1080p | 16:9 | 1920x1080 |
viduq4-preview의 경우 size에 아래 WxH 값 중 하나를 설정합니다. reference-to-video의 경우 size에서 프레임 형태를 설정합니다. image-to-video의 경우 출력은 입력 이미지의 종횡비를 유지합니다.
| 해상도 등급 | 종횡비 | size (WxH) |
|---|---|---|
720p | 16:9 (기본값) | 1280x720 |
720p | 9:16 | 720x1280 |
720p | 1:1 | 960x960 |
720p | 4:3 | 1104x816 |
720p | 3:4 | 816x1104 |
viduq4-preview 동영상에는 생성된 오디오 트랙이 포함됩니다.
작업 흐름
작업 생성
id을 저장합니다.작업 상태 확인
status가 completed, failed 또는 error 중 하나가 될 때까지.결과 다운로드
completed 상태가 되면 호출합니다 Vidu 동영상 콘텐츠 조회 MP4 파일을 다운로드합니다.인증
Bearer authentication. Use your CometAPI API key.
본문
Vidu model ID for this route: viduq3 or viduq3-turbo for text-to-video and image-to-video, or viduq4-preview for image-to-video and reference-to-video. Choose an available model from the Models page.
"viduq3-turbo"
Text prompt that describes the video to generate. For image-to-video, describe the motion and camera behavior that should animate the reference image. For viduq4-preview reference-to-video, refer to reference images as @1, @2, and so on, in the order of the input_reference fields. Up to 5000 characters for viduq4-preview.
"An astronaut walks through soft blue fog with a slow cinematic camera move."
Requested clip duration in seconds, sent as an integer string. Use 1 through 16 for viduq3 and viduq3-turbo, or 3 through 16 for viduq4-preview. Default is 5.
"1"
Output size as WxH. Supported WxH size values for viduq3 and viduq3-turbo: 960x528, 1280x720, 1920x1080. Supported WxH size values for viduq4-preview: 1280x720, 720x1280, 960x960, 1104x816, 816x1104. Default is 1280x720. For viduq4-preview reference-to-video, size sets the frame shape. For viduq4-preview image-to-video, the output keeps the aspect ratio of the input image.
Reference images. For Q3 image-to-video, upload one image file up to 20 MB. For viduq4-preview image-to-video, send one image file or one publicly accessible HTTPS image URL. For viduq4-preview reference-to-video, send 2-12 publicly accessible HTTPS image URLs by repeating input_reference once per image. Use PNG, JPEG, or WEBP images. Omit this field for text-to-video.
Voice references for viduq4-preview reference-to-video. Send up to 3 publicly accessible HTTPS URLs of MP3 clips, each 3-12 seconds long, by repeating reference_audios once per clip. Send at least one input_reference image in the same request.
^https://응답
Task created. Store the returned id and poll GET /v1/videos/{task_id}.
Task ID. Use this value with retrieve and content endpoints.
"task_example"
Object type. Video tasks return video.
"video"
Model ID used for the task, such as viduq3-turbo or viduq4-preview.
"viduq3-turbo"
Task lifecycle status. Poll until the value is completed, failed, or error.
queued, in_progress, completed, failed, error "queued"
Task progress as a coarse percentage.
0 <= x <= 1000
Task creation time as a Unix timestamp in seconds.
1779938152
Compatibility alias for id when present.
"task_example"
Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.
1779938219
Temporary video delivery URL. This field appears on completed tasks.
"<temporary-video-url>"
Failure details. This field appears when the task fails.
{
"id": "task_example",
"task_id": "task_example",
"object": "video",
"model": "viduq3-turbo",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}