veo generate video
curl --request POST \
--url https://ai.pmock.com/api/ai/gi/video/generate \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"videoId": "<string>",
"imageList": [
"<string>"
],
"translation": false
}
'import requests
url = "https://ai.pmock.com/api/ai/gi/video/generate"
payload = {
"prompt": "<string>",
"videoId": "<string>",
"imageList": ["<string>"],
"translation": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
videoId: '<string>',
imageList: ['<string>'],
translation: false
})
};
fetch('https://ai.pmock.com/api/ai/gi/video/generate', 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://ai.pmock.com/api/ai/gi/video/generate",
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>',
'videoId' => '<string>',
'imageList' => [
'<string>'
],
'translation' => false
]),
CURLOPT_HTTPHEADER => [
"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://ai.pmock.com/api/ai/gi/video/generate"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"videoId\": \"<string>\",\n \"imageList\": [\n \"<string>\"\n ],\n \"translation\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
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://ai.pmock.com/api/ai/gi/video/generate")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"videoId\": \"<string>\",\n \"imageList\": [\n \"<string>\"\n ],\n \"translation\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.pmock.com/api/ai/gi/video/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"videoId\": \"<string>\",\n \"imageList\": [\n \"<string>\"\n ],\n \"translation\": false\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "<string>",
"data": {
"taskId": "<string>"
},
"traceId": "<string>"
}Gemini
veo generate video
create a task to generate video
POST
/
ai
/
gi
/
video
/
generate
veo generate video
curl --request POST \
--url https://ai.pmock.com/api/ai/gi/video/generate \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"videoId": "<string>",
"imageList": [
"<string>"
],
"translation": false
}
'import requests
url = "https://ai.pmock.com/api/ai/gi/video/generate"
payload = {
"prompt": "<string>",
"videoId": "<string>",
"imageList": ["<string>"],
"translation": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '<string>',
videoId: '<string>',
imageList: ['<string>'],
translation: false
})
};
fetch('https://ai.pmock.com/api/ai/gi/video/generate', 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://ai.pmock.com/api/ai/gi/video/generate",
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>',
'videoId' => '<string>',
'imageList' => [
'<string>'
],
'translation' => false
]),
CURLOPT_HTTPHEADER => [
"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://ai.pmock.com/api/ai/gi/video/generate"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"videoId\": \"<string>\",\n \"imageList\": [\n \"<string>\"\n ],\n \"translation\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
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://ai.pmock.com/api/ai/gi/video/generate")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"videoId\": \"<string>\",\n \"imageList\": [\n \"<string>\"\n ],\n \"translation\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.pmock.com/api/ai/gi/video/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"videoId\": \"<string>\",\n \"imageList\": [\n \"<string>\"\n ],\n \"translation\": false\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "<string>",
"data": {
"taskId": "<string>"
},
"traceId": "<string>"
}Body
application/json
Video generated prompt words, currently only supporting English explanations
Minimum string length:
1Video operation, one of the following: text2video, img2video, get1080p
Available options:
text2video, img2video, get1080p Minimum string length:
1If the model is veo31_fast_ingredients, an imageList (1-3 http (s) URLs) is required
Available options:
veo3_fast, veo2_fast, veo3_quality, veo2_quality, veo31_fast, veo31_quality, veo31_fast_ingredients Minimum string length:
1VideoId is only required when operating as GET1080P; Otherwise prohibited
ImageList is only required when operating as IMG2VIDEO (1-2 http (s) URLs); Otherwise, it must be omitted or an empty array []
Aspect ratio:16:9、9:16
Available options:
16:9, 9:16 Whether to enable automatic translation of prompt words, default value is false
