Veo 3.1 API
Veo 3.1 비디오 생성 모델의 완전한 API 레퍼런스입니다.
모델 변형
이 API는 네 가지 모델 변형을 지원합니다:
빠른 비교
Veo 3.1 Text to Video (표준 및 빠름)
엔드포인트 {#}
POST /api/v1/video/task
요청 파라미터
필수
선택 사항
요청 예시
표준 버전:
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: 'veo3.1-text-to-video',
prompt: 'A time-lapse of a flower blooming'
})
});
const { data } = await response.json();
const taskId = data.task_id;
빠른 버전:
{
model_name: 'veo3.1-fast-text-to-video',
prompt: 'A time-lapse of a flower blooming'
}
Veo 3.1 Image 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: 'veo3.1-image-to-video',
image_url: 'https://example.com/image.jpg',
prompt: 'Camera slowly zooms in, soft wind movement'
})
});
const { data } = await response.json();
const taskId = data.task_id;
빠른 버전:
{
model_name: 'veo3.1-fast-image-to-video',
image_url: 'https://example.com/image.jpg',
prompt: 'Camera slowly zooms in, soft wind movement'
}
응답 형식
초기 응답
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "submitted"
}
}
폴링 응답
/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: 비디오 생성 실패
처리 시간
- 표준 버전: 약 2-3분
- 빠른 버전: 약 1-2분
5-10초마다 폴링을 사용하여 생성 상태를 확인하세요.
모범 사례
- 카메라 움직임과 장면 역학에 대해 구체적으로 설명하세요
- 빠른 버전은 더 빠른 처리로 좋은 품질을 제공합니다
- 표준 버전은 최고 품질의 출력을 제공합니다
- 더 나은 결과를 위해 상세한 프롬프트를 사용하세요