HappyHorse 비디오 만들기
CometAPI를 통해 POST /v1/videos로 HappyHorse 텍스트-투-비디오 또는 참조 이미지 비디오 작업을 생성한 다음, 작업을 폴링하고 완료된 MP4 파일을 다운로드합니다.
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
-F model=happyhorse-1.1 \
-F 'prompt=A close-up cinematic shot of a ceramic coffee cup on a wooden table. Steam rises slowly while morning light moves across the background.' \
-F seconds=3 \
-F size=1920x1080{
"id": "task_example",
"task_id": "task_example",
"object": "video",
"model": "happyhorse-1.1",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}id을 저장하여 작업을 폴링하고 완료된 비디오를 다운로드합니다.
POST /v1/videos multipart/form-data을 사용합니다. 제어 값은 양식 필드로 전송하고, 참조 이미지는 input_reference 필드로 전송하며, 각 필드에는 HTTPS URL 또는 업로드된 이미지 파일 하나를 지정합니다.
입력 모드 선택
| 목표 | 모델 | 필수 필드 | 선택 필드 |
|---|---|---|---|
| 텍스트-투-비디오 | happyhorse-1.0, happyhorse-1.1 | model, prompt | seconds, size |
| 참조 이미지-투-비디오 | happyhorse-1.0, happyhorse-1.1 | model, prompt, 1–9 input_reference URL 또는 파일 | seconds, size |
| 첫 프레임 이미지-투-비디오 | happyhorse-1.0, happyhorse-1.1 | model, prompt, first_frame URL 또는 파일 1개 | seconds, size |
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과 별도의 요청에서 사용하세요.
길이 및 크기 설정
| 모델 ID | seconds | 기본값 |
|---|---|---|
happyhorse-1.0 | 정수 3-15 | 5 초, 1920x1080 |
happyhorse-1.1 | 정수 3-15 | 5 초, 1920x1080 |
WxH에 사용할 정확한 size 값을 선택하세요.
첫 프레임 요청에서는 이미지가 프레이밍과 가로세로 비율을 결정하고, size은 출력 해상도 등급을 선택합니다.
| 모델 | 프레임 형태 | size 값 |
|---|---|---|
happyhorse-1.0 | 가로 | 1280x720, 1920x1080 |
| 세로 | 720x1280, 1080x1920 | |
| 정사각형 | 1440x1440 | |
happyhorse-1.1 | 가로 | 1280x720, 1920x1080 |
| 세로 | 720x1280, 1080x1920 | |
| 정사각형 | 1440x1440 | |
| 클래식 가로 | 1440x1080 | |
| 클래식 세로 | 720x960, 1080x1440 | |
| 와이드 가로 | 2520x1080 | |
| 와이드 세로 | 1080x2520 | |
| 정사각형에 가까운 가로 | 900x720, 1350x1080 | |
| 정사각형에 가까운 세로 | 720x900, 1080x1350 |
작업 흐름
작업 생성
id을 저장합니다.작업 폴링
status이 completed, failed 또는 error이 될 때까지 반복합니다.결과 다운로드
completed일 때 다음을 호출하여 HappyHorse 비디오 콘텐츠 검색 MP4 파일을 다운로드합니다.본문
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://응답
Task created. Store the returned id and poll GET /v1/videos/{task_id}.
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
-F model=happyhorse-1.1 \
-F 'prompt=A close-up cinematic shot of a ceramic coffee cup on a wooden table. Steam rises slowly while morning light moves across the background.' \
-F seconds=3 \
-F size=1920x1080{
"id": "task_example",
"task_id": "task_example",
"object": "video",
"model": "happyhorse-1.1",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}