Veo 3.1
Prix catalogue du fournisseur : sans majoration de plateforme, paiement à l'usage. Ce sont les prix catalogue officiels. Les clients connectés peuvent voir les prix effectifs incluant les remises de l’espace de travail sur /console/pricing.
Utilisez Veo 3.1 en 30 secondes
API de jobs asynchrone : créez une tâche puis interrogez-la, ou maintenez la requête ouverte avec Prefer: wait. POST /v1/videos
import time
import requests
BASE = "https://synthorai.io/v1"
HEADERS = {"Authorization": "Bearer sk-syn-..."}
# 1) create the video generation job (POST /v1/videos)
task = requests.post(
f"{BASE}/videos",
headers=HEADERS,
json={
"model": "veo-3.1-generate-001",
"prompt": "a watercolor lighthouse at dawn, waves rolling in, camera pulling back",
"resolution": "720p",
"duration": 5,
},
).json()
# 2) poll the job until it reaches a terminal state
while task["status"] in ("queued", "in_progress"):
time.sleep(5)
task = requests.get(f"{BASE}/videos/{task['id']}", headers=HEADERS).json()
# 3) completed → signed video URL (valid ~24h — download and store it promptly)
if task["status"] == "completed":
print(task["data"][0]["url"])
else:
print(task["error"])const HEADERS = {
Authorization: "Bearer sk-syn-...",
"Content-Type": "application/json",
};
interface VideoTask {
id: string;
status: "queued" | "in_progress" | "completed" | "failed" | "cancelled";
data?: Array<{ url: string }>;
error?: { code: string; message: string };
}
// 1) create the video generation job (POST /v1/videos)
const created = await fetch("https://synthorai.io/v1/videos", {
method: "POST",
headers: HEADERS,
body: JSON.stringify({
model: "veo-3.1-generate-001",
prompt: "a watercolor lighthouse at dawn, waves rolling in, camera pulling back",
resolution: "720p",
duration: 5,
}),
});
let task = (await created.json()) as VideoTask;
// 2) poll the job until it reaches a terminal state
while (task.status === "queued" || task.status === "in_progress") {
await new Promise((r) => setTimeout(r, 5000));
const res = await fetch(`https://synthorai.io/v1/videos/${task.id}`, { headers: HEADERS });
task = (await res.json()) as VideoTask;
}
// 3) completed → signed video URL (valid ~24h — download and store it promptly)
if (task.status === "completed") console.log(task.data?.[0]?.url);
else console.error(task.error);# Create the job; "Prefer: wait" holds the request up to 60s and returns the
# completed task when generation finishes in time (else the queued task).
curl https://synthorai.io/v1/videos \
-H "Authorization: Bearer sk-syn-..." \
-H "Content-Type: application/json" \
-H "Prefer: wait=60" \
-d '{
"model": "veo-3.1-generate-001",
"prompt": "a watercolor lighthouse at dawn, waves rolling in, camera pulling back",
"resolution": "720p",
"duration": 5
}'
# Still queued / in_progress? Poll until completed → data[0].url (valid ~24h).
curl https://synthorai.io/v1/videos/vid_9f2e8c1a4b7d \
-H "Authorization: Bearer sk-syn-..."package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"time"
)
const base = "https://synthorai.io/v1"
type videoTask struct {
ID string `json:"id"`
Status string `json:"status"`
Data []struct {
URL string `json:"url"`
} `json:"data"`
}
func call(method, url string, body []byte) (t videoTask) {
req, _ := http.NewRequest(method, url, bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer sk-syn-...")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
json.NewDecoder(resp.Body).Decode(&t)
return t
}
func main() {
// 1) create the video generation job (POST /v1/videos)
payload, _ := json.Marshal(map[string]any{
"model": "veo-3.1-generate-001",
"prompt": "a watercolor lighthouse at dawn, waves rolling in, camera pulling back",
"resolution": "720p",
"duration": 5,
})
task := call("POST", base+"/videos", payload)
// 2) poll the job until it reaches a terminal state
for task.Status == "queued" || task.Status == "in_progress" {
time.Sleep(5 * time.Second)
task = call("GET", base+"/videos/"+task.ID, nil)
}
// 3) completed → signed video URL (valid ~24h — download and store promptly)
if task.Status == "completed" {
fmt.Println(task.Data[0].URL)
}
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
// JDK built-in HttpClient — no extra dependency needed.
HttpClient http = HttpClient.newHttpClient();
// 1) create the job; "Prefer: wait=60" holds the request up to 60s and
// returns the completed task when generation finishes in time
HttpRequest create = HttpRequest.newBuilder(URI.create("https://synthorai.io/v1/videos"))
.header("Authorization", "Bearer sk-syn-...")
.header("Content-Type", "application/json")
.header("Prefer", "wait=60")
.POST(HttpRequest.BodyPublishers.ofString("""
{"model": "veo-3.1-generate-001",
"prompt": "a watercolor lighthouse at dawn, waves rolling in, camera pulling back",
"resolution": "720p", "duration": 5}"""))
.build();
String task = http.send(create, HttpResponse.BodyHandlers.ofString()).body();
System.out.println(task); // {"id":"vid_…","status":…} — completed → data[0].url
// 2) still queued / in_progress? Poll GET https://synthorai.io/v1/videos/{id} until the
// status turns completed, then download data[0].url (valid ~24h).À propos de Veo 3.1
Veo 3.1 est le modèle phare actuel de génération vidéo de Google, le plus récent de la gamme Veo.
- Il génère des clips .mp4 à partir d'un prompt textuel, d'une image de première image ou en interpolation première-et-dernière image entre deux images guides, le tout avec audio natif synchronisé — dialogue avec synchronisation labiale, son d'ambiance et musique.
- La sortie est en 720p ou 1080p, 24 fps, de 4, 6 ou 8 secondes, en 16:9 ou 9:16, et un commutateur generateAudio choisit entre sortie sonore et silencieuse.
- Veo 3.1 affine la synchronisation audio-vidéo et la fidélité à l'image de référence par rapport à Veo 3.
- Synthorai le sert via l'API de jobs asynchrone /v1/videos — créez une tâche, puis interrogez-la (ou maintenez l'appel ouvert avec Prefer: wait) jusqu'à ce que l'URL signée de la vidéo soit prête — et facture à la seconde de sortie à des tarifs distincts pour le son et le silence.
Spécifications et limites
| Modalités | text + image → video |
| Fonctionnalités | vision |
| Résolution | 720p / 1080p |
| Durée du clip | 4 / 6 / 8 s |
| Fréquence d'images | 24 fps |
| Formats d'image | 16:9 · 9:16 |
| Entrées vidéo | text-to-video · first-frame & first/last-frame image-to-video (up to 2 guide images) |
| Audio natif | Oui — génère le son |
| Format | .mp4 |
| À noter | Google's Veo 3.1 video model, the current flagship of the Veo line: text-to-video, first-frame image-to-video, and first-and-last-frame interpolation (up to two guide images), all with native synchronized audio (dialogue, ambient sound, music); 720p/1080p, 24 fps, 4/6/8 s, 16:9 and 9:16; a generateAudio switch selects sound-on vs silent output. Veo 3.1 sharpens audio-visual sync and reference-image adherence over Veo 3. Synthorai serves it via the async /v1/videos job API — create a task, then poll it (or hold the request open with Prefer: wait) until the signed video URL is ready — and bills per output second at separate sound-on and silent rates. |
FAQ
Peut-on essayer l'API Veo 3.1 gratuitement ?
Oui : les nouveaux comptes reçoivent 10 appels d'essai et jusqu'à $1 de crédit gratuit, sans carte bancaire. De quoi essayer Veo 3.1 sur votre charge de travail réelle avant d'ajouter un moyen de paiement.
Quels sont les points forts de Veo 3.1 ?
Modèle phare Veo actuel avec audio natif, ainsi que image-to-video première/dernière image, jusqu'à deux guides et sortie sonore ou silencieuse à tarifs distincts. Voir la section À propos pour le tableau complet, tiré des notes de version officielles du fournisseur.
Combien coûte Veo 3.1 ?
Sur Synthorai, Veo 3.1 coûte $0.4 par seconde de vidéo générée. Seules les générations réussies sont facturées : paiement à l'usage, sans majoration de plateforme, sans abonnement.
Comment générer des vidéos avec l'API Veo 3.1 ?
Envoyez un POST à /v1/videos sur Synthorai avec model="veo-3.1-generate-001" pour créer un job asynchrone, puis interrogez la tâche — ou maintenez la requête ouverte avec l'en-tête Prefer: wait — jusqu'à obtenir l'URL de la vidéo. Aucun SDK du fournisseur n'est nécessaire.
Comment obtenir l'accès à Veo 3.1 ?
Pointez votre SDK OpenAI existant vers base_url="https://synthorai.io/v1", définissez model="veo-3.1-generate-001", et c'est tout. Une seule clé API couvre tous les modèles de la passerelle.