Gemini Omni 1.1 Flash API
Google Gemini Omni 1.1 Flash 동영상 생성 모델의 전체 API 레퍼런스입니다.
모델 변형
이 API는 네 가지 모델 변형을 지원합니다.
빠른 비교
공통 엔드포인트
모든 Gemini Omni 1.1 Flash 변형은 동영상 작업 엔드포인트를 사용합니다.
POST /api/v1/video/task
Gemini Omni 1.1 Flash 텍스트 투 비디오
필수 파라미터
요청 예시
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.1-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: 8
})
});
const { data } = await response.json();
const taskId = data.task_id;
Gemini Omni 1.1 Flash 이미지 투 비디오
필수 파라미터
선택적 파라미터
요청 예시
{
model_name: 'gemini-omni-1.1-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.1 Flash 동영상 편집
필수 파라미터
참고: Video Edit는 aspect_ratio 또는 duration을 지원하지 않습니다. 요청에 두 파라미터를 포함하지 마세요.
요청 예시
{
model_name: 'gemini-omni-1.1-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.1 Flash 참조 자료 투 비디오
참조 이미지와 동영상은 선택 사항이며, 개별적으로 또는 함께 사용할 수 있습니다.
필수 파라미터
선택적 참조 입력
요청 예시
{
model_name: 'gemini-omni-1.1-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: 8,
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": {
"videos": [
{
"url": "https://example.com/generated-video.mp4"
}
]
}
}
}
상태 값
submitted: 작업이 접수되어 처리를 기다리는 중
processing: 동영상 생성 진행 중
succeed: 동영상 생성 완료
failed: 동영상 생성 실패
모범 사례
- 프롬프트 지시: 피사체, 동작, 카메라 움직임, 조명 및 장면 전개를 명확하게 설명하세요.
- 필수 설정: 지원되는 해상도를 항상 제공하고, Video Edit를 제외하고 지원되는 화면 비율과 길이도 제공하세요.
- 이미지 입력: 시작, 종료 및 참조 이미지에는 안정적이고 공개적으로 접근할 수 있는 URL을 사용하세요.
- 동영상 편집 입력: 제출하기 전에 원본 동영상 길이가 3-10초인지 확인하세요.
- 참조 자료 제한: 이미지 10개와 동영상 3개를 초과하여 제출하지 말고, 각 참조 동영상은 3초 이하로 유지하세요.