Gemini Native (Video)
curl --request POST \
--url https://api.leapx-hub.com/v1/video/generations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"durationSeconds": 123,
"aspectRatio": "<string>",
"resolution": "<string>",
"image": "<string>",
"lastFrame": "<string>",
"generateAudio": true,
"sampleCount": 123
}
'import requests
url = "https://api.leapx-hub.com/v1/video/generations"
payload = {
"prompt": "<string>",
"durationSeconds": 123,
"aspectRatio": "<string>",
"resolution": "<string>",
"image": "<string>",
"lastFrame": "<string>",
"generateAudio": True,
"sampleCount": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
durationSeconds: 123,
aspectRatio: '<string>',
resolution: '<string>',
image: '<string>',
lastFrame: '<string>',
generateAudio: true,
sampleCount: 123
})
};
fetch('https://api.leapx-hub.com/v1/video/generations', 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.leapx-hub.com/v1/video/generations",
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([
'prompt' => '<string>',
'durationSeconds' => 123,
'aspectRatio' => '<string>',
'resolution' => '<string>',
'image' => '<string>',
'lastFrame' => '<string>',
'generateAudio' => true,
'sampleCount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.leapx-hub.com/v1/video/generations"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"durationSeconds\": 123,\n \"aspectRatio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"image\": \"<string>\",\n \"lastFrame\": \"<string>\",\n \"generateAudio\": true,\n \"sampleCount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.leapx-hub.com/v1/video/generations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"durationSeconds\": 123,\n \"aspectRatio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"image\": \"<string>\",\n \"lastFrame\": \"<string>\",\n \"generateAudio\": true,\n \"sampleCount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leapx-hub.com/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"durationSeconds\": 123,\n \"aspectRatio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"image\": \"<string>\",\n \"lastFrame\": \"<string>\",\n \"generateAudio\": true,\n \"sampleCount\": 123\n}"
response = http.request(request)
puts response.read_bodyVideo Series
Gemini Native (Video)
Google Veo video generation models
POST
/
v1
/
video
/
generations
Gemini Native (Video)
curl --request POST \
--url https://api.leapx-hub.com/v1/video/generations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"durationSeconds": 123,
"aspectRatio": "<string>",
"resolution": "<string>",
"image": "<string>",
"lastFrame": "<string>",
"generateAudio": true,
"sampleCount": 123
}
'import requests
url = "https://api.leapx-hub.com/v1/video/generations"
payload = {
"prompt": "<string>",
"durationSeconds": 123,
"aspectRatio": "<string>",
"resolution": "<string>",
"image": "<string>",
"lastFrame": "<string>",
"generateAudio": True,
"sampleCount": 123
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
durationSeconds: 123,
aspectRatio: '<string>',
resolution: '<string>',
image: '<string>',
lastFrame: '<string>',
generateAudio: true,
sampleCount: 123
})
};
fetch('https://api.leapx-hub.com/v1/video/generations', 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.leapx-hub.com/v1/video/generations",
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([
'prompt' => '<string>',
'durationSeconds' => 123,
'aspectRatio' => '<string>',
'resolution' => '<string>',
'image' => '<string>',
'lastFrame' => '<string>',
'generateAudio' => true,
'sampleCount' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.leapx-hub.com/v1/video/generations"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"durationSeconds\": 123,\n \"aspectRatio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"image\": \"<string>\",\n \"lastFrame\": \"<string>\",\n \"generateAudio\": true,\n \"sampleCount\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.leapx-hub.com/v1/video/generations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"durationSeconds\": 123,\n \"aspectRatio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"image\": \"<string>\",\n \"lastFrame\": \"<string>\",\n \"generateAudio\": true,\n \"sampleCount\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leapx-hub.com/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"durationSeconds\": 123,\n \"aspectRatio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"image\": \"<string>\",\n \"lastFrame\": \"<string>\",\n \"generateAudio\": true,\n \"sampleCount\": 123\n}"
response = http.request(request)
puts response.read_bodyIntroduction
Veo is Google Vertex AI’s multimodal video generation model. It supports text-to-video (T2V), first-frame constraint, and first-and-last-frame constraint (3.1 series only) for coherent video generation. Use LeapX’s unified video API: submit a task to get atask_id, then query the task to poll status and get the result.
Authentication
string
required
Bearer Token, e.g.
Bearer sk-xxxxxxxxxxSupported models
| Model ID | Description |
|---|---|
veo-3.0-fast-generate-001 | Text-to-video, first-frame; fast (audio included by default) |
veo-3.1-fast-generate-preview | Text-to-video, first/first+last frame; fast |
veo-3.0-generate-preview | Text-to-video, first-frame |
veo-3.1-generate-preview | Text-to-video, first/first+last frame |
Call flow
- Submit task:
POST /v1/video/generationswithmodel,prompt, and Veo-specific parameters. - Poll status:
GET /v1/video/generations/{task_id}untilstatusissucceededorfailed. - Get result: On success,
urlin the response contains the video (Veo may returndata:video/mp4;base64,...or an OSS link).
Veo-specific parameters
string
required
Video generation prompt describing the scene and motion.
integer
default:"4"
Video duration in seconds; supported:
4, 6, 8.string
default:"16:9"
Aspect ratio; only
16:9 and 9:16 supported.string
default:"1080p"
Resolution:
720p, 1080p.string
First-frame reference image (URL or Base64) for image-to-video / first-frame constraint.
string
Last-frame reference image (veo-3.1 series only); use with first frame for start-and-end constraint.
boolean
default:"false"
Whether to generate synchronized audio. Fast models ignore this and always include audio.
integer
default:"1"
Number of videos to generate per request, range
1-4.personGeneration, addWatermark, seed), see Submit Video Task.
Request examples
Submit Veo task (text-to-video):curl -X POST "https://api.leapx-hub.com/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "veo-3.1-fast-generate-preview",
"prompt": "Morning light over a cyberpunk city skyline, camera slowly pushing in",
"durationSeconds": 6,
"aspectRatio": "16:9",
"resolution": "1080p",
"generateAudio": false
}'
curl -X GET "https://api.leapx-hub.com/v1/video/generations/{task_id}" \
-H "Authorization: Bearer sk-xxxxxxxxxx"
