Flux 3 비디오 생성
텍스트, 참조 이미지 또는 첫 번째와 마지막 프레임으로 720p 또는 1080p 크기 사전 설정의 Flux 3 비디오를 생성합니다.
curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=flux-3' \
--form-string 'prompt=A paper boat glides across a still pond while the camera moves forward.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720'{
"id": "<task_id>",
"task_id": "<task_id>",
"object": "video",
"model": "flux-3",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}id을 저장하여 작업 상태를 폴링하고 완료된 비디오를 다운로드하세요.
POST /v1/videos multipart/form-data을 사용합니다. 제어값은 양식 필드로 전송하세요. 이미지 입력에는 참조 이미지 URL 또는 시작 및 종료 프레임을 사용하세요.
input_reference을 first_frame 및 last_frame과 별도로 유지하세요.
입력 모드 선택
| 목표 | 필수 필드 | 선택적 필드 |
|---|---|---|
| 텍스트-비디오 변환 | model=flux-3, prompt | seconds, size |
| HTTPS 이미지-비디오 변환 | model=flux-3, prompt, input_reference URL 하나 | seconds, size |
| 순서가 지정된 키프레임 | model=flux-3, prompt, input_reference URL을 반복하여 지정 | seconds, size |
| 업로드된 시작 프레임 | model=flux-3, prompt, first_frame 파일 하나 | seconds, size |
| 첫 프레임 및 마지막 프레임 비디오 | model=flux-3, prompt, first_frame, last_frame | seconds, size |
참조 이미지 사용
input_reference 필드는 공개적으로 액세스 가능한 HTTPS 이미지 URL만 허용합니다. 이미지가 하나이면 한 번 전송하고, 여러 이미지이면 키프레임 순서대로 반복하여 전송하세요. 필드당 URL 하나를 사용하며, 총 최대 10개의 URL을 사용할 수 있습니다.
생성된 비디오가 참조 이미지에서 유지해야 하는 움직임, 카메라 동작 및 시각적 세부 사항을 설명하세요.
이 페이지 상단의 요청 샘플은 단일 이미지 및 다중 이미지 입력을 보여 줍니다. 다음 요청은 제출된 순서대로 두 이미지를 사용합니다:
curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=flux-3' \
--form-string 'prompt=Move smoothly through the supplied reference images in their given order. Preserve recognizable subjects and visual details as the scene changes. Keep the camera movement gentle.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form-string 'input_reference=https://apidoc.cometapi.com/images/image/gemini/6100640_569429.png' \
--form-string 'input_reference=https://apidoc.cometapi.com/images/image/gemini/6100640_569420.png'
첫 번째와 마지막 프레임 설정
시작 이미지를 설정하려면first_frame을 전송하세요. 종료 이미지도 설정하려면 last_frame을 포함하고, 두 프레임 사이의 움직임을 prompt에 설명하세요.
시작 프레임만 사용할 경우 last_frame을 생략하세요. 종료 프레임에는 first_frame 및 last_frame이 모두 필요합니다.
각 필드는 공개적으로 액세스 가능한 HTTPS URL 하나 또는 PNG나 JPEG 파일 하나를 허용합니다. URL 또는 파일 중 하나를 사용하여 각 필드를 한 번 전송하세요. 각 파일의 크기는 20 MiB(20 × 1024 × 1024바이트).
이 페이지 상단의 프레임 예시는 URL 입력과 파일 업로드를 보여 주며, seconds 및 size이 명시적으로 설정되어 있습니다.
길이 및 크기 설정
seconds을 5부터 20까지의 정수로 명시적으로 설정하세요.
size을 다음의 정확한 WxH 사전 설정 값 중 하나로 설정하세요:
| 해상도 등급 | 크기 |
|---|---|
720p | 1280x720 |
1080p | 1920x1080 |
작업 흐름
작업 생성
id을 저장하세요.작업 폴링
status이 completed 또는 failed이 될 때까지 호출합니다.결과 다운로드
completed 상태가 되면 다음을 호출하여 Flux 3 비디오 콘텐츠 다운로드 MP4 파일을 저장합니다.본문
Flux 3 multipart request. Choose text, input_reference URLs, or first_frame and last_frame inputs. Keep reference-image and frame inputs separate.
Reference image URLs. Send one publicly accessible HTTPS image URL per input_reference field. For multiple images, repeat the field in keyframe order, up to 10 URLs. This field accepts URLs only. Keep it separate from first_frame and last_frame.
^https://Opening-frame image as one publicly accessible HTTPS URL or one PNG or JPEG file. Keep each file at or below 20 MiB (20 × 1024 × 1024 bytes). Send the field once, using either a URL or a file. Pair with last_frame to set both boundaries. Keep frame inputs separate from input_reference.
^https://Closing-frame image as one publicly accessible HTTPS URL or one PNG or JPEG file. Keep each file at or below 20 MiB (20 × 1024 × 1024 bytes). Send the field once, using either a URL or a file. To specify the closing image through this endpoint, send last_frame together with first_frame. Keep frame inputs separate from input_reference.
^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" \
--form-string 'model=flux-3' \
--form-string 'prompt=A paper boat glides across a still pond while the camera moves forward.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720'{
"id": "<task_id>",
"task_id": "<task_id>",
"object": "video",
"model": "flux-3",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}