HappyHorse 비디오 만들기
CometAPI를 통해 POST /v1/videos로 HappyHorse 텍스트-투-비디오 또는 참조 이미지 비디오 작업을 생성한 다음, 작업을 폴링하고 완료된 MP4 파일을 다운로드합니다.
id을 저장하여 작업을 폴링하고 완료된 비디오를 다운로드합니다.
POST /v1/videos multipart/form-data을 사용합니다. 제어 값은 양식 필드로 전송하고, 참조 이미지는 input_reference 필드로 전송하며, 각 필드에는 HTTPS URL 또는 업로드된 이미지 파일 하나를 지정합니다.
입력 모드 선택
input_reference을 한 번씩 반복합니다.
이 필드 내에서는 URL만 사용하거나 파일만 사용하세요. URL을 쉼표로 연결하지 말고 각각 별도로 전송하세요.
input_reference의 경우 각 참조 이미지는 happyhorse-1.0이며 10MB 이하여야 합니다.
happyhorse-1.1의 경우 각 참조 이미지는 20MB 이하여야 합니다.
이 모델 제한은 이미지 URL과 업로드된 파일 모두에 적용됩니다.
가장 짧은 변이 400px 이상인 JPEG, JPG, PNG 또는 WEBP 이미지를 사용하세요.
input_reference 업로드 제한은 파일당 20MiB(20 × 1024 × 1024바이트)입니다. 업로드된 이미지는 위의 모델별 제한도 충족해야 합니다.
이 페이지 상단의 요청 샘플은 HappyHorse 1.1의 여러 이미지 URL과 두 모델 모두의 여러 파일 업로드를 보여 줍니다.
시작 프레임을 설정하려면 공개적으로 액세스 가능한 HTTPS 이미지 URL 하나 또는 이미지 파일 하나와 함께 first_frame을 한 번 전송합니다. 이 필드는 input_reference과 별도의 요청에서 사용하세요.
길이 및 크기 설정
WxH에 사용할 정확한 size 값을 선택하세요.
첫 프레임 요청에서는 이미지가 프레이밍과 가로세로 비율을 결정하고, size은 출력 해상도 등급을 선택합니다.
작업 흐름
작업 생성
id을 저장합니다.작업 폴링
status이 completed, failed 또는 error이 될 때까지 반복합니다.결과 다운로드
completed일 때 다음을 호출하여 HappyHorse 비디오 콘텐츠 검색 MP4 파일을 다운로드합니다.인증
Bearer authentication. Use your CometAPI API key.
본문
HappyHorse model ID for this endpoint.
happyhorse-1.0, happyhorse-1.1 "happyhorse-1.1"
Text prompt that describes the video to generate. For image inputs, describe the motion and visual details to preserve.
"Use the uploaded reference image as the visual guide. Create a short cinematic shot with gentle natural motion."
Requested clip duration in whole seconds. Send an integer from 3 through 15 as a form field. The default is 5.
3 <= x <= 153
Output size as an exact WxH value. Use one of the documented size values for the selected HappyHorse model. For first-frame requests, size selects the resolution tier; the image determines the framing and aspect ratio.
"1920x1080"
Reference images for reference-to-video. Send 1–9 publicly accessible HTTPS image URLs or 1–9 uploaded image files by repeating input_reference once per image. Use only URLs or only files within this field; do not join URLs with commas. Reference images guide subjects and visual details. CometAPI preserves image order. Use JPEG, JPG, PNG, or WEBP images with a shortest side of at least 400 px. Each reference image must be at or below 10 MB for happyhorse-1.0 or 20 MB for happyhorse-1.1. These model limits apply to both image URLs and uploaded files. The input_reference file upload limit is 20 MiB (20 x 1024 x 1024 bytes) per file. Keep uploads within the model limit as well. Keep this field separate from first_frame.
^https://Opening-frame image as one publicly accessible HTTPS URL or one image file. Send this field once, using either a URL or a file. Use JPEG, JPG, PNG, or WEBP images up to 20 MB. Do not combine first_frame with input_reference.
^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.
"happyhorse-1.1"
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.