텍스트, 이미지 또는 동영상으로 Omni 동영상 만들기
POST /v1/videos를 통해 CometAPI에서 베타 Omni 텍스트-동영상, 이미지-동영상 또는 참조 동영상 편집 작업을 생성한 다음, 작업을 폴링하고 완료된 MP4 파일을 다운로드하세요.
id 값을 저장하고 작업이 최종 상태에 도달할 때까지 폴링하세요.
입력 모드에 맞는 요청 콘텐츠 유형을 선택하세요. 텍스트-동영상 및 이미지-동영상 제어 항목은 multipart/form-data 필드로 전송하세요. 참조 동영상 편집은 application/json 본문으로 전송하세요.
입력 모드 선택
model=omni-fast 모델을 사용합니다. 동영상-동영상 예에서는 model=omni-fast-v2v 모델을 사용합니다. API 키에 모델 ID가 표시되는지 확인하려면 사용 가능한 모델 나열 을 사용하세요.
참조 이미지에 애니메이션 적용
이미지-동영상에는model=omni-fast 필드를 사용하고 multipart input_reference 필드에 PNG 파일 하나를 업로드하세요. 이 필드는 텍스트-동영상에서는 선택 사항이지만, 참조 이미지가 생성된 동영상의 기준이 되어야 하는 경우에는 필수입니다.
prompt에는 추가할 동작을 중심으로 작성하고, 결과에서 유지해야 할 색상, 형태, 피사체 또는 구성을 명시하세요. 코드 샘플 선택기에는 작업 디렉터리에서 reference.png 파일을 업로드하고 작업을 생성하는 Shell, Python 및 JavaScript 예제가 포함되어 있습니다.
이 요청 형식은 업로드된 PNG 하나를 다룹니다. URL 입력, 다른 이미지 형식, 여러 참조 이미지 또는 파일 크기 제한은 정의하지 않습니다.
참조 동영상 편집
동영상-동영상의 경우 로컬 MP4 파일을 base64로 인코딩하고 인코딩된 바이트 앞에data:video/mp4;base64, 접두사를 붙이세요. 완전한 데이터 URL을 video 필드에 전송하세요.
prompt에 요청한 변경 사항을 설명하세요. 또한 결과에서 유지해야 할 피사체, 객체, 구성 또는 동작을 지정하세요. 코드 샘플 선택기에는 작업 디렉터리에서 reference.mp4 파일을 읽는 Shell, Python 및 JavaScript 예제가 포함되어 있습니다.
이 요청 형식은 인라인 MP4 데이터 URL을 다룹니다. URL 입력, 다른 동영상 컨테이너 형식 또는 파일 크기 제한은 정의하지 않습니다.
기간, 비율 및 해상도 설정
Omni는 입력과 선택한 경로에 따라 생성 안정성이 달라질 수 있으므로 베타로 표시됩니다. 첫 요청은 작은 규모로 시작한 다음, 특정 렌더링 기간이나 프레임 크기에 의존하기 전에 완료된 동영상을 검사하세요.aspect_ratio 및 resolution을 생성 기본 설정으로 간주하고, 최종 픽셀에 의존하기 전에 다운로드한 MP4를 확인하세요.
작업 흐름
작업 생성
id을 저장합니다.작업 폴링
status가 completed 또는 failed이 될 때까지 기다립니다.결과 다운로드
completed 상태가 되면 다음 작업인 Omni 동영상 콘텐츠 가져오기 을 호출하여 MP4 파일을 다운로드합니다.인증
Bearer authentication. Use your CometAPI API key.
본문
Omni model ID for this endpoint. Use omni-fast for text-to-video and image-to-video.
"omni-fast"
Text prompt that describes the video to generate. For image-to-video, focus on motion and name the reference content that should be preserved.
"Ocean waves rolling onto a sandy beach at golden hour"
One PNG reference image uploaded as a multipart file. Optional for text-to-video and required for image-to-video. This contract does not define URL input, other image formats, multiple references, or a file-size limit.
Requested clip duration in seconds. The completed video can use a different duration.
"4"
Output aspect ratio preference. 16:9 and 9:16 are the most predictable; 1:1 can be accepted but may render as landscape.
16:9, 9:16, 1:1 "16:9"
Output resolution preference. Start with 720p. A request for 1080p can render at 720p.
"720p"
응답
Task accepted. 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.
"omni-fast"
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.