# Veo 3.1 API Vollständige API-Referenz für Veo 3.1-Video-Generierungsmodelle. ## Modellvarianten Diese API unterstützt vier Modellvarianten: | Modell | Kennung | Geschwindigkeit | Beschreibung | |-------|-----|-------|-------------| | **Veo 3.1 Text to Video** | `veo3.1-text-to-video` | Standard | Hochwertige Text-zu-Video-Generierung | | **Veo 3.1 Image to Video** | `veo3.1-image-to-video` | Standard | Hochwertige Bild-zu-Video-Generierung | | **Veo 3.1 Fast Text to Video** | `veo3.1-fast-text-to-video` | Fast | Schnellere Text-zu-Video-Generierung | | **Veo 3.1 Fast Image to Video** | `veo3.1-fast-image-to-video` | Fast | Schnellere Bild-zu-Video-Generierung | ## Schnellvergleich | Funktion | Standard | Fast | |---------|----------|------| | Generation Speed | ~2-3 minutes | ~1-2 minutes | | Quality | Höchste | Hoch | | Aspect Ratios | 16:9, 9:16 | 16:9, 9:16 | | Funktion | Text to Video | Image to Video | |---------|---------------|----------------| | Input | Text prompt | Image + Text prompt | | Start Frame | Not supported | Optional | | End Frame | Not supported | Optional | | Audio | Not supported | Not supported | ## Veo 3.1 Text to Video (Standard & Fast) ### Endpoint ``` POST /api/v1/video/task ``` ### Anfrageparameter #### Erforderlich | Parameter | Typ | Beschreibung | |-----------|------|--------------| | `model_name` | string | `"veo3.1-text-to-video"` oder `"veo3.1-fast-text-to-video"` | | `prompt` | string | Prompt für die Videoerzeugung | #### Optional | Parameter | Typ | Beschreibung | |-----------|------|--------------| | `aspect_ratio` | string | Seitenverhältnis des Videos: `"16:9"` oder `"9:16"` | ### Beispielanfrage **Standard-Version:** ```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; ``` **Fast-Version:** ```javascript { model_name: 'veo3.1-fast-text-to-video', prompt: 'A time-lapse of a flower blooming' } ``` ## Veo 3.1 Image to Video (Standard & Fast) ### Anfrageparameter #### Erforderlich | Parameter | Typ | Beschreibung | |-----------|------|--------------| | `model_name` | string | `"veo3.1-image-to-video"` oder `"veo3.1-fast-image-to-video"` | | `prompt` | string | Prompt für die Videoerzeugung | #### Optional | Parameter | Typ | Beschreibung | |-----------|------|--------------| | `aspect_ratio` | string | Seitenverhältnis des Videos: `"16:9"` oder `"9:16"` | | `image_url` | string | Optionale Bild-URL für das erste Frame | | `image_end_url` | string | Das letzte Frame des Videos | ### Beispielanfrage **Standard-Version:** ```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; ``` **Fast-Version:** ```javascript { model_name: 'veo3.1-fast-image-to-video', image_url: 'https://example.com/image.jpg', prompt: 'Camera slowly zooms in, soft wind movement' } ``` ## Antwortformat ### Erste Antwort ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/video/{task_id}", "task_status": "submitted" } } ``` ### Polling-Antwort Rufe `/api/v1/video/{taskId}` ab, um den Status zu prüfen: ```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" } ] } } } ``` ### Statuswerte - `submitted`: Aufgabe angenommen und wartet auf Verarbeitung - `processing`: Videoerzeugung läuft - `succeed`: Videoerzeugung abgeschlossen - `failed`: Videoerzeugung fehlgeschlagen ## Verarbeitungszeit - **Standard-Version**: ~2-3 Minuten - **Fast-Version**: ~1-2 Minuten Verwende Polling, um den Generierungsstatus alle 5-10 Sekunden zu prüfen. ## Best Practices - Sei spezifisch bei Kamerabewegungen und Szenendynamik - Die Fast-Version bietet gute Qualität bei schnellerer Verarbeitung - Die Standard-Version liefert die höchste Ausgabequalität - Verwende beschreibende Prompts für bessere Ergebnisse