sora2 generate video v2
curl --request POST \
--url https://ai.pmock.com/api/ai/sa/video/generate/v2 \
--header 'Content-Type: application/json' \
--data '
{
"model": "sora-2",
"prompt": "<string>",
"images": [
"<string>"
],
"orientation": "landscape",
"size": "small",
"duration": 10,
"removeWatermark": false,
"styleId": "anime",
"storyboard": false
}
'import requests
url = "https://ai.pmock.com/api/ai/sa/video/generate/v2"
payload = {
"model": "sora-2",
"prompt": "<string>",
"images": ["<string>"],
"orientation": "landscape",
"size": "small",
"duration": 10,
"removeWatermark": False,
"styleId": "anime",
"storyboard": 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({
model: 'sora-2',
prompt: '<string>',
images: ['<string>'],
orientation: 'landscape',
size: 'small',
duration: 10,
removeWatermark: false,
styleId: 'anime',
storyboard: false
})
};
fetch('https://ai.pmock.com/api/ai/sa/video/generate/v2', 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/sa/video/generate/v2",
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([
'model' => 'sora-2',
'prompt' => '<string>',
'images' => [
'<string>'
],
'orientation' => 'landscape',
'size' => 'small',
'duration' => 10,
'removeWatermark' => false,
'styleId' => 'anime',
'storyboard' => 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/sa/video/generate/v2"
payload := strings.NewReader("{\n \"model\": \"sora-2\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"orientation\": \"landscape\",\n \"size\": \"small\",\n \"duration\": 10,\n \"removeWatermark\": false,\n \"styleId\": \"anime\",\n \"storyboard\": 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/sa/video/generate/v2")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"sora-2\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"orientation\": \"landscape\",\n \"size\": \"small\",\n \"duration\": 10,\n \"removeWatermark\": false,\n \"styleId\": \"anime\",\n \"storyboard\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.pmock.com/api/ai/sa/video/generate/v2")
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 \"model\": \"sora-2\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"orientation\": \"landscape\",\n \"size\": \"small\",\n \"duration\": 10,\n \"removeWatermark\": false,\n \"styleId\": \"anime\",\n \"storyboard\": false\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "<string>",
"data": {
"taskId": "<string>"
},
"traceId": "<string>"
}Sora2
sora2 generate video v2
create a task to generate video v2
POST
/
ai
/
sa
/
video
/
generate
/
v2
sora2 generate video v2
curl --request POST \
--url https://ai.pmock.com/api/ai/sa/video/generate/v2 \
--header 'Content-Type: application/json' \
--data '
{
"model": "sora-2",
"prompt": "<string>",
"images": [
"<string>"
],
"orientation": "landscape",
"size": "small",
"duration": 10,
"removeWatermark": false,
"styleId": "anime",
"storyboard": false
}
'import requests
url = "https://ai.pmock.com/api/ai/sa/video/generate/v2"
payload = {
"model": "sora-2",
"prompt": "<string>",
"images": ["<string>"],
"orientation": "landscape",
"size": "small",
"duration": 10,
"removeWatermark": False,
"styleId": "anime",
"storyboard": 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({
model: 'sora-2',
prompt: '<string>',
images: ['<string>'],
orientation: 'landscape',
size: 'small',
duration: 10,
removeWatermark: false,
styleId: 'anime',
storyboard: false
})
};
fetch('https://ai.pmock.com/api/ai/sa/video/generate/v2', 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/sa/video/generate/v2",
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([
'model' => 'sora-2',
'prompt' => '<string>',
'images' => [
'<string>'
],
'orientation' => 'landscape',
'size' => 'small',
'duration' => 10,
'removeWatermark' => false,
'styleId' => 'anime',
'storyboard' => 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/sa/video/generate/v2"
payload := strings.NewReader("{\n \"model\": \"sora-2\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"orientation\": \"landscape\",\n \"size\": \"small\",\n \"duration\": 10,\n \"removeWatermark\": false,\n \"styleId\": \"anime\",\n \"storyboard\": 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/sa/video/generate/v2")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"sora-2\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"orientation\": \"landscape\",\n \"size\": \"small\",\n \"duration\": 10,\n \"removeWatermark\": false,\n \"styleId\": \"anime\",\n \"storyboard\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ai.pmock.com/api/ai/sa/video/generate/v2")
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 \"model\": \"sora-2\",\n \"prompt\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"orientation\": \"landscape\",\n \"size\": \"small\",\n \"duration\": 10,\n \"removeWatermark\": false,\n \"styleId\": \"anime\",\n \"storyboard\": false\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "<string>",
"data": {
"taskId": "<string>"
},
"traceId": "<string>"
}Body
application/json
SA-Generate V2 video request parameters
Video generation model, default is sora-2
Available options:
sora-2 Minimum string length:
1Example:
"sora-2"
The prompt for generating videos, up to 5000 characters
Maximum string length:
5000The images used to generate videos can be URL arrays or empty, currently only supporting one image
Maximum array length:
1Direction of video generation, default landscape
Available options:
landscape, portrait Example:
"landscape"
Video generation size, default small, only sora-2-pro, size can be set large
Available options:
small, large Example:
"small"
The duration of video generation can only be 10 for sora-2, and 10, 15, 25 for sora-2-pro, with a default of 10
Available options:
10, 15, 25 Example:
10
Whether to remove watermark, default is false
style id for video generation,default is anime
Available options:
anime, selfie, golden, handheld, festive, retro, news, chaos, vintage, comic, kakalaka, sitcom Example:
"anime"
whether to enable storyboard mode, if true, the prompt will be parsed as storyboard format
