Create video
Starts an asynchronous text-to-video generation job. Available models include EU-hosted Google Veo (on Vertex AI). Use /v2/models/all to list every video model.
Returns a job descriptor with status: "pending". Poll GET /v2/videos/generations/{id} until status is succeeded (returns signed URLs) or failed (returns an error message). Generation typically takes 30 seconds to several minutes.
Credits are charged up-front based on the requested resolution, duration, and number of videos. If the job fails or produces fewer videos than requested, the difference is refunded automatically.
Example request
curl https://api.deutschlandgpt.de/v2/videos/generations \
-X POST \
-H "Authorization: Bearer $DGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A golden retriever puppy bounding through autumn leaves, slow motion, cinematic",
"model": "veo-3.1-fast",
"n": 1,
"durationSeconds": 8,
"resolution": "720p",
"aspectRatio": "16:9",
"seed": 0,
"parameters": {}
}'curl https://api.deutschlandgpt.de/v2/videos/generations \
-X POST \
-H "Authorization: Bearer $DGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A golden retriever puppy bounding through autumn leaves, slow motion, cinematic",
"model": "veo-3.1-fast",
"n": 1,
"durationSeconds": 8,
"resolution": "720p",
"aspectRatio": "16:9",
"seed": 0,
"parameters": {}
}'import os, requests
response = requests.post(
"https://api.deutschlandgpt.de/v2/videos/generations",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
json={
"prompt": "A golden retriever puppy bounding through autumn leaves, slow motion, cinematic",
"model": "veo-3.1-fast",
"n": 1,
"durationSeconds": 8,
"resolution": "720p",
"aspectRatio": "16:9",
"seed": 0,
"parameters": {}
},
)
print(response.json())import os, requests
response = requests.post(
"https://api.deutschlandgpt.de/v2/videos/generations",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
json={
"prompt": "A golden retriever puppy bounding through autumn leaves, slow motion, cinematic",
"model": "veo-3.1-fast",
"n": 1,
"durationSeconds": 8,
"resolution": "720p",
"aspectRatio": "16:9",
"seed": 0,
"parameters": {}
},
)
print(response.json())const response = await fetch('https://api.deutschlandgpt.de/v2/videos/generations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"prompt": "A golden retriever puppy bounding through autumn leaves, slow motion, cinematic",
"model": "veo-3.1-fast",
"n": 1,
"durationSeconds": 8,
"resolution": "720p",
"aspectRatio": "16:9",
"seed": 0,
"parameters": {}
}),
});
console.log(await response.json());const response = await fetch('https://api.deutschlandgpt.de/v2/videos/generations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"prompt": "A golden retriever puppy bounding through autumn leaves, slow motion, cinematic",
"model": "veo-3.1-fast",
"n": 1,
"durationSeconds": 8,
"resolution": "720p",
"aspectRatio": "16:9",
"seed": 0,
"parameters": {}
}),
});
console.log(await response.json());Request body
promptstringrequiredText description of the desired video. English produces the most reliable results.
modelstringoptionalVideo model to use. Defaults to veo-3.1-fast. Use /v2/models to discover available video models.
nintegeroptionalNumber of videos to generate. Capped per-model; Veo currently allows up to 4.
durationSecondsintegeroptionalLength of the video in seconds. Must be one of the model's supported durations (Veo: 4, 6, or 8).
resolutionstringoptionalOutput resolution. Must be supported by the model (Veo: 720p, 1080p).
aspectRatiostringoptionalAspect ratio. Must be supported by the model (Veo: 16:9, 9:16).
seedintegeroptionalOptional seed for reproducible generation (when supported by the model).
parametersobjectoptionalProvider-specific passthrough merged into the upstream request, for models that take extra options. Ignored by Vertex/Veo models.
Response
{
"id": "00000000-0000-0000-0000-000000000000",
"object": "video.generation_job",
"status": "pending",
"model": "string",
"created": 0,
"params": {
"durationSeconds": 0,
"resolution": "string",
"aspectRatio": "string",
"n": 0
},
"estimated_cost_in_euro": 0
}{
"id": "00000000-0000-0000-0000-000000000000",
"object": "video.generation_job",
"status": "pending",
"model": "string",
"created": 0,
"params": {
"durationSeconds": 0,
"resolution": "string",
"aspectRatio": "string",
"n": 0
},
"estimated_cost_in_euro": 0
}Job accepted; poll the GET endpoint with the returned id.
idstring<uuid>objectstringstatusstringmodelstringcreatedintegerUnix timestamp
paramsobjectdurationSecondsintegerresolutionstringaspectRatiostringnintegerestimated_cost_in_euronumberUpper bound on cost charged at job creation. Refunded down to actual cost on completion.
Response codes
Job accepted; poll the GET endpoint with the returned id.
Invalid duration, resolution, or aspect ratio for this model
Unauthorized
Insufficient credits
API key lacks permission for this model
Model not found