Veo 3.0 Text-to-Video
curl --request POST \
--url https://api.myrouter.ai/v3/async/veo-3.0-generate-001-text2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"prompt": "<string>",
"aspect_ratio": "<string>",
"duration_seconds": 123,
"enhance_prompt": true,
"generate_audio": true,
"negative_prompt": "<string>",
"person_generation": "<string>",
"resolution": "<string>",
"sample_count": 123,
"seed": {}
}
'import requests
url = "https://api.myrouter.ai/v3/async/veo-3.0-generate-001-text2video"
payload = {
"prompt": "<string>",
"aspect_ratio": "<string>",
"duration_seconds": 123,
"enhance_prompt": True,
"generate_audio": True,
"negative_prompt": "<string>",
"person_generation": "<string>",
"resolution": "<string>",
"sample_count": 123,
"seed": {}
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
prompt: '<string>',
aspect_ratio: '<string>',
duration_seconds: 123,
enhance_prompt: true,
generate_audio: true,
negative_prompt: '<string>',
person_generation: '<string>',
resolution: '<string>',
sample_count: 123,
seed: {}
})
};
fetch('https://api.myrouter.ai/v3/async/veo-3.0-generate-001-text2video', 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.myrouter.ai/v3/async/veo-3.0-generate-001-text2video",
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>',
'aspect_ratio' => '<string>',
'duration_seconds' => 123,
'enhance_prompt' => true,
'generate_audio' => true,
'negative_prompt' => '<string>',
'person_generation' => '<string>',
'resolution' => '<string>',
'sample_count' => 123,
'seed' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.myrouter.ai/v3/async/veo-3.0-generate-001-text2video"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.myrouter.ai/v3/async/veo-3.0-generate-001-text2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.myrouter.ai/v3/async/veo-3.0-generate-001-text2video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Video
Veo 3.0 Text-to-Video
POST
/
v3
/
async
/
veo-3.0-generate-001-text2video
Veo 3.0 Text-to-Video
curl --request POST \
--url https://api.myrouter.ai/v3/async/veo-3.0-generate-001-text2video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"prompt": "<string>",
"aspect_ratio": "<string>",
"duration_seconds": 123,
"enhance_prompt": true,
"generate_audio": true,
"negative_prompt": "<string>",
"person_generation": "<string>",
"resolution": "<string>",
"sample_count": 123,
"seed": {}
}
'import requests
url = "https://api.myrouter.ai/v3/async/veo-3.0-generate-001-text2video"
payload = {
"prompt": "<string>",
"aspect_ratio": "<string>",
"duration_seconds": 123,
"enhance_prompt": True,
"generate_audio": True,
"negative_prompt": "<string>",
"person_generation": "<string>",
"resolution": "<string>",
"sample_count": 123,
"seed": {}
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
prompt: '<string>',
aspect_ratio: '<string>',
duration_seconds: 123,
enhance_prompt: true,
generate_audio: true,
negative_prompt: '<string>',
person_generation: '<string>',
resolution: '<string>',
sample_count: 123,
seed: {}
})
};
fetch('https://api.myrouter.ai/v3/async/veo-3.0-generate-001-text2video', 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.myrouter.ai/v3/async/veo-3.0-generate-001-text2video",
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>',
'aspect_ratio' => '<string>',
'duration_seconds' => 123,
'enhance_prompt' => true,
'generate_audio' => true,
'negative_prompt' => '<string>',
'person_generation' => '<string>',
'resolution' => '<string>',
'sample_count' => 123,
'seed' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.myrouter.ai/v3/async/veo-3.0-generate-001-text2video"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.myrouter.ai/v3/async/veo-3.0-generate-001-text2video")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.myrouter.ai/v3/async/veo-3.0-generate-001-text2video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"prompt\": \"<string>\",\n \"aspect_ratio\": \"<string>\",\n \"duration_seconds\": 123,\n \"enhance_prompt\": true,\n \"generate_audio\": true,\n \"negative_prompt\": \"<string>\",\n \"person_generation\": \"<string>\",\n \"resolution\": \"<string>\",\n \"sample_count\": 123,\n \"seed\": {}\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Generate high-quality video content from text descriptions using the Veo 3.0 video generation model. This API uses asynchronous processing and requires querying the final result via task_id.
Request Headers
string
required
Enum:
application/jsonstring
required
Bearer authentication format: Bearer {{API Key}}.
Request Body
string
required
A text string describing the video you want to generate.
string
Specifies the aspect ratio of the generated video.Enum:
16:9, 9:16. Default: 16:9.integer
The length of the video file you want to generate (in seconds).Enum:
4, 6, 8. Default: 8.boolean
Specifies whether to use Gemini to enhance your prompt.Default:
trueboolean
Specifies whether to generate audio for the video.
string
A text string describing content you want to prevent the model from generating.
string
Safety setting that controls whether person or face generation is allowed.Enum:
allow_adult(default): Only allows generating adultsdont_allow: Does not allow including people or faces in the image
string
Resolution of the generated video.Enum:
720p (default) or 1080pinteger
Number of videos to generate.Range: 1-4
uint32
A number used to initialize the random generation process. Using the same seed, prompt, and other parameters produces the same output video, making the generation process deterministic.Range: 0-4,294,967,295
Response
string
required
The task_id of the async task. Use the task_id to call the Get Async Task Result API to retrieve the generated result.