# Veo 3.1 API Veo 3.1 비디오 생성 모델의 완전한 API 레퍼런스입니다. ## 모델 변형 이 API는 네 가지 모델 변형을 지원합니다: | 모델 | ID | 속도 | 설명 | |-------|-----|-------|-------------| | **Veo 3.1 Text to Video** | `veo3.1-text-to-video` | 표준 | 고품질 텍스트-비디오 생성 | | **Veo 3.1 Image to Video** | `veo3.1-image-to-video` | 표준 | 고품질 이미지-비디오 생성 | | **Veo 3.1 Fast Text to Video** | `veo3.1-fast-text-to-video` | 빠름 | 더 빠른 텍스트-비디오 생성 | | **Veo 3.1 Fast Image to Video** | `veo3.1-fast-image-to-video` | 빠름 | 더 빠른 이미지-비디오 생성 | ## 빠른 비교 | 기능 | 표준 | 빠름 | |---------|----------|------| | 생성 속도 | ~2-3분 | ~1-2분 | | 품질 | 최고 | 높음 | | 화면 비율 | 16:9, 9:16 | 16:9, 9:16 | | 기능 | Text to Video | Image to Video | |---------|---------------|----------------| | 입력 | 텍스트 프롬프트 | 이미지 + 텍스트 프롬프트 | | 시작 프레임 | 지원 안 함 | 선택 사항 | | 종료 프레임 | 지원 안 함 | 선택 사항 | | 오디오 | 지원 안 함 | 지원 안 함 | ## Veo 3.1 Text to Video (표준 및 빠름) ### 엔드포인트 ``` POST /api/v1/video/task ``` ### 요청 파라미터 #### 필수 | 파라미터 | 타입 | 설명 | |-----------|------|-------------| | `model_name` | string | `"veo3.1-text-to-video"` 또는 `"veo3.1-fast-text-to-video"` | | `prompt` | string | 비디오 생성 프롬프트 | #### 선택 사항 | 파라미터 | 타입 | 설명 | |-----------|------|-------------| | `aspect_ratio` | string | 비디오 화면 비율: `"16:9"` 또는 `"9:16"` | ### 요청 예시 **표준 버전:** ```javascript 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; ``` **빠른 버전:** ```javascript { model_name: 'veo3.1-fast-text-to-video', prompt: 'A time-lapse of a flower blooming' } ``` ## Veo 3.1 Image to Video (표준 및 빠름) ### 요청 파라미터 #### 필수 | 파라미터 | 타입 | 설명 | |-----------|------|-------------| | `model_name` | string | `"veo3.1-image-to-video"` 또는 `"veo3.1-fast-image-to-video"` | | `prompt` | string | 비디오 생성 프롬프트 | #### 선택 사항 | 파라미터 | 타입 | 설명 | |-----------|------|-------------| | `aspect_ratio` | string | 비디오 화면 비율: `"16:9"` 또는 `"9:16"` | | `image_url` | string | 선택적 시작 프레임 이미지 URL | | `image_end_url` | string | 비디오의 마지막 프레임 | ### 요청 예시 **표준 버전:** ```javascript 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; ``` **빠른 버전:** ```javascript { model_name: 'veo3.1-fast-image-to-video', image_url: 'https://example.com/image.jpg', prompt: 'Camera slowly zooms in, soft wind movement' } ``` ## 응답 형식 ### 초기 응답 ```json { "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}`를 폴링하여 상태를 확인합니다: ```json { "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`: 비디오 생성 실패 ## 처리 시간 - **표준 버전**: 약 2-3분 - **빠른 버전**: 약 1-2분 5-10초마다 폴링을 사용하여 생성 상태를 확인하세요. ## 모범 사례 - 카메라 움직임과 장면 역학에 대해 구체적으로 설명하세요 - 빠른 버전은 더 빠른 처리로 좋은 품질을 제공합니다 - 표준 버전은 최고 품질의 출력을 제공합니다 - 더 나은 결과를 위해 상세한 프롬프트를 사용하세요