# model kann "veo3.1-fast" sein, alternativ auch der Alias "veo3.1-fast-ext"curl --request POST \ --url https://api.apimart.ai/v1/videos/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "veo3.1-fast", "prompt": "Dolphins leaping in the azure ocean", "duration": 8, "aspect_ratio": "16:9", "image_urls": ["https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"] }'
import Foundationlet url = URL(string: "https://api.apimart.ai/v1/videos/generations")!let payload: [String: Any] = [ "model": "veo3.1-fast", "prompt": "Dolphins leaping in the azure ocean", "duration": 8, "aspect_ratio": "16:9", "image_urls": ["https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"]]var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print(responseString) }}task.resume()
using System;using System.Net.Http;using System.Text;using System.Threading.Tasks;class Program{ static async Task Main(string[] args) { var url = "https://api.apimart.ai/v1/videos/generations"; var payload = @"{ ""model"": ""veo3.1-fast"", ""prompt"": ""Dolphins leaping in the azure ocean"", ""duration"": 8, ""aspect_ratio"": ""16:9"", ""image_urls"": [""https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png""] }"; using var client = new HttpClient(); client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>"); var content = new StringContent(payload, Encoding.UTF8, "application/json"); var response = await client.PostAsync(url, content); var result = await response.Content.ReadAsStringAsync(); Console.WriteLine(result); }}
(* Requires cohttp and yojson libraries *)open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://api.apimart.ai/v1/videos/generations"let payload = {|{ "model": "veo3.1-fast", "prompt": "Dolphins leaping in the azure ocean", "duration": 8, "aspect_ratio": "16:9", "image_urls": ["https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"]}|}let () = let headers = Header.init () |> fun h -> Header.add h "Authorization" "Bearer <token>" |> fun h -> Header.add h "Content-Type" "application/json" in let body = Cohttp_lwt.Body.of_string payload in let response = Client.post ~headers ~body (Uri.of_string url) >>= fun (resp, body) -> body |> Cohttp_lwt.Body.to_string >|= fun body_str -> print_endline body_str in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { final url = Uri.parse('https://api.apimart.ai/v1/videos/generations'); final payload = { 'model': 'veo3.1-fast', 'prompt': 'Dolphins leaping in the azure ocean', 'duration': 8, 'aspect_ratio': '16:9', 'image_urls': ['https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png'] }; final response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json', }, body: jsonEncode(payload), ); print(response.body);}
{ "error": { "code": 500, "message": "Internal server error. Please try again later", "type": "server_error" }}
{ "error": { "code": 502, "message": "Bad gateway. The server is temporarily unavailable", "type": "bad_gateway" }}
VEO3
VEO3 Videogenerierung
Asynchroner Verarbeitungsmodus, gibt Task-ID für nachfolgende Abfragen zurück
Unterstützt mehrere Generierungsmodi wie Text-zu-Video und Bild-zu-Video
Unterstützt 4K-Auflösungsausgabe
Generierte Video-Links sind 24 Stunden gültig, bitte zeitnah sichern
POST
/
v1
/
videos
/
generations
# model kann "veo3.1-fast" sein, alternativ auch der Alias "veo3.1-fast-ext"curl --request POST \ --url https://api.apimart.ai/v1/videos/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "veo3.1-fast", "prompt": "Dolphins leaping in the azure ocean", "duration": 8, "aspect_ratio": "16:9", "image_urls": ["https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"] }'
import Foundationlet url = URL(string: "https://api.apimart.ai/v1/videos/generations")!let payload: [String: Any] = [ "model": "veo3.1-fast", "prompt": "Dolphins leaping in the azure ocean", "duration": 8, "aspect_ratio": "16:9", "image_urls": ["https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"]]var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print(responseString) }}task.resume()
using System;using System.Net.Http;using System.Text;using System.Threading.Tasks;class Program{ static async Task Main(string[] args) { var url = "https://api.apimart.ai/v1/videos/generations"; var payload = @"{ ""model"": ""veo3.1-fast"", ""prompt"": ""Dolphins leaping in the azure ocean"", ""duration"": 8, ""aspect_ratio"": ""16:9"", ""image_urls"": [""https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png""] }"; using var client = new HttpClient(); client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>"); var content = new StringContent(payload, Encoding.UTF8, "application/json"); var response = await client.PostAsync(url, content); var result = await response.Content.ReadAsStringAsync(); Console.WriteLine(result); }}
(* Requires cohttp and yojson libraries *)open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://api.apimart.ai/v1/videos/generations"let payload = {|{ "model": "veo3.1-fast", "prompt": "Dolphins leaping in the azure ocean", "duration": 8, "aspect_ratio": "16:9", "image_urls": ["https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"]}|}let () = let headers = Header.init () |> fun h -> Header.add h "Authorization" "Bearer <token>" |> fun h -> Header.add h "Content-Type" "application/json" in let body = Cohttp_lwt.Body.of_string payload in let response = Client.post ~headers ~body (Uri.of_string url) >>= fun (resp, body) -> body |> Cohttp_lwt.Body.to_string >|= fun body_str -> print_endline body_str in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { final url = Uri.parse('https://api.apimart.ai/v1/videos/generations'); final payload = { 'model': 'veo3.1-fast', 'prompt': 'Dolphins leaping in the azure ocean', 'duration': 8, 'aspect_ratio': '16:9', 'image_urls': ['https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png'] }; final response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json', }, body: jsonEncode(payload), ); print(response.body);}
{ "error": { "code": 500, "message": "Internal server error. Please try again later", "type": "server_error" }}
{ "error": { "code": 502, "message": "Bad gateway. The server is temporarily unavailable", "type": "bad_gateway" }}
Hinweis zur Modellnamen-Kompatibilität: Diese Schnittstelle unterstützt auch die Aliasnamen veo3.1-fast-ext (entspricht veo3.1-fast), veo3.1-quality-ext (entspricht veo3.1-quality) und veo3.1-lite-ext (entspricht veo3.1-lite). Sie sind austauschbar und liefern identische Ergebnisse.
# model kann "veo3.1-fast" sein, alternativ auch der Alias "veo3.1-fast-ext"curl --request POST \ --url https://api.apimart.ai/v1/videos/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "veo3.1-fast", "prompt": "Dolphins leaping in the azure ocean", "duration": 8, "aspect_ratio": "16:9", "image_urls": ["https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"] }'
import Foundationlet url = URL(string: "https://api.apimart.ai/v1/videos/generations")!let payload: [String: Any] = [ "model": "veo3.1-fast", "prompt": "Dolphins leaping in the azure ocean", "duration": 8, "aspect_ratio": "16:9", "image_urls": ["https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"]]var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print(responseString) }}task.resume()
using System;using System.Net.Http;using System.Text;using System.Threading.Tasks;class Program{ static async Task Main(string[] args) { var url = "https://api.apimart.ai/v1/videos/generations"; var payload = @"{ ""model"": ""veo3.1-fast"", ""prompt"": ""Dolphins leaping in the azure ocean"", ""duration"": 8, ""aspect_ratio"": ""16:9"", ""image_urls"": [""https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png""] }"; using var client = new HttpClient(); client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>"); var content = new StringContent(payload, Encoding.UTF8, "application/json"); var response = await client.PostAsync(url, content); var result = await response.Content.ReadAsStringAsync(); Console.WriteLine(result); }}
(* Requires cohttp and yojson libraries *)open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://api.apimart.ai/v1/videos/generations"let payload = {|{ "model": "veo3.1-fast", "prompt": "Dolphins leaping in the azure ocean", "duration": 8, "aspect_ratio": "16:9", "image_urls": ["https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png"]}|}let () = let headers = Header.init () |> fun h -> Header.add h "Authorization" "Bearer <token>" |> fun h -> Header.add h "Content-Type" "application/json" in let body = Cohttp_lwt.Body.of_string payload in let response = Client.post ~headers ~body (Uri.of_string url) >>= fun (resp, body) -> body |> Cohttp_lwt.Body.to_string >|= fun body_str -> print_endline body_str in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { final url = Uri.parse('https://api.apimart.ai/v1/videos/generations'); final payload = { 'model': 'veo3.1-fast', 'prompt': 'Dolphins leaping in the azure ocean', 'duration': 8, 'aspect_ratio': '16:9', 'image_urls': ['https://cdn.apimart.ai/doc/9998238783208208-9972597b-255d-4e7e-9649-e6ee38a837aa-image_task_01K88B53MTK41PP5KGDTG2PA5P_0.png'] }; final response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json', }, body: jsonEncode(payload), ); print(response.body);}
{ "error": { "code": 500, "message": "Internal server error. Please try again later", "type": "server_error" }}
{ "error": { "code": 502, "message": "Bad gateway. The server is temporarily unavailable", "type": "bad_gateway" }}
Autorisierung
string
erforderlich
Alle API-Endpunkte erfordern eine Bearer-Token-AuthentifizierungHolen Sie Ihren API Key:Besuchen Sie die Seite zur API-Key-Verwaltung, um Ihren API Key zu erhaltenIm Anfrage-Header hinzufügen:
Authorization: Bearer YOUR_API_KEY
Anfrageparameter
string
Standard:"veo3.1-fast"
erforderlich
Name des VideogenerierungsmodellsVerfügbare Modelle:
veo3.1-fast — Modell für schnelle Generierung, geeignet für schnelle Vorschauen und Iterationen (kompatibler Alias veo3.1-fast-ext)
veo3.1-quality — Modell für hochwertige Generierung, geeignet für die Endproduktion (kompatibler Alias veo3.1-quality-ext)
veo3.1-lite — Leichtgewichtiges Generierungsmodell, geeignet für kostengünstige Stapelgenerierung (kompatibler Alias veo3.1-lite-ext)
Beispiel: "veo3.1-fast"
Zur Kompatibilität mit älteren Aufrufen können die Aliasnamen veo3.1-fast-ext (entspricht veo3.1-fast), veo3.1-quality-ext (entspricht veo3.1-quality) und veo3.1-lite-ext (entspricht veo3.1-lite) weiterhin verwendet werden.
boolean
Standard:"false"
Legt fest, ob der Inhalt vor dem Absenden des Videoauftrags moderiert wird.
true: Prompts und Eingabebilder mit omni-moderation-latest prüfen
false oder nicht angegeben: keine Moderationsanfrage und damit keine zusätzlichen Moderationskosten oder Verzögerung (Standard)
string
erforderlich
Textbeschreibung für die Videogenerierung
integer
Videodauer in SekundenFester Wert: 8 (VEO3 unterstützt nur 8 Sekunden Dauer)
string
Seitenverhältnis des VideosUnterstützte Formate:
16:9 (Querformat)
9:16 (Hochformat)
string
VideogenerierungstypUnterstützte Typen:
frame — Frame-zu-Video (FL-Modus)
reference — Video aus Referenzbild
Wenn nicht angegeben, wird basierend auf der Bildanzahl gewählt: 2 Bilder für Frame-zu-Video, 3 Bilder für Video aus ReferenzbildHinweis: Das Modell veo3.1-quality unterstützt den Modus reference nicht
Das Modell veo3.1-lite unterstützt diesen Parameter nicht, übergeben Sie ihn nicht
array<url>
Array von Referenzbild-URLs für die Bild-zu-Video-GenerierungUnterstützt öffentlich zugängliche Bild-URLs (http:// oder https://)Beispiel: ["https://example.com/image.jpg"]Einschränkungen:
Maximal 3 Bilder
Für den Frame-zu-Video-Modus: erstes Bild ist der Startframe, zweites Bild ist der Endframe
Maximale Dateigröße: 10 MB
Unterstützte Formate: .jpeg, .jpg, .png, .webp
Das Modell veo3.1-lite unterstützt diesen Parameter nicht, übergeben Sie ihn nicht
string
VideoauflösungUnterstützte Werte:
720p (Standard)
1080p
4k
boolean
GIF-Ausgabeformat aktivieren. Standard: falseHinweis: GIF und 1080p/4k-Auflösung können nicht gleichzeitig verwendet werden
boolean
Standard:"false"
Ob der offizielle Kanal als Fallback verwendet werden soll
false: nicht verwenden (Standard)
true: offiziellen Kanal verwenden
Das Modell veo3.1-lite unterstützt diesen Parameter nicht, übergeben Sie ihn nicht