curl --request POST \
--url https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instances": [
{
"prompt": "A cinematic aerial shot of a modern city at sunrise",
"referenceImages": [
{
"image": {
"inlineData": {
"mimeType": "image/png",
"data": "BASE64_IMAGE_DATA"
}
},
"referenceType": "asset"
}
]
}
],
"parameters": {
"aspectRatio": "16:9",
"durationSeconds": 5,
"resolution": "720p"
}
}
'import requests
url = "https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning"
payload = {
"instances": [
{
"prompt": "A cinematic aerial shot of a modern city at sunrise",
"referenceImages": [
{
"image": { "inlineData": {
"mimeType": "image/png",
"data": "BASE64_IMAGE_DATA"
} },
"referenceType": "asset"
}
]
}
],
"parameters": {
"aspectRatio": "16:9",
"durationSeconds": 5,
"resolution": "720p"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
instances: [
{
prompt: 'A cinematic aerial shot of a modern city at sunrise',
referenceImages: [
{
image: {inlineData: {mimeType: 'image/png', data: 'BASE64_IMAGE_DATA'}},
referenceType: 'asset'
}
]
}
],
parameters: {aspectRatio: '16:9', durationSeconds: 5, resolution: '720p'}
})
};
fetch('https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'instances' => [
[
'prompt' => 'A cinematic aerial shot of a modern city at sunrise',
'referenceImages' => [
[
'image' => [
'inlineData' => [
'mimeType' => 'image/png',
'data' => 'BASE64_IMAGE_DATA'
]
],
'referenceType' => 'asset'
]
]
]
],
'parameters' => [
'aspectRatio' => '16:9',
'durationSeconds' => 5,
'resolution' => '720p'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning"
payload := strings.NewReader("{\n \"instances\": [\n {\n \"prompt\": \"A cinematic aerial shot of a modern city at sunrise\",\n \"referenceImages\": [\n {\n \"image\": {\n \"inlineData\": {\n \"mimeType\": \"image/png\",\n \"data\": \"BASE64_IMAGE_DATA\"\n }\n },\n \"referenceType\": \"asset\"\n }\n ]\n }\n ],\n \"parameters\": {\n \"aspectRatio\": \"16:9\",\n \"durationSeconds\": 5,\n \"resolution\": \"720p\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instances\": [\n {\n \"prompt\": \"A cinematic aerial shot of a modern city at sunrise\",\n \"referenceImages\": [\n {\n \"image\": {\n \"inlineData\": {\n \"mimeType\": \"image/png\",\n \"data\": \"BASE64_IMAGE_DATA\"\n }\n },\n \"referenceType\": \"asset\"\n }\n ]\n }\n ],\n \"parameters\": {\n \"aspectRatio\": \"16:9\",\n \"durationSeconds\": 5,\n \"resolution\": \"720p\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"instances\": [\n {\n \"prompt\": \"A cinematic aerial shot of a modern city at sunrise\",\n \"referenceImages\": [\n {\n \"image\": {\n \"inlineData\": {\n \"mimeType\": \"image/png\",\n \"data\": \"BASE64_IMAGE_DATA\"\n }\n },\n \"referenceType\": \"asset\"\n }\n ]\n }\n ],\n \"parameters\": {\n \"aspectRatio\": \"16:9\",\n \"durationSeconds\": 5,\n \"resolution\": \"720p\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "models/veo3.1-fast/operations/abc123"
}Créer une vidéo (format Omni et Veo)
Cette série prend en charge le format de génération vidéo OpenAI (voir le lien Formats compatibles pour la génération vidéo Sora).
Cette page de présentation de l’API explique les formats vidéo liés à Omni et à Veo, ainsi que l’état de prise en charge par la passerelle actuelle du format natif de Veo.
Pour les appels externes de la série Veo, veuillez utiliser le mode de compatibilité OpenAI Sora : POST /v1/videos.
Le chemin réservé pour le mode natif de Google est : POST /v1beta/models/{model}:predictLongRunning. La passerelle actuelle n’est pas encore connectée à la chaîne native de distribution des tâches de Veo ; les appels au format du corps de requête natif instances/parameters ne sont donc pas encore pris en charge.
Point clé : les points de terminaison pris en charge par le modèle gemini-omni sont le format compatible Sora POST /v1/videos ou le format Seedance POST /api/v3/contents/generations/tasks ; les points de terminaison Google natifs Veo predictLongRunning de cette page ne sont pas pris en charge.
curl --request POST \
--url https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instances": [
{
"prompt": "A cinematic aerial shot of a modern city at sunrise",
"referenceImages": [
{
"image": {
"inlineData": {
"mimeType": "image/png",
"data": "BASE64_IMAGE_DATA"
}
},
"referenceType": "asset"
}
]
}
],
"parameters": {
"aspectRatio": "16:9",
"durationSeconds": 5,
"resolution": "720p"
}
}
'import requests
url = "https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning"
payload = {
"instances": [
{
"prompt": "A cinematic aerial shot of a modern city at sunrise",
"referenceImages": [
{
"image": { "inlineData": {
"mimeType": "image/png",
"data": "BASE64_IMAGE_DATA"
} },
"referenceType": "asset"
}
]
}
],
"parameters": {
"aspectRatio": "16:9",
"durationSeconds": 5,
"resolution": "720p"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
instances: [
{
prompt: 'A cinematic aerial shot of a modern city at sunrise',
referenceImages: [
{
image: {inlineData: {mimeType: 'image/png', data: 'BASE64_IMAGE_DATA'}},
referenceType: 'asset'
}
]
}
],
parameters: {aspectRatio: '16:9', durationSeconds: 5, resolution: '720p'}
})
};
fetch('https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'instances' => [
[
'prompt' => 'A cinematic aerial shot of a modern city at sunrise',
'referenceImages' => [
[
'image' => [
'inlineData' => [
'mimeType' => 'image/png',
'data' => 'BASE64_IMAGE_DATA'
]
],
'referenceType' => 'asset'
]
]
]
],
'parameters' => [
'aspectRatio' => '16:9',
'durationSeconds' => 5,
'resolution' => '720p'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning"
payload := strings.NewReader("{\n \"instances\": [\n {\n \"prompt\": \"A cinematic aerial shot of a modern city at sunrise\",\n \"referenceImages\": [\n {\n \"image\": {\n \"inlineData\": {\n \"mimeType\": \"image/png\",\n \"data\": \"BASE64_IMAGE_DATA\"\n }\n },\n \"referenceType\": \"asset\"\n }\n ]\n }\n ],\n \"parameters\": {\n \"aspectRatio\": \"16:9\",\n \"durationSeconds\": 5,\n \"resolution\": \"720p\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instances\": [\n {\n \"prompt\": \"A cinematic aerial shot of a modern city at sunrise\",\n \"referenceImages\": [\n {\n \"image\": {\n \"inlineData\": {\n \"mimeType\": \"image/png\",\n \"data\": \"BASE64_IMAGE_DATA\"\n }\n },\n \"referenceType\": \"asset\"\n }\n ]\n }\n ],\n \"parameters\": {\n \"aspectRatio\": \"16:9\",\n \"durationSeconds\": 5,\n \"resolution\": \"720p\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aiid.edu.kg/v1beta/models/{model}:predictLongRunning")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"instances\": [\n {\n \"prompt\": \"A cinematic aerial shot of a modern city at sunrise\",\n \"referenceImages\": [\n {\n \"image\": {\n \"inlineData\": {\n \"mimeType\": \"image/png\",\n \"data\": \"BASE64_IMAGE_DATA\"\n }\n },\n \"referenceType\": \"asset\"\n }\n ]\n }\n ],\n \"parameters\": {\n \"aspectRatio\": \"16:9\",\n \"durationSeconds\": 5,\n \"resolution\": \"720p\"\n }\n}"
response = http.request(request)
puts response.read_body{
"name": "models/veo3.1-fast/operations/abc123"
}Autorisations
Utilisez l'authentification Bearer Token.
Format : Authorization: Bearer sk-xxxxxx
Paramètres de chemin
Veo Nom du modèle.
veo3, veo3-fast, veo3-fast-frames, veo3-frames, veo3-pro, veo3-pro-frames, veo3.1, veo3.1-4k, veo3.1-components, veo3.1-fast, veo3.1-pro, veo3.1-pro-4k "veo3.1-fast"
Corps
1Hide child attributes
Hide child attributes
Générer des prompts
"A cinematic aerial shot of a modern city at sunrise"
Facultatif. 1 à 3 images de référence, utilisant le format natif Google inlineData ou une structure d'URI de fichier.
Hide child attributes
Hide child attributes
"asset"
Réponse
Structure de réponse réussie en réserve. Actuellement fournie uniquement à titre de description du protocole ; les appels réels ne sont pas pris en charge.
Le champ operation name, utilisé pour les requêtes d'état ultérieures.
"models/veo3.1-fast/operations/abc123"
