Gemini Omni 1.2 Flash API
Google Gemini Omni 1.2 Flash 동영상 생성 모델의 전체 API 레퍼런스입니다.
모델 종류
이 API는 다음 네 가지 모델을 지원합니다.
기능 비교
공통 엔드포인트
모든 Gemini Omni 1.2 Flash 모델은 다음 동영상 작업 엔드포인트를 사용합니다.
POST /api/v1/video/task
Gemini Omni 1.2 Flash Text to Video
필수 매개변수
요청 예시
const response = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'gemini-omni-1.2-flash-text-to-video',
prompt: 'A cinematic tracking shot follows a sailboat crossing a glowing ocean at sunset',
aspect_ratio: '16:9',
resolution: '1080p',
duration: 12
})
});
const { data } = await response.json();
const taskId = data.task_id;
Gemini Omni 1.2 Flash Image to Video
필수 매개변수
선택 매개변수
요청 예시
{
model_name: 'gemini-omni-1.2-flash-image-to-video',
prompt: 'The girl walks toward the camera while the city lights shimmer behind her',
image_url: 'https://example.com/start-frame.jpg',
image_end_url: 'https://example.com/end-frame.jpg',
aspect_ratio: '9:16',
resolution: '1080p',
duration: 8
}
Gemini Omni 1.2 Flash Video Edit
필수 매개변수
참고: 동영상 편집은 aspect_ratio와 duration을 지원하지 않습니다. 요청에서 두 매개변수를 모두 제외하세요.
요청 예시
{
model_name: 'gemini-omni-1.2-flash-video-edit',
prompt: 'A small ball rolls into the scene and captures the attention of the cat',
video_url: 'https://example.com/source-video.mp4',
resolution: '1080p'
}
Gemini Omni 1.2 Flash Reference to Video
참조 이미지와 참조 동영상은 각각 사용하거나 함께 사용할 수 있습니다. images 또는 videos에 하나 이상의 참조 이미지나 동영상을 지정해야 합니다.
필수 매개변수
선택적 참조 입력
요청 예시
{
model_name: 'gemini-omni-1.2-flash-reference-to-video',
prompt: 'Use the references to create a cinematic shot of a small boat approaching from the distance',
aspect_ratio: '16:9',
resolution: '1080p',
duration: 12,
images: ['https://example.com/boat-reference.jpg'],
videos: ['https://example.com/motion-reference.mp4']
}
응답 형식
초기 응답
모든 모델은 폴링에 사용할 task_id를 반환합니다.
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "submitted"
}
}
폴링 응답
GET /api/v1/video/{taskId}를 주기적으로 호출하여 상태를 확인하세요.
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "succeed",
"task_status_msg": null,
"task_result": {
"credit": 0.2,
"videos": [
{
"url": "https://example.com/generated-video.mp4"
}
]
}
}
}
상태 값
submitted: 작업이 접수되어 처리 대기 중
processing: 동영상 생성 중
succeed: 동영상 생성 완료
failed: 동영상 생성 실패
권장 사항
- 프롬프트 작성 피사체, 동작, 카메라 움직임, 조명 및 장면 전개를 구체적으로 설명하세요.
- 필수 설정 지원되는 해상도를 항상 지정하세요. 동영상 편집을 제외한 모든 모델에서는 지원되는 화면 비율과 길이도 지정하세요.
- 이미지 입력 시작 이미지, 마지막 이미지, 참조 이미지에는 외부에서 안정적으로 접근할 수 있는 공개 URL을 사용하세요. 마지막 프레임 이미지를 지정할 때는
duration을 3~10초로 설정하세요.
- 동영상 편집 입력 제출하기 전에 원본 동영상이 10초 이하인지 확인하세요.
- 참조 자료 제한 참조 이미지나 동영상을 하나 이상 제공하세요. 이미지는 최대 10장, 동영상은 최대 3개이며 각 참조 동영상의 길이는 3초 이하여야 합니다.